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.

Ask HN: Funniest thing you've seen in a codebase?

5 pointsby BillFranklinabout 10 years ago

8 comments

tjrabout 10 years ago
I don&#x27;t remember it verbatim, or even what exactly the code was doing, but something like:<p><pre><code> &#x2F;&#x2F; And now ladies and gentlemen, we need a volunteer from the audience! &#x2F;&#x2F; Yes, you there, please come up. ...allocate dynamic memory... &#x2F;&#x2F; Now our lovely lady from the audience will enter this mysterious box! ...do something with allocated memory... &#x2F;&#x2F; We spin the box around! ... do more stuff ... &#x2F;&#x2F; And when we open the box, we see she has vanished! ... deallocate memory ... </code></pre> Amusing, I guess, but it really didn&#x27;t contribute understanding to the code. This was in the middle of a gigantic avionics simulation program that was almost entirely uncommented and extremely hard to understand in the first place. The same code base also had an MP3 recording of this song checked into it:<p><a href="http://lyrics.wikia.com/Frank_Hayes:Threes" rel="nofollow">http:&#x2F;&#x2F;lyrics.wikia.com&#x2F;Frank_Hayes:Threes</a>
atwebbabout 10 years ago
Paraphased but<p>if(thingthatshouldneverhappen) {alert(&#x27;Oh shit!&#x27;);}<p>Guess what happened in the middle of a regional training?<p>At least it was easy to find for debugging...
BillFranklinabout 10 years ago
I also remember someone from the early Google team wrote that the founders&#x27; code wasn&#x27;t all that great.<p>&gt;One Google engineer from back then says the most remarkable thing about the co-founders&#x27; code was that when it broke, users would see funny error message: &quot;Whoa, horsey!&quot;<p><a href="http://www.businessinsider.com/larry-page-sergy-brin-are-lousy-coders-2013-10#ixzz3VWhAmsSY" rel="nofollow">http:&#x2F;&#x2F;www.businessinsider.com&#x2F;larry-page-sergy-brin-are-lou...</a>
ianamartinabout 10 years ago
A giant wall of ascii art that said very simply:<p>&quot;It is awful!&quot;
评论 #9275088 未加载
jwdunneabout 10 years ago
&quot;&#x2F;&#x2F; SagePay is a bit of hack on my framework&quot;<p>Said framework also looking at lot like one big blob of hacked together tangle of PHP and HTML.
pepsiabout 10 years ago
Not in our code, but in a log file - while parsing a credit card number, the log states &quot;determining creditcardiness&quot;
BillFranklinabout 10 years ago
I found &#x27;&#x2F;&#x2F; A mistake plus keleven gets you home by seven&#x27; today, bug right above it.
n17r4mabout 10 years ago
Not super funny, but pretty cool&#x2F;weird stuff in a project I inherited:<p>app &lt;- -&gt; exports.setup = it<p>in LiveScript seems to compile to<p>(function(it){ return exports.setup = it; })(function(app){})<p>which is pretty crazy.<p>Another one, just above some code making many deep monkey-patches to the Sequilize db driver:<p>&#x2F;* HOLY FUCK THIS IS THE SKETCHIEST THING EVER *&#x2F;<p>made me smile.