Best comment ever

Started by
106 comments, last by Finalspace 6 years, 10 months ago

These are hilarious. During my undergrad I was working on a partner project and found this in a 20 line .c file:


;;;;;  ;;;;;;  ;;      ;; ;;             ;;;;;;;  ;;;;;;;  ;;       ;;;;;;;  ;;   ;;  ;;;;; 
;;     ;;      ;;;;  ;;;;                ;;       ;;   ;;  ;;       ;;   ;;  ;;;  ;;  ;;   
;;;;;  ;;;;;;  ;;  ;;  ;; ;;   ;;;;;;    ;;       ;;   ;;  ;;       ;;   ;;  ;; ; ;;  ;;;;;
   ;;  ;;      ;;      ;; ;;             ;;       ;;   ;;  ;;       ;;   ;;  ;;  ;;;     ;;
;;;;;  ;;;;;;  ;;      ;; ;;             ;;;;;;;  ;;;;;;;  ;;;;;;;  ;;;;;;;  ;;   ;;  ;;;;;

Which much to my surprise compiles just fine.

Advertisement

Well d'oh, they're all empty statements, pretty much every language that uses semicolons to finish sentences supports them (I think the only exception is Lua). I have to admit though, when I saw that my first thought was that it was assembly (since semicolons are the usual comment character for assemblers).

Don't pay much attention to "the hedgehog" in my nick, it's just because "Sik" was already taken =/ By the way, Sik is pronounced like seek, not like sick.

Well right, it just doesn't FEEL like it should!

These are hilarious. During my undergrad I was working on a partner project and found this in a 20 line .c file:


;;;;;  ;;;;;;  ;;      ;; ;;             ;;;;;;;  ;;;;;;;  ;;       ;;;;;;;  ;;   ;;  ;;;;; 
;;     ;;      ;;;;  ;;;;                ;;       ;;   ;;  ;;       ;;   ;;  ;;;  ;;  ;;   
;;;;;  ;;;;;;  ;;  ;;  ;; ;;   ;;;;;;    ;;       ;;   ;;  ;;       ;;   ;;  ;; ; ;;  ;;;;;
   ;;  ;;      ;;      ;; ;;             ;;       ;;   ;;  ;;       ;;   ;;  ;;  ;;;     ;;
;;;;;  ;;;;;;  ;;      ;; ;;             ;;;;;;;  ;;;;;;;  ;;;;;;;  ;;;;;;;  ;;   ;;  ;;;;;

Which much to my surprise compiles just fine.

(;) is a null statement and usually compiles to nothing at all.

A compiler I was working with for programming MSP430 microcontrollers would interpret a null statement as an actual NOP instruction. If I had pasted that thing into our code a lot of people would have been mad.

"I would try to find halo source code by bungie best fps engine ever created, u see why call of duty loses speed due to its detail." -- GettingNifty

Hah. I imagine that in a microcontroller being able to insert NOPs makes sense though (since it's probably something directly controlling hardware).

Don't pay much attention to "the hedgehog" in my nick, it's just because "Sik" was already taken =/ By the way, Sik is pronounced like seek, not like sick.

I ran across that stackoverflow thread years ago I think, and if memory serves my favorite (though there are so many gems in there!) was something along the lines of

// I'm sorry, I'm so sorry.

Sometimes I'm also partial to something along the lines of

// What kind of idiot wrote this?
bad code goes here
// Oh, it was me.

I'm rather satisfied by the fact that the company I work for has a revision control submission tracker thing that keeps track of what people think are the funniest submit comments.

There was a saying we had in college: Those who walk into the engineering building are never quite the same when they walk out.

... O_o ... are the commit comments supposed to be funny?


/**
* 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.
*/

This one made me lol pretty good laugh.png

One of the best comments I wrote was something along the lines of...

// Somehow multiplying what *should* be divided is what made this possible so DON'T TOUCH IT EVER

That was in one of my first games I wrote in DarkBASIC Professional. A formula that I used for centering the text manually in my own GUI library was supposed to use division for centering text, but it didn't work. Finally I just randomly tried multiplying it and it worked. To this day, I don't know why, I think it was just a total fluke. :P


My website! yodamanjer.com
My development blog!

Follow me on Twitter! [twitter]jwg1991[/twitter]


/**
* 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.
*/

Wow. The rickrolling comment. Awesome!

I think, therefore I am. I think? - "George Carlin"
My Website: Indie Game Programming

My Twitter: https://twitter.com/indieprogram

My Book: http://amzn.com/1305076532

Note to my future self:


// FIXME - I wrote this file at 4am, re-read EVERYTHING

This topic is closed to new replies.

Advertisement