11

The best/worst code comments you have ever seen?

Mine:

//Upload didn't work, have to react:
system.println('no result');

//$Message gives out a message in the compiler log.
{$Message Hint 'Feed the cat'}

//Not really needed

//Closed source - Why even comments?

//Looks like bullshit, but it has to be done this way.

//This one's really fucked up.

//If it crashes, click again.

asm JMP START end; //because no goto XP

catch {
//shit happens
}

//OMG!!! And this works???

asm
...
mov [0], 0 //uh, maybe there is a better way of throw an exception
...
mov [0], 0 //still a strange way to notify of an error

// this makes it exiting -- in other words: unstable !!!!!

//Paranoic - can't happen, but I trust no one.

else {
//please no -.-
sleep(0);
}

//wuppdi

for (int i = random(500); i < 1000 + random(500 + random(250)); i++)
{
// Do crap, so its harder to decompile
}

//This job would be great if it wasn't for the f**king customers.

//TODO: place this peace of code somewhere else...

// Beware of bugs in the code above; I have only proved it correct, not tried it.

{$IFDEF VER93}
//Good luck
{$DEFINE VER9x}
{$ENDIF}

//THIS SHIT IS LEAKING! SOMEONE FIX IT! :)

/* no comment */

Comments
  • 4
    A pet peeve are those who insist on..

    {
    ..
    } // end of if

    Where does one start?

    IT'S A LANGUAGE WITH BRACE BLOCK DELIMITATION. OF COURSE IT'S THE FUCKING END. ITS IN THE FUCKING SPEC IF YOU'RE ARSED TO READ. THE FUCKING IDE EVEN PUTS IT IN FOR YOU, FUCKWAD. IF THIS WAS FOR YOUR OWN BENEFIT BOIL YOUR HEAD IN RAT'S PISS. IF IT WASN'T GO FUCK YOURSELF. AND WHEN YOU'VE FUCKED OFF FUCK OFF SOME MORE.

    Thanks
  • 6
    //Code sanitized to protect the foolish.
    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.Reflection;
    using System.Web.UI;

    namespace Mobile.Web.Control
    {
    /// <summary>
    /// Class used to work around Richard being a fucking idiot
    /// </summary>
    /// <remarks>
    /// The point of this is to work around his poor design so that paging will
    /// work on a mobile control. The main problem is the BindCompany() method,
    /// which he hoped would be able to do everything. I hope he dies.
    /// </remarks>
    public abstract class RichardIsAFuckingIdiotControl : MobileBaseControl, ICompanyProfileControl
    {
    protected abstract Pager Pager { get; }

    public void BindCompany(int companyId) { }

    public RichardIsAFuckingIdiotControl()
    {
    MakeSureNobodyAccidentallyGetsBittenByRichardsStupidity();
    }

    https://gist.github.com/frnz/871723
  • 1
    @DenzilPenburthy Makes sense if you have a ton of closing blocks and don't know which is which when it's so far down. Not everyone can remember what goes where just from indentation.
  • 1
    @TheCapeGreek aha.. but I omitted the bit about "keeping the code short", especially conditional logic as in this case.

    My bad. I am an imbecile.
  • 0
Add Comment