TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Weekend project: A place to post crappy code. HatePaste

64 pointsby Raisinabout 13 years ago

18 comments

biotabout 13 years ago
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?
评论 #3668216 未加载
评论 #3668396 未加载
评论 #3668946 未加载
评论 #3668653 未加载
评论 #3668213 未加载
评论 #3668329 未加载
wcdolphinabout 13 years ago
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>
vereloabout 13 years ago
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)
dan-gabout 13 years ago
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.
steeleabout 13 years ago
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>
Klunyabout 13 years ago
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.
simon02about 13 years ago
Looks nice. Quick note: please change the of color the timestamps and the categories, they are unreadable to me. Hardly even noticed they were there.
yitchelleabout 13 years ago
In some ways, I like this better that dailywtf.com as it is like reading Dilbert vs watching "The office". Great work!
LuxuryModeabout 13 years ago
I gave it a whirl. Entered some ruby and clicked post with no title entered. Nothing happened. Just back to /post...
franzeabout 13 years ago
please hate it <a href="http://hatepaste.com/paste/155205ac" rel="nofollow">http://hatepaste.com/paste/155205ac</a>
评论 #3668168 未加载
pawelwentpawelabout 13 years ago
you just made my evening, please add 'fb share' button! ;)
monsurabout 13 years ago
And its an Archers of Loaf song, nice!
SteveOSabout 13 years ago
Similar to badprogramming.com
Intermediateabout 13 years ago
how about adding comments?
评论 #3669211 未加载
aespinozaabout 13 years ago
Very cool indeed...
dmisheabout 13 years ago
RSS!
drivebyacct2about 13 years ago
An explanation should be required. There are several of these that I find nothing wrong with
评论 #3669600 未加载
platzhirschabout 13 years ago
I love social coding, because there is so much hate.
评论 #3668326 未加载