• al_borland a day 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.

    • swah 13 hours 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 7 hours 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 21 hours ago

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

        • talldayo a day 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 21 hours 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 12 hours 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.