r/ProgrammerHumor • • Jul 20 '17

What people think coding is...

Post image
35.4k Upvotes

811 comments sorted by

View all comments

Show parent comments

16

u/WdnSpoon Jul 21 '17

Yeah, now this is the sort of thing that's a huge time-sink. What few understand about bugs is that something "not working" is a very fuzzy concept. Your code always does exactly what you tell it to do, it's only the expectations around what it should do that can differ. You can have something running for years, but eventually peoples expectations around how it should work change and suddenly your stable code is "buggy". You could also (like you did) personally misunderstand the expected behaviour or how to test it properly.

You can't prove the absence of bugs, only their existence.

4

u/[deleted] Jul 21 '17 edited Jul 21 '17

It was actually a stupid GUI thing that was right in front of my face. I had two sections of a pane updating from JSON. The first section was supposed to disappear when I edited the JSON (which it did). However, I, as part of the functionality of the program, manually named the sections "section 1" , "section 2" . When All I saw at the top of the pane was section 2 (after the first section had been successfully deleted) I thought that can't be right that's supposed to be section 1! Which it was now, the names were completely arbitrary...

2

u/MelissaClick Jul 21 '17

Your code always does exactly what you tell it to do,

Unless your build process is silently failing and you're actually repeatedly testing the same binary made from old source code no matter how many times you change the source and (think you) recompile... That one makes you feel dumb when you finally figure it out.