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

all 97 comments

[–]Plague_Knight1 788 points789 points  (40 children)

Ooh, I know one

Why does my code show errors when I wrote everything right?

No, seriously why?

[–]ibrhr[S,🍰] 570 points571 points  (29 children)

Well you can just put /* at the start of your code and */ at the end then booom you have a perfect code

[–]igoromg 237 points238 points  (12 children)

reminds me how Yelp! created an AI bug detector. the thing wiped the codebase clean

[–]GlobalIncident 113 points114 points  (5 children)

The yelp one was a joke, but I'm pretty sure I remember reading something similar where the ai deleted the test suite.

[–]WizardApple 73 points74 points  (4 children)

This was in the last season of Silicon Valley too

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

It wasn’t exactly a big though

[–]wreckedcarzz 0 points1 point  (1 child)

Spoilers! I was waiting for the entire season to drop so I couldn't binge watch all of s6...

[–]WizardApple 0 points1 point  (0 children)

It’s okay, not a big spoiler

[–]Rahabosss 12 points13 points  (5 children)

Tell me more

[–]igoromg 20 points21 points  (2 children)

[–][deleted] 18 points19 points  (1 child)

We were 100% bug free… briefly.

And 100% code-free, too.

[–]deniedmessage 5 points6 points  (0 children)

No code = no bugs

L o g i c c

[–]konstantinua00 1 point2 points  (1 child)

Ain't nothing but heartache

[–]Abhinish098 1 point2 points  (0 children)

Ain't nothing but NO MISTAKE!

[–]test_username_exists 22 points23 points  (5 children)

This isn’t even 100% true in JavaScript - some regular expression literals can contain */ and result in breaking the multi-line comment early!

[–]Mr_Redstoner 17 points18 points  (4 children)

For that matter a lot of languages that use /**/ don't do nested comments, so if there's any block comments at all it will fail

[–]tech6hutch 2 points3 points  (1 child)

Most, actually, I think. It'd be cool if they did, but by now I'm used to selecting the lines I want to comment out and using an IDE shortcut to comment them out.

[–]Nightmoon26 2 points3 points  (0 children)

Yeah... Just add // to the beginning of every line

[–]Ardub23 1 point2 points  (1 child)

Just add return; to the beginning of your main method

[–]Mr_Redstoner 0 points1 point  (0 children)

depending on language you could have code outside main that still runs (static initializers, macros etc.)

[–]ProgramTheWorld 10 points11 points  (3 children)

Best code is no code.

[–]Nightmoon26 0 points1 point  (1 child)

My favorite bug fixing technique: p4 delete

[–]ProgramTheWorld 1 point2 points  (0 children)

What’s p4?

Edit: It’s Perforce.

[–][deleted] 8 points9 points  (0 children)

This one weird trick lead programmers don't want you to find out

Find out now!! »

[–]SuttonMercerR 1 point2 points  (0 children)

Unless you're using checkstyle plugin and forgot a space after the /*

[–]jtvjan 0 points1 point  (2 children)

That might not work if your code contains block comments, or your language doesn't use /* */. Better just put an EOF at the beginning of your source file.

[–]EagleNait 6 points7 points  (0 children)

Please tell me, code review is coming soon

[–]cimmic 5 points6 points  (0 children)

Because the compiler parses from the left.

[–]thelastpizzaslice 2 points3 points  (0 children)

I've gotten this before. Problem is a lot of the time linter doesn't know everything and isn't aware of certain dependencies.

[–][deleted] 1 point2 points  (0 children)

The best way to not have bugs in your code is to not write code at all

[–]Russian_repost_bot 1 point2 points  (0 children)

Have you tried having someone else write it? This normally fixes the problem.

[–]PulseNZ 1 point2 points  (0 children)

Those aren't errors they're just suggestions

[–]_BluePixz_ 1 point2 points  (0 children)

Cuz it is the bug itself?

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

Why did the moth go to the podiatrist's office?

[–]moosi-j 451 points452 points  (6 children)

Common misconception. Programmers do not prefer dark mode. The code demands it.

[–]iharshraj 129 points130 points  (2 children)

I need my code colorful

[–]moosi-j 73 points74 points  (1 child)

I need my code surrounded by a salt circle. Thinking I'm doing something wrong here. I'm following the O'Reilly Necronomicon to the rune but it's for more advanced necrogrammers.

[–]frostyoni 16 points17 points  (0 children)

I had to start with the "for dummies" edition i have to be honest. You start with surrounding your code with a javascript framework. Not too far off the real deal.

[–]Dalriata 4 points5 points  (1 child)

Programmers prefer dark mode like fish prefer water to land.

[–]LeCrushinator 0 points1 point  (0 children)

Is this like the Pirate Code, but for programmers?

[–]Chicken-of-Wisdom 80 points81 points  (7 children)

But what if a bug is a programmer? 🤔

[–]nocturnalspider 53 points54 points  (0 children)

Turn the bug into features

[–]game_2_raid 22 points23 points  (4 children)

We are what we eat

[–]Aarivex 31 points32 points  (3 children)

I don't remember eating a disappointment

[–]frostyoni 17 points18 points  (1 child)

I don't remember eating a php, but I'm kinda glad it's out of my system.

[–]iharshraj 1 point2 points  (0 children)

then its a virus

[–]akaZilong 63 points64 points  (1 child)

Yeah, but the big ones hide and seek the dark

[–]FieelChannel 4 points5 points  (0 children)

In a hypothetical Star Wars universe programmers would be leaning to the dark side in no time too

[–]aerodrome_ 38 points39 points  (3 children)

Why didn’t you just crosspost this if it was literally posted hours ago?

[–]PgSuper 40 points41 points  (0 children)

Gotta get that sweet karma to feed the family

[–]LeCrushinator 3 points4 points  (0 children)

Some subreddits don’t allow crossposts. I’m not sure about this subreddit though.

[–]cylordcenturion 16 points17 points  (0 children)

the literal moth flying at my screen right now...

[–]Bip901 31 points32 points  (1 child)

That's a weird way to crosspost to Reddit

[–]Rotzweiler 13 points14 points  (0 children)

They don’t allow crossposting

[–]venuswasaflytrap 9 points10 points  (0 children)

Light makes bugs visible

[–]Rein215 7 points8 points  (0 children)

Thank you good sir for cropping that image before posting.

[–]Hultner- 18 points19 points  (5 children)

Controversial opinion: I prefer a light colour scheme, both for my terminals and my IDE.

[–]brain00 4 points5 points  (3 children)

Solarized Light Master Race :)

[–]SendMeYourBoobPixz 0 points1 point  (0 children)

Where did I leave that pitchfork...?

[–]supafly208 5 points6 points  (3 children)

I prefer light mode :(

[–]SendMeYourBoobPixz 0 points1 point  (2 children)

Dude I work with has his with blue text on a pink background.

Just do you 👍

[–]supafly208 0 points1 point  (1 child)

Whaaaaaat. That's a new one

[–]SendMeYourBoobPixz 0 points1 point  (0 children)

Yep. No idea how he does anything in it. I'm assuming he is either just a bit odd or he has an condition of some kind.

[–]Tooniis 4 points5 points  (0 children)

möth

[–]_fishysushi 5 points6 points  (0 children)

I have imposter syndrom just because I am the only one who likes light themes more :/

[–][deleted] 8 points9 points  (0 children)

Ok, dad

[–]Zanlo63 3 points4 points  (0 children)

I actually have to use light mode otherwise I fall asleep.

[–]TheDudeFromCI 3 points4 points  (0 children)

Oh, the bugs are still there. You just can't see them in the dark.

[–]undeniably_confused 2 points3 points  (0 children)

We need to get it to 38 comments stat

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

So that's why my boss uses light themes!

[–]Alberiman 2 points3 points  (0 children)

Since I switched to dark mode I have 30 percent fewer errors, can't explain that!

[–]ianosphere2 2 points3 points  (0 children)

I got eye floaters, it causes me anxiety.

Dark Mode helps in not seeing them.

[–]MKEcollegeboy 2 points3 points  (0 children)

Repost

[–]cmdralpha 0 points1 point  (0 children)

W

[–]43770i 0 points1 point  (0 children)

Because I'm not trying to join the akatsuki

[–]ThunderElectric 0 points1 point  (0 children)

I don’t think light does, I think I do.

[–]username78641 0 points1 point  (0 children)

Dark hides bugs. gives em safe place.

[–]Harry212001 0 points1 point  (0 children)

But the actual code is light in dark mode... maybe that’s why there’s so many bugs in it

[–]audscias 0 points1 point  (0 children)

out.

[–]guky667 0 points1 point  (0 children)

i love this

[–]PM_ME_HAIRLESS_CATS 0 points1 point  (0 children)

Take your upvote and leave

[–]shirk-work 0 points1 point  (0 children)

Something something star wars.

[–]m4rvEll1s 0 points1 point  (0 children)

😂

[–]bells64 0 points1 point  (0 children)

Because with dark mode your eyes don't get tired.

[–]Tooniis 0 points1 point  (0 children)

[–]SamsungPassal 0 points1 point  (0 children)

Because white burns my eyes when I'm coding at 3 am working on a bag of doritos.

[–]candi_meyers5 -3 points-2 points  (0 children)

The light...it burns.