- 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
First!
And just to say - love the graphic!
CAPTCHA: praesent
Admin
Communist Management rulez!
Admin
Wait, let me guess, Dick was given a raise for that, right?
Admin
Knock Knock
Who's There
Java
Admin
Not a Java or C++ thing. TRWTF is that Dick's name is very appropriate. Anyway, a tool for each job.
Admin
Especially Dick's.
Admin
I believe the tool in this case was Dick.
Admin
My experiments show that in most cases, Java is between 1x and 3x slower in CPU time, but most things simply aren't CPU bound anymore.
Admin
Ok the two guys' names are Dick and Peter? Did Rod or Mr. Johnson work there too?
Oh yeah, Java is slow compared to C++ as long as you don't account for the development time.
My mom and dad had their budget in an Excel spreadsheet and they were constantly asking me for help. I re-wrote spreadsheet as a Java application and now they never ask for my help. Java Rules!
Admin
As a staunch Java advocate, to be fair, that just means you're a good app designer, not that Java rules.
Admin
Is Alex writing or rewriting everything these days ? I really enjoyed the writing on this one. The images (loved the quip about change), the tone and rhythm, this was stellar (minor quibble: "As the years past by" -> "As the years passed by")
Admin
Either that, or mom and dad are dirt poor.
Admin
It probably means that they don't tell him about their Excel problems because they don't want him to realize they aren't using his slick little Java app.
Admin
I hope that lost contract was enough motivation for upper management to get Dick fired.
Admin
I thought everyone these days understood the "My <relative> used to <something normal>, and were always asking me for help. I <horrendous solution>, and now they never ask me for help!" ad-lib. Hint: it ISN'T meant to imply the solution was a good one...
Admin
so the writing to text files truly is a wtf...
choosing C++ over Java for performance reasons is a valid concern. Of course if there was no performance issue then Dick is an idiot. However it seems the dev team wasn't terribly bright either:
"That's most likely what's slowing the whole thing down so much," the developer explained.
your system was ground to a hault by a performance issue and you haven't even done the work to profile the app and see where the problem is? more over this system wasn't tested at expected loads?
Admin
TRWTF is disagreeing that Java is slow. SQL Developer, Zend Studio, and pretty much all other Java-based development tools I've used have been horridly slow in comparison to non-Java based equivalents.
Admin
I'd use C#.NET over java any day though.
Admin
In a enterprise environment, maintainability is WAY WAY more important than performance most of the time.
Admin
I think the point was that he wrote something that was so not what was needed that they never bothered him again. :)
Admin
Yep - which is why I avoid java like the plague.
Admin
True, but you said "enterprise environment". Now you have to have special servers running special software for your java applications to run. This leads to more maintenance costs and epertise (that you'll have to pay for) when a problem does occur.
The only decent "enterprise environment" I've ever seen was on TNG.
Admin
What "special servers" and "special software" do you think is required to run Java?
Admin
TRWTF is 65 cents for a can of soda. I hate when management nickle and dimes (and two quarters) developers. Sell soda at cost, sheesh.
Admin
The kind that highly-paid "Enterprise Java Consultants" will tell (and sell!) you is required to run Java, of course!
Admin
Transactions in the 100s per second?! Say it ain't so!
/get a real system. and code it in assembler.
Admin
Well, the Java Runtime Environment and Java Virtual Machine come to mind as special software. C++ applications don't require either of those to run.
The reality is that Java remains to this day far slower than an application that gets compiled to native code. Whether or not that matters depends on the specific case - generally the additional memory usage and startup time don't matter in long-running environments where memory is plentiful.
But suggesting that Java is lighter weight or faster than a well-written native application is ludicrous at best.
Admin
I'm generally a java disliker, but... wow. Dick needs to stop sabotaging his own company and his own company's internal software (as usual, the major source of WTF is the company's management.)
I definitely agree about the writing BTW, this one was awesome with the only exception being the minor "past" instead of "passed" homonym swap, as noted above.
Admin
I agree, our company sells soda at a 2 cent loss per bottle...
Admin
Java slow? Nooo. That may have been true once, but everyone knows that nowadays Java code typically runs 500 times faster than assembly.
Sometimes a method will finish running before it began!
Admin
TRWTF is that Dick survived 25 years on that company.
Admin
Admin
You rewrote their Excel spreadsheet in Java? You are either a liar or a moron. Why would you rewrite ANYTHING when you can get off the shelf software to do anything you could possibly do and do it better? Grab QuickBooks if it is business based, or an old copy of Money and I guarantee you'd be better off.
Admin
aggreed. That is not the point of using higher level languages. In the same regard I cannot compare C code to a well written assembly program. Java(and .NET; same thing, hold your rage please) is a nice cross between an interpreted simplicity and compiled language performance IMO.
Admin
All thanks to the quantum physics included in the VM
Admin
Java does suck... The language semantics are a bitch (I wouldn't consider it quick to write, though perhaps I just have to learn "the Java way" first), the code is ugly (I wouldn't call it maintainable), and in my experience it always performs poorly (nearly every Java app I've used has been near unusable).
I think C++ is probably still my favorite language to write, but I can understand one's need for a higher level language. C#/.NET (i.e., they were developing in Visual C++ anyway) would have been my preference, not Java. Although I doubt Mono is considered enterprise ready yet and it sounds like these projects were going to be running on UNIX platforms (a good thing).
When I think of software to manage transportation for an entire country (even a relatively small one) I think of limited scope and high performance. So C++ sounds like a reasonable tool to use, unless they were specifically going to be building clients or something for the backend system.
Admin
I was always under the impression that a company cafeteria/snack machine was there to keep you from going out and taking longer to get back to your desk; not to make a profit.
Edit: Quoted wrong person; meant to quote earlier message...[need to go out for coffee]
Admin
Dick uses C++ ?! But I can write much faster programs if I do it in machine code. Compilers are for wimps! You can do much better optimization on your programs if you write the machine code yourself than you would ever get from a compiler.
http://www.farid-hajji.net/fun/cj-progmachine.html
'Since Mel knew the numerical value of every operation code, and assigned his own drum addresses, every instruction he wrote could also be considered a numerical constant. He could pick up an earlier "add" instruction, say, and multiply by it, if it had the right numeric value. His code was not easy for someone else to modify.'
Next lesson: Bypassing that sleazy keyboard stuff and modifying data directly on your hard drive by hand with a magnet.
Admin
[quote user="Anon]The reality is that Java remains to this day far slower than an application that gets compiled to native code.[/quote]
The Just-in-Time compiler that came out with, what was it, Java 2.4?, really puts Java into a different league from version 1.
Java 6 so fast that it can execute an infinite loop in 12 seconds.
Admin
Admin
Well, last I checked C++ apps require that you have numerous libraries installed. A decent install program for a Java app will have to install the JVM, just like a decent install program for a C++ app will have to install a bunch of libraries. I don't see that as a truly qualitative difference.
I'm surprised that Sun hasn't made it easier to install the JVM -- at least as of when I was last working with desktop apps, maybe they've done it better by now. (These days I'm on web apps, where I don't ask the user to install anything besides a browser.) But you write your own installer for it once and re-use it for every app and it doesn't really matter.
Admin
TRWTF it seems is that a lot of Dick's peers seem to be in this comment thread. Java isn't as slow as you think it is, people, and probably hasn't been for a long time.
Admin
On no... you mean I have to download the JVM to run my apps, and it's only available (and open source) on every major platform? I mean, that's just vastly more complicated than making sure you have the right libs (e.g. GTK, QT, et al.) installed to run apps in many other languages.
The original person I was responding to was obviously a .NET dev, and for a .NET guy to complain about special software and platform requirements for Java is laughable.
Who the frack suggested that? It certainly wasn't me...
Admin
TRWTF is that many of the articles have this kind of "typo".
Admin
Let's start with "The language semantics are a bitch." How so? You don't like "public int x = 1"? Is that terribly difficult for you to understand? Maybe since it doesn't have a * or an & in there you can't comprehend it. <shrug /> The semantics are some of the easiest to understand (and yes I program in ANSI C, C++, ASP .NET and VB .NET, and Java), and coincidentally they are VERY VERY similar to C#, which I believe you recommend :)
"The code is ugly" Alright now you're just being stupid. Java code is very easily readable and is VERY straight forward. ESPECIALLY compared to C and C++. What don't you understand about:
public int getX() { return x; }
Are there just not enough of those * and & that you love so much in C++? if it was:
return &x;
Would it be that much easier to read, oh and "sexier"?
"...in my experience it always performs poorly ... near unusable)." You need more experience. I don't have too much to say except that you are completely ignorant and need to experience more in life.
I am not saying that Java is the best. Hell I would rather be programming in C# .NET myself. But I hate senseless Java bashers that have no idea what the fuck they are talking about.
Admin
Re the Java-is-slow debate...
I've been working with Java in huge enterprise-sized apps for about 12 years, longer for C++ and C and have a few observations with the benefit of hindsight:
Back when disk space wasn't so plentiful, users used to complain about the size of the jvm on disk. In fact, it was similar to a C++ version of the app linked with debug info (necessary for debuggable core dump files).
Before the JIT compilers came out, the complaints that it was too slow were in some cases valid. Ever since, for most cases (in the context of financial applications, and end-of-day crunching through MM's of records in a constrained time period), speed has not been the constraining factor (usually works out to be an IO bound DB/disk/network).
For some things that are brute force computationally intensive (eg: risk analysis), it is not fast enough and C++ apps are usually used, but that's more the exception than the rule.
Bad code can be written in any language.
Good code can be written in any language.
Efficient code can be written in any language.
Inefficient code can be written in any language.
Bad comments/documentation (in [language of choice] code) is universal.
Badly written third party libraries can kill even the best of applications (TIBCO, are you listening?)
Inept managers who think they are still capable of making sound technical decisions can undo any amount of technical competance on your part.
Admin
TRWTF is nobody proofreads shit.
Admin
The syntax and semantics of Java are, by design, very similar to C and C++. Any competent programmer that writes Java can pick up a C or C++ app and be able to understand it pretty easily (and visa versa).
So please, enlighten me as to what's so radically different about Java to make it's semantics "a bitch".
Admin
Admin
I once interviewed for a project that would use my experience in both C++ and Java: they wanted to convert a desktop client application from Java to C++ because the application had memory leaks and they heard you had more control over memory allocation in C++.
I called the headhunter as soon as I walked out and told him I didn't think I'd be a good fit there.