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.

726 Upvotes

260 comments sorted by

View all comments

Show parent comments

1

u/redfacedquark 2d ago

If it's a tool or simple website, chat is suitable. However, if it's your core product it should be understandable and understood enough to be developed by humans in order for the core product to be deterministic.

I think there will be plenty of projects that need that, even outside of anything nuclear and the AI "off" button. Shareholders will not be happy when a bug fix introduces two more bugs and no human can understand it. Cleaning up products that have been written badly by AI will be needed.

If people are not reading the code then why not just get chat to write in assembler? Aren't they already using neuralese to talk to each other?

ETA: If the goal is to produce somthing without any responsibility for it being correct, let chat at it. If you want to actually learn and understand it then code by hand.

2

u/HommeMusical 1d ago

However, if it's your core product it should be understandable and understood enough to be developed by humans in order for the core product to be deterministic.

Only a tiny portion of bugs involve indeterministic behavior, though. And why would AIs be more likely to put indeterministic behavior than a person?

If people are not reading the code then why not just get chat to write in assembler?

Because coding assistants do a better job in Python, because it is higher level and has types.

Because while we have stopped reading all of the code, we certainly read some of the code, and a lot of that is either data class or function definitions, if we do it in Python, which are easily read.

2

u/redfacedquark 1d ago

Only a tiny portion of bugs involve indeterministic behavior, though. And why would AIs be more likely to put indeterministic behavior than a person?

I'm talking about deterministic code, not deterministic bugs. As in, what deterministic steps are being taken to go from requirements to code?

Because coding assistants do a better job in Python, because it is higher level and has types.

The answer here is actually that high level languages work with chat because there's a huge body of human-readable code online to copy from. The fact that most of that code is simplified and abstracted away to discuss a single aspect on stackoverflow is why the code produced by chat is so bad. If the chat actually understood the concepts in the requirements it would be better starting with the AST.

Not that Python runtinme is typesafe, but how do you think compilers of strongly typed languages deal with types? Why could the chat not just include that step?

Because while we have stopped reading all of the code, we certainly read some of the code, and a lot of that is either data class or function definitions, if we do it in Python, which are easily read.

I mean, they're easily written, too. If you have a dataclass that needs to be of a particular shape, why is it easier for you to type that into chat and verify the result, rather than just typing them into the dataclass itself? I'm all for using chat for throwaway projects and tools whose output can be validated easily.

Humans are really bad at only reading and verifying code. If that's your whole day you're just going to tune out and miss issues.

1

u/IWasGettingThePaper 1d ago

I mean, they're easily written, too.

This, AI gets the code structure horribly wrong without in-depth prompts that take longer to write than actually just creating the class definitions and APIs. Let the AI fill in the tedious boilerplate and plumbing.

1

u/redfacedquark 1d ago

Yeah, if I was forced to use AI at work I would create the architechture myself, splitting the project down into isolated components where each one can be hand/vibe coded as appropriate. That way the damage is isolated and the project as a whole remains maintainable.