Live data from Hacker News

Survey: a third of senior developers say over half their code is AI-generated

fastly.com

231–240 of 388 posts

Re: Survey: a third of senior developers say over half their code is AI-generated

#231

Earlier quoted context omitted.

> So you get both the wonderful views (building the house or delivering the software) but also you get improved health (keeping your mind trained on both high level thinking and low level implementation vs high level only). The vast majority of developers aren't summitting beautiful mountains of code, but are instead are sifting through endless corporate slop. > We might say that using a hammer constantly will develo…

> The vast majority of developers aren't summitting beautiful mountains I'm not sure you're approaching this metaphor the right away. The point is that coding manually is great cognitive exercise which keeps the mind sharp for doing the beautiful stuff. > The trades destroy human bodies over time and leads to awful health outcomes. Again, you're maybe being too literal and missing the point. No one is destroying thei…

> I'm not sure you're approaching this metaphor the right away. The point is that coding manually is great cognitive exercise which keeps the mind sharp for doing the beautiful stuff.

No, I'm challenging the metaphor. Working the trades isn't exercise - it's a grind that wears people out.

> Again, you're maybe being too literal and missing the point. No one is destroying their minds by coding. Exercise is good.

We actually have good evidence that the effects of heavy cognitive load are detrimental to both the brain and mental health. We know that overwork and stress are extremely damaging to both.

So reducing cognitive load in the workplace is an unambiguous good, and protects the brain and mind for the important parts of life, which are not in front of a screen.

Re: Survey: a third of senior developers say over half their code is AI-generated

#232

Earlier quoted context omitted.

Yeah I’m still not more productive. Maybe 10% more. But it alleviates a lot of mental energy, which is very nice at the age of 40.

For all the folks on the "reduce mental burden", "reduce cognitive load" train, are you all aware that this basically means you are exercising less your brain day in and day out, and in the end you will forget how to do things? You will learn how to guide an AI agent, but until the day an AI agent is perfect (and we don't know if we will ever see that day), you are just losing inch by inch your ability to actually un…

My current pattern is to manually craft during the first half of the day when I enjoy that, and during the second half when I'd be normally burnt on hard thought and not quite up for another coffee, pomodoro, theanine deep dive, I can start tackling tests, exploratory data analysis, or small bugs, and these tasks are 50% or more LLM.

So yeah, 30%-50% seems right, but it's not like I lost any part of my job that I love.

Re: Survey: a third of senior developers say over half their code is AI-generated

#233

Seems about right for me (older developer at a big tech company). But we need to define what it means that the code is AI-generated. In my case, I typically know how I want the code to look like, and I'm writing a prompt to tell the agent to do it. The AI doesn't solve any problem, it just does the typing and helps with syntax. I'm not even sure I'm ultimately more productive.

Yeah I’m still not more productive. Maybe 10% more. But it alleviates a lot of mental energy, which is very nice at the age of 40.

Do you feel like you lack mental energy at 40? I do not feel any different from 30. I think the main difference between 30 and 40 is I am much more efficient at doing things and therefore am able to do more.

Re: Survey: a third of senior developers say over half their code is AI-generated

#234
post #208

In terms of LOCs maybe, in terms of importance I think is much less. At least that's how I use LLMs. While I understand that might produce the meaty bits as well, I believe that having a truck factor of basically 0 (since no-one REALLY understands the code) is a recipe for a disaster and I dare say long term maintainability of a code base. I feel that you need to have someone in any team that needs to have that level…

> test fixtures I'm curious- how does the AI know what you want?

I use CodeCompanion on neovim. My workflow for text fixtures is basically:

""" Given these files: file1, file2, ... (these are pulled entirely into the LLM context)

Create a test fixture by creating a type that implements the trait A and should use an in memory SQLite DB, another one that implements Trait B, ...

"""

Of course there is a bit of back and forth, but I find that using Interfaces/Traits/ABCs extensively makes LLMs perform better at these tasks (but I believe it is a nice side-effect of having more testable code to begin with).

However, wiring with IoC frameworks are a bit of a hit and miss to be honest so often I still have to do these parts manually.

Re: Survey: a third of senior developers say over half their code is AI-generated

#235

Seems about right for me (older developer at a big tech company). But we need to define what it means that the code is AI-generated. In my case, I typically know how I want the code to look like, and I'm writing a prompt to tell the agent to do it. The AI doesn't solve any problem, it just does the typing and helps with syntax. I'm not even sure I'm ultimately more productive.

Yeah I’m still not more productive. Maybe 10% more. But it alleviates a lot of mental energy, which is very nice at the age of 40.

I am pleasantly surprised when it is able to figure out the root cause of some bugs which at times require a lot of mental energy

Re: Survey: a third of senior developers say over half their code is AI-generated

#236

Earlier quoted context omitted.

This, to me, feels like you're complaining to the 45 year old builder that they should be using a hammer instead of a nail gun. I know how to nail a nail, I've nailed so many nails that I can't remember them all. My job is to build a house efficiently, not nail nails. Anything that can make me more efficient at it is a net positive. Now I've saved 2 hours in the framing process by using a nail gun, I have 2 extra hou…

IMO it's different. That's why I brought the e-bike similitude: climbing even mild mountains or hills with your own legs will actually make your legs, heart and lungs stronger in the process. So you get both the wonderful views (building the house or delivering the software) but also you get improved health (keeping your mind trained on both high level thinking and low level implementation vs high level only). We mig…

Ironically, e-bikes, at least in the EU, are having the exact opposite effect. More people that don't normally ride bikes are using e-bikes to get about. The motor functions not as a replacement, but as a force multiplier. It also makes "experimenting" easier, because the motor can make up for any mistakes or wrong turns.

Caveat: In the EU, an e-bike REQUIRES some physical effort any time for the motor to run. Throttles are illegal.

Re: Survey: a third of senior developers say over half their code is AI-generated

#237
post #94

Earlier quoted context omitted.

I didn't see much mention of tab-completions in the survey and comments here. To me that's the ultimate coding AI is doing at my end, even though it seems to pass unnoticed nowadays. It's massive LOC (and comments!), and that's were I find AI immensely productive.

Don't you have to keep dismissing incorrect auto-complete? For me I have a particular idea in mind, and I find auto-complete to be incredibly annoying. It breaks flow. It has no idea my intention, but very eagerly provides suggestions I have to stop and swat away.

My experience with Supermaven has been close to perfect. Imho, the smaller the suggestion, the better it generally is. 99% of supermaven suggestions are just one line.

Re: Survey: a third of senior developers say over half their code is AI-generated

#238
post #217

I think I'm using it wrong. I'm using Zed as my editor, and maybe 18 months ago I upgraded my system. I didn't miss the AI autocomplete at the time, so I didn't bother to set it up again. However, around two weeks ago I figured I'd give it another go. I set up GitHub Copilot in Zed and... it's horrible. It seems like most of its suggestions are completely misguided and incorrect, usually just duplicating the code imm…

I've used the 200 bucks Claude Code account, and while that's pretty great, it's definitely not "fire and forget". It often requires a completely different skill set. You basically need to develop a feeling for what the agent can do automatically and what needs extra prompting.

If you want a perfect investment imho, get Supermaven. It's autocomplete is 99% perfect.

Re: Survey: a third of senior developers say over half their code is AI-generated

#239
post #68

Earlier quoted context omitted.

Neither are you if that's your understanding of a senior engineer

I think the parent commentors point was that it is nearly trivial to generate variations on unit tests in most (if not all) unit test frameworks. For example: Java: https://docs.parasoft.com/display/JTEST20232/Creating+a+Para... C# (nunit, but xunit has this too): https://docs.nunit.org/articles/nunit/technical-notes/usage/... Python: https://docs.pytest.org/en/stable/example/parametrize.html cpp: https://google.gith…

99% of the work in testing is coming up with test scenarios and test cases. 95% of the code is just dealing with setting up input and output data, 4% is calling the code you want to test and the final assert is often just a single line of code.

I'm not sure what depth of experience has to do with any of this, since it is busy work that costs a lot of time. A form with 120 fields is a form with 120 fields. There is no way around coming up with the several dozens of test cases that you're going to test without filling out almost all of the fields, even the ones that are not relevant to the test itself, otherwise you're not really testing your application.

Re: Survey: a third of senior developers say over half their code is AI-generated

#240
post #132

Earlier quoted context omitted.

If you want to discount a tool that may save you an immense amount of time because you might have to help it along the fast few feet, thats up to you. If you can share a tool that can analyze a function and create a test for all corner cases in a popular language, I'm sure some people would be interested in that.

You should look up intellitest and reshaper test generator. Products exist for this.

Maybe you should have brought that up earlier instead of acting smug and burying the lede? It's also pretty telling that you didn't elaborate this further and kept your comment short.

What you should have said is that some parameterized test generators do automated white box testing where they look at your code similar to a fuzzer and try to find the test cases automatically. Your first link is literally just setting up an array with test cases, which basically means you'd have to use an LLM to quickly produce the test cases anyway, which makes parameterized testing sound exceedingly pathetic.

https://learn.microsoft.com/en-us/visualstudio/test/generate...

>IntelliTest explores your .NET code to generate test data and a suite of unit tests. For every statement in the code, a test input is generated that will execute that statement. A case analysis is performed for every conditional branch in the code. For example, if statements, assertions, and all operations that can throw exceptions are analyzed. This analysis is used to generate test data for a parameterized unit test for each of your methods, creating unit tests with high code coverage. Think of it as smart fuzz testing that trims down the inputs and test cases to what executes all your logic branches and checks for exceptions.

Post reply on HN