- 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
What you described is pretty much what I wrote, not what the Anon guy wrote. I said the point is the laugh at code so silly and stupid that almost anyone who understands the basics of programming can see there's better ways to write it.
What the anonymous guy (who I think we can assume is loneprogrammer) wrote was:
>>The whole RAISON D'ETRE (that's the French language by the way - go look it up) of this site is so that one group of people can take the piss out of code written by some other people with the implication that the first group is superior to the second. IOW, this site is all about elitism
So you agree with HIM on that statement and disagree with me?
They key difference is: The site isn't about good programmers having their pretty good but unperfect code ripped apart by those who are "elite" superior programmers to everyone else. It's about common, everyday programmers like me and you who recognize that perhaps you don't need to do 255 IF statements to convert an integer value to a character. And it's about common programmers like us who in the past may have written WTF code overselves and now have learned from it, and are capable of laughing at ourselves.
Admin
<font face="Georgia">Hold on, Razzie - it wasn't "Mr Anonymous who makes you absolutely sick" who used the word moron. The word moron was introduced earlier, and I thing MAwmyas was right to say that anyone who's not stuck in their rut will have a better idea about the example than you, and others, have implied. It's a good example, taken in context, and is not a WTF by any standard I can identify.
I feel that there are two dangerous flaws in your thinking: the first is to think that if you are ignorant of something then you are stupid, and the second is to think that if someone knows more than you they are evil. The first is wrong because ignorance is the essential first step on the road to knowledge; the second is wrong because it discourages you from taking that road yourself.
Don't mistake a lack of knowledge (ie ignorance) for an inability to gain knowledge (ie stupidity). You have the former all the time, and you can learn and set yourself free; you only have the latter if you have some sort of medical condition affecting your higher brain function, or else you're too set in your ways to do something about it.
Don't fear knowledge, even someone else's.
</font>
Admin
Admin
Admin
Bat,
There is a big difference in your average 'WTF' piece of code and giving my OPINION about Haskell syntax. If I say that Haskell looks like Chinese that doesn't mean that I can't figure out what it means if I take a better look at it. Hell, I might even be able to do that better than anyone else here. My point is though, that the 2nd Mr Anonymous comes here not to laugh at the WTF code, but rather to just feel 'elite' or something, because he can then look at some errors he will never make.
Well, I don't need to feel elite. I also am not elite. I am a very good programmer though especially for my age. I still learn everyday and I like to learn. However, I am not a moron because I say that Haskell looks like Chinese to me on first glance. And I certainly do not want to read smart and rather childish comments of others telling how silly it is if you have that opinion about something.
I really like this site and its concept, but I really dislike the 'elite' culture that seems to exist here. You don't need to be elite to laugh at WTF comments, and you certainly don't need to be laughed at by people who like to consider themselves 'elite' (for some sad reason?) because you give a very reasonable opinion.
Admin
Ok, maybe i generalized too much before. Yeah, true, it's the code we're laughing at. We all makes mistakes. And if a WTF is just a mistake you could say that we don't laugh at their skills, we just laugh their mistake.
But if you browse this forum you'll see that a lot of the examples doesn't *seem* to be simple mistakes. It does often seem to be deeper than that - like it's the way they code/think that is the mistake. So when we laugh at their code we laugh at their skills. Which means we're in these cases implying that we're better than they are. (And since "their skills" in our context means "them": we laugh at them. They could be nice guys n' all - but the only part of their person we can see and judge here is how they code.)
So i'ld say that directly we ofcause laugh at their code, but indirectly we are sometimes implying that we're better than they are. (and sometimes directly aswell)
This is kind a' elitism, isn't it?
Ok, let me elaborate a bit on what i meant.. True, we're not saying that we're better than everyone else. We're just normal programmers and not the elite of the elite. BUT... if someone uses 255 if-statements to convert an integer to a char, doesn't that suggest that he is not a good coder? (atleast he does not feel at home in the language he is using) And since we make jokes about it, doesn't that imply that most of us are better than he is? (and thereby we are more elite than he is - atleast in this aspect of coding)
I mean... you don't do stuff like that to save time, so it isn't because he is in a hurry. It's harder to modify so, it isn't because he wants to make easier-to-change code. It's performance sucks, so it isn't to make it go faster. It takes more memory, so it isn't to save RAM. It's not just a small silly mistake, because if you write 255 if-statements to convert an int to a char, you do have the time to reflect at what you're doing - after 3.14159 secs, you SHOULD immediately realize that what you're doing is retarded. That coder didn't. Doesn't that say something about his skills compared to ours?
(and that example is not the only one. And these guys even get paid to do what they do.. that's funny (<- notice how what i just wrote is a normal thing to write in here, and that it does imply excatly what i'm saying))
Admin
Jeff, ok maybe i retract that this is what the site is ALL about. But i do believe that this is what this site is also about.
Admin
Some programmers improve their skills with time. Others do not. Most of us would look back on code we wrote years ago and say "WTF?" That is a good thing. None of us have the skill of a master programmer when first starting out. But for some, that is the most skilled they ever become.
The truely elite do not come here to feel more elite than others. They come here to learn, or to teach, about programming.
I wrote the long post explaining the Haskell code. But because I posted anonymously, I guess it was actually a troll, so it was ignored. Please, let's continue discussing exactly which anonymous people are morons. That's what we're all here for, isn't it?
Admin
Yeah - you'd expect a programmer to know better than to make a comma splice in a comment.
Admin
For the anon troll, I wonder if removing the explanation and changing a few 'obvious' variable names would make it so incredibly obvious to him what this did. I mean, you can look at it and translate it to set, and possible to an execution path, but it wouldn't be immediately obvious that it was a quick sort impl.
I'm pretty sure the whole true2 and tristate boolean phenomenon is really evidence of programmers way ahead of their time, preparing for the inevitable rise of multi-state logic circuits that will pave the way to the glorious land of terahertz processing.
Admin
foxyshadis, your avatar image is not loading -- 404 error.
Admin
Did it ever occur to the obviously veeerrryyyy smart Anonymous hijodeputas here that a good chunk of professional programmers have not taken Computer Science nor Mathematics as a degree, let alone Set Theory and Discrete Math?
Admin
Oh godammit. I think everyone lost their sense of humor. [:'(]
Admin
Actually, I come to this site to see what other people do 'wrongly' or 'inefficiently' so that I do not fall into the same traps. I think of myself as a pretty good programmer, but I know that I always try to incorporate 'new' (for the company) technology in my projects. This can lead to mistakes which perhaps I can catch here before I make them myself.
Also, browsing this forum gives me inspiration about things I have to do.
Then after learning something new, I have a laugh about the WTFs, but I realize it could've been my code I'm laughing at.
But, I still love having a good laugh at all this, and wish that people who had an opinion stated it as such (ie: NOT languageX sucks, BUT in my opinion languageX is not suited to this task because bladibla). It's so easy to critisize, but so hard to produce constructive critisism [:O]
Drak
Admin
In the true/false/WTF? case, it occurred to me that if this is in Java, it might have been a <font face="Courier New">Boolean</font> object rather than a <font face="Courier New">boolean</font> primitive, and that the 'other' case is for <font face="Courier New">null</font> references... except that in order to use that as the argument of an <font face="Courier New">if()</font> expression, it would have to return the actual boolean value using the <font face="Courier New">booleanValue()</font> method, which it doesn't. So much for explaining that away.
As for the Haskell case, I won't comment. I know both the Quicksort algorithm and a smattering Haskell already (and have read this particular example before), so I wouldn't want to try and judge how 'obvious' it is to someone who didn't. However, I will say that a) I disliked the choice of variable names in the example, but I understood them well enough, b) whether it is familiar or not to someone seems to be predicated primarily on one's familiarity with set mathematics, rather than programming, and c) as the interface designers say, "The only "intuitive" interface is the nipple. After that it's all learned." HTH.
The negative number case and the print "0" case both look like instances where the programmer got lost in a little programmatic labryinth and didn't notice the "Exit" sign when he passed it. As for the last one, all I can do is shake my head sadly and wonder how any programs ever actually run at all.
<font face="Times New Roman"> </font>
Admin
Assuming this is Embedded Visual Basic, or some sort of Visual Basic for Applications, you can't use Left because it's a property of the parent form and therefore not available as a function of the same name.
In that language everything is a varient so type casting would be the only way to be sure your getting what you expect.
If that is the case using those Mr Burn's languages is the WTF.
(Mr Burn's Language = Everyone wishes they would die, but they won't, yet you can make money working for them at the cost of your immortal soul.)
Admin
<font face="Georgia">Funny, I've just been thinking myself about the quote that "the only intuitive user interface is the nipple". See, my daughter was born on Saturday, and I was there during her first few feeds. She actually took a fair while to work out what to do, but in this case I think it's because she was still trying to figure out how her mouth works, since it's all pretty new to her. At any rate, I'd have to say that even the nipple is not 100% intuitive, requiring as it does a little bit of trial and error before the user can fully interface with it. From this, I deduce there really is no such thing as a fully intuitive user interface, and we should just write better help files.
</font>
Admin
I finally decided to find out where it was loading from and change it.
As an aside, new forum wtf: Once you've uploaded an avatar you can't upload anything else. It just keeps the old one when you try. wtf.
This forum is hilariously bad. It wouldn't be nearly as fun with scoop or vbb/phpbb. =D
Admin
<FONT size=2>RE: As an aside, new forum wtf: Once you've uploaded an avatar you can't upload anything else. It just keeps the old one when you try. wtf.</FONT>
Isn't that just your or the forum's cache acting up?
Drak
Admin
The haskell code is probably easy to read for people who have had a lot of math in their study; I don't know Haskell but I understand the example because it look (syntatik sugar aside) like a mathematical definition of quicksort.
Admin
Yikes! 3 sentences, 3 incorrect statements -- not too shabby for a Monday morning! We'll give you the benefit of the doubt and assume (hopefully!) you're an anonymous troll and not really that ... uh ... misinformed.
(Can't use LEFT() in VBA? EVERYTHING is a variant? yeah, if you don't declare your variables!)
Admin
Well I'm not all that smart, I don't have a degree in programming (learned all I know by myself), and I had very poor grades in Mathematics. Of all languages I've studied, Haskell looked the most intuitive to me. I didn't even understood quicksort before reading that Haskell example.
But then again, this is just me. No two people are ever alike.
P.S. I find the forum software is working better than before. Good work, Alex!
Admin
Fair. I have a degree in maths and exclaimed 'wtf' at the Haskell post. It wasn't until I'd read many of the replies before I could make any sense of it. It would never have occurred to me that it might be using a modified version of set notation.
... And it still looks opaque to me.
Admin
Hmm. If you didn't already know:
http://msdn.microsoft.com/library/en-us/vbenlr98/html/vafctLeft.asp
Which should work fine in VBA, seeing as how that function comes from the VBA library (Just look at the top,right corner of the document, it will be in italics, something to the effect of "Visual Basic for Applications Reference").
How, exactly, do you type cast in VB? I'd like to know how. BTW CStr does not count for type casting, but rather type conversion, two completely different operations.
What really steams me about your post is the fact that you appear to put on the façade of knowing something about programming and cannot properly spell VARIANT.
So, with the lack of knowledge on how to spell the type, how do you get by programming in a language that uses that type?
Admin
After re-reading my post, One other thing I would like to point out is that the VBA namespace generally overrides most other namespaces. You would need to fully qualify the Left property, if VB complained about it...
Admin
int iChkShut; // variables MUST be initialized, not sure why
That is probably my favorite code comment of all time. Somehow I get the impression the guy is really fed up with not understandly why and just does it out of defeat.
My guess is he's a classic ASP programmer trying to write C# ASP.Net code. For those who don't know, by default you don't need to itialize variable in classic ASP, you have to enabled 'Option Explicit' in order to required initialization.
Admin
I cleared my cache and closed the browser a couple of times f'ing with it, and it kept displaying the first one I uploaded. Maybe the forum designers thought WORM was a really cool concept and used it there. Lack of post editing supports that idea. >_>
Admin
Lol
<FONT color=#000099>If</FONT> (<FONT color=#000099>Mid</FONT>(<FONT color=#000099>CStr</FONT>(cppObject.GetValue()), 1, 1) = <FONT color=#990000>"-"</FONT>) <FONT color=#000099>Then</FONT> ...
is *really* interesting cause the outer () will cause VB to cast it into a variant before evaluation! So many humerous incidents in one code statement - classic!
Admin
Eh... NULL?