back to article Safari practices self-love, claims code monkey

Aficionados of code profanity in which exasperated operatives embed their disaffection deep in their masters' source code will doubtless enjoy Last.fm's contribution to the genre, found hidden in this innocent-looking page. A quick perusal of the source code reveals: <input id="safariIsWank" type="hidden" value="" /> - an …

COMMENTS

This topic is closed for new posts.
  1. Anonymous Coward
    Coat

    Better Code

    "if (!event)" or "if (event === null)" are better alternatives.

  2. Tom Bradbury

    Not new...

    Bit of Googling reveals this was noticed a long time ago...

    http://mrspeaker.webeisteddfod.com/2007/02/

    Funny nonetheless.

  3. Stephen
    Happy

    really?

    do people really get upset about "vulgar" code comments?

    i find expressing my frustrations keeps me from wanting to act on them.

    i'd rather some coder gets it out in code, rather than take it to his supervisor or family...

  4. Steve Pettifer
    Happy

    Got to be done

    Love it. I often embed stuff in my comments which goes unnoticed even though the code is supposed to be reviewed. A former team leader of mine was surprised to find a quite long diatribe in some comments I made about a dodgy hack implemented because I was about to go on three weeks holiday and couldn't be arsed to do it properly (legacy app, being phased out - you know the score). Luckily, he's a mate and foubnd it rather amusing especially as he found it in a section he allegedly reviewed, 3 years after the event.

  5. Anonymous Coward
    Linux

    searching for code expletives and firefox

    Curious, I did a search for file:\.js$ f[cu]{2}k firefox on google code search, the result was mainly people complaining about IE, though this searches open source apps and so there would be a tendency to blame the evil Redmondites for everything, quite right too.

    Penguin, because I blame the evil Redmondites for most of my daily hassles too.

  6. David Buckley
    Boffin

    @first post

    well perhaps in some situations

    but null and 0 are not always the same thing

  7. James Le Cuirot
    Gates Horns

    Fucking IE

    ...is probably my most often-used comment.

  8. Shell
    Paris Hilton

    bored

    How bored to you have to be before you start trawling the source of web sites for smutty comments?! I mean... come on. Surely you're not run out of porn.

    Paris, just because.

  9. Quirkafleeg
    Coat

    Er…

    … exactly how did Safari claim the code monkey in question?

  10. Sooty

    Is it just me?

    or is the (relatively non-existent)commenting of that whole piece of code a complete f*cking disgrace.

    http://www.koders.com/javascript/fid82A0EBCC891CA06722493DA646BB09267D3E420D.aspx?s=fucking#L177

    If i was reviewing that i would have taken one quick glance and sent it back without even checking further. I wouldn't care if it worked or not, it's a maintenance nightmare.

  11. Anonymous Coward
    IT Angle

    Ah, like the good old days ...

    when compilers actually left comments embedded in the executable files!

    Now, that was an eye-opener on the mindset of the programmers.

  12. J-Wick
    Paris Hilton

    @bored

    ...one generally can't surf porn at work.

  13. Anonymous Coward
    Alert

    @ David Buckley

    "but null and 0 are not always the same thing"

    They are NEVER the same thing and should never be treated as such.

    Chhhhrrrriiiii ....

  14. Anonymous Coward
    IT Angle

    I'm sorry ...

    But if you dare to refer to yourself as a “programmer” and don't realise the difference between NULL and 0 you are officially sacked. Anywhere. In any language or in any discipline.

    The difference is often a fine one but it is very important.

    Please God: tell me I'm wrong.

  15. Tim Brown

    How sad is it...

    ...that someone actually read the code deeply enough to find that comment?

    Nerds!

  16. Quirkafleeg
    Happy

    Re: How sad is it…

    Ah, but would he? grep and Google are the tools of choice for that kind of thing.

  17. Andrew
    Thumb Up

    work?

    At El Reg, you can surf porn at work. See article where your dear reporter surfed porn with a city councilman. For ... research.

  18. Steven Knox
    Boffin

    The correct answer...

    for the event test is actually NONE OF THESE:

    if (!event)

    if (event == null)

    if (event === null)

    I'll leave it to you to figure out why, and how to test properly. Remember to show your work.

  19. Steven Knox
    Boffin

    The correct answer...

    Okay, here's a hint: for starters, you have to know the difference between 0 and null AND false AND undefined.

  20. Michael Greenhill

    Code comments

    Ahh, I remember the fun times at my old job. I pretty much documented all the bullshit that was going on that particular day - my boss's paycheque bouncing, and him then calling the beancounters and senior management"a bunch of useless tossers" was a frequent occurance.

    I used to have conversations with our other devs in comment form. Most of them revolved around which torrents we should choke off the net connection with on that particular day, or which manager/beancounter was giving us the shits.

    It was a very hostile workplace - devs + engineers vs senior managers + beancounters - which resulted in all the devs resigning on the same day, racking up a ginormous tab at the pub senior management favourited and leaving them to pay the bill.

    Ahh...

  21. michael

    I rember

    showing somone how

    null=null =false

  22. Fred
    Linux

    @ Shell

    Good call lol...

  23. Anonymous Coward
    Anonymous Coward

    @J-Wick

    I could.

    All you need is a desk with your back to a corner where no-one is able to see your screen coupled with administrative control over the infrastructure (proxy server? I bypass your steeeeeenking poxy server).

    Don't see the appeal in just *looking* at porn though. It would just eat into valuable commenting on El Reg stories time.

  24. Daniel B.

    null

    In C, null = 0 only if you're talking about a pointer. But don't EVER go on that assumption!!! Please!!!

    Reminds me of that BOOL someone posted in the Daily WTF:

    enum BOOL {

    TRUE,

    FALSE,

    NOT_TRUE_OR_FALSE };

    Extra points for those who notice how bad that is...

  25. Anonymous Coward
    Alert

    @ Daniel

    You eloquently make my point.

    This is seriously the type of shit I stumble over almost every week. Where do they GET these people and why do these people ever imagine a career in writing software for a living is their niche?

  26. Pyros

    Ooo, C++ questions!

    @Stephen Knox: "Okay, here's a hint: for starters, you have to know the difference between 0 and null AND false AND undefined."

    Hrmmm... I'm rusty at this, but if I recall correctly--you're reffering to how the value is determined in terms of size and bit order (with the exception of NULL.) 0 is an actual integer, FALSE is a one-bit value, and UNDEFINED could pratically be *any* value/size (which is why you don't find this statement in good code, unless some numpty made it a global constant.)

    Only NULL doesn't encapsulate any value/size, as it simply states "there is no defined value assigned to this variable." You can have some pointer remember some random address in memory and it'll return some gibberish based on the size of the variable it's using--it'll never return NULL because there's *always* something there.

    @Daniel B.: "Reminds me of that BOOL someone posted in the Daily WTF"

    Shouldn't it be "enum BOOL {FALSE, TRUE, NOT_TRUE_OR_FALSE }; based on bit order?

    But, then again, this is a moot point; it's basically adding an actual '2' to raw binary '01' code. (Enums also don't take constants very well, as it's bad coding pratice to do so.)

  27. Anonymous Coward
    Thumb Up

    Code Abuse

    I used to love adding comments to HTML that would potentially be 'seen' by everyone. I used to tell all sorts of people off, plus add witty quotes and jokes. No one ever found any of it. Oh, well, who said the life of a nerd was all excitement and danger?

  28. Anonymous Coward
    Anonymous Coward

    @really?

    Have we honestly arrived at the point where if aren't swearing in our code that the supervisor's family may have cause for concern? Because if that's the case it might be time for a long vacation :)

  29. Anonymous Coward
    Coat

    Null = 0

    when you refer to the contents of my wallet.

    Oi, some bugger is going through my jacket to get my empty wallet

This topic is closed for new posts.