Live data from Hacker News

Writing Code Was Never the Bottleneck

ordep.dev

331–340 of 400 posts

Re: Writing Code Was Never the Bottleneck

#331

This reminds me of the quote by Robert C. Martin[1]: "the ratio of time spent reading [code] versus writing is well over 10 to 1". If programmers spend 90%+ of their time reading code rather than writing it, then LLM-generated code is optimizing only a small amount of the total work of programming. That seems to be similar to the point this blog is making. [1] https://www.goodreads.com/quotes/835238-indeed-the-ratio-…

No one is hiring though for reading code. I have read 10 million lines of code, roughly, I have written not one line.

Now I have produced a lot of programs, just by reading them.

People should also learn how to read programs. Most open source code is atrocious, corporate code is usually even worse, but not always.

As Donald Knuth once said, code is meant to be read. The time of literate programming is gonna come at some point, either in 100 years or in 3 years.

Re: Writing Code Was Never the Bottleneck

#332

Earlier quoted context omitted.

Would be interesting to look at the real world impact of the rise of outsourcing coding to the cheapest lowest skilled overseas body shop en mass, around the 2000s. Or the impact of trash version of commodified products flooding Amazon. The volume here is orders of magnitude greater, but that’s the closest example I can think of.

> Would be interesting to look at the real world impact of the rise of outsourcing coding to the cheapest lowest skilled overseas body shop en mass, around the 2000s. Tech exec here. It is all about gamed metrics. If the board-observed metric is mean salary per tech employee, you'll get masses of people hired in india. In our case, we hire thousands in India. Only about 20% are productive, but % productive isnt the m…

I'm a fractional RevOps consultant for a company for about 20 hours a week. They spend more for those 20 hours than they would if they filled the position full time, but they'd rather it this way because it shows up on a different line item and goes with their narrative of slashing headcount. Expect we'll see a lot more of this, particularly as everyone races to become the next "single-person unicorn startup."

Re: Writing Code Was Never the Bottleneck

#333

Earlier quoted context omitted.

>Even without LLMs, we were approaching a point of saturation where software development was bottlenecked by market demand and funding, not by a shortage of code I think it's credible to say that it was just market demand. Marc Andreessen's main complaint before the AI boom was that "there is more capital available than there are good ideas to fund". Personally, I think that's out of touch with reality, but he's the…

I think the "more capital than ideas" problem is highly contextual and largely a Silicon Valley-centric view. There is immense, unmet demand for good software in developing countries—for example, robust applications that work well on underpowered phones and low-bandwidth networks across Africa or Southeast Asia. These are real problems waiting for well-executed ideas. The issue isn't a lack of good ideas, but a VC ec…

Investors generally don't care about the actual utility of what gets built. They want a high return on investment.

Re: Writing Code Was Never the Bottleneck

#334

Wow a lot of the stories people are writing here are super depressing. If a junior developer is delivering you a pile of code that doesn’t work, hasn’t been manually tested and verified by them, hasn’t been carefully pared down to its essential parts, and doesn’t communicate anything about itself either through code style, comments or docs … then you are already working with an LLM ; it just so happens to be hosted i…

People think juniors submitting LLM-generated code to seniors to review is a sign of how bad LLM is. I see it as a sign of how bad juniors are, and the need of seniors interacting with LLM directly without the middlemen.

We're in an environment where management is demanding the staff use these tools. The junior staff is going to listen to the CEO.

Re: Writing Code Was Never the Bottleneck

#335
I've spent the last few weeks writing a non-trivial distributed system using Codex (OpenAI's agentic coding system). I started by writing a design brief, and iterated with o3 to refine it so it was more complete and less ambiguous. Then I asked it to write a spec of all the messages - didn't like its first attempt, but iterated on it til I did like it. Then got it to write a project plan, and iterated on that. Only then did I start on the code. The purpose of all this is to provide it some context.

It generated around 13K lines of Go for me in just over two weeks. I didn't previously speak Go, but its not hard to skimread to get the gist of its approach. I probably wrote about 100 lines, though I added and removed a lot of logging at various times to understand what was actually happening. I got it to write a lot of unit tests, so that coverage testing is very good. But I didn't actually pay a lot of attention to most of those tests on the first pass, because it generally got all the fine detail stuff exactly right on the first pass. So why all the tests? First, if something seems off, I have a place to start a deep dive. Second, it pins down the architecture so that functionality can't creep without me noticing that it is needing to change the unit tests.

Some observations.

- Coding this way is very effective - the new models almost never make fine detail mistakes. But I want to step it through chunks of new functionality at a size that I can at least skim and understand. So that 13K LoC is about 300 PRs. Otherwise I lose track of the big picture, and in this world, the big picture is my task.

- Normally the big design decisions are separated by days of fine detail coding. Using codex means I get to make all those decisions nearly back-to-back. This is both good and bad. The experience is quite intense - mostly I found the fine-detail coding to be "therapeutic", but I don't get that anymore. But not needing to pay attention to the fine detail (at least most of the time), means I think I have a better picture in my head of the overall code structure. We only have so much attention at any time, and if I don't have to hold the details, I can pay attention to the more important things.

- It's very good at writing integration tests quickly, so I write a lot more of them. These I do pay a lot of attention to. Its these tests that tell me if I got the design right, and if not, these are the place I start digging to understand what I need to change.

- Because it takes 10-30m to come back with a response, I try to keep it working on around three tasks at a time. That takes some effort, as it does require come context switching, and effort to give it tasks that won't result in large merge conflicts. If it was faster, I would not bother to set multiple tasks in parallel.

- Codex allows you to ask for multiple solutions. For simpler stuff, I've found asking for one is fine. For slightly more open questions, it's good to ask for multiple solutions, review them and decide which you prefer.

- Just prompting it with "find a bug and suggest a fix" every now and then often shows up real bugs. Mostly they tend to be some form if internal inconsistency, where I'd changed my mind about part of the code, and the something elsewhere needed to be changed to be consistent.

- I learned a lot about Go from it. If I'd been writing myself, my Go would have looked more like C++ which I'm very familiar with. But it wrote more idiomatic Go from the start, and I've learned along the way.

- Any stock algorithm stuff it will one-shot. "Load this set of network links, build a graph from them, run dijkstra over the graph from this node, and tell me the histogram of how many equal-cost shortest paths there are to every other node." That sort of stuff it will one-shot.

- It's much better than me about reasoning about concurrency. Though of course this is also one of Go's strengths.

Now I don't have any experience of how good it would be for maintaining a much larger codebase, but for this sort of scale of utility, I'm very impressed with how effective it has been.

Disclaimer: I work at OpenAI, but on networks, not AI.

Re: Writing Code Was Never the Bottleneck

#337
post #76

Earlier quoted context omitted.

I have a team that’s somewhat junior at a big company. We pretty much have everyone “vibe plan” significantly more than vibe code. - you need to think through the product more, really be sure it’s as clarified as it can be. Everyone has their own process, but it looks like rubber ducking, critiquing, breaking work into phases, those into tasks, etc. (jobs to be done, business requirement docs, domain driven design pl…

I pray for whoever has to review code you didn't bother writing

I think this is a good use of AI. Change your thinking - the code is, and has always been, a medium between the computer and the human. Where is the human? Where do we define our intent? AI gives us a chance to redefine that relationship or at least make it more fluid.

A well-architected system is easier to develop and easier to maintain. It makes sense to put all the human effort into producing that because, lo and behold, both humans and LLMs can produce much better results within a well-defined structure.

Re: Writing Code Was Never the Bottleneck

#338
post #79
post #53

Earlier quoted context omitted.

> - Many bugs were of a new kind (to me), the code would look like it does the right thing but actually not work at all, or just be much more broken than code with that level of "polish" would normally be. This reminded me of a quarter million dollar software project one of my employers had contracted to a team in a different country. On the face of it - especially if you go and check by the spec sheet - everything w…

I'm expecting to see so much more poor quality software being made. We're going to be swimming in an ocean of bad software. Good experienced devs will be able to make better software, but so many inexperienced devs will be regurgitating so much more lousy software at a pace never seen before, it's going to be overwhelming. Or as the original commenter described, they're already being overwhelmed.

> Good experienced devs will be able to make better software,

No, they won't. It's a race to the bottom.

I can take extra time to produce something that won't fall over on the first feature addition, that won't need to be rewritten with a new approach when the models get upgraded/changed/whatever and will reliably work for years with careful addition of new code.

I will get underbid by a viber who produced a turd in an afternoon, and has already spent the money from the project before the end of the week.

Re: Writing Code Was Never the Bottleneck

#339

Earlier quoted context omitted.

I think the recent post about the Cloudflare engineer who built an OAuth implementation, https://news.ycombinator.com/item?id=44159166 , shows otherwise (note the Cloudflare engineer, kentonv, comments a bunch in the discussion). The author, who is clearly an expert, said it took him days to complete what would have taken him weeks or months to write manually. I love that thread because it clearly shows both the bene…

There was also a review of that code about a week later [0] which highlights the problems with LLM-generated code. Even looking strictly at coding, the hard thing about programming is not writing the code. It is understanding the problem and figuring out an elegant and correct solution, and LLM can't replace that process. They can help with ideas though. [0] https://news.ycombinator.com/item?id=44215667

> There was also a review of that code about a week later [0] which highlights the problems with LLM-generated code.

Not really. This "review" was stretching to find things to criticize in the code, and exaggerated the issues he found. I responded to some of it: https://news.ycombinator.com/item?id=44217254

Unfortunately I think a lot of people commenting on this topic come in with a conclusion they want to reach. It's hard to find people who are objectively looking at the evidence and drawing conclusions with an open mind.

Re: Writing Code Was Never the Bottleneck

#340
post #284

Earlier quoted context omitted.

Code review has become the new bottleneck, since it’s the layer that prevents sloppy AI-generated code from entering the codebase. One thing I do that helps clean things up before I send a PR is writing a summary. You might consider encouraging your peers to do the same. ## What Changed? Functional Changes: - New service for importing data - New async job for dealing with z. Non-functional Changes: - Refactoring of C…

Ha. Almost always when I see PRs with such summaries I can assume that both the summary and the code has been AI-generated. PRs in general shouldn't require elaborate summaries. That's what commit messages are for. If the PR includes many commits where a summary might help, then that might be a sign that there should be multiple PRs.

1. about looking artificial.

Granted, it is not only summaries that go into the description—how to test, if there is any pre-deploy or post-deploy setup, any concerns, external documentation, etc.

Less is more. A summary serves to clarify, not to endlessly add useless information.

2. about the usefulness of summaries.

Summaries always provide better information—straight to the point—than commits (which are historical records). This applies to any type of information.

When you’re reporting a problem by going through historical facts, it can lead to multiple narratives, added complexity, and convoluted information.

Summaries that quickly deliver the key points clearly and focus only on what’s important offer a better way to communicate.

If the listener asks for details, they already have a clear idea of what to expect. A good summary is a good introduction to what you are going to see in the commits messages and in the code changes.

______________________

3.About multiple Prs.

Summary helps to clarify what is scope creep (be it a refactor or unrelated code to the ticket);

it make it easier for the reviewer demand a split in multiple PRs.

examples: A non-summary PR/MR might lead to the question—“WHY is this code here?"

"he touched a class here, was he fixing something that the test missed out ? or is just a refactor?"

_______________

As a reviewer you can get those information by yourself, although summary helps you to get it much quicker.

Post reply on HN