this post was submitted on 01 Mar 2024
14 points (100.0% liked)

Programmer Humor

32386 readers
1163 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
top 6 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 8 months ago

As a compiler developer this speaks to me on a deep level lol

[–] [email protected] 1 points 8 months ago (2 children)

It always gives me an uneasy feeling when I try to run code I just wrote and it works the first time.

[–] [email protected] 1 points 8 months ago

It must be cosmic rays, a bit flipped while compiling. No way I got it right the first time.

[–] [email protected] 1 points 8 months ago

When I first code something up, I think of it as a first draft, and I expect maybe 5ish typos / brainos per 100 lines. Only a few times in my life have I finished writing a few hundred lines of code, tried to compile / run it, and not seen at least a few errors.

When I don't see errors, it's almost always because somehow I managed to not compile / run the code at all. Like, one of my typos / brainos managed to cause it to skip that entire new block of code. Only once or twice has it happened because I actually wrote error-free code the first time. And, let me tell you, that perfect code sucked up so much more time than the more typical bad code.

With the bad code, I see the various errors, quickly fix them, and those errors convince me that the compiler / interpreter has actually seen all the new stuff and judged it. But, with perfect-from-the-start code, I now have to go in and throw in print statements, or step through a debugger to convince myself that yes, the system actually made it into that function and actually did execute those statements.

[–] [email protected] 1 points 8 months ago

Yes it compiles. It just throws segfaults.

[–] [email protected] 1 points 8 months ago

"Fuck, now I gotta document this without sounding like a crazy person."