Programming is fun, when the computer does what you actually told him to do, but when it just gives out SEGFAULTs or any press of a button results in a cryptic Windows error dialogue (you know this kind: "Error #1254 occurred. Continue?") it can be a real pain in the ass.
You then are about to throw your PC out of the window and when you finally, after 5 hours of rage, find the source of the problem (a missing semicolon) you just want to punch the creator of the language in the face.
So this thread is to post more oddities found in your daily programming or rant about anything you had to deal with.
I may start with this image I found on the net which I find it hilarious (some might already know it):
Also a nice blog about some strange JS behaviour, makes me giggle every new day (also funny when you don't know JS or just have a general understanding of programming):
http://wtfjs.com/
Some examples:
Oh yeah and the all-time classic:
How to shoot yourself in the foot in any programming language
have fun
foxblock out
You then are about to throw your PC out of the window and when you finally, after 5 hours of rage, find the source of the problem (a missing semicolon) you just want to punch the creator of the language in the face.
So this thread is to post more oddities found in your daily programming or rant about anything you had to deal with.
I may start with this image I found on the net which I find it hilarious (some might already know it):
Also a nice blog about some strange JS behaviour, makes me giggle every new day (also funny when you don't know JS or just have a general understanding of programming):
http://wtfjs.com/
Some examples:
Code:
[] == 0
+[] === 0
++[] === 1 // sorta, though this is invalid js syntax, so...
[[]][0] === []
++[[]][0] === 1
++[[]][+[]] === 1 // yay! wtf!
Code:
"0" && {} // true
0 && {} // false, ok...fair enough
0 == "0" // true, wtf!
Oh yeah and the all-time classic:
How to shoot yourself in the foot in any programming language
have fun
foxblock out