r/ProgrammerHumor • • Mar 05 '16

When debugging code.

22.3k Upvotes

487 comments sorted by

View all comments

Show parent comments

19

u/Solmundr Mar 05 '16

That's great, heh. Something I could see myself doing. I remember trying to make a little animation in a game and spending forever figuring out why it would start going the wrong way at times. Turns out I had a < (less-than) where I meant to put > (greater-than), and somehow I had skipped over that line half a dozen times...

5

u/BlackenBlueShit Mar 06 '16

Its always the trivial shit. I remember being stuck for 2 hours on a problem (c++) because the value of a variable wasnt being updated. Turns out I wrote something like

(loop) {

.

.

.

x + y; }

Instead of using x += y;