9 comments

  • thelostdragon 8 hours ago ago

    Recently read a [similar article][1] and I couldn't agree more.

    Essentially, you need to stringent the code review and testing processes. You cannot have AI doing code generation and code review and/or testing together. Either you have code generated by AI, and have Humans review and test the code, or have humans write the code and AI supporting with code review and/or testing the code. Never both.

    I find the second approach better - AI supporting with testing and code review processes. Code generation is still Developer's domain and I don't see AI writing Production level code anytime soon. Developers can use AI to generate snippets of code which is then adjusted to make it production ready. That is probably best of both worlds at the moment.

      [1]: https://rdel.substack.com/p/rdel-57-what-are-the-most-common
  • al_borland 2 days ago ago

    > It's also hard to tell them not to use AI because the code does work.

    If they are still looking to have humans maintain the code, and hire people to optimize it, the at use case needs to be taken into account. From that perspective, I would argue that it doesn’t work.

    You could/should charge a higher rate for companies that have a bigger mess to clean up. A cleaning crew is going to charge more to clean up a hoard than to do some light cleaning and re-organizing. The price reflects the effort involved, and I don’t see this as any different. They can choose to pay to write clean code up front, or pay for it later with difficult or impossible maintenance. The choice is theirs.

    Personally, everyone on my team hates AI and it’s rarely used. I probably use it the most, which is maybe 4 or 5 times a month to write a single line here or there, mostly to save me a search for syntax.

  • moomoo11 2 hours ago ago

    I just hope it leads to non-technical people not meddling in or starting tech startups where they have no f'ing idea what they're talking about or doing.

    Stick to the scams and whatever else, or go work at a PE firm.

    Source: my experience working with such types.

  • swah a day ago ago

    I don't have this problem, but Cursor was an excellent companion yesterday while I was scripting in Python. It was always ready with function suggestions—sometimes just typing the function name and hitting tab twice. Other times, I used cmd+k for descriptions. What worries me is that writing functions is easy, but keeping everything in my head to write more functions later, especially after 20 days, is challenging.

    (When I tried with Zig it was a disaster..)

    • agarren a day ago ago

      Software is hard. AI can radically simplify this by writing the code for you, but that comes at a cost. If you don’t understand what was written, or you only understand it at a superficial level, maintenance is going to be a nightmare. It isn’t uncommon to come back to code you wrote yourself, say, 20 days ago, and need to reacquaint yourself. Extend that to AI.

      I’d argue that relying on a tool like cursor to bang out whole routines and types, just using it as “advanced intellisense”, takes away from you truly understanding the solution you’re putting together. It’s fantastic if they make you more productive in the short term, but in the long term, if the generated code is convoluted, difficult to revisit, that’s where you (or a future maintainer like OP) are going to kill time.

  • anonzzzies 2 days ago ago

    This will get much, much worse. Better strap in.

  • talldayo 2 days ago ago

    > So how are you all handling this problem?

    Increasing my per-hour rate until I'm comfortable spending hundreds of hours unspaghettifying code.

    • anonzzzies 2 days ago ago

      That is the right answer. I usually charge 2-5k euros to take a quick look and then, depending on what I find, I will charge 200-500 euros/hr to start working. Currently, human written code, mostly older php will demand the highest rate; asp/vba does a good job as well at being terribly written. Overarchitected things are usually in java/c# which I find annoying but not as hard; cobol, fortran and c/c++ are usually ok. Other things we don't really encounter besides a lot of scripts in bash and perl and tcl: usually fine ( mostly don't touch them as they work ).

  • mergisi a day ago ago

    Dealing with AI-generated code complexity is a common challenge. AI tools can quickly produce functional code, but often at the cost of readability and maintainability due to excessive abstractions and indirection. One effective approach is to establish strict coding standards and incorporate thorough code reviews to simplify and optimize the generated code.

    As the founder of AI2sql, I’ve found that balancing AI assistance with human oversight is crucial. By setting clear guidelines and regularly refactoring the code, it's possible to harness the speed of AI while maintaining a clean and manageable codebase.