logoalt Hacker News

johnfnlast Wednesday at 7:14 PM5 repliesview on HN

I only write around 5% of the code I ship, maybe less. For some reason when I make this statement a lot of people sweep in to tell me I am an idiot or lying, but I really have no reason to lie (and I don't think I'm an idiot!). I have 10+ years of experience as an SWE, I work at a Series C startup in SF, and we do XXMM ARR. I do thoroughly audit all the code that AI writes, and often go through multiple iterations, so it's a bit of a more complex picture, but if you were to simply say "a developer is not writing the code", it would be an accurate statement.

Though I do think "advanced software team" is kind of an absurd phrase, and I don't think there is any correlation with how "advanced" the software you build is and how much you need AI. In fact, there's probably an anti-correlation: I think that I get such great use out of AI primarily because we don't need to write particularly difficult code, but we do need to write a lot of it. I spend a lot of time in React, which AI is very well-suited to.

EDIT: I'd love to hear from people who disagree with me or think I am off-base somehow about which particular part of my comment (or follow-up comment https://news.ycombinator.com/item?id=46222640) seems wrong. I'm particularly curious why when I say I use Rust and code faster everyone is fine with that, but saying that I use AI and code faster is an extremely contentious statement.


Replies

MontyCarloHalllast Wednesday at 7:25 PM

>I only write around 5% of the code I ship, maybe less.

>I do thoroughly audit all the code that AI writes, and often go through multiple iterations

Does this actually save you time versus writing most of the code yourself? In general, it's a lot harder to read and grok code than to write it [0, 1, 2, 3]. For me, one of the biggest skills for using AI to efficiently write code is a) chunking the task into increments that are both small enough for me to easily grok the AI-generated code and also aligned enough to the AI's training data for its output to be ~100% correct, b) correctly predicting ahead of time whether reviewing/correcting the output for each increment will take longer than just doing it myself, and c) ensuring that the overhead of a) and b) doesn't exceed just doing it myself.

[0] https://mattrickard.com/its-hard-to-read-code-than-write-it

[1] https://www.joelonsoftware.com/2000/04/06/things-you-should-...

[2] https://trishagee.com/presentations/reading_code/

[3] https://idiallo.com/blog/writing-code-is-easy-reading-is-har...

show 2 replies
3rodentslast Wednesday at 7:38 PM

I regularly try to use various AI tools and I can imagine it is very easy for it to produce 95% of your code. I can also imagine you have 90% more code than you would have had you written it yourself. That’s not necessarily a bad thing, code is a means to an end, and if your business is happy with the outcomes, great, but I’m not sure percentages of code are particularly meaningful.

Every time I try to use AI it produces endless code that I would never have written. I’ve tried updating my instructions to use established dependencies when possible but it seems completely averse.

An argument could be made that a million lines isn’t a problem now that these machines can consume and keep all the context in memory — maybe machines producing concise code is asking for faster horses.

foobarianlast Wednesday at 11:29 PM

I'm on track to finish my current gig having written negative lines of code. It's amazing how much legacy garbage long running codebases can accumulate, and it's equally amazing how much it can slow down development (and, conversely, how much faster development can become if legacy functionality is deleted).

show 1 reply
ipdashclast Thursday at 4:55 AM

> I'm particularly curious why when I say I use Rust and code faster everyone is fine with that, but saying that I use AI and code faster is an extremely contentious statement.

This hits the nail on the head, IMO. I haven't seen any of the replies address this yet, unless I missed one.

I don't even like AI per se, but many of the replies to this comment (and to this sentiment in general) are ridiculous. Ignoring the ones that are just insulting your work even though you admitted off the bat you're not an "advanced" programmer... There are obviously flaws with AI coding (maintainability, subtle bugs, skill atrophy, electricity usage, etc). But why do we all spring immediately to this gaslighting-esque "no, your personal experience is actually wrong, you imagined it all?" Come on guys, we should be better than that.