TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Weekend project: A place to post crappy code. HatePaste

64 点作者 Raisin大约 13 年前

18 条评论

biot大约 13 年前
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 未加载
wcdolphin大约 13 年前
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>
verelo大约 13 年前
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-g大约 13 年前
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.
steele大约 13 年前
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>
Kluny大约 13 年前
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.
simon02大约 13 年前
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.
yitchelle大约 13 年前
In some ways, I like this better that dailywtf.com as it is like reading Dilbert vs watching "The office". Great work!
LuxuryMode大约 13 年前
I gave it a whirl. Entered some ruby and clicked post with no title entered. Nothing happened. Just back to /post...
franze大约 13 年前
please hate it <a href="http://hatepaste.com/paste/155205ac" rel="nofollow">http://hatepaste.com/paste/155205ac</a>
评论 #3668168 未加载
pawelwentpawel大约 13 年前
you just made my evening, please add 'fb share' button! ;)
monsur大约 13 年前
And its an Archers of Loaf song, nice!
SteveOS大约 13 年前
Similar to badprogramming.com
Intermediate大约 13 年前
how about adding comments?
评论 #3669211 未加载
aespinoza大约 13 年前
Very cool indeed...
dmishe大约 13 年前
RSS!
drivebyacct2大约 13 年前
An explanation should be required. There are several of these that I find nothing wrong with
评论 #3669600 未加载
platzhirsch大约 13 年前
I love social coding, because there is so much hate.
评论 #3668326 未加载