Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Diego Lucero
10,588 PointsFound this on Stack Overflow. Hilarious.
I was browsing stack overflow and found this awesome thread that was locked for "historical significance" although it was also closed for "not [being] constructive".
Reading through the thread, I can see why. I can't stop laughing at a few of these, like this one:
I am particularly guilty of this, embedding non-constructive comments, code poetry and little jokes into most of my projects (although I usually have enough sense to remove anything directly offensive before releasing the code). Here's one I'm particulary fond of, placed far, far down a poorly-designed 'God Object':
/**
* For the brave souls who get this far: You are the chosen ones,
* the valiant knights of programming who toil away, without rest,
* fixing our most awful code. To you, true saviors, kings of men,
* I say this: never gonna give you up, never gonna let you down,
* never gonna run around and desert you. Never gonna make you cry,
* never gonna say goodbye. Never gonna tell a lie and hurt you.
*/
So I guess a good question to ask for a thread like this is, what is the best comment you have ever written or encountered in a code base?
7 Answers
Diego Lucero
10,588 PointsAlso! This one:
// Replaces with spaces the braces in cases where braces in places cause stasis
$str = str_replace(array("\{","\}")," ",$str);
And this one also, in some JavaScript code:
// hack for ie browser (assuming that ie is a browser)
Chris Akers
2,527 PointsClassic!
Christopher Warren
17,640 PointsThank you so much for bringing this into my life. LOL.
Diego Lucero
10,588 PointsHaha no prob. I'm still browsing the thread myself. There is some gold in there.
Kevin Korte
28,149 Pointshaha, what a great idea!
Matthew S
Courses Plus Student 6,513 Pointshttp://cl.ly/image/2x3e0H370e0r ^
This was an old image I saved of Steam's web code.
Diego Lucero
10,588 Pointshahahaha nice
António Lourenço
1,964 Points//When I wrote this, only God and I understood what I was doing
//Now, God only knows
Diego Lucero
10,588 PointsThat's one of my favorites. On the thread, they attribute the original quote to Karl Weierstrauss, the mathematician who gave us the epsilon and delta continuity definition.
Matthew S
Courses Plus Student 6,513 PointsThe most famous comment embed in The Oatmeal
<!--
-\-
\-- \-
\ - -\
\ \\
\ \
\ \\
\ \\
\ \\
\ \\\
\ \\
\ \\
\. . \\
\ . \\
\ . \\
\ . \\
\ . \\
\ <=)
\ <==)
\ <=)
\ .\\ _-
\ . \\ _-//
\ . \\ _-_/ /
\ . . . \\ _--_/ _/
\ \\ _- _/ _/
\ \\ ___-(O) _/ _/
\ \ __-- __ /_ / ***********************************
\ \\ ____--__---- / \_ I AM A MOTHERFUCKING PTERODACTYL!
\ \\ ------- / \_ \_ HERE TO PTERO-YOU A NEW ASSHOLE
\ \ // // \__ \_ HTTP://PTERODACTYL.ME
\ \\ // // \_ \_ **********************************
\ \\ /// // \__-
\ - \\///////// //
\ - \_ //
/ - //
/ - ///
/ - //
__--/ ///
_______/ // |
//-______ ___ //// |
__--/ ///// |
-----____ -/---_____//// |
_/ --/ \ |
/___-/ \ |
// \ /
. /
\ . /
\ . /
\ . /
\ /
\ _|
\ ==/
/ //
/ . //
/ . . //
/. /
/ //
/ /
/ //
/ //
--/ /
/ //
//// //
///_______////
Actually just inspect the code.
David Dong
5,593 PointsWHOA! I though treehouse had a filter...