This meme was written by a novice that does not yet know true pain. An error that takes fifteen minutes to find! In your own code! Ha, you young whipper snapper... just wait until you have to debug an unforeseen edge case in a library... especially if it's compiled. And once you've seen that, once you've known that horror, come and talk to me about DLL hell.
Unless you're working with installers and, probably, in C++ it's unlikely you'll ever meet this Cthonic horror. Zalgo? Tony the Pony comes? You have met that friendly demon of development? They are but the apprentice... DLL hell is a span of time measured in days.
... Alternatively talk to me about trying to track down an extra newline at the end of a PHP file, that (against all advice) has a closing tag, that causes some output to be sent preventing you from sending headers to the client. There's no error detection for that and PHP is an interpreted language... you just need to check files manually!
Not really programming but I once had an issue that lasted for months like that:
I'm working with a software specific to our industry that generate quotes, sales order and production orders.
For quotes and sales order a PDF can be created and archived in the right folder automatically, or you can use the windows "Print to pdf" printer to do that manually which take closes to a minute for the sales person to create the right folder, with the right name and put the PDF in there with the order number.
The automatic PDF creation fail to include our logo each time and I battled for months with the software company that was telling me that everything is working fine.
Until I looked in the metadata of the PDF the company was sending us, few of the PDFs they were sending is did not have any logo and were created by their software, some had their logo and were created with an external PDF printer.
After I realized they had the same problem internally but were lying about it I just took a day to create a python script running as a service on the server that automatically add the logo on the PDF created and that was it.
Can't you just grep (or something) for ?> followed by a whitespace? Though yeah, both are fun problems. Luckily I had to deal with DLL hell only once in my lifetime and presumably, if I stay on the same career path, will never have to again.
Clang won’t tell you if you’re missing a return statement, even with all warnings on and will just let it crash during runtime. Static analysis won’t save you from all stupid mistakes.
Static analysis won't save you from all of them, but they will definitely save you from the great majority of the ones ProgrammerHumor seems to get worked up about.
I still see people sharing ancient memes about pouring over code for hours looking for mismatched curly braces, missing semicolons, and greek question marks. These and the bulk of minor syntax problems like them should all be complete non-issues with modern tooling.
Well, what most of us do... manage to reproduce it by chance one out of twenty attempts and then remove any evidence that you managed to trigger it and mark the ticket "unable to reproduce". Bury the ticket by removing any good tags or keywords and hope it's at least three months until anyone else reports the error so you can repeat the dance.
Time to delivery is important. Moving quickly withing a language and frameworks that prioritise speed over safety gets a product out the door is important when testing whether a business idea holds merit. Once you're established with a better scope of the project you should be rewriting this in a static language.
Dynamically typed interpreted languages should never be used for long term support imo
Idunno, Ruby was my first language and the other day I was trying to write a one-file script to wrangle some CSV data and even that got irritating. What does this function need? What does it return? Who the fuck knows! Is it even a function? Run it and find out, loser
And I’ve got reasonably popular projects in ruby, I’m not a beginner.
That's nerve wracking. But you know what's worse? Finding code that shouldn't work, not being able to figure out why it works, and having to leave it in production because of you "fix" it, the whole damned thing will come fluttering down like a house of cards in a slight breeze.
There is actually an approach for this. Leave the cursed code in, but implement it again in the same file, from scratch, without looking at the cursed code. You'll either unthinkingly fix the combination of conditions that led to bad code being correct, or you'll realize why that was what you needed the whole time.
More often than not you'll actually learn that the code is never really ran and it just looks like it does something, while the real code runs somewhere entirely else.
You should switch to Rust. Through massively impressive feats of compiler engineering and a phenomenal amount of novel syntax constructs that make Rust the hardest language for existing programmers to learn, the rustc team has successfully managed to move this agony from after the program compiles to before.
"Okay, everything looks good, time to run it"
Code fails
"What? Let me try again…"
Code fails
"What the fuck, where's the issue???"
Checks syntax error
"GOD DAMN IT TELL ME WHERE THE FUCKING ISSUE IS YOU PIECE OF SHIT"
Hopelessly tries to fuck around with the code and find the error
"PLEASE PLEASE JUST WORK WHY WON'T YOU WORK-"
Notices obvious error that I should have noticed like 15 minutes ago
"Oh. I'm a fucking idiot."
Code works now
"I have gained nothing from this experience and I will do it again"
#coding #coding pain #python #coding hell
#this is from painfully personal experience
#but replace 15 minutes with a fucking hour
Then when it's a job, you can replace that with weeks. But instead of a silly syntax error, it's a slow memory leak that nobody seems to have noticed for years, but that now forces you to restart your service every day at the very least. And we just spent an afternoon, six people, looking at it and only making it worse.
Hey at least they didn't have to trace a bug in their core framework. Only to find it is both in the issue tracker and 10 years old, and there is no offical fix. So you have to make a hacky patch yourself
The thing is, you don't make syntax mistakes on purpose. Especially if you know a language extremely well, a syntax error will happen at random, you won't notice it (if you did, you would have fixed it), and it therefore becomes invisible to you.
Part of your brain "knows" there's no error, because you know the language extremely well, and because if you had made an error, you would have fixed it.
This leads to acute, irrational frustration. It's very human.
There's not really a solution, just smoke more weed and take your eyes off the screen occasionally.
I've had this experience in other languages, but never python. Find the missing semicolon and getting a cryptic error message is a very common programming experience.
The reason I never had this problem in python is that by the time I learned it, I was already a fairly experienced developer, and I used better tooling from the get go. This kind of error is reallllllly hard to make in a modern IDE using a linter and formatter.
That suggests to me that this is more likely a fairly language agnostic experience. It might even bias people against the languages they learn first.
I mean, I guess, it depends on your perspective. Some folks work in garbage/proprietary languages all day and would be very glad to have Python-levels of compiler help. Others work in JS/TS and do have similar nonsense to deal with as in Python.
But lots of languages, e.g. JVM languages, Rust etc., don't struggle with semicolons and the like.
And they don't have to compile at runtime, so they can easily outclass Python for more complex error reporting, which is at least my experience.
Personally, I have pretty much only had the experience of "tell me where the error is" in Python and TS.
As someone who has taught people a variety of languages. No. This happens regardless of what language you choose. It's just a universal programmer experience to get frustrated at your work