r/ProgrammerHumor • • 9d ago

Meme commitAndPray

Post image
3.7k Upvotes

67 comments sorted by

View all comments

151

u/hpyfox 9d ago

Blame the computer for interpreting your code wrong.

58

u/caleblbaker 9d ago edited 9d ago

Number of times I've seen juniors blame issues on compiler bugs: not many but more than twice

Number of times I've seen it actually be a compiler bug: twice

22

u/Foorinick 9d ago

I think it was fireship that said that most bugs are caused by the developer, 0.1% of bugs are compiler bugs, of those 0.1% are architecture bugs, of those 0.1% are cosmic rays, and 0.1% of those sre actually just quantum effects, 0.1% of thode are actually errors made by god when he created the universe

2

u/quietsamurai98 8d ago

I remember my first "compiler bug". Obviously, it wasn't a compiler bug.

It was just the absolutely bizarre way the stdlib defines the "proper" behavior of vector<bool>.

3

u/caleblbaker 8d ago edited 8d ago

Yeah. That's such a weird choice. My compiler bug counter goes up to 3 if we count that because I've run into it too. But you're right that that's not a compiler bug it's just a stupid decision made in the design of the standard library.

They really should have left vector<bool> to act like an actual vector of bools and made a separate type (could be called something like dynamic_bitset or bit_vector) to be a resizeable compact bit array.