loading...

Epic code comments

Nelson on October 25, 2017

I know my lack of expertise never play for me but as someone who is trying (very hard) to learn how to code, one of my exercise I tend to do is t... [Read Full]
markdown guide
 

This is making me feel like my personal website is lacking in this area.

 

your website started my computer's fan, I basically never hear the fan. your website is evil ahhaha :D

 
 
 

Hahaha, that is a nice find. I'm only aware of facebook's warning but I am now motivated to keep the devTool opened at all time.

 
 
 

Maybe y'all already know this but Stackoverflow has some good ones on one of their Q/A stackoverflow.com/questions/184618...

Comments like

// sometimes I believe compiler ignores all my comments

 

I'm so happy with little stuff. Made my day sir

 

Straight from the Linux kernel;

    /*
     * IOC3 is fucking fucked beyond belief ...  Don't even give the
     * generic PCI code a chance to look at the wrong register.
     */

It's great because there are a bunch of labels and gotos for oh_my_gawd.
If you're curious, it's in /arch/mips/pci/ops-bridge.c.

There's another where someone drew clouds and I think cows and space ships(??) in ascii art. I can't remember which file it is in though, and it's a lot harder to grep for. I'm pretty sure it's over in the networking portion of the kernel though.

This is another nice one, but it includes source;

/* Oh yes, the MIF BitBang is mighty fun to program.  BitBucket is more like it. */
static void BB_PUT_BIT(struct happy_meal *hp, void __iomem *tregs, int bit)
{
    hme_write32(hp, tregs + TCVR_BBDATA, bit);
    hme_write32(hp, tregs + TCVR_BBCLOCK, 0);
    hme_write32(hp, tregs + TCVR_BBCLOCK, 1);
}

Have to love that struct name :). From /drivers/net/ethernet/sun

I'll leave here. The kernel is a goldmine of hilarious, and maybe slightly frightening, comments and humour.

 

I added my contact info and my picture in ASCII art to my personal site (as well as some of my side projects).

You might have to step away from the screen and squint in just the right way, but that's me :)

me in ascii art

 

I'm a realist, and I know that I'm probably the one who will be looking at my comments next... so I like to leave myself nice notes, things like: "Dear future self, it looks like you ended up here (again), this is probably because [bad data situation]. Check that first. Good luck, Love - self, on [date]

 

You're so cute with yourself.. :)

 

Once I had to take over Android app code from outsourced dev, where still I can't code anything myself.

Lurked through code and found exception handler...

try {
...code of something very very important...
} catch (Exception e) {
// Meh...
}

 

Sevilla FC is one of the top football clubs in Spain and its website markup contains the club's ASCII logo.
Sevilla FC logo

 

This one I found from the website of a finnish company called Reaktor.

Reaktor comment

 

Going through my old "top posts" emails and saw this... just thought I'd leave this here for anyone wanting to put a bit of fun in their source code: ascii.today/

:)

code of conduct - report abuse