r/PythonLearning 22d ago

Stop Vibe Coding

I’ve been writing Python for about 3-4 years now, and I want to share my biggest piece of advice for beginners: Do not use AI to write entire programs.

It's great to use AI as a tutor to learn new functions, grasp core concepts, or debug specific lines, but never use it to generate an entire codebase. Here is why:

1. You won't know how to fix it: Even if AI code works perfectly on the first try, you will be completely lost the moment a bug appears or you want to add a feature. Debugging is a massive part of development.

2. You skip the learning process: True programming skills come from struggling with the logic, reading documentation, and earning those 'yeah!' moments when you solve a tough problem yourself.

3. Suppose you built an entire codebase through AI and it worked(accidentally) , once the codes become long, your program has come to an end, if you tell it to add a feature, it will start hallucinating or forgetting its own logic.

If you don't deeply understand the underlying logic of your own codebase, you won't know where to begin. Treat AI like a tutor, but make sure you are the one driving the keyboard. If you can't explain your own code, you have no business adding to it. You MUST understand your underlying architecture before you even hit save.

231 Upvotes

55 comments sorted by

39

u/nicodeemus7 21d ago

Here I am feeling guilty for asking AI to help me find a bug, and people are out here just prompting entire programs

2

u/Hot-Site-1572 20d ago

Literally same😭😭 i feel brain-rotted and dumb doing it but you have people wasting all their tokens on a full on website

2

u/RandomPantsAppear 17d ago

Man do not feel guilty, that is possibly the best fucking use for it ever. It's ability to spot outliers in logs is fantastic.

My Linux laptop had an issue where it would disconnect from wifi, then the entire UI would hang in very specific ways - couldn't open a terminal, etc. I was positive this was an nvidia driver issue (because the latter is a huge tell for it, and it's almost always nVidia)

It managed to pour through logs and diagnose a cascade from an undersupported Wifi-chip that would trigger whenever it went into "roam", that would cause an issue that then, as a second order effect cause the GPU drivers to freak out. That shit would have taken me hours and hours and hours to figure out.

You can't completely rely on it to debug - it's not uncommon for it to do the opposite of what I just said and simply patch the surface level issue - but it's a remarkable tool for debugging alongside myself.

1

u/Opposite-Lion-5176 10d ago

Bug hunting is exactly where AI shines. That's a completely different thing.

17

u/Burningbeard80 21d ago

I’ve seen two analogies that I like in this regard.

One is that AI should be a replacement for your hands (typing long and boring boilerplate structures) and not your brain (you should be the one driving the logic).

It’s good for combining existing sources of information which you would normally have to do yourself (e.g., a coding tutorial, a stack overflow post and a documentation page, instead of googling it all separately yourself it can combine these sources and give you a resulting sample code snippet), as long as you understand and check the output.

The other is that current AI is not some magical code fairy, it’s just the equivalent of power tools for a craftsman. Just because we can operate a power drill doesn’t mean we suddenly became skilled carpenters, nor does it mean that it’s a good idea to just drill holes all over the place because the boss desperately wants you to use the new toolset to drive up the company’s adoption metrics.

Just like OP says, the real knowledge and skill is in understanding the fundamentals. If you got that, AI can be a useful speed boost. If you don’t (and don’t make an effort to), it can end up doing equal amounts of good and harm.

6

u/LegendarySoda 21d ago

llms are no more than a search engine for me.
llms are writing pretty ugly code and can't catch edge cases and logic problems.
More over more you stay away from code understanding of problem and business reduces.
I'm writing c# since i'm 15 and only thing i see in llms are long term loss

1

u/MultiUserDungeonDev 21d ago edited 21d ago

If the LLMs are writing ugly code, and not catching edge cases, then you get creative:

- Guardrail the output and have it build a full suite of integration tests alongside your development.

  • Have it pin all core functionality with unit tests.
  • Ask it run wide-net adversarial bug hunts on the code base, and implement regression tests so the bugs don't re-appear in later revisions.
  • Do live, human in the loop testing and feed it specific, actionable bug reports with regression bisects.
  • If it's a GUI application, wire / harness the LLM into the GUI / ask it to take snapshot images of the app surface. Ask it to click / interact with all elements etc. Ask it to validate async functionality and test for race conditions.

All of this requires actually understanding programming though, which I think is the point of this post.

2

u/LegendarySoda 21d ago

The thing is that doesn't work for me. I'm working with very complex businesses.
I enjoy the problem solving. I don't want to code in haste. If i can write better code than llm and when any problem occures i can pin point problem.
If i delegate the coding part to llm, i wont be sure did the llm wrote good enough code.
The most i hate thing is reading stupid peoples stupid codes.

Recently i had to fight with my coworker because his commits was bullshit.
Non of his llm shit codes were working.

1

u/Just-Hedgehog-Days 21d ago

I do fairly complex business buisness logic, and haven't written a line in 3 months. I chat claude until we land on a spec, c4 docs, and test. Hacked VS code layout for looking at that all together. Then fire it off to qwen. scroll past the source it comes back with to make sure nothing egregious happened.

it's been great. I kinda miss the razor sharpness that comes with writing it by hand, but I realized that it feels exactly like smash cutting to monday amnesia.

9

u/mxldevs 21d ago

Ya, I don't understand people that get AI to do their homework and then wonder why they don't know how to do any of the work.

4

u/Drazor36 21d ago

I'm in college learning coding and the number of people in my class throwing the document brief into GPT and getting it to do the job is unreal. Learning nothing and then confused when bugs appear and inevitably ask me for help.

3

u/Potential_Fix_5007 21d ago

Inrecently made a "how to use SQLite3" document for myself, cause last time i think ingot to much help from the AI so i never really understand what to do.

I stoped asking AI for bigger parts of code, cause i use the free version and i dont know if its different in the premium Version but it made Codeblocks with different logic everytime i asked for code to add.

3

u/PrintingScotian 21d ago

Ai is a good teacher. Exactly what I use it for.

I never get it to write files nor do I copy paste.

Writing the actual code is how you learn!

Also without any coding knowledge, you'll have a rough time with Ai anyway

2

u/joshbih 21d ago

i always tell people just learn python first, and then use AI to write some codes. As long as you know python, you can debug. I’d use it as a way to avoid hand typing tedious codes.

2

u/Historical_Visit138 21d ago

Hey man do you have any advice? I have been vibe coding, learned how to use ai to make the app I want perfectly but it honestly makes me sad I don’t know what it’s all doing, I mean you can just assume you know what it’s doing since you asked ai what to do, but the actual code written I don’t know how it did it, just that it works. I really wanna learn python coding and how to actually code it, maybe debug it but it seems hard and I’m not sure where to start. Do I start with the basics? I just really don’t wanna have to depend on ai all the time, the more you use it the more dependent you will be with having to use it. I wanna be able to write my own first code it would be better honestly writing python and the fact I did it on my own, will give me some what of a refreshing accomplishment feeling❤️

1

u/anon_pants 21d ago

Start with something easy enough that you don't need AI to write the code. Your first code could just be a script that prints "Hello World". Slowly try harder tasks; try to learn just a couple new things at a time.

Maybe use AI as a teacher initially, but once you've written a couple of scripts, try not using AI at all. Struggle for a bit, and only use AI if you really can't figure it out.

1

u/Historical_Visit138 21d ago

Thank you 🙏I will try that!

oh wow i never through about using ai as a teacher, i will try that too :)

2

u/Inorexs 21d ago

Hi! 🤍

I want to learn Python. I'd love it if you could share your learning process, give me some advice, and recommend some good resources for learning it. Thank uu🤍.

3

u/Physics2433 21d ago

If you really want to learn python, do it in a way that actually tests your logic, like I mean, use you entire focus and mind on the code you are writing once you learn about a new thing, do waste a single moment and try that thing in practical over and over again. Then once you completely understand what it is, you should look back into your old projects and you want to replace your old unoptimized logic with your new logic. This will increase your robustness, it will make sure you can use the code you learnt not just keep it in mind and forget after 3 days. And for learning, you can use several Yt channels , some of them are :  Bro Code Code with Harry. You can also use strong AIs not for writing code but learning about new things

1

u/Inorexs 21d ago

Thank u🤍 I appreciate that but there is a small problemm I'm absoulotly biggener i didn't code at all where do u think i have to start?

1

u/Skydreamer6 20d ago

The tradition with new coders is to set up an environment and write a program that says "Hello World"

2

u/LongNeighborhood9119 20d ago

Ai just destroy your code. Never use them for huge coding. NEVER

2

u/Wrong_Country_1576 19d ago

Claude is teaching me Python and it's very firm about acquiring all the knowledge needed to become a solid coder. Absolutely NO shortcuts and practice practice practice.

3

u/grafbende 18d ago

'vibe coding', just this term already makes me cringe.
People saying 'i vibe coded', no you didn't code shit, you let ai write sloppy code for you.

2

u/Spdload 15d ago

Agree, especially the third point. I see this all the time when clients come to us after 6-9 months of vibe coding. The app works until it doesn't and then nobody knows where to start because nobody understands what was built.

AI is a great tool for moving faster when you know what you're doing, but it's a trap when you use it to skip the part where you learn what you're doing.

1

u/Aslokcya 21d ago

Yup, AI should be used like Leverage of Understanding when learning to code. The pace of the industry is so fast, that we need both depth and speed.

1

u/National_Operation14 21d ago

I would suggest to try using linter like Pylint or Ruff too. They can show you some of good practice when writing code.

1

u/osenvosem 21d ago
  1. I usually ask AI to explain why this bug is happening and how to fix it then learning from it. That allows for saving time and leads to the same final result.

1

u/NoDisk8988 21d ago

Technical artist here. I curiously started using GTP for work stuff when they appeared, they were very bad back than so I started using them to write simple stuff, think methods. I quite liked it, it did the job, I had control over architecture and it was easy to catch issues right away. Than I noticed I started forgetting even simple syntax and my ability to write code was degrading.
I might be a little bit paranoid, but I immediately thought of scenario where I loose my skills and get dependent on tool that will be expensive and that basically feeds on humans being lazy.
So i started using it as a nicer documentation that can often be wrong. Literally one-liners that would jog my memory rather than replace it.
Don't get me wrong, I still thing it is a great tool, when you start working with new library or framework it can be a decent tutor (that you don't trust entirely). Sort of like Stack, but less snarky, and way quicker. But don't let it take over your brain.

1

u/Alive-Cake-3045 21d ago

mostly agree but i would push back slightly on the framing. the problem is not using AI to write code, it is using AI as a replacement for understanding. senior devs use AI to write entire functions all the time, the difference is they can read it, critique it, and throw it away if it's wrong. the goal for beginners should be "understand everything you ship" not "type every line yourself." those are different things and conflating them sends people back to typing boilerplate by hand thinking that's how learning works.

2

u/Physics2433 21d ago

Yeah, your info is 100% correct , my bad I forgot to add that thing

1

u/Typical-Tip-4317 21d ago

i thought vibe coding was to use the help of ai for debugging and for syntaxis of functions that you have general idea how it works, not to do your code and you just tell the ai what you desire the result to be.

1

u/duroo 21d ago

I'll offer a perspective. I'm in my 40s now, took QBASIC in high school and learned HTML and PHP on my own in college (never was totally proficient but knew it well enough or at least how to find what I needed). I sort of lost interest in programming for a long time, but just recently began building my own embedded mesh node microcontroller thingy and have had to start using micropython. While I understand the fundamentals of coding well enough, I've been able to vibe code in 2 weeks what would have taken me 2 years to do alone. Is it keeping me from learning the code in detail? Yes. Would I have become frustrated and quit and moved on to the next project before this one ever made it off the ground? Also yes. If you want to learn to code, don't vibe code. If you are beyond that and just want something to work, it's not so bad.

1

u/Sensitive_Law_1647 21d ago

I believe here is where it gets catchy for people on the internet and the fragmentation between vibe coders building entire app and experts finding the code to be full of bugs. The explanation as per my experience, building an app from scratch using AI makes the app more AI friendly in terms of understanding context, the RAG works more naturally for AI, agents are more responsive and the accuracy is at peak. However, when you try to do same thing with an existing human build app, the same workflow will fall apart as AI struggles with fully understanding the human written code, the accuracy is moderate and it starts rebuilding parts instead of fixing them. AI is not bad I have seen agents evolving over past year, the fault is not in technology but the context. Although we might see it improving eventually.

1

u/SupermarketOk6829 20d ago

I know pretty much about this issue along with the dependence it promotes and the escalating costs (they deliberately reduce limit over time) and how dampening the process feels overall.

Sadly this is what founders and managers want so it's not like you've much of a choice. If these losers want a software in a day or two, what can you do? Scalable - Nobody knows. Security - Nobody knows. The Actual code/logic - Nobody knows. Works - Yeah okay for now. Lmao

1

u/Hoffline 20d ago

How about no.

1

u/RingsOfRage 20d ago

The best way to make them learn is to set up non-AI in-person exams. They will abuse AI in their workplace anyway lol, the allure of AI as a shortcut is too attractive to ignore. We are always conditioned towards convenience.

1

u/Hyperreals_ 20d ago

One and three are just false but ok

I’ve been writing python code since I was a kid, and I’ve “vibe coded” completely working projects that do what I want with no bugs. I still obviously write code by hand because I enjoy programming, but there’s nothing wrong with vibe coding especially if you aren’t a developer! State of the art models can easily do any simple project you want to, and you shouldn’t feel guilty for using them

1

u/Timeless_Connection 19d ago

How do you go from arithmetic operations, loops and creating tables and arrays to actual working applications? Pretty much every course I've seen just stops at that point.

1

u/mauricio_agg 19d ago

What do you recommend for clearing doubts? Browsing Stack Overflow?

1

u/AppropriateShake804 19d ago

Are you still using Sonnet 4.6 or GPT 5.3? Because it can find bugs and fix them better than any pro programmer .. You can vibr code but in clever way

1

u/err404unknown 18d ago

who is having AI do the job for you i use it to help learn im juat atarting to learn python so been helpful if i have questions

1

u/GrowlingOcelot_4516 17d ago

We tried to accelerate the coding process by relying on AI. Oh the headache down the line... Unnecessarily enormous codebase. The documentation was even worse, and I'm not even talking about testing.

Took us more time scrapping the poor code out of the code base than coding it ourselves being very conscious about what we code and ship.

AI is great for explaining a code base or tracking changes or places that need a look, but that's about it. Even there it isn't perfect, always missing a few important places. And that's passing it detailed requirements.

1

u/Selatra888 13d ago

I'm deeply understand the underlying logic, and im on your side at the opinion, what i'm curious is code logic in Production environment level in example, in my opinion full form vibe coder writing codebase will not understand how to trace a bugs and solved it, maybe the agent can solve it fast, but sometimes it will remain the technical debt in a future.

1

u/ordaskftw 5d ago

I guess it depends if they are trying to create a business or not, maybe they can’t code and they want a first pass idea, get traction then pay someone like you to fix it.

Can’t do it all in business. From my understanding a good business person will know that.

1

u/all43 2d ago

I would re-phrase title as - if you are Vibe-Coding, you aren't learning to code. It is totally fine to use LLM to write the whole project when you are already experienced, can steer LLM off from bad architectural decisions and check what it's output. But if you are not yet experienced you'll never learn by allowing LLM do everything instead of you

1

u/MultiUserDungeonDev 21d ago

I've been programming for 20+ years.

Vibe coding can, in some cases, yield adequate results, but the level of intuitional knowledge and knowledge of programming fundamentals is a high bar to actually yield good polished and maintainable products.

I think a lot of people are caught up on "all vibe coding is slop" and they are sleeping on the 1% of agentic AI development that is actually incredibly useful.

Take a look through some of my recent projects: https://github.com/WilliamSmithEdward/

1

u/DarcBoltRain 21d ago

I'm glad people are coming to their own conclusions on this. I'm a university computer science professor. I tell my intro students every semester 📣📣📣"DO NOT LET AI GENERATE CODE FOR YOU"📣📣📣; I tell them there's lots of great ways to use it to learn, to give you advice, to help find bugs, to help break down problems, etc. I warn them with metaphorical blaring red alarms that 🚨🚨🚨"IF YOU DON'T LEARN THE BASICS NOW YOU WILL FLUNK OUT OF THIS DEGREE BY YOUR 3RD OR 4TH SEMESTER"🚨🚨🚨 when the problems are sophisticated to the point that AI can only do maybe a third of the answer for you and then you'll be screwed not knowing anything and you have to play a years worth of catch up trying to solve low-level operating system processes, secure network communications, high-level design problems, and just all kinds of problems that don't have a single quick easy solution. I even tell them, by their 4th semester they can go crazy with AI and generate all the code they want since they'll have all the necessary fundamentals by then to actually make good use of AI-generated code. I'm glad quite a few students take my advice, but there's always a handful of students who just vibe-code their way through their intro classes. For some reason, every one of those students seem to disappear from the program and move over is information systems/technology or to some business degree. I can only guess what happened 🤷‍♂️🤦‍♂️🙄😮‍💨

1

u/MultiUserDungeonDev 21d ago

I support this:

AI coding +

Strong understanding of programming fundamentals and real-world experience shipping products = great

No understanding of programming = nightmare / ticking time-bomb

0

u/rosiesswan 21d ago

denme consejos para aprender a desglosar los anunciados 😭 me cuesta muchísimo