Oh fuck off. years of code that cannot be easily redone in ANY editor. Whoever OCDd that into python 3 needs to have their asshole kicked up into their mouth.
why would it not have brackets? i detest syntax that is only applicable to a handful of situations and has to be specifically memorized separately from how every other part of the language works.
Not after 10 years of it not having brackets. And providing no editing ability to change it as a macro. That’s just cruel and inhumane and psychopathic.
If you developed it to not have brackets for the first one or two decades. Especially if there’s no possible way to easily edit it. You’re a psychopath to not consider this.
That’s what major versions are for - breaking changes. Regardless, you should probably be able to fix this with some regex hackery. Something along the lines of
For how popular of a language python is, at this point it’s a bad sign to me that the language has default way to manage versions and create new projects. I get having options, but options are annoying to new folk.
Honestly also annoying as a not-so-new folk. I just thought about this yesterday, I reasonably expect to clone a random project from the internet written Java, Rust et al, and to be able to open it in my IDE and look at it.
Meanwhile, a Python project from two years ago that I helped to build, I do not expect to be able to reasonably view in an IDE at all. I remember, we gave up trying to fix all the supposedly missing dependencies at some point…
Does python not require you to include your libraries? How can the runtime environment not tell you “you used whatever library but whatever library isn’t installed” is it then hard to find the library? Does python not have anything like perl’s cpan to consolidate all libraries? Can’t you just grep for the libraries a project calls and loop over the results adding that library to the build environment?
It does have that, the ecosystem is just really fractured and also not good.
Sort of the ‘standard’ way of managing dependencies is with Pip and a requirements.txt. By itself, that installs dependencies on your host system.
So, there’s a second tool, venv, to install them per-project, but because it’s a separate tool, it has to do some wacky things, namely it uses separate pip and python executables, which you have to specify in your IDE.
But then Pip also can’t build distributions, there’s a separate tool for that, setup.py, and it doesn’t support things like .lock-files for reproducible builds, and if I remember correctly, it doesn’t deal well with conflicting version requirements and probably various other things.
Either way, people started building a grand unified package manager to cover all these use-cases. Well, multiple people did so, separately. So, now you’ve got, among others:
Pipenv
Pip-tools
Conda
PDM
Poetry
Rye
Well, and these started creating their own methods of specifying dependencies and I believe, some of them still need to be called like a venv, but others not, so that means IDEs struggle to support all these.
Amazingly, apart from Rye, which didn’t exist back when we started that project, none of these package managers support directly depending on libraries within the same repo. You always have to tag a new version, publish it, and then you can fix your dependent code.
And yeah, that was then the other reason why this stuff didn’t work for us. We spent a considerable amount of time with symlinks and custom scripts to try to make that work.
I’m willing to believe that we fucked things up when doing that, but what makes still no sense is that everything worked when running tests from the CLI, but the IDE showed nothing but red text.
One of the things that frustrated me more with python, coming from R and Julia, was that the math and statistics functions weren’t default. But after learning more, and learning the math, numpy, scipy and others started yo like that, there’s different projects working on the same and you pick and choose what works better for you.
They help to digest the individual code blocks. My mind doesn’t digest whitespace the same way, it simply interprets it as formatting.
It’s also much more frustrating to edit imo since the formatter generally has no idea what to do with misaligned whitespace. I also find it frustrating that you can’t do multiline lambdas, last I used it.
The same meme with “wiring and lights” at the top. Then you descend to motors, transformers delta-y phases, RC and RL circuits, op amps, BJT circuits, reverse bias what?, differential equations, and eventually signals and systems.
Your perspective might be why I enjoy microcontroller work. I love getting to know everything about the system, reading hardware documentation, and getting the low level parts to work in a highly deterministic way.
I use ATTiny85 cores when a ESP32 costs almost the same, but the 85 only has 256 bytes of SRAM and five I/O pins so I can track it all and ensure it will do exactly what I want.
What’s the difference? I rarely use Python and every time I do I have to relearn which tools are the go to ones. In Java it’s a little simpler, we really just have Maven and Gradle. They have their own problems, sure, what tool doesn’t, but the thing that annoys me about python is the quantity of tools. There often isn’t a clear winner.
Now, to be fair to python, a lot of the ones mentioned on this post are very specifically for data science use cases and not general purpose development.
The thing that annoys me the most is how it cares about whitespace/carriage returns. I remember back in college when I was taking a CS class, learning Python and writing the Code on a Windows PC, emailing it to myself, and then attempting to run the code on Linux. Before I learned about the carriage return conversions, I remember having to rewrite about 75 lines of code before I got it to run. 🤬
While being controversial, rye is very good for small personal projects. It does pretty much everything from python version management to project scaffolding.
Yes. That being said, it matters which language you choose. COBOL is always a bad choice, unless writing in COBOL is the whole point. There isn’t really a universal best choice, either. Python is often a good one, but if you’re doing something big it will become this meme.
But the Lord came down to see the city OS and the tower app the people were building. The Lord said, “If as one people speaking programming the same language they have begun to do this, then nothing they plan to do will be impossible for them. Come, let us go down and confuse their language so they will not understand each other.”
So the Lord scattered them from there over all the earth, and they stopped building the city OS. That is why it was called Babel—because there the Lord confused the language of the whole world. From there the Lord scattered them over the face of the whole earth.
Are any of those things that you actually deal with as a beginner, though? Sure, those add complexities, but by the time you start to get into them, you are probably no longer a beginner.
Of course… But the idea is that it is misleading… And there’s more traps the beginners falls into. I have a feeling if beginners begin with C++, or other language that is strongly typed and requires memory management and then do some other language that is more abstract like python; they will become better programmers compared to them doing it in reverse.
For someone starting out, I would say that a major advantage of Python over any compiled language is that you can just create a file and start writing/running code. With C++ (which I’m also a heavy user of) you need to get over the hurdle of setting up a build system, which is simple enough when you know it, but can quickly be a high bar for an absolute beginner. That’s before you start looking at things like including/linking other libraries, which in Python is done with a simple import, but where you have to set up your build system properly to get things working in C++.
Honestly, I’m still kind of confused that the beginner course at my old university still insists on giving out a pre-written makefile and vscode config files for everyone instead of spending the first week just showing people how to actually write and compile hello world using cmake. I remember my major hurdle when leaving that course was that I knew how to write basic C++, I just had no idea how to compile and link it when I could no longer use the makefile that we were explicitly told to never touch…
Yeah but fuck all that python is good enough for most beginners. Variables, scope, loops, functions, operators… Once you get some of the principles down switching to C++ or similar isn’t nearly as bad.
Being a person that tried to learn C/C# from scratch in my early days python was a good gateway language.
I don’t know, man, far too many people seem to think that “easy to learn” means they’ll know all they need to know in relatively short time.
Like, you talk to our data scientists and they’ll tell you doing anything in Python, no problem. But you talk to our seasoned software engineers and you see the war flashbacks in their eyes, because it racks up in complexity so fucking quickly, it’s insane.
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmerhumor@lemmy.ml
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
Posts must be relevant to programming, programmers, or computer science.
No NSFW content.
Jokes must be in good taste. No hate speech, bigotry, etc.
“Print needs ()”
Oh fuck off. years of code that cannot be easily redone in ANY editor. Whoever OCDd that into python 3 needs to have their asshole kicked up into their mouth.
Meanwhile Nim:
Thanks for coming to my Ted-talk.
More here: Nim for Python Programmers
why would it not have brackets? i detest syntax that is only applicable to a handful of situations and has to be specifically memorized separately from how every other part of the language works.
Not after 10 years of it not having brackets. And providing no editing ability to change it as a macro. That’s just cruel and inhumane and psychopathic.
Imo is more intuitive the need of () in print,like is a function like any other, why would not use ()?
If you developed it to not have brackets for the first one or two decades. Especially if there’s no possible way to easily edit it. You’re a psychopath to not consider this.
That’s what major versions are for - breaking changes. Regardless, you should probably be able to fix this with some regex hackery. Something along the lines of
should do the trick.
I would recommend pdm and micromamba.
For how popular of a language python is, at this point it’s a bad sign to me that the language has default way to manage versions and create new projects. I get having options, but options are annoying to new folk.
Honestly also annoying as a not-so-new folk. I just thought about this yesterday, I reasonably expect to clone a random project from the internet written Java, Rust et al, and to be able to open it in my IDE and look at it.
Meanwhile, a Python project from two years ago that I helped to build, I do not expect to be able to reasonably view in an IDE at all. I remember, we gave up trying to fix all the supposedly missing dependencies at some point…
Does python not require you to include your libraries? How can the runtime environment not tell you “you used whatever library but whatever library isn’t installed” is it then hard to find the library? Does python not have anything like perl’s cpan to consolidate all libraries? Can’t you just grep for the libraries a project calls and loop over the results adding that library to the build environment?
It does have that, the ecosystem is just really fractured and also not good.
Sort of the ‘standard’ way of managing dependencies is with Pip and a
requirements.txt
. By itself, that installs dependencies on your host system.So, there’s a second tool, venv, to install them per-project, but because it’s a separate tool, it has to do some wacky things, namely it uses separate
pip
andpython
executables, which you have to specify in your IDE.But then Pip also can’t build distributions, there’s a separate tool for that,
setup.py
, and it doesn’t support things like .lock-files for reproducible builds, and if I remember correctly, it doesn’t deal well with conflicting version requirements and probably various other things.Either way, people started building a grand unified package manager to cover all these use-cases. Well, multiple people did so, separately. So, now you’ve got, among others:
Well, and these started creating their own methods of specifying dependencies and I believe, some of them still need to be called like a venv, but others not, so that means IDEs struggle to support all these.
Amazingly, apart from Rye, which didn’t exist back when we started that project, none of these package managers support directly depending on libraries within the same repo. You always have to tag a new version, publish it, and then you can fix your dependent code.
And yeah, that was then the other reason why this stuff didn’t work for us. We spent a considerable amount of time with symlinks and custom scripts to try to make that work.
I’m willing to believe that we fucked things up when doing that, but what makes still no sense is that everything worked when running tests from the CLI, but the IDE showed nothing but red text.
So it’s big and diverse ecosystem with multiple standards to choose between
The problem isn’t that it’s missing something like cpan, it’s that there are ten incompatible ones to choose between
Remind me not to learn python. If I get into microcontrollers I shall use their C++ like language not micropython ;)
I really like the ability to dig up code from twenty years ago and just run it
If the language can just break during runtime because of code indentation, I can’t really trust it
Why would it be a bad sign that the language has built in tools for common things you need to do?
One of the things that frustrated me more with python, coming from R and Julia, was that the math and statistics functions weren’t default. But after learning more, and learning the math, numpy, scipy and others started yo like that, there’s different projects working on the same and you pick and choose what works better for you.
Agreed, numpy really could/should be built in.
Also pandas and matplotlib but maybe that’s just me.
-Data Nerd
The standard library is where project go to die.
But what about the pleasure of starting any project with “import pandas as pd”?
I’m guessing, they meant to write “that the language has no default way”.
I didnt upvote the other python-beginer friendly meme cause it wasn’t accurate. But this one is on point.
Hey, no pointers!
Is it the language’s fault that you want to solve complex problems?
Is it? No. Is it also my fault I am stupid? No.
YES!
You jest but it can happen when what the docs says doesn’t reflect the implementation. And also, that’s what we call bugs.
I don’t know who needs to hear this, but Python, like most languages, can be as complex as you make it.
no i will NOT use more than one line in my scripts
Yeah my code is a disaster!
Felt
Preach!
Very little of this is uniquely a problem in Python. It seems to me that your problem is with software development in general.
My problem is with semantic whitespace
That’s really the part I hate the most. it just feels wrong
That’s the part I like the most. I don’t want to work on any code that isn’t properly formatted, and at that point why bother with curly braces, etc?
They help to digest the individual code blocks. My mind doesn’t digest whitespace the same way, it simply interprets it as formatting.
It’s also much more frustrating to edit imo since the formatter generally has no idea what to do with misaligned whitespace. I also find it frustrating that you can’t do multiline lambdas, last I used it.
I used to love it so much more…
come into the light, my child. become an electrical engineer.
The same meme with “wiring and lights” at the top. Then you descend to motors, transformers delta-y phases, RC and RL circuits, op amps, BJT circuits, reverse bias what?, differential equations, and eventually signals and systems.
at least then you’re dealing with the laws of nature instead of man-made BS. if you’re like me and have 0 tolerance for BS, it’s an absolute win.
Your perspective might be why I enjoy microcontroller work. I love getting to know everything about the system, reading hardware documentation, and getting the low level parts to work in a highly deterministic way.
I use ATTiny85 cores when a ESP32 costs almost the same, but the 85 only has 256 bytes of SRAM and five I/O pins so I can track it all and ensure it will do exactly what I want.
No, the dependency management in Python is a nightmare. There’s like a billion options for it.
Use pipenv and don’t think about it anymore.
What’s the difference? I rarely use Python and every time I do I have to relearn which tools are the go to ones. In Java it’s a little simpler, we really just have Maven and Gradle. They have their own problems, sure, what tool doesn’t, but the thing that annoys me about python is the quantity of tools. There often isn’t a clear winner.
Now, to be fair to python, a lot of the ones mentioned on this post are very specifically for data science use cases and not general purpose development.
The thing that annoys me the most is how it cares about whitespace/carriage returns. I remember back in college when I was taking a CS class, learning Python and writing the Code on a Windows PC, emailing it to myself, and then attempting to run the code on Linux. Before I learned about the carriage return conversions, I remember having to rewrite about 75 lines of code before I got it to run. 🤬
The syntax wouldn’t work without consistent spacing
oh my fuck. circular imports.
I set out to create a Discord Bot in Python, then gave up trying to use an easy “proper” server-side language and just did it in TypeScript
Some people in the comments didn’t take it as tongue-in-cheek as I did. 😝
I thought this was really funny. That’s a good collection of toe stubs.
There is a lot of stuff to learn to be good at python but I still love it.
While being controversial, rye is very good for small personal projects. It does pretty much everything from python version management to project scaffolding.
Coming from c# then typescript and nextjs, rye feels very intuitive and like a nice bridge / gateway drug into python.
I know this may be an unpopular opinion on lemmy, which leans so heavily towards Linux and FOSS, and I’m a Linux user myself but….
I actually really like C# and .NET (the modern cross-platform version anyway).
.net from core 2 was awesome. From 5 onwards it’s been beyond amazing!
That link is broken…
They didn’t include https so the link doesn’t know what protocol it’s meant to open with
https://rye.astral.sh/
Thanks!
they are also working on a follow-up, uv. not really a fan of writing tooling in another language but it works really well.
I think venv is the best because it’s built in. But I’m also not a Python dev.
Oh god, I feel this. Why can’t there be a sane language‽
bash
Computer programming, regardless of language, is hard. The computer does exactly what you tell it to.
Yes. That being said, it matters which language you choose. COBOL is always a bad choice, unless writing in COBOL is the whole point. There isn’t really a universal best choice, either. Python is often a good one, but if you’re doing something big it will become this meme.
There are 2 types of programming languages
People complain about perl, but no one uses perl.
C exists
This message brought to you by TempleOS
Amen. Now, where’s that Wine?
It would have to be written by sane people.
Because no one likes Java.
Hahahahahhahaha
While Java js definitely one of the best, it still has some quirks that you need to know about.
That’s an unfortunate typo
I mean javascript is java right? It’s in the name
Java²script
Are any of those things that you actually deal with as a beginner, though? Sure, those add complexities, but by the time you start to get into them, you are probably no longer a beginner.
Of course… But the idea is that it is misleading… And there’s more traps the beginners falls into. I have a feeling if beginners begin with C++, or other language that is strongly typed and requires memory management and then do some other language that is more abstract like python; they will become better programmers compared to them doing it in reverse.
For someone starting out, I would say that a major advantage of Python over any compiled language is that you can just create a file and start writing/running code. With C++ (which I’m also a heavy user of) you need to get over the hurdle of setting up a build system, which is simple enough when you know it, but can quickly be a high bar for an absolute beginner. That’s before you start looking at things like including/linking other libraries, which in Python is done with a simple
import
, but where you have to set up your build system properly to get things working in C++.Honestly, I’m still kind of confused that the beginner course at my old university still insists on giving out a pre-written makefile and vscode config files for everyone instead of spending the first week just showing people how to actually write and compile hello world using
cmake
. I remember my major hurdle when leaving that course was that I knew how to write basic C++, I just had no idea how to compile and link it when I could no longer use the makefile that we were explicitly told to never touch…100 times this.
I think I have a solid grasp of C++ and its manual memory management, but give me a build error and I’ll have zero clue how to fix it.
Yeah but fuck all that python is good enough for most beginners. Variables, scope, loops, functions, operators… Once you get some of the principles down switching to C++ or similar isn’t nearly as bad.
Being a person that tried to learn C/C# from scratch in my early days python was a good gateway language.
I don’t know, man, far too many people seem to think that “easy to learn” means they’ll know all they need to know in relatively short time.
Like, you talk to our data scientists and they’ll tell you doing anything in Python, no problem. But you talk to our seasoned software engineers and you see the war flashbacks in their eyes, because it racks up in complexity so fucking quickly, it’s insane.