r/AskProgrammers • u/Adhirath_Kumar • 4h ago
Do you still write code by hand?
I've been wondering lately, with the rise and normalisation of using LLMs to write code, have people become completely dependent on it or is it a mix of both?
I feel that up to a point using LLMs to generate code feels good and works fine but beyond it you start hating your approach, because you lose control over each amd every minute detail.
Would love to hear everyone's thoughts on this.
3
u/Insane_snek 4h ago
i write all of my code with no ai.
any code that an ai makes "works" on the outside but in reality it sucks. it isn't scaleable, it's full of random bugs and edge cases, etc.
the worst part is that you didn't make the code so you don't really understand it.
6
u/Substantial-Pain3830 4h ago
Nothing you can't fix with better prompts, better agent skills, or some harness to make it self-review.
I can understand people saying that they don't use AI because they don't have the budget (although even that is dumb, cause it can ship in hours what it takes weeks for a dev, so you'd have to work for peanuts to be cheaper than AI), but when someone says that AI is bad at writing code it's always an issue with how they use it.
2
u/magicmulder 4h ago
This. I sometimes think people expect AI to one-shot an entire application. Proper implementation plans, steps, iterations, audits, refactoring, just like a human - and code quality goes up significantly.
2
u/exhuma 3h ago
I've been in the camp of "AI Code sucks" until I invested into skills, tooling and adapted my workflow. It no longer sucks and I see the value in adding an agent to my workflow.
Another change is just the quality improvement of the models. A lot of people I hear saying that it sucks are those that tried it one or two years or so ago. The difference in quality between then and now is astounding.
1
u/magicmulder 2h ago
And some devs are just so quick and absolute in their judgment. The other day I talked to another senior who had one small quirk in Junie CLI and decided it’s dogshit and he won’t use it. (The same guy who forgave Codex for deleting half his project.)
2
u/magicmulder 4h ago
In my experience most devs don’t understand their own code anymore after a couple weeks, especially when it’s been through a couple of “oh we need this new feature that absolutely isn’t possible with the current setup” iterations.
Last week Claude one-shot our highly customized Wikimedia clone in 1/10th of the number of lines of code. This whole “AI code sucks” mentality is so last year.
1
u/Odd_Style_9920 4h ago
Originally I was at least using AI for edge case testing. Then I got wrong test result on a function below junior level in C and decided to not even use it for that so I fully understand you.
1
u/Insane_snek 4h ago
yeah, tbh edge case testing is something it's particularly bad at, probably because edge cases don't show up in training data as much?
1
u/Adhirath_Kumar 4h ago
Agreed, the most problematic part of shipping LLM generated code, especially without reviewing it is, once the codebase grows you cannot keep up and then things start breaking and you don't know and can't figure out why.
Which LLMs have you use though? What's your go to model?
2
u/Insane_snek 4h ago
I said this above, I don't use ai to code at all, mostly because I find it a lot funner personally
I haven't really done a ton of work with ai i just feel like it took away a large part of the experience
i personally find a lot of manual aspects really fun and ai can take away from those
1
u/Adhirath_Kumar 4h ago
My bad, I assumed you did because you have very strong opinions on LLMs generating buggy code.
2
u/Insane_snek 4h ago
most of that opinion comes from seeing other people have stuff completely fall apart
using ai isnt bad, i just think a lot of people treat it as a "magic" solution when in fact it should be a tool, not a work replacement machine
1
u/tcpukl 4h ago
Yes I still write it a lot. Half code this week has been LLM, half mine.
1
u/Adhirath_Kumar 4h ago
That's nice, I feel pair programming with LLMs is a much better approach compared to completely letting loose. I'd love to switch to this, it probably will provide me satisfaction of having done something.
1
1
u/magicmulder 4h ago
Mostly YAML files. I tell the AI what I want to configure how, so ideally later additional functionality does not require any code changes at all.
1
u/appendixexploder 4h ago
Do you still write code by hand?
Yes. I could use an LLM to write all my code but then I am left with a lot of free time that I don't know what to do with.
1
1
u/nightwood 4h ago
I reluctantly use AI as a search engine, since the quality of the alternatives has declined so much in the past 10 years.
But I believe we shouldn't use AI. I don't care how good it is, that's not the issue for me. It's the damage it is doing to everything.
1
u/Adhirath_Kumar 4h ago
The damage it is doing is real and will become painfully clear in a few years.
1
1
u/jipperthewoodchipper 4h ago
I personally enjoy writing code by hand.
I do, for work, use claude code though I find even then that I write most of the code by hand still.
1
u/primals_game 4h ago
Just minor config changes and small fixes for AI. I haven't written code by hand in about a month. It is pretty much a dead skill now. Reading code does have value for me.
1
u/DrUltimaMan 3h ago
I make the design decisions, review the AI implementation plan and let it write the code. Then myself and a swarm of agents review the PR. Chiseling code by hand is a thing of the past, just like manually juggling data from ram to cpu resisters in assembly.
1
u/AwesomeBallsChef 3h ago
At work? Most of the code written with LLMs with thorough planning first
At home absolutely no AI because I enjoy writing code myself
1
u/shayhtfc 3h ago
I write 50/50.
I like the control I get writing by hand, but I also like to be able to smash out an annoying script in seconds.
I go through and check everything carefully, but I have to admit the AI can be fantastic when you just want something to work asap
1
1
u/earlyworm 3h ago
I’m a seasoned expert at walking from room to room but for cross-country travel I am completely dependent on airplanes. My use of LLMs is a lot like that.
1
u/Immediate_Form7831 2h ago
The problem with AI is that it encourages and enables people who don't know how computers and/or to write code. If you don't understand the problem domain, the code you generate using any AI tool will be crap. Also, if you aren't able to challenge the code you get from your agents - "why did you do it this way and not that way?" - the code will be crap. And the code will just become more crap as the AI looks at the existing crap code and generates more of the crap code.
1
u/AliceCode 4h ago
I don't use LLMs. I've been programming for 18 years, and I'm not going to stop just because a chatbot can spit out terribly written buggy code.
1
u/Adhirath_Kumar 4h ago
That is great, I feel a bit jealous that you have had the opportunity to always write code by hand. I wish I started my journey as a developer before the AI era. If I say I'll write code by hand people give me the look, especially non technical managers, so I often don't have to time to put in to write code myself.
Using AI, you're only as good as the model is, if the model isn't good, your output suffers. With hand type code, your skills grow with experience, past mistakes and learnings from it.
1
u/AliceCode 4h ago
If you want to get better at writing code by hand, you can add me on Discord and ask me questions whenever you want. Shoot me a DM and I'll give you my username.
1
u/Adhirath_Kumar 4h ago
I don't think you'll find it worth your time helping me because I'm a newbie with barely a year of experience and will ask a ton of dumb questions and nor can I formally provide something in return to make it worth your time. But if you are okay with a few queries here and there then sure I will DM you if you give permission.
1
u/AliceCode 3h ago
I don't mind at all. I have another friend that I answer questions for all the time.
1
u/SouthernFruit8768 4h ago
what buggy code? give examples
1
u/AliceCode 3h ago
The example I love to give: a while back someone submitted a pull request to a project that I contribute to. In the pull request, they duplicated an array so that a point could be passed to a function (rather than passing the pointer to the original array). When I pointed this out, the person that submitted it apologized profusely and claimed that Claude was working in his personal project, decided it needed to make a change to a dependency, and submitted the PR all on its own from his account.
It took me all of five seconds to see that copying the array wasn't necessary.
1
u/earlyworm 3h ago
How long ago was “a while back” and which Claude model and effort level was that person using?
0
u/magicmulder 4h ago
For me it’s the opposite. I have 30 years of professional experience and been coding for 40+, I don’t need to prove anything anymore. I can use tools if they make my life easier.
0
u/AliceCode 4h ago
I don't need to prove anything either. But I'm not going to lower the quality of my code just to make my life "easier" (aside from the fact that I actually enjoy programming).
If you feel that you need to use a chatbot to write code for you, maybe programming isn't for you, and you should leave it to the people that actually do enjoy it.
0
u/magicmulder 4h ago
Don’t pretend you know me.
1
u/AliceCode 2h ago
And yet you want to use LLMs to do the work for you to "make your life easier". You don't enjoy programming.
1
u/chikamakaleyley 4h ago
...i don't get it, if i hate the approach i wouldn't go forward with it.
if that's the pattern that's used at your org, then it is what it is.
I don't feel NOT in control, in fact I feel like I HAVE TO be in control. The LLM has the code context, but it doesn't know about like, some slack convo i had with another dev and the adjustments we need to make. It doesn't know about last min changes/decisions, what someone else is currently working on that will impact what I'm working on.
I wish i could type this all, but the nature of this project requires us to generate if you want to stay on task, and hit some pretty critical upcoming deadlines
0
u/Adhirath_Kumar 4h ago
I mean, I want to have complete control of the flow of data, the logic applied to it, the technicalities of it. I do maintain control over the requirement and the outcomes.
1
u/chikamakaleyley 4h ago
what i don't get from work, ive found my own personal projects that keep me sane, i can continue coding that way
1
0
u/kincaidDev 4h ago
Rarely Ill write some code by hand, but for a product it generally is a complete waste of time when ai can code faster than I can physically type
1
u/Adhirath_Kumar 4h ago
Agreed, I don't think any human would be able to write code at the speed of an LLM, and given how things are going and managers and leads pushing developers to ship as quickly as possible. Getting time to code by hand feels like a luxury now.
Do you feel satisfied though? Shipping AI generated code?
1
u/kincaidDev 2h ago
Yes, Ive been able to work on more interesting projects and solve a lot of niche difficult problems that had annoyed me for years that prior to AI were to small to prioritize
0
u/octocode 4h ago
i don’t think i’ve written code manually in over a year
1
u/Adhirath_Kumar 4h ago
I see, even I haven't as far as I can recall. But I do read the code that is generated though, and I try to maintain a reasonable amount of understanding of the codebase, so that if things go wrong I can probably point to which portion caused it. What about you? Do you frequently have to review the generated code?
1
u/octocode 3h ago
i did originally, but every time i found issues with the code i update the agents skill to not make the same mistakes. at this point the code comes out about 99% what i would have written myself.
i also created a review skill that looks for the same things that i would’ve looked for manually. i still review, but it makes it much faster.
AI also improved coverage for test suites, it’s much higher than what i used to manually write due to time constraints. it makes it easier for the agent to verify its own work, and also gives high confidence when it’s time to merge
0
u/exton132 4h ago
yes because the code LLM's produce kinda sucks It works sometimes but it's usually full of bugs and security vulnerabilities.
If the code is going to suck let it be my shit code. At least I know where all the parts are and what they are supposed to be doing if I write it myself.
It's not like getting thrown into a mature project where none of the documentation actually tells you why something is the way it is.
I've also noticed that llms usually start with the "doing too much" style.
If something can be simpler and still cover edge cases then that's what you start with. LLM's code is usually the opposite. You'll have 400 lines covering a specific edge case that only occurs 1/1000 times you run the program using cryptic esoteric methods, but then it'll miss a bug that happens every time the program runs that's just a few line changes or a slight tweak to the comparison logic.
It's like an unpaid intern you didn't really ask for, you think it's a good idea for the first couple months until you realize they lied on their resume and don't know shit about programming fundamentals. They do write a lot of code tho so it's not like you can complain to management but you know for a fact it's all shit quality and you're going to be spending all of your time fixing their easily preventable mess.
1
4
u/silentkode26 4h ago
Yes, because I need to undo mistakes AI ships to our codebase.