Feeds

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.
Coat

Better Code

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

0
0

Not new...

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

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

Funny nonetheless.

0
0
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...

0
0
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.

0
0
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.

0
0
Boffin

@first post

well perhaps in some situations

but null and 0 are not always the same thing

0
0
Gates Horns

Fucking IE

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

0
0
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.

0
0
Coat

Er…

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

0
0

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.

0
0
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.

0
0
Paris Hilton

@bored

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

0
0
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 ....

0
0
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.

0
0

How sad is it...

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

Nerds!

0
0
Happy

Re: How sad is it…

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

0
0
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.

0
0
Silver badge
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.

0
0
Silver badge
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.

0
0

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

0
0

I rember

showing somone how

null=null =false

0
0
Linux

@ Shell

Good call lol...

0
0
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.

0
0
Silver badge

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

0
0
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?

0
0

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.)

0
0
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?

0
0
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 :)

0
0
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

0
0
This topic is closed for new posts.