I got into the habit of doing this since it's immediately obvious that the value you're comparing is expected to be a boolean and not something like an integer, which could cause subtle bugs later on if what you thought was a boolean gets negated. More commonly, it's of the form:
if (someValue == false) ...
rather than:
if (!someValue) ...
to distinguish this from:
if (someValue == 0) ...
It only takes an extra fraction of a second of typing and increases clarity for the next developer, or for you six months later. Anyone else do this too?
Its far easier to read if (!someBoolean) than if (someBoolean == false)
Ofcourse, your example probably applies to JavaScript since anything and everything can be a boolean, or not depending on the phase of the moon. In Java at least if not someBoolean is nice to read, and if (isGood) is nicer than if (isGood == true).
Not usually. However, I do sometimes make explicit comparisons to False or None if I can end up with both, and the behaviour differs depending on what I have.
It's probably not the best idea to be doing that, but it's not tripped me up yet ;-)
I actually love this. What would be a great feature is the ability to "add to clipboard". I found myself wanting to share one, and it was a bit of a bitch to copy and paste it (the structure on the page just doesnt lend well to highlight and copy)
This is awesome, but it'd be really nice if you could vote on the overview pages (Most Hated, Most Alright, Newest, etc) for the shorter examples rather than having to click on through to its own unique page.
I can't believe you admitted that here! That means you're a terrible programmer! Of course I'm kidding. There were quite a few I saw nothing wrong with too. I think some of it pretty subjective. Other stuff, especially the HTML and CSS snippets, look terrible on their own but a lot of times if you have context you'd get why the person made that choice.