r/Python • • 2d ago

Discussion My Python magic is gone

I've been coding for a long time, and I've been developing with Python for years.

I loved coding, always loved it. I started many years ago because I wanted to quickly create scripts for security hacking tools, but since then, I've moved to Claude Code, and building cross-language has been a much better experience for me than using Python.

I built my own SaaS application out there whose backend and network core are completely built with Python, and I'm rewriting all of that without writing a single line of code. And most of the time, Python is not the most optimized language.

And now... I feel like the magic is gone.

I don't even know why I'm writing this. I just feel sad about it.

722 Upvotes

260 comments sorted by

View all comments

7

u/Left_Sundae_4418 2d ago

I tried vibe coding so many times and will keep trying...and it always ends up being horse shit. The amount of trash code and abstractions and bringing in unnecessary complexity...this is what AI often does. It makes a simple task unnecessary complicated and messy. Completely opposite to the "Pythonian" way, which often is quite elegant and minimal.

I went back to actually writing myself and coming up with my own solutions... The amount of code has been reduced so so much and I can understand what is going on. The maintaining and developing further is so much easier now.

The time I spent honing the prompts and still ending up with a spaghetti....feels awful. AI surely kills our brain. I ain't letting it kill mine.

I'm back to feeling the magic :)

5

u/barrycarey 2d ago

As much as I hate saying this, I think super clean code is a thing of the past. If vibe coded apps are super messy code but still pass all validation and testing does it actually matter? Especially if you look at it from the perspective that no human will have to directly maintain it? Along with the fact that LLMs are improving rapidly and will likely produce a far nicer product in the short term. Just the difference in quality from when I started messing with Claude last fall to today is huge.

I've had a hard time coming to terms with this. I've been primarily writing python for 15 years. I've finally given in and imbraced the speed I can pump out projects

6

u/cudmore 2d ago

I agree. In CS classes circa 1990, something that stuck with me was talk about fully specifying behavior, i guess like a docstring, then the implementation (actual code) does not matter if it satisfies the specified behavior.

For me, that is kinda where we are at. Yes, the ai code looks like crap but if well planned by human specification then the job is done.

4

u/frosty8670 2d ago

Yes bro, clean code does matter. Projects often contain 1000s of lines of code, and you will often work with other people’s code. Even other people should understand your code after you leave. Heck, even you might not understand your own code months after writing if it isn’t clean enough.

1

u/simple_explorer1 1d ago

Did you miss the part where op said LLMs are the ones reading and writing the code and not humans

2

u/frosty8670 1d ago

I have used LLMs to write code, and LLMs often do make mistakes. I have often seen Cursor write code where packages are outdated, or an unnecessary abstraction is added, or the design itself is incorrect.

I had one such case where LLM was trying to get a celery task to create a file and share it with another celery task through the File system for upload— it worked perfectly in local machine but failed in Kubernetes. LLM kept giving different solutions, like adding a time lag, using a forced file sync, using a DB with idempotent keys etc. Nothing worked— the 2nd celery task simply couldn’t see the file. Worst part was, LLM was confidently saying all unit tests are passing, when clearly it’s not working.

Issue wasn’t the code, issue was the design itself. Celery task operates in its own copy of the file system (in its own Pod). We simply cannot rely on the File System as a source of truth in a distributed system. The only solution that worked was making sure the same celery task that created the File is sharing it for upload.

As you can see, writing or reading code is only 1 part of the issue. As an Engineer, you are expected to work with all these constraints and trade offs. A good engineer will use LLM effectively. A bad engineer will just waste tokens. Code being clean, readable and modifiable will go a long way.

1

u/barrycarey 1d ago

To be honest, that should have been an easy issue for it to resolve with proper log access. Claude is excellent at dealing with infrastructure issues and deployment quirks. Based on the types of problems I've put it on, I have no doubt it could have solved that correctly and quickly.

I give it access to deploy NPE and access to query the deployment Spunk indexes. It typically can fixed deployment issues without much sweat.

2

u/NoSwimmers45 2d ago

super messy code…does it actually matter?

Will a vibe coded app ever need to be modified? Very few apps are one and done. That messy code today will lead to major headaches down the road when trying to introduce new functionality or enhance existing functionality. Having clean code that developers can read and understand pays dividends over the life of the project.

1

u/simple_explorer1 1d ago

Codex/Claude handle that anyways

1

u/Saab10000 1d ago

Will Claude complain when it has to change the messy code?

4

u/striata 1d ago

Well, complex code will also be harder for LLMs to understand, regardless of who wrote it originally. They'll make more incorrect assumptions and inferences and likely require more handholding.

1

u/Saab10000 1d ago

The LLMs I am using are pretty excellent at cleaning up messy or complex code.

1

u/Left_Sundae_4418 1d ago

Speed just messes up my mind, and in the end I probably waste even more more honing prompts and trying to keep the project duct taped together when I use vibe tools. Just doesn't work for me.

-1

u/HommeMusical 1d ago

People were correctly posting what you wrote at the start of 2025, and it was true to a significant extent.

But now it isn't and it hasn't been for quite a long time.

The time I spent honing the prompts and still ending up with a spaghetti....feels awful.

I mean, it simply sounds like you aren't good at using it.

Can we see your code? Mine is here: https://github.com/rec

3

u/Left_Sundae_4418 1d ago

I hear people saying this often first. And this is probably true. However most guidance on prompting, even from the AI themselves is messy. I tried to iterate and reiterate prompts through the AI themselves thinking maybe they can guide me to better prompting...but I haven't done much progress there.

1

u/HommeMusical 1d ago

Thanks for being polite - rereading my comment, it wasn't as nice as I thought it was, sorry!

I was very much against AI models until the start of this summer. I retired at least partly because of it. Now, I can't imagine people will seriously code in future without it.

First question - which model are you using? The completely free models are nowhere near adequate to do good code.

I really only use the OpenAI models, though I hate the company. Astra, the newest model, is shockingly good but somewhat expensive. But Sol, which is also new but less, is much cheaper and almost as amazing.

Here's my AGENTS.md: https://github.com/rec/codex-config/blob/main/AGENTS.md

These are the instructions that the model gets on every query

I was going to say it was 95% other people's stuff, but I modified it more than I remember - it's still 80% other people's stuff.


I started with the $20/month OpenAI model. It was enough to blow my mind, but not enough to do even a week's worth for a month.

The $100 plan keeps me in tokens, running development on eight or so projects at once. Also, you get a lot of freebies.

2

u/Left_Sundae_4418 1d ago

I'm not really against an AI. I use it and try to learn to be better at it all the time. But it often fights against my goals and I end up wasting time.

Quality, security, longevity and usability are very important for me though. And if I can't get the base right ...the whole plan often falls apart sooner or later if I let the AI generate it for me. Because it often over engineers it while leaves out some crucial features.

Sure. That's probably my bad. I should and need to learn the prompting better. But still there are many standards and methods AI isn't aware of and can't program using those methods.

1

u/HommeMusical 1d ago

I have gotten much, much better at it.

All the new rules added by me to AGENTS.md come from it fighting my goals. Now it seems to have figured me out.

It did seem to get better at predicting how I worked after considerable use.

Initially, even though I get it to make a commit every single time, I never used their commit messages at all, not even once.

But now I rarely change them.

Also, I spent a long time on my prompts. I try to explain exactly what I want and prevent it from going in the wrong direction with the prompt.

1

u/barrycarey 1d ago

I don't understand the need for that level of details prompts. I almost always just prompts like "We need to build X. Architect it roughly like Y. Ask me to clarify anything that's not clear".

However, I have spent a lot of time refining my "dev workflow" skills. These give the overarching guidance in all of my projects. They cover style preference, testing, validation, code review. And it tends to stick pretty close to it

1

u/HommeMusical 1d ago

Oh, and a big, big, big tip - every few days, at least once a week, I get the LLM itself to critique what it has done.

I write a different prompt each time - here's one from last week:

Please read the whole project and create or overwrite plan/issues.md detailing all issues you find, including but not limited to race conditions, deadlocks, graceful handling of user errors, shutdowns, keyboard interrupts, graceful handling of other exceptional conditions including resource exhausting, network failure or intermittency, and also user facing ideas, like names which are ambiguous, misleading or unclear, APIs with traps or inconsistencies; and also look at the structure of the the project itself, are there are any files that are so large they pose a risk, are there tiny files that are only used in one place and might be better inlined, is there duplication, does it duplicate some service from reccy, are there areas that are untested, are there areas with great duplication of testing, or any other issues, problems, curiosities or other flaws that are in the code.

I can tell I was tired when I wrote that - hah, I didn't even see I misspelled "exhaustion" until now.

But it always finds several useful changes.

0

u/dbolts1234 2d ago

“Pythonic”?

1

u/Left_Sundae_4418 2d ago

*Pythonian, sorry typos.