b.l3n.co

LolaCat, to programmerhumor in The coding experience
Image Transcription:

number-1-haxorus-fan

[In large text]
The coding experience:

“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

57 notes

Vishram1123, to programmerhumor in The coding experience

Me and my cs prof i’m TA’ing for trying to debug two swapped lines for an hour yesterday be like

Synthead, to programmerhumor in The coding experience

Read your errors fully, kids

jubilationtcornpone, to programmerhumor in The coding experience

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.

xantoxis,

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.

pixelscript, to programmerhumor in The coding experience

It’s 2023. If you’re not using an IDE or a highly extensible text editor with simple static analysis features, I really don’t know what to tell you.

GigglyBobble,

I had to read it repeatedly and check if it really said "syntax error". What will those people do if they encounter their first race condition?

xmunk,

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.

Arigion,

They insert sleep(1) and print statements. No shit. I had to fix this in two projects. One was a complete rewrite.

tiredofsametab, to programmerhumor in The coding experience

Write smaller units. Test those units. Save time.

Knusper, to programmerhumor in The coding experience

I mean, it’s not unlikely for a programming beginner to write Python, but I certainly had a hunch this was Python before reading to the end.

So, yeah, this is at least partially the Python experience, not generally the programming experience…

BeigeAgenda,
@BeigeAgenda@lemmy.ca avatar

I can suggest using pylint, it can find a lot of the syntax errors.

Enkers, (edited )

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.

Knusper,

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.

xantoxis, to programmerhumor in The coding experience

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.

dingleberry, to programmerhumor in The coding experience

There are way too many Notepad enthusiasts out there.

xmunk, (edited ) to programmerhumor in The coding experience

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!

lukas, (edited )
@lukas@lemmy.haigner.me avatar

I spent 7 hours to debug why doubles in Java classes brick my class file parser only to discover the following small print in the specification after I read the corresponding OpenJDK source code: In retrospect, making 8-byte constants take two constant pool entries was a poor choice. Yeah no shit. I chose to write a custom user stylesheet for Oracle specifications to enlarge notes since they’re obviously critical to the implementation of JVMs. I guess the technical writers at Oracle didn’t want to offend the developers who wrote the JVM originally at the expense of developers who write JVMs today.

wraithcoop, to programmerhumor in The coding experience

I’ve learned that in these scenarios, show it to somebody else. They’ll see the stupid mistake you made within seconds.

saturnalia, to programmerhumor in The coding experience

I spent 4 hours today trying to figure out why a calculation to get a percentage (in decimal) was always returning exactly 1 no matter what parameters I tried passing to it. Turns out I’d forgotten to cast the ints being provided to decimal, even though I’ve had to do that so many times before. I’m not a sharp man

ummthatguy, to risa in Average VOY episode:
@ummthatguy@lemmy.world avatar
EmpathicVagrant, to risa in Average VOY episode:

So I’m really bad at this but am I looking at Doctor of Nine?

interolivary, to risa in Average VOY episode:
@interolivary@beehaw.org avatar

Stupid sexy emergency medical hologram

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • aaaaaaacccccccce
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • KamenRider
  • Ask_kbincafe
  • TheResearchGuardian
  • KbinCafe
  • Socialism
  • oklahoma
  • SuperSentai
  • feritale
  • All magazines