Before and after programming
Before and after programming
Before and after programming
Lmao, bruh. How do people keep praising a language where messing up a space breaks everything and there is no real type system?
The whitespace doesn't bother me. Any IDE worth a damn will manage that for you. As for the type system, yeah, I strongly prefer static typing, but for simpler projects I can see the convenience of it.
My real issue with Python comes with managing a development environment when multiple developers are working on it. Dependency management in Python is a headache, and while in theory, virtual envs should help with synchronizing environments from machine to machine, I still find it endlessly fiddly with a bunch of things that can go wrong that are hard to diagnose.
Python is great for small scripts, proofs-of-concept, and such, but I wouldn't write anything more heavy-duty than that in it.
You can totally write heavy duty things if you know what you're doing: use type hints, static checkers, tests, etc. It just takes a bit more effort and care.
Any IDE worth a damn will manage that for you.
Yeah in like 10% of cases. I'm copying something from a pdf my prof gave. The only ones able fix spacing now are me and God
Yeah, working on python projects professionally is always a nightmare of configuring env variables and trying to get your system to perfectly match the reference dev system. I find Node.js projects to often be the simplest and most pain free to setup, but even compiled languages like C# and Java are often easier to get up and going than python.
My real issue with Python comes with managing a development environment when multiple developers are working on it. Dependency management in Python is a headache, and while in theory, virtual envs should help with synchronizing environments from machine to machine, I still find it endlessly fiddly with a bunch of things that can go wrong that are hard to diagnose.
Late to the party, but a serious suggestion; give uv for Python dev env/package management and ruff (or Black, for that matter, if you’re not using a formatter yet like some others here in the comments) for linting/formatting a shot.
They’re great and feel magical to use if you’ve known the pain experience of not having them.
Haha: "A space breaks everything." Fuck YES! Are you kidding me‽ It's one of the best features!
Why? Because it's so easy to see. In other languages you've got semicolons which are surprisingly difficult to notice when they're missing. Depending on the situation (or if you're just new to programming) you could spend a great deal of time troubleshooting your code only to find out that you're missing a semicolon. It's frustrating and it makes you feel stupid which is never a good thing for people who are new programming.
Types are in a different category altogether with seemingly infinite reasons why you'd want a feature-rich, low-level type system and also why you'd want to avoid that.
IMHO, the point of Python is to be a simple language that's quick to write yet also very powerful and speedy when you need it to be (by taking advantage of modules written in C or better, Rust). If it had a complex type system I think it would significantly lower the value of the language. Just like how when I see an entire code repo using Pydantic and type hints everywhere it makes the code unnecessarily complex (just use type hints where it matters 🙄).
I'm not saying using type hints on everything is a terrible thing... I just think it makes the code harder to read which, IMHO defeats the point of using Python and adds a TON of complexity to the language.
The promise of type hints is that they'll enable the interpreter to significantly speed up certain things and reduce memory utilization by orders of magnitude at some point in the future. When that happens I'll definitely be reevaluating the situation but right now there doesn't seem to be much point.
For reference, I've been coding in Python for about 18 years now and I've only ever encountered a bug (in production) that would've been prevented by type hints once. It was a long time ago, before I knew better and didn't write unit tests.
These days when I'm working on code that requires type hints (by policy; not actual necessity) it feels like doing situps. Like, do I really need to add a string type hint to a function called, parse_log()
? LOL!
I don't mean this insultingly because lots of programming jobs don't require this and for the ones that do we still tend to all start here, but in all honesty this sounds like it's coming from someone who's never worked on a large project maintained by multiple people over time.
First of all, the hysteria over semicolons is ridiculous when JavaScript, Typescript, C#, Java, Go, Swift, etc. etc. wil all automatically highlight missing semicolons, if not automatically insert them for you when paired with an IDE and standard linter. On top of that, JavaScript and Typescript do not require semicolons at all, but they are still used alongside braces, because they make your code more scannable, readable, and moveable.
Secondly, without type safety your code is no longer predictable or maintainable. If you're working to quickly sketch out some new fangled logic for a research paper it's one thing, if you need to write test code so that your codebase can be tested an infinite number of times by other coders and whatever CI/ CD pipelines to make sure that nothing's broken, then all of the sudden you start seeing the value in strict typing.
Honestly, complaining about type safety adding "extra code" is a complaint that almost every coder has when they start out, before you eventually realize that all that "extra code" isn't just boiler plate for no reason but is adding specificity, predictability, reusability, and maintainability to your code base.
When defining types looked like this it was one thing:
String name = new String("Charles Xavier");
But when it looks like this, there's no reason not to use strong typing:
const name = "Charles Xavier";
What are you writing your code in? Windows notepad? How the hell do you not see the semicolon missing?
It’s kinda funny that Godot’s custom language GDScript is, at least on a surface level, pythonic (no list comprehensions, context managers, decorators, etc, it’s mostly syntactical similarities). But type hints do make it run faster!
I was blessed to get to skip most of the old pains in python. I only had a handful of scripts that ever needed to be ported from 2 and they didn’t rely on any libraries. The ecosystem is easy to work with and I’m looking forward to working with Python for the foreseeable future
Exactly! I've wasted more time hunting missing semicolons in languages that use them, than fixing wrong indentation in Python.
Not even the worst. This function declarations with separations between positional and enum variables... Or the infamous global...
because it's easy to use. I don't like strangling my code because it's screaming about semicolons again
To me it's as natural as using periods
I have never once, in nearly 20 years of using python, encountered IndentationError. Until today actually. I tried to make it happen because I couldn't remember the class name.
A statically typed Python would be my dream programming language.
Can someone please make Typethon?
Pyright language server makes Typethon out of your Python at the cost of massive bugs and performance. I used to like it, until I got really sick of waiting about 10 seconds for a suggestion to appear when typing open() and really fucking sick of the entire server crashing after I type pow()
Type checking for python is not bad these days, just run pyright (or mypy, I would like to prefer the non MS solution, but we have found pyright much more rigorous) on your code. Yes obviously you can still get out of it with an ignore statement, and that might occasionally be necessary for some libraries, but if you enforce no errors in pre-commit or CI then it's only a little worse than compile time.
where messing up a space breaks everything
Messing up some character breaks everything in any language, skill issue
there is no real type system
What does "real" mean? It's pretty robust these days.
Have you tried Rust?
Rust:
Jesus Christ! No thanks! I can't imagine improperly placing cabinet knobs on closet doors like that
I already hate that style of door but the knobs make it even worse
Fun fact: the negative space in the pattern of the door is a cross. The 2 squares below it (out of frame) make an open Bible too.
Learned that on a field trip to a door factory where I nearly got left behind because I was looking at a very loud door cutting machine.
Is the archinstall script not working?
Idk, it was some image I found on Unix socks
Pink Fedora logo is class
Missing a fursuit or cat ears and a tail plug
Or fox ears :3
I prefer cat ears and tail plug. Im not a furry, I'm a catgirl :3
(No problem with furrries tho)
Python?? False
also None is another annoying quirk
How is None a quirk?
PHP
That’s PCP
dead
I've learned python after CPP... And I can't #even remember all the cases when I thought "damn, I wish I could've just used pointers"
I've been in industry for a decade, big tech for over 6 years. And I STILL fucking hate Python. I can write in it, but everything about it just feels wrong
Similar story in our team with 2-15 YoE. We do TS and C# but recently did a hostile takeover of the API from one of our providers which is in python We all now fucking hate python. The codebase is fine, the language isn't.
Might I introduce you to the wonderful language known as Nim? Python-like syntax, compiles to C, C++, and even JS, has mature libraries and good tooling, and some memory safety features built in! And yes, you can use pointers!
Even our C++ guys won't touch my C code with all the pointer tricks and unions used for hidden castings. Whimps!
But python has worse problems than lacking pointer. Have you ever copied a piece of code from an external source into a python source? It really can f-ck up everything if one has tabs and the other has spaces.
Or a complier that tells me when I mispell a variable in an assignment or use the wrong type for something.
Java is in a completely different leagues to the rest of these.
Whatever you think Java sucks at, the other languages mentioned here suffer from much worse.
A language is only as enjoyable as the hellish legacy projects that you'll actually spend your time maintaining.
That’s why the Java programmer looks happier in the “after” pic. Not as much as Python but it’s still there.
The jpeg is strong, but if you look closely she is covered with scabs and sores.
Does Java have an elegant way of compiling to native machine code now? Genuinely asking.
Not java itself, but GraalVM can do this https://www.graalvm.org/latest/reference-manual/native-image/
I can't confidently tell you it's production ready as I have never used it myself.
I’d rather use a language that doesn’t treat me like an incompetent child, removing unsigned ints because “they’re a source of bugs”.
Every time I use python it makes me want to throw my computer through my window. Doesn't happen with other languages. Pip fucking sucks it seems like every time I want to install dependencies for a project there is one that throws a compilation error when installing it. Like, why does it not try to download the version of the package that works with my version of python?? It doesn't even tell me why it failed!!!
i still do not fathom what on earth you people are doing to get these issues.
The worst annoyances i've had with python is just running the correct commands to install stuff, which is no different from working with git.
Yeah that's annoying but it's a short-term problem. Python just recently cleaned up some long-standing issues that broke backwards compatibility in packaging (for certain things). Most public modules that broke made trivial changes to fix the problems (once they learned about them) and life went on.
However, for some fucking reason a whole bunch of dependencies related to AI are dragging their feet and taking forever to fix their shit. Insisting that everyone "just use Python 3.10" and it drives me nuts too.
This problem started to become a real thing almost two years ago (so they had plenty of warning and time to fix things) and yet here we are with still a handful of core dependencies that won't install for things like Stable Diffusion, Flux, and various LLM stuff because they're dragging their feet.
I blame corporate culture: Enterprises hate upgrading their shit and they're as slow as glaciers sometimes. There's probably tooling at Nvidia, for example, that needs a ton of work for Torch to work with new versions of Python and since all their documentation already was written for running on Python 3.10 (and Ubuntu 22.04 LTS) they've created a lot of work for themselves.
Any day now they'll finally finish fixing all these little dependencies and then we'll have another two years of ease before the problem rises again with Python 3.14 and it's massive GIL-free improvements that require big changes in code to actually take advantage of them.
Yup. The fact that the "proper" method to develop is to work in a sandboxed environment tells me everything I need to know. I feel like the only thing you learn from python is how to fight python instead of anything about programming. Personally, I think we need to stop recommending it as a first language.
So... The proper way is... Global installs? What are you saying here?
Just use poetry or something, install the environment in your project directory and you're done. The versions of your dependencies are fixed, so are consistent across installs, and because it's sandbox you aren't polluting your system, and vice versa.
And if you're using a language that installs the dependencies localy, guess what? That's what you're already doing, only with less security.
Let me guess. Are the Java and Python programmers happy after because they leave up their technical debt for someone else to resolve? 🤭
that's why it's so addicting. lol
Cobol
💰💰💰💰💰
Y'all need Qt Creator: C++ for under the hood and Javascript for the UI. Virtually nonexistent base of coders who can do both competently and if you're not careful you end up moving to Finland because of it.
I worked a bit on the previous version of Neptune UI https://doc.qt.io/archives/neptune3ui/ wit QML and I worked mostly with integration of https://doc.qt.io/QtApplicationManager/ into different cars. But I stayed in Sweden for that.
I know Qt is cross-platform, but cars? Wow! I only ever used it for shitty Skype clones for Canadian ISPs.
It's the exposure to those languages that reassures Python developers that Python is superior.
Take nodejs for example. you write js on the backend, js on the front end and you're convinced that js is all you'll ever need.
Python managed to turn me away before I wrote a single line of code.
Running an already functional project took me nearly two hours and three separate tutorials.
What's so difficult?
undefined
import project as p p.run()
Hmm, I follow the package's readme and only get invalid command errors.
Gotta install the pip dependencies.
Oh but first you need to create a venv or everything will be global. Why isn't that local by default like with npm? Hell if I know!
Ah but before that I need to install the RIGHT version of Python. The one I already have likely won't do. And that takes AGES.
Oh but even then still just tells me the command is invalid. Ah, great, I live CLIs. Now I've gotta figure out PATH variables again and add python there. Also pip maybe?
Now I can follow the readme's instructions! Assuming I remember to manually open the venv first.
But it only gives me errors about missing pieces. Ugh. But I thought I installed the pip dependencies!
Oh, but turns out there's something about a text file full of another different set of dependencies that I need to explicitly mention via CLI or they won't be installed. And the readme didn't mention that, because that's apparently "obvious". No it's not; I'm just a front-end developer trying to run the darn thing.
Okay. Now it runs. Finally. But there's a weird error. There might be something wrong with my .env file. Maybe if I add a print statement to debug... Why isn't it showing up?
Oooh, I need to fully rebuild if I want it to show up, and the hot reload functionality that you can pass a command line argument for doesn't work... Cool cool cool cool.
You can't see the C one because it went by too quickly.
If Python has no haters I'm dead.
I fucking hate python. Fuck your stupid tabs/spaces bullshit.
And fuck your versioning system. And you dependency management. And tooling. Why are there like five different projects trying to lock down the python environment? Conda? Venv?
Even Ubuntu tries to lock down python so that it doesn't brick the install due to dependency conflicts.
Malbolge
I can't speak for others, but the python3 transition wiped the smile off my face for awhile there.
Why? The most annoying thing that I remember about it was popular modules that hadn't been ported yet. In essence, a temporary problem; growing pains.
The Unicode/string/bytes changes were welcome (to me). But that might just be because I had actually encountered situations where I had to deal with seemingly endless complexity and ambiguity related to Unicode stuff and encodings. Python 3 made everything much more logical 🤷
looking at python2 code these days is very uncanny, just the fact that print
is a magical keyword is so wrong: what is this? bash?
yep, that's how major version changes do be working. if they didn't decide to implement breaking changes to improve the language people would have been complaining about how terrible python2 is to use
Rust is a scrappy pimply kid vs a US Marine (still with pimples).
Ada is just two redacted pictures
I have worked with TypeScript for about 6 years now, professionally, and I really enjoy it. It's got all the nice things from JavaScript, obviously, and almost eliminates all the bad stuff/uncertainties from JavaScript. That's my opinion. I feel very confident working with TS.
Is that not just the post?
I think they jpeg'ed it up.
I dont mind Python, in fact I kind of like it. Its easy enough, works fast enough and has a huge community backing. Open up notepad and start typing. The space thing is kinda stupid. I prefer braces and semicolons but apparently new programmers cant remember to use them so Python just got rid of them.. not my thing but whatever, I can live with it.
However, I'd never really want to create a large project in it. The dev tools arent there, .net style project management isnt there. I can see how it just becomes a mess if you try to make something that isnt just downloading some data, parsing and importing to somewhere else. Its great for simple stuff. It can do larger stuff - though not as good. It cant do enterprise, performance heavy, commercial stuff.
Pick the right tool. Yeah you can make a website in x86 ASM and you can make embeded systems for the space shuttle in Python. The question is why.
It cant do enterprise, performance heavy, commercial stuff.
It can, I've been doing it for almost a decade. I've never noticed a lack of dev tools, and I'm not sure why .NET style project management is a prerequisite for creating enterprise applications. Obviously you can write more performant code in other languages, but I've found that 90% of the time, python's performance is good enough.
Agree on picking the right tool for the job though. Most of the time though, unless you're dealing with an extreme edge case (like writing embedded firmware for the space shuttle), that just means picking the language your team is most comfortable with.
Where Delphi?
he just chillin at the beach
Dead and buried?
It turned into C#
The JavaScript boy became a sexy mysterious wizard.
Checks out.
Python with ESModules would be neat.
Every time I type if typing.TYPE_CHECKING a part of me dies inside
Coding space characters? Fuck no
Why does JavaScript before-guy look like Alan Kay? 🤔