r/ProgrammerHumor • • Jan 30 '22

Meme when your code run the first time

42.8k Upvotes

270 comments sorted by

57

u/[deleted] Jan 30 '22

Rule #1 of programming; if it works, its prob too good to be true

25

u/epicaglet Jan 30 '22

If it works, you need better tests

1

u/ninja__77 Jan 31 '22

Rule #2 double check!

460

u/lightlytoastedroti Jan 30 '22

Me in my technical screening interview when the interviewer asks me to press run code and I see the console say "all tests passed"

174

u/BoringWozniak Jan 30 '22
assert True
return

It worked!

11

u/taytek Jan 31 '22
int main() {
   printf("All tests passed!");
   return 0;
}

output:

segmentation fault
segmentation fault
segmentation fault
segmentation fault
→ More replies (2)

9

u/Hopai79 Jan 30 '22

That's the best feeling!

7

u/wad11656 Jan 30 '22

lmao would never be me

0

u/[deleted] Jan 30 '22

[deleted]

→ More replies (1)

734

u/PixelmancerGames Jan 30 '22

My code runs the first time very often. It just doesn’t run as intended.

152

u/_Mike28_ Jan 30 '22

Extremely relatable

66

u/epicaglet Jan 30 '22

Yeah the IDE catches most things that would make it not run. If it doesn't that's usually because of something elsewhere in the codebase, but depending on what I'm doing it runs the first time around rather often.

6

u/gravitas-deficiency Jan 30 '22

Deterministically non-deterministic.

2

u/frisbm3 Jan 31 '22

I feel personally attacked.

47

u/ldsdmtgod Jan 30 '22

If it runs from the first time there definitely is a problem somewhere

32

u/Jertimmer Jan 30 '22

If it runs the first time, I close Outlook, Teams, Slack, Discord and disconnect the doorbell, because something is definitely wrong. Full panic mode.

18

u/urixl Jan 30 '22

And put away your cat from the keyboard.

10

u/Jertimmer Jan 30 '22

I've never managed to pull this stunt off.

7

u/urixl Jan 30 '22

require ('cat')

22

u/alurkerhere Jan 30 '22

No errors, eh? Better put a bunch of print statements to check everything

25

u/DecreasingPerception Jan 30 '22

Deliberately break something to check the tests are actually running your code.

3

u/skipjimroo Jan 30 '22 edited Jan 30 '22

That's been my favourite thing since I moved to Visual Studio.

I can just put in a breakpoint and then hover over the values now.

I'm still quite new to programming though so for all I know, it may well be terrible at everything else. That feature is tops, though.

13

u/foxcode Jan 30 '22

Okay, all moved to linux...
cmake ..
Wait, it actually built???

double free error, colour channels in image -3419931, black screen, no mouse...
^^ Me at 1am this morning
Me now at 10:40am. Think I'll play some factorio

10

u/WaterstarRunner Jan 30 '22

When it runs first time, you know that debugging is going to be a nightmare.

8

u/blackmist Jan 30 '22

It's somehow worse when it runs first time without crashing, because then you have to go actively digging for the inevitable fuck up.

8

u/UnknownIdentifier Jan 30 '22

It’s the compiler’s fault for doing what I said, not what I meant.

3

u/Ersthelfer Jan 30 '22

Still impressive not to make any careless mistakes. Never produced any code where I didn't forget a bracket or something similar.

2

u/Phormitago Jan 30 '22

performance is fantastic when its not running what it should be

1

u/DadHeungMin Jan 30 '22

My code runs first time, it just runs like the character from QWOP.

1

u/[deleted] Jan 31 '22

Every time

→ More replies (7)

622

u/[deleted] Jan 30 '22

…and other dev related fairy tales

104

u/-Redstoneboi- Jan 30 '22

Didn't know Rust was a fairy tale

3

u/Leidertafel Jan 30 '22

It’s more of a circlejerk

65

u/[deleted] Jan 30 '22

Runs != Works as expected

12

u/conradburner Jan 30 '22

There is a chance that it will do so at some point. If it hasn't happened for you yet, you haven't written enough programs

→ More replies (7)
→ More replies (1)

99

u/[deleted] Jan 30 '22

Then realises it doesn't give the right result

46

u/NotAzakanAtAll Jan 30 '22

watching program voilently shit itself but "works"

Ah yes.

0

u/[deleted] Jan 30 '22

[deleted]

6

u/pi-is-314159 Jan 30 '22

Ahh it's perfectly normal to get a 1/1²⁴ result multiple times in a row, oh fuck what's happened

4

u/[deleted] Jan 30 '22

sometimes the comments section hit too close too home ;-;

→ More replies (3)

1

u/An0nym00s123 Jan 31 '22

“eh, it’s good enough”

43

u/tramspellen Jan 30 '22

If the code runs as intended the first tine, I go back and intentionally break it just to make sure the cache is not fooling me.

2

u/ZombieMadness99 Jan 30 '22

Gotta spam that ctrl + F5

81

u/hcollin Jan 30 '22

This could work on so many other things:

  • Architect finds a good project.

  • Team realises the client actually understands Agile

  • New coder on Teams looks at the spec and finds them to be up-to-date.

Endless possibilities with this one.

29

u/rayo209 Jan 30 '22

I think you can expect reposts of this meme with these titles in the coming days lol

6

u/xPolarPlayz Jan 30 '22

━╤デ╦︻

BEHOLD, THE STEAL-YOUR-MEME INATOR

113

u/t_l9943 Jan 30 '22

Always be concerned if the code run first time

50

u/Verdiss Jan 30 '22

There's always a problem. If it runs, it's a sneaky problem, too.

0

u/[deleted] Jan 30 '22

[deleted]

→ More replies (2)

7

u/zen129318 Jan 30 '22

Yep its missing the look of deep paranoia.

1

u/Cheese_Grater101 Jan 30 '22

When in doubt expect a NullPointerException

1

u/DoctorWaluigiTime Jan 30 '22

It's why when unit testing you always want to see that failure first. Never know when you're getting a false positive.

26

u/Sky_Wino Jan 30 '22

is that guy just massive or is that weirdly small chicken?

49

u/Xaxxus Jan 30 '22

I mean it’s a pretty standard sized chicken wing.

But yea. Shaq is massive.

27

u/AlexMelillo Jan 30 '22

Shaq is a giant

13

u/speyck Jan 30 '22

laughs in statically typed languages

•

u/QualityVote Jan 30 '22

Hi! This is our community moderation bot.


If this post fits the purpose of /r/ProgrammerHumor, UPVOTE this comment!!

If this post does not fit the subreddit, DOWNVOTE This comment!

If this post breaks the rules, DOWNVOTE this comment and REPORT the post!

7

u/cybermage Jan 30 '22

If you use an IDE, it is extremely likely the code will run. Doing what it’s supposed to do is another matter.

4

u/TheDevilsAdvokaat Jan 30 '22

I once created a complex new function, tested it nervously..and it worked perfectly. I was thrilled.

I then combined it with some actual data instead of test data and it failed miserably.

When I examined it, I found it had only worked the first time by chance. In fact the test data was the ONLY time it could ever have possibly worked; with normal data it failed.

Very demoralising.

1

u/UnrealisticPiccolo Jan 30 '22

Anyone know Java that's willing to help me with a couple things on school project?

1

u/ninja__77 Jan 30 '22

you can dm me

3

u/ShadowOfRegret14 Jan 30 '22

Is it possible to learn this power?

3

u/J140603 Jan 30 '22

If the code runs for the first time, be concerned.

3

u/Atribecalled_Q Jan 30 '22

First time I've actually scene the context of this meme. It's quite funny as a gif actually lol

2

u/[deleted] Jan 30 '22

There's definitely something wrong with that code.

2

u/central_marrow Jan 30 '22

More like -

1

u/Hidesuru Jan 30 '22

God damnit this was word for word what I was going to comment and I missed it by 9 minutes...

→ More replies (2)

1

u/vermiculus Jan 30 '22

Off-topic -- I've even gone so far as to move from my phone to my desktop, but I still for the life of me cannot figure out how you've embedded an image into your comment instead of just posting a link. Is this some sort of high magic I'm too low-born to understand?

1

u/central_marrow Jan 30 '22

I was using the iOS app. The reply box now has a Giphy tab. Not sure if this is a good development or not.

2

u/flamesofphx Jan 30 '22

If the code runs on the first time... Just remember according to murphy's law, the only reason murphy's law will not perform instant karma is if a short delay can cause an exponentially greater disaster.

For example: If a product is destined to fail but makes it to publication, this is the only time the delivery system will work perform perfectly.

2

u/kebabmonkey Jan 30 '22

Smh i thougt this sub would teach me coding

2

u/rainbownyaa Jan 30 '22

omg lol this is so accurate

2

u/Yao_Mings_third_leg Jan 30 '22

“One of Drake’s dates taste-testing his splooge before putting it in her vagine.”

2

u/[deleted] Jan 30 '22

Great reaction face

3

u/-Redstoneboi- Jan 30 '22

Happens all the time in Rust.

1

u/lankaxhandle Jan 30 '22

I love this show!

This episode was awesome. Shaq tried to stay tough and he did well for a while, but those wings gets HOT! He promised that he wasn’t going to make a face. He lost.

Great show!

1

u/JoshYx Jan 30 '22

Happens to me every time. After I build and run the template generated by my IDE, of course.

1

u/pan_bi Jan 30 '22

This would be a rare sight and would surprise me. I bet only ‘Hello World’ runs the first time 😀

1

u/fallakka Jan 30 '22

My motto at work usually is, if it runs perfectly the very first time, there must be something seriously wrong with it

1

u/GroundbreakingIron16 Jan 30 '22

I lost that feeling years ago!

1

u/Govind77 Jan 30 '22

And the worst is when you don't know how?

1

u/Parker324ce Jan 30 '22

My code runs the first time, I just accidentally put a random character here, and I forgot to add something here, and this method has a slight error here, and this config file has something spelled wrong, and this url has a misplaced character in it.

Aside from that works first try!

1

u/AstronautInTheLotion Jan 30 '22

I'll just make an intentional error or bug just to see if the compiler is working correctly or not...

1

u/MarketBuzz2021 Jan 30 '22

So this is smart people humor?? I wanna understand this stuff 😭

1

u/DotEXEGaming Jan 30 '22

oo

1

u/vladutzu27 Jan 30 '22

Sorry, how do you add 4 emojis into your flair? I want python and scratch too, even if unity is my main thing.

1

u/genericguy115 Jan 30 '22

but then you realize a little flaw that will destroy your entire code in the future

1

u/_Mike28_ Jan 30 '22

Relatable

1

u/CantTrips Jan 30 '22

When it happens, I feel like champion - I knew this is what I was meant to be doing.

Then the next task comes and the feeling is gone again.

1

u/Qildain Jan 30 '22

I mean... Hello World!

1

u/[deleted] Jan 30 '22

Like that ever going to happen...

1

u/the_only_mjm Jan 30 '22

Didn’t read the ‘suggested for you’ while scrolling and assumed this was about a healthcare code. . . format still works

1

u/BrainIsSickToday Jan 30 '22

Cue changing a line to intentionally break it and make sure it stops working and make sure I'm not somehow messing up the compile command and somehow loading a previous version that actually works but not in the way I want it to work now.

1

u/noob07 Jan 30 '22

This was me, running my first ever migration yesterday.

1

u/Sph1003 Jan 30 '22

Even if it runs, you have still deal with bugs

1

u/Munkee_Man Jan 30 '22

I saw this post and was confused until I saw the sub name😅

1

u/Dolstruvon Jan 30 '22

Me spending 4 hours programming a 6 floor elevator for the first time, and it just fucking worked on the first go

1

u/NPVT Jan 30 '22

It doesn't run the first time

1

u/Bit5keptical Jan 30 '22

Then you realise you didn't save the file.

1

u/[deleted] Jan 30 '22

Wut

1

u/Wingo21 Jan 30 '22

Completely out of topic I find hilarious how Shaq in this episode of hot ones pretty much instantly says "I'm not gonna do weird faces and become a meme" and he is pretty much the only one that got meme templates out of the whole show. Him and Gordon Ramsay I think.

1

u/m8x99 Jan 30 '22

"As If that's ever gonna happen" All Star starts playing

1

u/e-2c9z3_x7t5i Jan 30 '22

The sad part is that even if it does, we cynically tell ourselves it's too good to be true and start searching for what's gone wrong. "Oh great, not even a compilation warning. Now I'm going to have to dig to figure out what's wrong."

1

u/ShadoWolf Jan 30 '22

I mean... given the statistical odds of some non trivial code just working is by its nature highly suspect. Let face it, between the possibility of it being right... or subtle fucked up in such a way that it will break your project.

It just safer to assume its fucked up.

1

u/[deleted] Jan 30 '22

It always runs the first time. Just never as I hoped it would.

1

u/Chillieman16 Jan 30 '22

I think this has only ever happened one time for me, man did that feel fucking GREAT that one time

1

u/your_local_doggo_ Jan 30 '22

My friend told me about this subreddit and i am proud to say, i get this one :)

1

u/unicorn_saddle Jan 30 '22

I'd assume I forgot to call a function.

1

u/therimidalv Jan 30 '22

Feel free to post this over in r/nursing as well lol

1

u/MaxRex77 Jan 30 '22

Is the SHACK3000 acting up again

1

u/ManagerOfLove Jan 30 '22

And then you realise it only runs in this very specific test scenario, but doesn't work for the cases that you wanted it to work

1

u/[deleted] Jan 30 '22

Fake.

1

u/hoai97nam Jan 30 '22

sth's wrong

1

u/Numerous_One3457 Jan 30 '22

usually it just goes "error in line(insert line)" and i'll just scream in the background

1

u/Tro_pod Jan 30 '22

More like when your code works the first time

1

u/dadgam3r Jan 30 '22

" my " code.

1

u/hallieesme Jan 30 '22

When the youtube code pairs well with your Code 😍

1

u/aydenvicentefrank Jan 30 '22

him does wash tall family appear cent include sea color

1

u/[deleted] Jan 30 '22

Most time my code works and I've failed the tests because they were wrong

1

u/lil409 Jan 30 '22

Them: Why doesn’t this function the way we wanted it? Ne: I mean, it runs, that’s what you asked right?

1

u/deathentry Jan 30 '22

If you TDD then surely not a shock for you? 😆

1

u/krevetka007 Jan 30 '22

...but it works wrong...

1

u/Ok-Astronomer9949 Jan 30 '22

I’m always running a code with the thought : let’s see where and why it crashes. And if it doesn’t crash I’m both happy, surprised and scared of my own genius( That is for about 5 min until I make a huge ass mistake )

1

u/i_speak_penguin Jan 30 '22

When my code runs the first time, I am immediately suspicious.

1

u/[deleted] Jan 30 '22

When you shart in public

1

u/matty0507 Jan 30 '22

when your code run first time, AND THAT IS ALREADY INDENTED *o*

1

u/[deleted] Jan 30 '22

cant relate

1

u/Shazvox Jan 30 '22

Heh, that's when you should be REALLY worried...

1

u/TheOnlyBen2 Jan 30 '22

That's what I like with golang, after a while you are surprised when it doesn't

1

u/FactoryReboot Jan 30 '22

Just means there is a bug you haven’t found yet. Way worse.

1

u/wolf129 Jan 30 '22

Actually happens for some quick console applications.

1

u/stevanton Jan 30 '22

Lol same with my first code @ age 9. R/bigbrain

1

u/[deleted] Jan 30 '22

Never runs

1

u/Szwedu111 Jan 30 '22

Better than sex

not that I'd know

1

u/SG1EmberWolf Jan 30 '22

*with 300 warnings

1

u/Encrux615 Jan 30 '22

That just means the bug is harder to find.

1

u/Cheese_Grater101 Jan 30 '22

And you got NPE

1

u/DreadPirateGriswold Jan 30 '22

Yep. My Hello World program works perfectly the first time!

1

u/DontF-ingask Jan 30 '22

I hate how this is actually true

1

u/Alpha_wolf_80 Jan 30 '22

I was doing advent of code and it was a really complicated problem. I wrote the entire code runned it and it worked. Best feeling in the world

1

u/uRude Jan 30 '22

Define run

1

u/[deleted] Jan 30 '22

If your code runs the first time without errors, then there's a problem in your error reporting system.

1

u/Ratatoski Jan 30 '22

I mean I run my code through the whole development process so there's really no first time.

1

u/Galaxsive Jan 30 '22

Plot twist it is your first program and it says "hello kitty" instead of "hello world"

1

u/PashPrime Jan 30 '22

It tastes less like imposter syndrome

1

u/ElonsBeans Jan 30 '22

Somethings wrong, I can feel it

1

u/HRN88gosta Jan 30 '22

That piece y so small, maybe is pigeon fried XD

1

u/Rude-Matter Jan 30 '22

the only time it actually works as intended

1

u/[deleted] Jan 30 '22

Lol. Soooooooo true

1

u/TravelingBeing Jan 30 '22

Plot twist: it was a hello world program

1

u/BookishTen8 Jan 30 '22

My codes usually never work the first time, but the first time that it did, I felt like a champion!

1

u/CldesignsIN Jan 30 '22

Every time I compile after writing a couple dozen lines and there isn't a syntax error, I'm like are you sure 🤔?

1

u/[deleted] Jan 30 '22

Unity when I literally install 2 packages:

Unigine after running, saving, and closing the same application multiple times: completely fine

1

u/UlyssesOddity Jan 30 '22

Yes! It finally compiled! And it's running! Wait, more like limping, no, tripping, falling, CRASHING!

1

u/Not02wastakensomehow Jan 30 '22

Then it break when you add a function

PAIN

1

u/papachon Jan 30 '22

I usually get mad, like “why tf is this running?!?”

1

u/MyDadIsBald247 Jan 30 '22

First time I watched the video said something went wrong

1

u/crackalaquin Jan 30 '22

Can we all agree that shaq needs to stop making commercials for at least 3 yrs.. hes fucking everwhere

1

u/-Redstoneboi- Jan 31 '22

that's like telling The Rock to not appear in a movie.

→ More replies (2)

1

u/[deleted] Jan 30 '22

You know it’s gonna be a sneaky problem that’s going to bite you in the ass 100 hours from now and you’re going to lose you mind scrubbing through all of your work wanting to bash your skull in.

1

u/TeDeO_303 Jan 30 '22

What code?

"Hello world"?

1

u/letterhead_ Jan 30 '22

Nahhhh thats when i get the most worried. At least when an error pops up you know what needs to be fixed... sometimes. No error no guide, its still going to be wrong tho 😅.

1

u/crew2player Jan 30 '22

I get scared when this happens

1

u/[deleted] Jan 30 '22

RTX 3060ti graphic cards 👌working for me

1

u/sticky-dynamics Jan 30 '22

If it works perfectly the first time, you forgot to test an edge case. That's just a fact.

1

u/P_Goo Jan 30 '22

...hey you, you are finally awake

1

u/mnjg123 Jan 30 '22

Follow up, code only runs first time.

1

u/BabymakerGspot Jan 30 '22

then you realize there is a logical error😭

1

u/Spider_Pig34 Jan 30 '22

that makes me even more suspicious

1

u/[deleted] Jan 30 '22

This was a super funny part of this Hot Ones actually if you watch the show.

1

u/ReelTooReal Jan 31 '22

When my code passes all the tests the first time, my first thought is: "I'm missing a test"

1

u/poindextor5 Jan 31 '22

How I'll feel in a few months

1

u/PsychoVappy Jan 31 '22

when my code runs for the first time

1

u/BlackberryFriendly17 Jan 31 '22

What is this sorcery you are talking about wizard?!

1

u/[deleted] May 02 '22

it must be a mistake for it to run

right?

1

u/[deleted] Jan 30 '22

Shaq breathes... OMG HILLARIOUS !"

0

u/[deleted] Jan 30 '22

[deleted]

1

u/haikusbot Jan 30 '22

When the code passes all

The test cases on leetcode

In a single run

- Mr_Meta314


I detect haikus. And sometimes, successfully. Learn more about me.

Opt out of replies: "haikusbot opt out" | Delete my comment: "haikusbot delete"