- 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
He said "better".
Of course, vim is free, too, so...
Admin
I think that's a small WTF in and of itself. In a strongly-typed language like Java, it'd be trivial to build a struct or class that does the same thing, and require that as the parameters.
setDataRecs( new DataRec( "a", "b", "c") )
Requiring a certain multiple of parameters is a pretty confusing way to code.
Admin
TRWTF is that some people just don't get sarcasm.
Admin
Admin
Admin
Now you can argue about how much you have to fight against the language before it becomes a WTF, but I personally don't think that particular offense is anywhere near that level.
Admin
(It is free when using the Classroom License or the Open Source Project License).
Admin
That's pretty much how the .Net languages and regular C++ (with exceptions turned on) operate all of the time, which I'm OK with. You shouldn't really have to worry about catching/rethrowing exceptions at every level in a library or application anyway.
Admin
I suspect that the original coder had no concept of infinity when they coded the first example though.
Today's lesson: "There are three ways to code for sets: none, one, and many".
Admin
Just declaring "throws Exception" is pure lazyness on the part of the implementor and makes life a hell for the user.
In other words: It is a WTF!
Admin
Copy-and-Paste code may end up here. Be glad you are prevented from "writing" it.
Admin
Admin
Just keep scrolling.... just keep scrolling...
Admin
I absolutely love it when people fight over pointless, pedantic nonsense then leave with opinions even more idiotic than when they joined the conversation. The only way this could get better would be to somehow make it gladitorial.
Admin
Admin
Not having checked exceptions is not a WTF. Having checked exceptions and being lazy to the point that they're strictly worse than unchecked exceptions is a WTF.
Admin
Admin
Of course in JAVA you have to do it like that, but in C# you can do this at once and have a function that has an overload for 1 to INF strings to be added to an array :).
public string[] RecData(params string[] m) { return m; }
(disclaimer: of course I'm being sarcastic)
Admin
Another thing that sucks about Eclipse is you can't open two projects (workspaces) at once without jumping thru hoops. I routinely open multiple projects in Visual Studio to add new changes to various projects through out the day. But when I had multiple projects setup thru Eclipse it just gave me an error message if I tried to open an additional "workspace". I guess those IBM guys really aren't that smart.
Admin
What terrifies me is the thought that it may have been intended to use it like this:
setRecData("x", "string", "fish", "y", "int", "42");
Admin
I had not heard of this software before, so I looked it up. I didn't think it could possibly be as bad as you described. Then I saw that it was the product of FOSStards, and understood your position.
Admin
Admin
And this is how the FOSSfuck begins. You spend hours... sometimes days reading forum post after forum post and trying all levels of absurd and random things until you find something that works. If you get one problem fixed, you cause another. Etc.
I've tried the latest popular linux distribution every 3 years or so for the last 15 years. Every time I try there is some new WTF. I spend days trying to get everything working right. I'm not sure why it strings me along for so long before I reinstall Windows... Perhaps it's because I always feel so close to getting it to work. Perhaps it's because of the time investment I've already put in it. Perhaps it's because I see all the potential, and just can't let go.
I've concluded that those that say they "dual boot" must boot into Windows to work on something and boot into linux to fuck around in a never-ending circle jerk of WTFs. That may explain why most screenshots of a linux desktop just show overlapping windows (some translucent) of shit on top of an image of a half naked objectified woman.
Did they ever ship a distribution with readable fonts? I don't care about howtos... Does one of the fucking distributions actually render good fonts in all windows with some sort of subpixel smoothing? And I mean right out of the box with no action on my part. Does it do proper DPI scaling if I choose? If so, then it may be time to try it again and check out the new WTFs.
Captcha: enim - reinstalling windows and blowing away the linux partition - works like an enim for your computer.
Admin
Payed by the number of lines coded?
Admin
I just love how he explicitly states 'throws Exception' every time.
Admin
Is the WTF here that the coworker didnt even use own makeStringArray method?
Oh, wait, ...
Admin
You kidding? If only it did spell check the code, and not just the comments and string constants. There are badly spelled variable and method names all though our product, even in public APIs...
Admin
You know what doesn't work all that well for me? Windows. So I guess I'll just have to keep using Linux.
Funny how what works well for one person with unique personal preferences and work practices doesn't work quite the same for another person with completely different personal preferences and work practices. It's almost as if these alternatives exist just so that people can have the option to choose something that meets their individual needs.
Interesting. Well, have a good day.
Admin
All those functions, and he's not bothered to write javadocs for them. Terrible - how will anyone know what they're supposed to do? :)
Admin
introduce him to varargs please
Admin
But once you're at 40 how can you resist 41 and 42?
Admin
public void setDataRecs( List<DataRec> recsToSet ) { /* do something here */ }
where DataRec is an object containing the three strings. No need to spawn more overlords ;)
Admin
Eclipse is kind of open, but it is actually the spiritual successor to IBM's Visual Age. So it is really a fairly-decent IDE that turned into something really ugly... and then got opensourced.
Me? I prefer NetBeans.
Admin
Trying to make Java act like C# is like programmers using goto to make C look like those old GOTO-ridden languages of yore.
Admin
Admin
Losers.
Captcha: populus
Populated by losers such as yourselves.
Worst WTF evar.
Admin
Wait, let me get this right. He can write VB code by copy-and-paste, but hasn't graduated to a knowledge of loops? And he gets paid to do this by your company? Geez, I get a chance to teach this to 10 high school freshmen in a 5 day week. What should I tell them is the salary range for their advanced knowledge?
Admin
Normally i wouldn't even attempt to justify an abomination such as this, but the code does have one advantage:
it enforces that that the number of parameters is a multiple of 3 at compile time; a vararg implementation could do this check at runtime, but not compile time.
That said its still a stupid shitty way of doing things. If the multiple of 3 requirement MUST be checked at complie time a better strategy would be to only have the first 3 param, version and call it multiple times. If the records MUST be inserted at once, one could make a helper class with a 3 param AddRec method which builds the array, and a CommitRec method that actually calls setRecData(String[]).
Though with that said, those 3 requirements do seem arbitrary but its hard to tell without knowing the context.
While still a huge WTF, its possible this is the only way the origonal coder could figure to satisfy those requirements be they real or imaginied.
Admin
function Recursion(){ if(confirm('Do you understand recursion?')){//if yes msgBox('Good for you.'); } else //if no { Recursion(); } }
=D
Captcha - Minim = Latin for 30, the number of times you do something before you understand you've wasted your time.
Admin
This guy puts the grunt in grunt work...
Admin
public void setRecData(String... args) throws Exception { setRecData(args); }
Done.
Admin
Yeah, I do this all the time for various languages that have similar syntax...which is more or less all of them.
to OP: If you want your commas to look like English, I hear there is still demand for COBOL programmers.
db
Admin
Admin
In VB, you'd write one version with a parameter array and be done with it...
Oh nevermind, C# can do that trick too.
Admin
I love the fact that you asked him about 20 sets, and he then went and catered for 30. That's going the extra mile ><.
Admin
What about negative one sets?
Admin
If something's broken, log a bug. It's software, it's not perfect. That said I've never experienced this so my best guess is you have a plugin that's providing a conflicting hotkey for CTRL-C under certain modes. Check under Window->Preferences->General->Keys, sort by Bindings and see if there's any duplicates for CTRL-C.
Me. But in this case, I would suggest trying to work with it for a bit before dismissing your tool entirely. Almost everything you just mentioned is stuff that can be configured in about 3 minutes.Admin
You can open two projects at once without a problem. You can't open two workspaces at once. They are different concepts in Eclipse. And it bugs me too that the same binary can't be used to open to workspaces at once. Eclipse uses working sets for this issue though (define a working set over all the "projects" of your first "project", and interact with that). Unfortunately working set usefulness is pretty limited.
Admin
So I'm infinite years old. No wonder I'm tired.
CAPTCHA: illum. Speaking Latin so much it makes you sick.
Admin
why is he still allowed to code?