7 ms·
if happens: print "shit, that wasn't supposed to happen"
by mdjt 10y ago
if happens:
print "shit, that wasn't supposed to happen"
- mrspeaker 10y agoNever 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!
- kagamine 10y agoI remind myself frequently not to swear in code as I am quite juvenile on a normal day. If I'm struggling I'll just make up a word, so that if it ever happens that someone else sees it I can say it is an acronym but that I have conveniently forgotten for what.
- bryanrasmussen 10y agoYou could always put a "this should never happen" right before the swear words so they know it wasn't your fault.
- kagamine 10y agoBut there's a risk I'll become stuck in an infinite loop of writing shit! this should never happen shit! this should never happen shit! ... and so on. Still it would be a change from writing bad code.
- bryanrasmussen 10y agoWow, deja-vu, this is just what happened to me one time when I was working on a new booking system for a hotel. I was working on site over the winter season when the hotel was closed down, a lovely old hotel high up in the Rockies. Every day I sat down and wanted to write some brilliant code but all I ever ended up writing was the same comment All objects and no functions makes Jack a dull boy. over and over again. Drove me quite mad actually. Sometimes I feel like I'm still there.
- sinxoveretothex 10y agoI had a hearthy chuckle when learning about Android's Log class: the highest level of importance for a message is WTF. Documented as What a Terrible Failure.
- arethuza 10y agoNot only will it manifest itself in production, it will do so at the time and with the user most likely to cause great embarrassment. [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].
- dingaling 10y agoI encountered a variation earlier this week that was more quzzical of itself: "How did this happen?"
- musgravepeter 10y agoMy favourite was some Telecom code that returned "Not Kansas", as in "We've not in Kansas anymore".
- brobinson 10y agoNot a good idea to use profanity/vulgarities in anything user-facing. See: http://thedailywtf.com/articles/We-Burned-the-Poop http://thedailywtf.com/articles/We-Burned-the-Poop