I can't really tell if the author is joking (it reads a little sarcastically), but assuming he's not, the counter argument is really easy. While you're spending days writing mallocs and copying function pointers in C, your competitor is using one of these "lazy programmers" languages and implementing features in hours. Features that are going to take you days to write. Once scale is needed, your competitor just goes…
The key words to understand the author are buried in there: "As a sysadmin". For sysadmins, the time saved in development means nothing, while every additional machine (and especially the infrastructure to run them as a cluster) means more work. Still, shouldn't even a sysadmin appreciate the increased reliability and especially security that modern languages bring?
My latest anti-java rant
21–30 of 48 posts
Re: My latest anti-java rant
#22The JVM has never been 1000x slower than native code. Fourteen years ago it was occasionally as much as 10x slower. What's the penalty these days, maybe 10%? And in return we don't risk undefined behavior if anyone who worked on the project ever made a single mistake? Java is a mediocre language at best, it truly epitomizes everything pg said about Blub, but I'm still glad we didn't use C. And assembly? Seriously? Al…
Re: My latest anti-java rant
#23Earlier quoted context omitted.
The key words to understand the author are buried in there: "As a sysadmin". For sysadmins, the time saved in development means nothing, while every additional machine (and especially the infrastructure to run them as a cluster) means more work. Still, shouldn't even a sysadmin appreciate the increased reliability and especially security that modern languages bring?
Exactly, as a sysadmin, he should appreciate, that he is not solving buffer overflows all the time. Regarding the more work, as a sysadmin, it is his job to make the machines run the application. His salary and benefits are part of the cost using the higher level languages/additional computers. His rant could be taken as "lazy sysadmin" problem, while what he is ranting against was just costs/benefits decision.
True, my rant could be takes as a "lazy sysadmin", but I have a CS degree and have a programming background. Personally, I'd prefer to re-write this code myself in C than see this kind of hardware waste. That's not being lazy, it's being respectful of the power at my disposal. Use the machine's power on doing actual work, don't waste the machine's power on programmatic overhead that could be avoided by making a different choice.
Re: My latest anti-java rant
#24"It’s not as slow as it used to be, but it’s still pretty un-optimized. It doesn’t run “close to the metal” like C and assembly does." While everyone likes to have efficiency, being readable and/or easy to use sometimes trumps it. Would you really write a program like in assembly, just because it would be faster?
Re: My latest anti-java rant
#25"It’s not as slow as it used to be, but it’s still pretty un-optimized. It doesn’t run “close to the metal” like C and assembly does." While everyone likes to have efficiency, being readable and/or easy to use sometimes trumps it. Would you really write a program like in assembly, just because it would be faster?
I'd go further and say that readability and/or ease of use _often_ trumps efficiency. I/O tends to be the bottleneck at least as often as CPU, apart from anything else. I agree with the point about writing in assembly language. This rant is basically arguing for speculatively micro-optimising _every line of code_ by choosing a supposedly faster language.
Re: My latest anti-java rant
#26In many cases macro-optimization trumps micro-optimization. C/C++ might be closer to the metal and in extremely simple applications incrementally (or perhaps significantly) faster, but if the difficulty of using C for web app development results in an extremely sub-optimal solution then you'd have been better off with a more advanced language like Ruby or even Java. Moreover, the long pole in almost every web applica…
Re: My latest anti-java rant
#27The anti-GC part of this rant is especially hard to take. I've had the misfortune of having to debug various memory allocation problems in C. That's something I don't miss at all. To bag GC for performance without mentioning reliability is just wrong.
Re: My latest anti-java rant
#28I'd comment on the blog if I didn't have to login. Wins prize for most naive rant this week. There are a lot better reasons to hate on java, but speed really isn't one in 2010. I'd love to see the rewrite of one of the apps he's complaining about in C and blog post about that. --omg-optimized
I'm sorry that you think that I'm naive. I'm 41 years old and have a CS degree. I've been a linux programmer and sysadmin since 1993, before linux had a 1.0 kernel (0.99.9.45 or something like that when I installed my first linux machine). My background is in programming and I spent my college career in 1990-1994 writing mostly C code.
Java is slow, although most java programmers don't want to admit it. When you take into account resource bloat, java is still a horrible choice for almost any application unless you work for a company with a lot of money that's willing to just throw money at hardware because the software developers say it's needed.
If you'd like to compare apples-to-apple, it's going to be hard because people don't usually write the exact same app in more than one language unless they're doing benchmark tests of something simple (usually hello world, or a matrix operation or something), but not real world applications.
I realize that I'm sticking my neck out there for criticism, but I'm ok with it. A lot of web programmers are java engineers - young kids coming out of school with a java background and they don't want to even deal with C because they don't want to do the manual memory management or watch for return codes, but instead just wrap the whole function in a try/catch handler. To me, it's laziness. C and C++ are almost the same syntactically to java. You guys can write C or C++, you just choose not to. For me, being a sysadmin for a living now, this is just a lazy and wasteful choice.
If you were to write your code in something more "close to the metal" just think how much more awesome your programs could be!
Re: My latest anti-java rant
#29Rather strange rant. I hope it was trying to be funny, but if so, it failed miserably. Anyway, what I find interesting is that Java really is very slow in one thing: startup time. My completely unscientific test concluded that a hello world -program in written in Java takes about 0.110 seconds to run, while the C version took about 0.003 seconds. What's interesting, Python version takes about 0.015 seconds, which inc…
Secondly, let's talk socket pools, file handle pools, garbage collection, and all of the many things that java gives you to get better performance out of a language that is literally the elephant (bloated, slow thing) in the room.
Re: My latest anti-java rant
#30Sadly, it is the faults of java that pre-adapted it to success in a corporate environment; it creates an impression of vast complexity in even simple tasks and allows for large budgets and swollen headcounts that translate into more power for the leadership of projects in which it is used.