by zerof1l · 4mo ago · 0 comments
AI has a tendency to generate more code than necessary. It keeps re-inventing things, and every time you ask it to add a new feature or fix something, it just keeps on piling the code. I now periodically ask AI to refactor the code by simplifying, removing unused things, factoring out, and reusing.
My wife does exactly that. For the exercise. She makes large detours to go anywhere. The end result is a healthier body.
How this translates to software, I don't know. I don't think AI benefits from this exercise.
The case is different with LoC though: the more the worse. I'd much maintain the thing written in 500 lines than the one written in 10,000 lines.