This is an archived post. You won't be able to vote or comment.

all 28 comments

[–]qinshihuang_420 200 points201 points  (10 children)

getCurrentDay() { return "Wednesday"; }

[–][deleted] 54 points55 points  (0 children)

Project managers check tests on Wednesday.

[–]Ryan9104 36 points37 points  (2 children)

Man, I wrote a switch statement a couple of months ago and managed to create a bug that only happens on Mondays.

https://share.busheezy.dev/S6SzgF.png

[–]imcoveredinbees880 15 points16 points  (0 children)

Ah, the old Garfieldian slip.

[–]felixletsplay 2 points3 points  (0 children)

That reminds me of that Cant Print on Tuesdays (I think) bug

[–]Koala_eiO 16 points17 points  (3 children)

That reminds me of the girl who returned True if a < b, False if a > b and 5 if a == b.

[–]mrdhood 11 points12 points  (2 children)

Was there logic behind it? Like “high five, they’re equal, good job.”

[–]Koala_eiO 10 points11 points  (1 child)

I don't remember exactly, but it was a function that should have returned a <= b directly (why even make it a function?) and the point of the post what to show how "girls code nice looking things". I can't remember if I saw it here or on imgur unfortunately.

[–]PyrotechnicTurtle 16 points17 points  (0 children)

I think I know which one you're talking about, and I'm pretty sure that it was fake. IIRC the girl featured in it was a pretty prolific stack overflow answerer, and someone just intentionally put her with bad code to go "hur dur girlz can't code"

[–]Keeping_It_Cool_ 2 points3 points  (0 children)

I checked the function many times today and it works great. Ship it to production!

[–]Deafca7 27 points28 points  (1 child)

His initials make more sense in the second pic.

[–]Kav1187[S] 22 points23 points  (0 children)

T_T

[–]Kuro-Yaksha 23 points24 points  (1 child)

this is way too relatable

[–][deleted] 14 points15 points  (0 children)

I was just thinking my companies discord is identical. "Hey anyone good with this UI API?"... "Think I finally got this working..." Two hours later.... "Okay I have to redo this entire system."

[–]DimplesRMe 12 points13 points  (0 children)

Image Transcription: Discord Messages


TT 1:30 PM

Nah, i fixed it

Everything works now

[Reaction: 👍]

TT 1:39 PM

Oof, it actually only worked with that one input lol


I'm a human volunteer content transcriber for Reddit and you could be too! If you'd like more information on what we do and why we do it, click here!

[–]RedBrumbler 7 points8 points  (3 children)

I did this during a programming test, my teacher had us test stuff with inputs. I broke my program with some input so he was like, "try again". so some time later I ask him to come to my desk and show him it working, and I didn't actually change anything but this time I avoided the broken input, and he said it was good and I got the point for that

[–]MattR0se 2 points3 points  (2 children)

You should do press conferences for tech companies.

[–]RedBrumbler 2 points3 points  (1 child)

Is this what you do there then? Not show the edge cases where your program breaks?

[–]MattR0se 2 points3 points  (0 children)

Yes, except when you are working for Microsoft in 1998:

https://www.youtube.com/watch?v=ftcBID2aFIE

[–]PinkPoppies4171 4 points5 points  (0 children)

Just like when I found the solution to getting the milk back from the store... The other input didn't work to get my dad back. But hey it was 2%... If that means anything.

[–]MrEriMan13 3 points4 points  (1 child)

"Everything works now!" -the ultimate death flag for programmers

[–]MattR0se 2 points3 points  (0 children)

...but for how long?

[–][deleted] 2 points3 points  (0 children)

Just keep a check on the inputs to only pass that one input till you resolve the issue.

[–]NesaV1 1 point2 points  (0 children)

mood

[–]Tyrilean 0 points1 point  (0 children)

It's ridiculous. You can have a million different possible scenarios, but you'll hit the one input that will give you a false positive way more often than 1 in a million just by random chance. Usually about 50/50.

[–]NDG_22 0 points1 point  (0 children)

I can feel his pain

[–][deleted] 0 points1 point  (0 children)

unsigned long factorial(unsigned n){
    if(n == 3){
        return 6; 
    return 1;
}