←back to thread

-2000 Lines of code

(www.folklore.org)
502 points xeonmc | 1 comments | | HN request time: 0s | source
Show context
daitangio ◴[] No.44381563[source]
Software metric are hard, indeed :) Be prepared in a ai-code world when more code does not mean better code.
replies(2): >>44381664 #>>44381673 #
bunderbunder ◴[] No.44381664[source]
I've been watching my colleagues' adoption of Copilot with interest. From what I can tell, the people who are the most convinced that it improves their productivity have an understanding of developer productivity that is very much in line with that of the managers in this story.

Recently I refactored about 8,000 lines of vibe-coded bloat down into about 40 lines that ran ten times as fast, required 1/20 as much memory, and eliminated both the defect I was tasked with resolving and several others that I found along the way. (Tangentially, LLM-generated unit tests never cease to amaze me.) The PHBs didn't particularly appreciate my efforts, either. We've got a very expensive Copilot Enterprise license to continue justifying.

replies(6): >>44381723 #>>44381759 #>>44381879 #>>44382024 #>>44382066 #>>44382304 #
2muchcoffeeman ◴[] No.44382066[source]
I don’t believe your numbers unless your colleagues are exceptionally bad programmers.

I’m using AI a lot too. I don’t accept all the changes if they look bad. I also keep things concise. I’ve never seen it generate something so bad I could delete 99 percent of it.

replies(3): >>44382148 #>>44382164 #>>44388864 #
1. akavi ◴[] No.44382164[source]
I've never seen 8000 -> 40, but I have done ~10 kLoC -> ~600.

Aggggressively "You can write Java in any language" style JavaScript (`Factory`, `Strategy`, etc) plus a whole mini state machine framework that was replaceable with judicious use of iterators.

(This was at Google, and I suspected it was a promo project gone metastatic.)