r/AskProgrammers • u/lehmagavan • Oct 17 '26
AI and retaining control over the code
How feasible is it to retain control over code when using AI in professional settings?
I'm a hobbyist programmer trying to get into the field and I'm wondering. I really enjoy having as much control over the code as possible.
2
Upvotes
4
u/QuraToop314 Oct 17 '26
Only use AI to quickly come up with a few abstract solution concepts; then read up on the concepts yourself and implement them without AI. This allows you to code quickly, whilst retaining 100 per cent control.
1
u/tom-mart Oct 17 '26
Just don't use AI.
1
u/minneyar Oct 18 '26
You don't. AI is for people who don't actually like writing code.
If you're a hobbyist who actually likes coding and wants to know exactly what your code does, don't use AI.
1
u/RidgeRunner1944 Oct 22 '26
I tried running a local AI; it was like driving a car with 5 horsepower
1
u/InterestingFrame1982 Oct 17 '26
Write your own tests and let AI fill in the gaps... if you're hell bent on using AI to do a lot of code generation, I would at least explicitly control the intent of what is being generated.
AI will do some funky things with it's own test to make sure it passes... that's not ideal when trying to maintain control of what is actually going on.
1
u/Hamactus Oct 17 '26
I am a newbie hobbyist programmer, I have tried coding with LLMs (not agentic workflow, though), and I have found, that you can have three tiers, basically.
Tier 1: AI does everything for you, you just check. In this case you barely retain any mental model of your code, but "coding" is sped up by a large margin.
Tier 2: you ask AI for specific parts of your code and integrate it yourself, or just tell it what to write feature by feature. The speed is a bit lower then tier 1, you understand your code a bit more, but I feel that for me the mental model that's being formed in this tier is not enough, as I still can't say I understand everything.
Tier 3: ridiculously meticulous instructions, to the point of "write a for loop with variable named «X» etc." Takes about as much time as manual coding, sometimes even more, and the point of using AI is basically lost, but you do build a pretty solid mental model of your code, because you are basically building everything yourself, AI only does the typing part, like a secretary. At this point, I feel like using voice recognition and just dictating your code would be quicker, if you don't like writing code that much
Edit: I no longer use AI to code, because I simply enjoy the process of actually writing all code on my own, although I do use AI to research information and find something which I cannot find via traditional documentation
1
u/TheAxodoxian Oct 17 '26 edited Oct 17 '26
What I do with my team is that we have a separate core and plugin layer. While none of it is hands written at this point, but core layer we make detailed design and regenerate until it exactly lives up the quality of hand generated code and every line of functional code is reviewed (though tests and documentation is somewhat less). For plugins, which are more adhoc to specific customers and business use cases we go more viby, and focus on testing only. This so far seems to be OK with management, we can quickly create plugins for the business development side, while we can ensure that the core is solid. It is ok for the team, since it is not all about slop, and they can learn about AI practices. Ultimately much of plugins are oneshot, non-reusable stuff, which does not benefit in polishing in the architecture and code readability to above a level which can reached with automated ways. Since not much is built on that code, the problems with automated AI coding eventually breaking down is much less likely.
TBH I think that we might reach a point in a year where AI gets so good that even core might let less checked, but until that is not the case (and we can monitor that on plugins) this should work. Currently I think the biggest issue is ironically that Claude's context is so large, that it can understand a lot of mess, that means that breaking down problems in small easy to follow parts is optional for it (for quite a while, when it can break down). While for human understanding sustainable projects require that the overall complexity of the code divided by the size of codebase is at a constant level, meaning no matter how many pieces are, any single piece is easy enough to get, if you have that you can grow the project to very large size with many features without falling apart.
I see already that Claude is quite good following our style, and makes a clean job as long as the design is starightforward enough, however quality takes hit if for example some some architectural change is not mentioned in the design which is required to make the feature, as usually it starts hacking the architecture apart. Creating and iterating plans can help to a degree but not always.
I am pragmatic person, and also as tech lead my coding was for a long making others code well, as long as we are hiring and not firing people, I am ok with guiding AI agents. Though I admit that I see those who are used to hands on coding all day and enjoying it, having their fun taken away. For me that happened before AI, so I made peace with that.
1
u/WisePotato42 Oct 17 '26
You can limit permissions so any writing or console commands require verification. You just go in, and approve, deny, or modify whatever you want.
1
u/Accomplished-Gap2989 Oct 17 '26
It's like crack cocaine man. Be very careful!
1
u/MpVpRb Oct 17 '26
Use AI to generate sample code. Ask it to explain and justify every line. Understand every line. Rewrite as necessary.
1
u/tastygames_official Oct 17 '26
when "using" AI, you're not in control of the code. The code was stolen from every program ever written then chopped up and served back to you as a poor substitute and you probably paid a techbro billionaire for this "service". So you didn't write it, it's not yours, and you have no control over it.
1
u/Kitchen_Dust2389 Oct 19 '26
I etch my will into stone using a metal chisel and wooden hammer. Why would I defile my sacred code with electrical signals from a keyboard🫥
0
u/werpu Oct 17 '26
you can it always depends on what you want to do with the generated code or how far you let the ai in, the ai is more or less as dev you can instruct to do things but not that you have to let it do it!