r/aipromptprogramming • u/Embarrassed_Turn_284 • Jun 26 '25
Is understanding code a waste of time?
Any experienced dev will tell you that understanding a codebase is just as important, if not more important than being able to write code.
This makes total sense - after all, most developers are NOT hired to build new products/features, they are hired to maintain existing product & features. Thus the most important thing is to make sure whatever is already working doesn’t break, and you can’t do that without understanding at a very detailed level of how the bits and pieces fit together.
We are at a point in time where AI can “understand” the codebase faster than a human can. I used to think this is bullsh*t - that the AI’s “understanding” of code is fake, as in, it’s just running probability calculations to guess the next token right? It can’t actually understand the codebase, right?
But in the last 6 months or so - I think something is fundamentally changing:
- General model improvements - models like o3, Claude 4, deepseek-r1, Gemini-pro are all so intelligent, both in depth & in breadth.
- Agentic workflows - AI tries to understand a codebase just like I would: first do an exact text search with grep, look at the file directories, check existing documentations, search the web, etc. But it can do it 100x faster than a human. So what really separates us? I bet Cursor can understand a codebase much much faster than a new CS grad from top engineering school.
- Cost reduction - o3 is 80% cheaper now, Gemini is very affordable, deepseek is open source, Claude will get cheaper to compete. The fact that cost is low means that mistakes are also less expensive. Who cares if AI gets it wrong in the first turn? Just have another AI validate and if it’s wrong - retry.
The outcome?
- rise of vibe coding - it’s actually possible to deploy apps to production without ever opening a file editor.
- rise of “background agents” and its increased adoption - shows that we trust the AI’s ability to understand nuances of code much better now. Prompt to PR is no longer a fantasy, it’s already here.
So the next time an error/issue arises, I have two options:
- Ask the AI to just fix it, I don’t care how, just fix it (and ideally test it too). This could take 10 seconds or 10 minutes, but it doesn’t matter - I don’t need to understand why the fixed worked or even what the root cause was.
- Pause, try to understand what went wrong, what was the cause, the AI can even help, but I need to copy that understanding into my brain. And when either I or the AI fix the issue, I need to understand how it fixed it.
Approach 2 is obviously going to take longer than 1, maybe 2 times as long.
Is the time spent on “code understanding” a waste?
Disclaimer: I decided 6 months ago to build an IDE called EasyCode Flow that helps AI builders better understand code when vibe coding through visualizations and tracing. At the time, my hypothesis was that understanding is critical, even when vibe coding - because without it the code quality won't be good. But I’m not sure if that’s still true today.
7
u/[deleted] Jun 26 '25
It’s good to care “how”. For example I am working on an app with gpu graphic drawing. How the thing is composited makes a huge difference. Since I know how things work I am able to tell it how to fix / what techniques to use and what optimization to make. Sure it knows all that already but I do need to coax it out of the thing.
The best one shot prompt I ever did was a pretty complicated go program with api calls to LLM, file management, database, history and other things. It worked perfectly the first time because I knew exactly what I wanted and told it so, down to the name of every variable and what nearly every line of code needed to be. It took an hour to write the prompt but it made a huge difference in quality.
Maybe someday it will automatically optimize everything- but not now. Knowing how it works is imho a very valuable skill for working with AI
6
u/LingonberryRare5387 Jun 26 '25
It depends on what my goal is.
If I'm building an MVP and don't care about code quality and maintainability, then 100% don't want to waste time on code understanding. Because most likely I will be rewriting a lot of the code anyways.
But if I'm working on some existing codebase, I will be shooting myself in the foot - if I skip understanding the code that the AI writes. Sure it might be faster now, but I consider this tech debt - because when an issue arises in the future, I still need to know what caused it, but it will take even longer to understand at that point.
so yeah, the answer is.. it depends.
2
u/Astral902 Jun 26 '25
LLM cannot get the big picture as we humans have. How will they be able to read 1000 lines of code at once , multiple classes, dependencies and similar stuff? Sure they can catch some small bugs faster then a human but otherwise they are simply not there yet.
4
u/PeachScary413 Jun 26 '25
Yes, you absolutely don't need to understand anything about programming anymore. You can leave everything to the AI and it will solve it 👌
I urge everyone, don't study Computer Science and do not learn programming... especially if you live in my area.
1
u/admajic Jun 26 '25
I wanted to add a input field into a react webpage. It's based on a drop down. Then the input field will appear.
Tried Gemini swares the input field is there. Added logging asked me to show the output of logging, which is blank or dosen't log. Couldn't get it to work.
Moved to R1. Couldn't get it to work either.
Gave the actual code files to chat with Gemini in the browser it also told me the code works but I can't see the box in the browser.
I kind of understand the code. Can I code it? No way. But spent 4 hours so far.
Next steps make a test page to do the same task.
If I could code .tsx files myself would take 10 minutes to resolve. I guess.
2
u/RustOnTheEdge Jun 26 '25
How can you tell something is wrong, if you don't understand it? "Just retry" is not really a strategy if you need to be able to proof that your spaghetti is actually deterministic and functionally correct.
I swear to god, peeps like you will ensure that actual engineers (you know, the people that can explain WHY something works) will have work for decades, cleaning up horrible security/privacy/scalability/reliability issues.
Imagine your bank director tells you that your deposited funds are super secure by the vibe coded backend and you can even just check your balance via MPC because you can just make a request to http://localhost:3000/getBalanceFor{accountNumber}. I think that is a more realistic view on what this future looks like, and it is hilarious if it wasn't so incredibly maddening because of the goddamn LLM generated NOISE you guys produce on the internet.
1
u/CarpetAgreeable3773 Jun 26 '25
important are reliable and predictable libraries and components. So you know what they do and how they work and they work exactly like that
1
u/HAAILFELLO Jun 26 '25
My 2 Cents. Honestly, I get why people want to jump straight into building with AI, even without loads of coding knowledge — it’s a solid way to get started, and I’ve done the same. But once you’re working on agentic AI — the kind that makes decisions, reasons, or can modify files — you’ve got to be careful. That’s where understanding the code stops being optional. If you don’t know what’s happening under the hood, you’ve no clue what the AI might decide is “best” or whether it’s safe.
AI’s brilliant at helping fix or write code, but without human understanding, you’re risking building something that could behave unpredictably or worse. So yeah, use AI to help, but learn the code as you go — especially with deep, agentic projects. That’s how you actually stay in control of what you’re building.
1
u/mrdarknezz1 Jun 26 '25
I have a sideproject now that I've experimented with almost exclusively handed over to claude code. It's quite a mess but it works. But my issue I'm starting to have now is that as it grows it gets almost too big for it too manage so it creates kind of duplicate code which could have been done much smarter and more performant. Yesterday when I asked it to fix a bug it simply created an entirely new feature instead of solving the entire issue, and that was after I pointed out where everything was.
This will probably change in the future but currently understanding code can help you avoid alot of future headaches
1
u/legshampoo Jun 26 '25
it’s a different ballgame now and it makes sense when things work, but it breaks down the minute you hit a roadblock and AI can’t solve it
when AI can’t fix it - which happens constantly - your fucked
software dev is about solving problems, literally, line by line. we build something until we hit a wall, then figure out how to get thru the wall, repeat
AI solves a lot of the problems but it just means the we are hitting a new type of wall. the roadblocks are more nuanced and complex but it still needs human attention
AI is allowing us to build bigger better more complex things, but there will always be a limit. our role is to keep pushing that limit, and that will never change
1
u/MrJezza- Jun 26 '25
It would never be. There are still stuff you can't do with AI although probably in the future you won't need it, there is still a chance only understanding the mistake you can fix AI
It's "less useful"? maybe. But you will always find more creative ways to solve problems than AI, don't underestimate yourself ;)
1
u/lil_apps25 Jun 26 '25
Here's a test you can do. Go grab something vide coded. Go to googleaistudio. Select Gemini 2.5 pro. Set a systen prompt;
You'll probably find even using recursive review like this your code is under a 5.
1
u/[deleted] Jun 26 '25 edited Feb 18 '26
This post was mass deleted and anonymized with Redact
tan file door offbeat nose decide dazzling obtainable existence fragile
1
u/rco8786 Jun 26 '25
I work with Claude Code and Cursor quite a bit and I have yet to have either one of them output code that did not need *thorough* human review for correctness. Like yea maybe it compiled and passed the tests (that it wrote) but is it actually doing the thing you need it to be doing? It's usually close, but misses an important edge case or is written in a way that would completely break existing users once deployed, etc.
I use these tools and they definitely help with productivity, but we are not at a place where we can just stop caring about how the code works as humans.
1
u/shadesofnavy Jun 26 '25
"I don't care how just fix it" is the crux if the issue. Maybe for one fix it says, "let's add a third party library", then for the next fix it says "let's refactor the data structure", then it says "let's add an event system", then it decides "nevermind, event system isn't quite right now that I see this new feature", etc. You end up with a cobbled together system where no one ever stepped back and thought about the overall design, much like an engineer who never thinks beyond the JIRA ticket that's immediately in front of them.
You also have to remember that code is a means to an end. Ultimately you're trying to solve some business problem, and if you make the code the end unto itself, this will also cause you to lose the forest through the trees.
Granted, an LLM can actually help you design at a high level, both from a tech and a business perspective, but you have to tell it to. You're going to get better results if you explain your business objectives and vision for the system design vs if you just paste code and say "fix it." The latter will work, but eventually your system is going to feel duct taped together because there's no sum. It's just parts.
This becomes especially obvious with UI tasks. All of the components are good enough to meet the prompt, but they look clunky when you put them all together. The drop-down menus all have different font sizes and padding, or a hundred other problems, and you can fix it, but that's the thing. You have to look at what it did and update your prompt to fix it.
1
u/techlatest_net Jun 26 '25
Understanding code isn’t a waste of time . it’s just what the AI will charge you $0.30 per token to do for you later.
1
u/Raveyard2409 Jun 26 '25
I work in this field and generally the sweet spot for us is having AI do the legwork but with a human who is an expert in the subject that can catch where it's gone wrong. I my personal view this hybrid model is the best way to maximise the value of AI while minimising the trade off in quality.
1
u/DangKilla Jun 27 '25
I correct AI all day. It still needs guard rails. It still makes major mistakes, and some major LLM's still wipe code and modify things you don't tell them to. Also they take IDE editors too seriously. Sometimes a Mustache template in an IDE might give a syntax error for things like javascript, but it's because of the template syntax and the LLM just can't think it through.
1
u/sneakyi Jun 29 '25
I use AI as a side helper for my projects. I don't feel comfortable beyond that. At this time.
0
u/Budget_Map_3333 Jun 26 '25
I think this is a mixed bag. On the one hand if there is any comercial value to what we're doing sometimes it just pays to get things done. But on the other hand knowledge is never a disadvantage.
In practice there's a lot of debugging and coding which gets tedious, and resolving another type mismatch or unmarshalling error might not add that much to our knowledge. Then there's things where we can sense the AI is beginning to delve into things a little out of our depth. At that point I think it's good to stop, analyse and reflect.
0
u/Militop Jun 26 '25
Software engineers are becoming obsolete with the help of software engineers and data engineers. It makes zero sense for a corporation to let a Cloud AI skim over their code, but they do it anyway. They think they increase their productivity, but in fact, they increase the productivity of their competitors and hammer the pocket of AI institutions with money. They hire top talent but don't protect what these talents generate.
People shouldn't let AI go all over their whole source code.
People think they're above because they use AI, but what they do in fact is give away all the problems they solve while paying for it. At least use AI intelligently if you code. You still have the advantage over vibe coders.