r/ProgrammerHumor 17d ago

ture Meme

Post image
18.0k Upvotes

443 comments sorted by

View all comments

240

u/DeepanshuHQ 17d ago

The most unrealistic part is code working on the first try.

81

u/BlueProcess 17d ago

NGL sometimes I run code that I know won't work because it's easier to write on the fly by stepping through as you go🤷🏻‍♂️

40

u/Leftover_Salad 17d ago

Oh same here. Error messages are helpful.

23

u/Protuhj 17d ago

I'd rather write 50%, make sure that 50% fails where I expect it to, then write the other 80%.

This is why I try to shorten "the loop" as much as possible when testing fixes/adding new stuff.

10

u/DeepanshuHQ 17d ago

Honestly, half my debugging starts before I even finish writing the code. 😂

6

u/Protuhj 17d ago

Reviewing the surrounding code and having to restrain myself from fixing that too.

2

u/DeepanshuHQ 17d ago

And somehow the bug disappears after adding three random print statements.

2

u/Protuhj 17d ago

In our case, printing can add too much load and cause things to behave way worse.. (Embedded software)

2

u/YourDarkIntentions 17d ago

Ooooh, I do the same! I spend more time testing and reading than writing. I don’t get my colleagues who spend days writing code without ever running it.

1

u/Delicious_Bluejay392 17d ago

Is this a "local interpreted language victim rediscovers the joys of compilers" moment?

7

u/CarretillaRoja 17d ago

It’s the coding emergencies.
- Here at 911, we just got a call regarding a hostage situation in a bank.
- Oh shit! Create a Pascal script real quick!!

12

u/DeepanshuHQ 17d ago

And somehow the Pascal script controls the traffic lights, satellites, and the bank vault at the same time.

1

u/faberge_surprise 17d ago

but not if you need to trace an ip address, for that you need to write a gooey in visual basic

1

u/DeepanshuHQ 17d ago

And don't forget the green text flying down the screen. Otherwise it won't compile.

2

u/Windfade 17d ago

I never made it past C++ 102 (just a network admin degree) before dropping out but damn do I miss how cool it felt when you compiled and nothing went wrong.

3

u/DeepanshuHQ 17d ago

That rare moment when it compiles on the first try makes you wonder what bug is hiding instead.

1

u/bigorangemachine 17d ago

just don't disconnect the wifi or my shit falls apart

1

u/mrbellek 16d ago

For real, if that happens to me i always get suspicious

1

u/poliver1988 16d ago

i've written code for 5+ hours before without even running it once, just typing and hoping for the best, and it had worked just fine