- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Admin
There is a certain mentality, especially fed by stuff like JSON, that wants to reduce all data types to integer, float, string, list and map. It's really aggravating in Java because everything is an ArrayList, HashMap and occasionally LinkedHashMap of whatever and static typing is just this elaborate ritual of repeating yourself endlessly.
Admin
Of course it's ok. You may not like it, but it's absolutely ok. And it's better to know who the dickheads are then to keep covering them up.
Admin
TRWF is, as ever, a lack of code comments. Code which makes no sense often makes a lot more sense when someone has written a comment that tells you why they did this seemingly weird thing.
Except the times when it just leads to an even bigger "WTF?", of course.
Admin
But you can't be elitist if you don't have esoteric terms!
Does any composer even use a breve? I've always wondered.
Admin
It seems fairly obvious that this once did something. Maybe it changed a https:// request to http:// or vice versa. The requirements changed, and the code changed too... as little as possible.
The lesson here is that some WTF code isn't done by idiots. It's a series of reasonable, rational decisions, gradually moving towards the inane. Ware the creeping stupid!
Admin
There's a Pink Floyd track called "breve".
(That's Wright isn't it? Must check the track listing...)
Admin
Admin
Oh boy! I have seen this in prod. code.
Admin
Look for a blakeyrat posting. Disagree with it (suggest Microsoft sucks rocks or that Linux and Open Source is the one true way). You'll initiate a cascade of posts sufficient to prove you exist for a week or more. Then repeat when the noise dies down.
Admin
But the code does do something. It removes http:// from the url. It just does it in the most stupid way possible.
Admin
If I saw code like that, rather than fixing it, I would add a comment like "// what in the actual f*ck..." on the last line.
Admin
Admin
Lol, classic Steve!
Admin
It is a near obsolete term denoting a unit of measurement of liquid. The musical version (two crotchets) is in no way obsolete. BTW a "half-note" in UK (and probably everywhere else but dumbed down US) would be interpreted as a quaver, it being half a standard note (crotchet). A minim is half a semi-breve, so not only is it confusing, it is also wrong.
Admin
The problem with those names is that they imply they mean something, when they don't.
What does 'whole' mean? A whole what? A whole bar? No. A whole beat? No. What then?
At least a "semibreve" has no other meaning that what it is.
Admin
Admin
Admin
See this is why you should always be leery about using lines of code completed as a metric.
Admin
Hard to tell without context or comments, but it doesn't seem to consider forms like
http://http://www.organizedcybercrime.com/malware.html
-Harrow.
Admin
Really you can say that the semi-breve is the full "bar" in common (C) or 4/4 time, which is therefore not a fractional bar like 3/4 or 6/8 is.
A minim is two crotchets and half a semibreve. A breve is virtually unknown as it spans more than a bar in common time, so far more likely they would use two tied semibreves to indicate it as notes generally do not extend beyond a bar in their regular form and are written as tied notes.
A tied note is written as two notes with a curved line between them indicating that they are in fact one long note (therefore you should not sound the note again when it re-appears).
A minim is indicated like a crotchet but "unfilled" or like a semi-breve with a stem. You can also get a minim with a dot to indicate a 3/4 note (a full bar note in 3/4 time).
Admin
A stur is a deng which is two plonks which are five sixth of a flenky, whereas a habs is a fswop's half nache.
It does not make any sense!
Admin
But but... what was it supposed to do? I can't even get that much from the code!
Admin
The breve rest is more common than the note itself. It is often used in conjunction with the digit 2 to denote two bars' rest, in the same way that the semi-breve rest is used to denote a bar's rest (even when the bar is shorter than a semi-breve).
For four bars' rest one can use a double breve, and the three rests can be combined for up to seven bars' rest if necessary. (Longer amounts of rest use a different system.)
Admin
Admin
Just do me.
captcha: plaga
Admin
That is TRWTF right there. Code that can randomly crash if used in the 'extreme' or maybe on second thought not so extreme situation of an url that is actually only 7 characters long.
Admin
also, http://http://example.wtf would produce http://example.wtf
...inb4 they read this and fix it by using while(substr($string,0,7) == "http://") { [...] }
Admin
Sorry, what's a venous injection? Google gives me some medical jargon. Was that simply a joke, or is there a security attack I'm not aware of?