This one is more worrying I suppose: https://github.com/search?utf8=&q=FIXME&type=Code&ref=search...
This should never happen
41–50 of 214 posts
Re: This should never happen
#42Re: This should never happen
#43Re: This should never happen
#44Apparently things-that-shouldn't-happen happen 10x more in C code than the next nearest language.
Re: This should never happen
#45if happens: print "shit, that wasn't supposed to happen"
Never ever EVER put bad language in any unexpected error cases or logs - even as you're developing it... it WILL somehow magically make its way to production, and it WILL appear!
[NB There is a related phenomena to do with a demo of a system that includes "adult content" (i.e. porn) - the likelihood of a user randomly stumbling upon this content is practically 100%, even if this content is a tiny part of the overall demo].
Re: This should never happen
#46Using github to search like this reminds me of how a CS professor of mine would show the "best commit messages of the year" (homework was submitted via git) by looking for various patterns like all caps, all symbols, etc. http://www.slideshare.net/bsotomay/uchicago-cmsc-23300-the-b...
Re: This should never happen
#47Snips from discussion in [1]: "We can expect problems, therefore, and should prepare for them. ... Garbage is bad enough, but garbage which is expected to contain a count to tell you how long it is can be much worse. ... The first time we ran this code it said 'can't happen' We got that message perhaps a hundred times in the process of adding the rest of the code... This experience speaks for itself; if you're going to walk a high-wire, use a net."
'Can't happen' is as much a pattern as 'Hello, World'... and it has the same genesis.
[1] Brian Kernighan, P.J. Plauger, 'Software Tools', Addison-Wesley 1976
Re: This should never happen
#48My favorite part is the Java project that has an exception class called ThisShouldNeverHappenException [1]. Only in Java would someone create an exception class for a condition that should never happen :) [1] https://github.com/TheProjecter/propidle/blob/f0d5320e2a3d46...
Re: This should never happen
#49assert(false);
Re: This should never happen
#50https://github.com/search?utf8=%E2%9C%93&q=%22no+idea+why+th...