Hacker News new | ask | show | jobs
by zerof1l 22 days ago
Measuring success in LoC is so wrong… It's like bragging that you took 10,000 steps to reach the store by walking in circles when you could have taken 500 steps if you just walked straight. The end result is the same.

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.

3 comments

> It's like bragging that you took 10,000 steps to reach the store by walking in circles when you could have taken 500 steps if you just walked straight.

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.

People like using the "AI is like bringing a forklift to the gym" metaphor. I suppose for the shopping one it's using a SUV to make the 500m trip.
Using an SUV to make a 500m trip and then bragging about how you now drive 37 kilometers per day.
> It's like bragging that you took 10,000 steps to reach the store by walking in circles when you could have taken 500 steps if you just walked straight. The end result is the same.

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.

IOW, you're doing an insane amount of micromanagement with a most inexperienced beginner developer.