It's interesting that this is one of the most hated (<a href="http://hatepaste.com/paste/f5da3584" rel="nofollow">http://hatepaste.com/paste/f5da3584</a>):<p><pre><code> if (someBoolean == true) {
doSomething();
}
</code></pre>
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:<p><pre><code> if (someValue == false) ...
</code></pre>
rather than:<p><pre><code> if (!someValue) ...
</code></pre>
to distinguish this from:<p><pre><code> if (someValue == 0) ...
</code></pre>
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?
My submission:<p>#ActiveRecord::Base.send(:attr_accessible, nil)#comment this line out to let GitHub get hacked<p><a href="http://hatepaste.com/paste/e18802f3" rel="nofollow">http://hatepaste.com/paste/e18802f3</a>
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.
Given the events of this weekend, I couldn't help myself...<p><a href="http://hatepaste.com/paste/0cb65712" rel="nofollow">http://hatepaste.com/paste/0cb65712</a>
love it. small typo: "Oh no! there is nothign here!" on the not found page.<p>Although, given the nature of the site, you might as well leave it as is.