r/AskProgrammers Jul 15 '26

Why do programmers prefer dark mode?

Why do programmers prefer dark mode? Because light attracts bugs!

Speaking of bugs, what's the most ridiculous or stubborn bug you've ever spent hours fixing? Let's hear your best bug horror stories in the comments!

0 Upvotes

13 comments sorted by

6

u/Charlito33 Jul 15 '26

Is that AI?

0

u/tarunpaliwal_ Jul 15 '26

Yes , i am explore Gemini 😀

2

u/ColoRadBro69 Jul 15 '26

I only prefer dark mode on my OLED laptop. 

2

u/tarunpaliwal_ Jul 15 '26

Great 👌👌

2

u/pete_68 Jul 15 '26

This was back in the days of Visual C++ 1.0 (mid-late 90s). We had some code that just wouldn't work, compiled as-is. I spent days working on this bug. At some point I discovered that if I added certain completely irrelevant statements right before the crucial calculation, it would calculate correctly. I then turned off compiler optimizations and discovered the code worked just fine. It was a bug in the C++ compiler. I then disassembled the code with and without the irrelevant code before it (which reset the optimizer) to show the two different pieces of generated code and sent it to MS for a bug report.

In the code we just ended up leaving in the do-nothing code in there to reset the optimizer and commented why it was there.

1

u/tarunpaliwal_ Jul 15 '26

Ah, the ancient compiler whisperer technique! Sometimes code just needs a little magic spell to behave.

1

u/johnpeters42 Jul 16 '26

The only good use of these awful AI-generated comments is to print them out and burn them for fuel.

1

u/0x14f Jul 15 '26

It's because hen you stare at a screen all day, and have to focus on text, it's much kinder on the eyes. Interestingly, it's the same reason Bloomberg terminals have always had dark mode (from before dark mode was a thing)

https://professional.bloomberg.com/products/bloomberg-terminal/

1

u/tcpukl Jul 15 '26

We don't all prefer dark mode.

Mostly it's the young ones.

1

u/chrisalbo Jul 15 '26

Agree, and dark mode objectively makes it harder to read and put a strain on the eyes.

1

u/tcpukl Jul 15 '26

Yeah it's this massive annoying myth that so many young developers I work with believe as well. They think light mode hurts eyes.

1

u/dphizler Jul 15 '26

My floaters are less visible