- 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
Try C99. IT's only 11 years old (just about to become 12) and most people don't really know it. Or C++98, 12 years old but people still can't understand it.
We can't help that Java was WTF-inducing until 2004.
Admin
I didn't read anywhere near all the comments, so I assume this has been pointed out before. I just couldn't help myself.
Right, so The Tiobe Index proves that Java isn't TRWTF?
How?
More lines of Java have been written than any other language in 2010, yes, but that could mean that...
It says nothing about the quality, or even the popularity, just the number of lines.
Admin
Except, of course, that everyone who advocates this misses the fact that now, you cannot comment out the first line without introducing a syntax error - there's no avoiding the fact that there's going to be an issue at one end of the list or the other. (ditto for ANDed clauses, or anything else that has infix separators)
Admin
Yep. Every single "solution" to these "problems" have the same flaw: It'll mess up in either one end or the other.
That's why I like languages that allow
<3 Perl <3 CAPTCHA: eros, how appropriate!
Admin
The REAL WTF is that he does not use his own makeStringArray() method to create those arrays.
Admin
You already can't comment out the first line without introducing a syntax error. Also, it is easier to actually perform the edits to remove a comma that is plainly visible than to find one that is missing, especially if they are staggered at the end of lines instead of put into a tabular form.
Admin
Given that the chief perpetrator of this article writes utility classes and methods (although the utility of them is on par with that of a chocolate teapot), throwing java.lang.Exception means that the user of those methods has no way of distinguishing between exceptions, least of all unchecked (run-time) exceptions.
A tool like PMD will mark this in your source code.
At work, I've introduced the explicit rule that catching java.lang.Exception is forbidden in all circumstances, and that catching java.lang.RuntimeException or any of its descendants is only allowed to prevent an ugly error message being shown to a user.
If you catch all checked exceptions, there is no reason to catch java.lang.Exception.
And because a run-time exception means that you have a bug in your code, catching it is only permitted at the very top level, and still a complete log has to be sent to the support section.
Admin
you must mean 42 right?
Admin
Wow... A programmer that gets a request one day and has the code finished the next. Granted, the whole principle of his code is utter crap, but at least he's fast.
Admin
And in Java, the following compiles without errors:
Admin
Admin
Admin
public void wtf(String... params) {
}
public void wtf(String... params, String... params) {
}
public void wtf(String... params, String... params, String... params) {
}
:--D
Admin
Can you add me a fourth column? ;)
Admin
cripes, someone give that guy a link to an explanation about varargs...
Admin
Such like:
PS: Why does the [s]strikethrough[/s]-tag not work in this forum?
Admin
Hi,
Now you can comment either end...
-Brendan
Admin
Where's my damn article?
Admin
TRWTF is Sourcesafe.
Die Sourcesafe. Die.
Admin
Admin
Admin
Easy enough to write a code generator to create all that, so you wouldn't have to type it manually.
Is it any practical use though?
Admin
Admin
!
Admin
Oh, and to the question of if people know a Python IDE. I used Eric3 a lot and never really had any trouble with it.
Admin
Um... you can use integer values in annotations, you know. (And strings, and any primitive type, and Class, and enums, and arrays of these.)
Admin
Admin
I am sending you a bill for breaking the scroll wheel on my mouse.
Admin
TRWTF is source-code based programming languages.
Admin
Have a look at the name of the site this forum belongs to!
Code posted here must be appropriate! (As a replacement in cases the daily article is missing!)
CAPTCHA: jumentum
Ju meant ... um, what?
Admin
It's official, there are no more WTFs in software.
Admin
I have passed out...pray I don't drink anymore.
Admin
Evidently, the one true number of record data's is 42.
Admin
Did somebody mention it should be 42 instead of 40?
How about varargs?
Admin
Admin
Do you ever leave?
Admin
Is it because 7 ate 9?
Admin
I have seen actual code like that in database stored procedures and packages.
Admin
I can't see what's wrong with this code! You, Jared are the bitch who made the spec!
CAPTCHA: eros Yep, i got it! But still miss the article of today.
Admin
So this is why Microsoft added the params keyword to C#.
Admin
IT IS NEVER ACCEPTABLE TO PULL THIS KIND OF IDIOTIC STUNT.
...well, maybe sometimes, in the heat of the moment, it's forgivable...
Admin
Wrong.
http://java.sun.com/docs/books/jls/third_edition/html/binaryComp.html#13.4.21
I believe there are also some depreciated methods in Thread that can lead to unexpected checked exceptions.
Admin
Ah, well, but there are some other rules, such as 'do not use deprecated methods' and 'do a clean and build of your project before deploying'.
Which should catch most of the cases. In all other cases, we employ corporal punishment on the developer responsible, so (s)he won't do it again.
Admin
Who lives under a bridge? Why it's you
Admin
That's why people think programming is hard. They try to tackle programming with brute force(ctrl-c,ctrl-v) instead of smarts.
Admin
spawn more overloads.
amet. is some kind of amulet?
Admin
Um, what? Sure, you can't open one workspace multiple times, but I frequently have 2 - 3 instances of Eclipse open, each pointing to a different workspace. But then, I use Linux too.
Also, regarding the point about not being able to share projects: You can. I think it's retarded, but you can. It requires that everyone has the exact same Eclipse setup, though, and that people are very careful about experimenting with new Eclipse plugins (as they can change the .project file, and that makes things wonky for other developers if they don't have the plugin). I generally figure that IDE-specific files shouldn't be in Source Control. The only things that should be are what is required to build the project from the command line. That way each developer can configure their IDE exactly how they want, not how everyone else has it configured.
And I honestly wouldn't care what IDE a developer used, so long as the end result was as expected (e.g. Unit Tests, no WTFs, compiles, etc).
CAPTCHA: augue (augue, augue... round and round we go!)
Admin
Now Netbeans has quite a few WTFs of its own (re-introducing bugs that had been fixed in a previous release comes to mind), but when I read about such silly restrictions in Eclipse, I think we made the right choice at work.
Right now, I've got five projects open; my colleagues often have a multiple of that.
Admin
Holy sh*t, dudes!
Admin
To continue on this Eclipse thread GAH! I downloaded eclipse IDE for PHP to try it out. I can't open some of the source code files, it comes with an "Unknown Error" WTF! The file opens fine using cyberduck (sftp) and textmate (mac editing program). Its quite sad, because I kinda like how eclipse works but practically its useless!