Slashdot Mirror


Phillip Greenspun: Java == SUV

lateralus writes "In his blog, Philip Greenspun re tells of his epiphany that Java is the SUV of programming languages. An interesting point brought forth in his typical extreme style."

24 of 974 comments (clear)

  1. Whatever dude. by botzi · · Score: 5, Insightful
    A project done in Java will cost 5 times as much, take twice as long, and be harder to maintain than a project done in a scripting language such as PHP or Perl


    This guys is a troll. With all my respect, he doesn't bring any actual arguments with the exception of how difficult binding variables is. Should I also add that he's looking only in a matter of web based project's depending on a SQL-type DB????
    Oh and last:


    take twice as long, and be harder to maintain than a project done in a scripting language such as PHP or Perl..


    Java has never been intended to substitute scripting languages. Of course a project done with PHP and/or Perl will go much faster!!! Both are able to execute almost eveyrthing you throw at them, but you may say exactly the same thing about C++ and PHP/Perl and it will be evenly unfair.
    PS: And this said from a C++ zealot;oP

    --
    1. No sig. 2. ???? 3. Profit!!!
  2. Java's not an SUV! by Steve+G+Swine · · Score: 5, Funny

    SUV's start up instantly!

    --
    "Consider yourself a member of a virtual corporation with Mr. Torvalds as your Chief Executive Officer." - Linux Advocac
  3. Like a SUV huh? by weave · · Score: 5, Funny
    Let's see, I can't read the article because it's slashdoted already, let me take a stab...

    Weave's rushed tongue-in-cheek SUV vs JAVA comparison:

    • Very successful, can't sell enough of them. Nope
    • Crushes the competition (anything that gets in the way). Nope
    • Able to crash in spectacular ways if not handled correctly. Maybe
    • Bloated, overkill. Yes
    • Wastes resources. Yes
    • Preferred by men with small penises. Yes
    • Can put everything including the kitchen sink into one. Yes
    • Is seldom used to do all of that. Yes
    • Promoted by using annoying advertising. Yes
  4. Re:Too much formalism by msgmonkey · · Score: 5, Insightful

    Bad programmers write bad programs regardless of the language.

  5. Java's Cover by nthomas · · Score: 5, Interesting
    The blog seems to be down, but in case anyone was interested in a similar story:

    Paul Graham (of Bayesian filtering and Lisp fame) wrote an excellent article called Java's Cover.

    It is about why he thinks Java is bad technology -- despite never having used the language. Very interesting read.

    Thomas

  6. Harvard: The 'SUV' of Higher Education? by hethatishere · · Score: 5, Funny

    Just a thought from a friendly MIT student.

    --
    Something intelligent here.
  7. Re:Finally by gilgongo · · Score: 5, Insightful

    If you'd said "I work for a web development house that used to produce everyting using J2EE, then we discovered PHP..." I'd be more interested in what you had to say about the merits of PHP over Java. Let me guess - you also can't undertand why anyone would use Oracle when MySQL is so easy and fast, yes?

    It's all about horses for courses.

    There is an "overhead" in Java, because it's not designed for quick-n-dirty deployment of something trivial. Getting the whole J2EE thing together to deliver a mail form is obviously going to take you 5 times longer in Java than it will in, say, perl or PHP.

    But that's obvious, isn't it?

    --
    "And the meaning of words; when they cease to function; when will it start worrying you?"
  8. Obligatory: ... then C++... by Anonymous Coward · · Score: 5, Interesting

    ...must be the Humvee.

    True story: I was working for a startup in 1992 that needed to get a product to market in record time with minimal resources. The product was not a piece of software, but a simple Windows utility was needed to control it.

    The utility was not very large and manipulated only very small amounts of data, but it needed to be easy to use, reliable, and look and feel like a good "commercial-quality" Windows application. The total number of hoped-for installations was to be in the low two digits.

    I chose VB as the development system, which at that time was almost brand-new, to implement the software. I got it done in time--about nine months. It was a beautiful candidate for rapid application development. During the development, we added many features and change the UI many times in response to user testing and management requests.

    It worked well. I am not aware of any problems with it, with respect to performance or UI, other than a rather slow startup time (about 30 seconds on the hardware of the day--which was an 80386SX running at, IIRC, 33 MHz).

    I left the company, the company was bought by a new set of VC's, they hired a new software developer (who was absolutely first-rate).

    The VC's insisted that the software be rewritten in C++.

    There's no real punchline, because after two years of work the new developer succeeded in converting the program, and adding some new features (relating to minor changes in hardware capabilities). Neither I, nor the programmer, nor anyone at the company was aware of any real gains from the recoding, other than the ego satisfaction of knowing that they were using a "professional" programming language.

    In my next few job searches, the hiring manager looking at the part of the resume where I described this work experience skipped over the "successfully completed on time" part and focussed on the "Visual Basic" part. It seemed as if the appearance of VB on a resume practically erased all my experience with other languages.

    Of course, PERL and friends, being associated with the academic and UNIX communities, don't have quite the same aroma to them.

    Nevertheless, I was very struck with the amount of damage to one's career that one can do by doing topnotch work, but using the "wrong" programming language in which to do it.

  9. Re:JAVA is the suv? by wegrzyn · · Score: 5, Interesting

    I think you miss the point. Before you go back and re-read the article put aside your obvious bias. The problem he was mentioning was that Java is not the right language for every situation. He was stating that you need to understand what you need to perform the job and use the right system. In cases of web-side solutions he is saying perhaps Java is over-kill.

    I've written software in C that has been ported with little effort from one hardware platform to another with less effort than I have seen of many Java applications. I might suggest C is the language of choice for programmers.

  10. Re:Programming lesson 101 by avdp · · Score: 5, Interesting

    OK, I guess I need a programming lesson then. For a database driven application, how do you propose not to have hardcoded SQL statements? Have the SQL statements looked up in the database or something? And how would you do that without hardcoding statements?

    I am genuinely interested by the way...

  11. I think everyone is missing the point... by surfsalot · · Score: 5, Insightful

    including the author of the blog. Java is great for what it is supposed to be used for. Yes, managed improperly its a great scapegoat for developers who have no clue whats going on. Managed properly (I say managed as in development code, concept usage, and production) it can be a valuable tool. Its quick to develop larger scale applications in, it provides a fairly uniform method of creating documentation, a framework so that others can understand whats going on, and (once again) when used properly is sufficiently fast for most all applications. The problem that comes about is the same problem with all new technology aimed at the business market... its not designed for a /single/ user. Its designed for a business, and what makes the most sense for that market. If I want to do something, yes, I'm going to do it in a scripting language. If someone else wants me to work on a team, share code, resources, and not be tied to a proprietary platform / application base, then yes, I'm going to write something in java. Thats the difference that everyone is missing, its not for me and you, its for a company. Swing and Awt suck, but the world doesnt revolve around gui applets. Java is great for server side applications that require stability (bug tracking is easy... its either there and you fix it, or its sun/ibm's fault and you wait or work around it). I wouldnt compare it to an suv, but maybe more of a bus: Its not /really/ small, it doesnt go /really/ fast, but if you have a lot of people that all need to get to the same place, and they need to get there as quickly / cheaply as possible, then it does the trick.

  12. Re:JAVA is the suv? by Twylite · · Score: 5, Informative

    I've got to agree with this. Reading Greenspun's blog I was left pondering how to start responding to something so completely wrong.

    The article implies a lack of understanding of the JSP paradigm. Sure, binding variables to a relational database is tough. So if you insist on doing that, use JSP tags. But that's not the point of Java -- you should be access instance methods from a JSP page, and those instances can access any data source they choose.

    VB and ASP are intended for developing front-ends to primarily relational data, so they make it pretty easy to accomplish. The fact that they make it easy doesn't mean that you can use the same design and technique to deliver a scalable, maintainable web site. All the current theory says take the pain up front and put in a decent template system, and never put code in your page.

    "People who are serious about getting the job done on time and under budget" will get the requirements first, and not making sweeping bullshit generalisations. There is a huge problem in the industry at the moment with IS departments trying to coalesce the functionality of dozens of specific-purpose VB applications into one enterprise system. The size of the project, requirement for scalability, expected lifetime and regularity of changes, systems integration issues, cost, stability, customer technology preference and other technical and non-technical issues will all influence the choice of a development environment.

    With a dynamic language ... you could do bind variables by having the database interface look at local variables in the caller's environment

    And if you look at development guides and bug reports, you'll find that it is exactly this sort of implementation that has insidious security holes. The security of systems that provide such shortcut functionality depends on the developer understanding how to use the system properly. Unfortunately it is quite often developers who don't have the time or inclination to understand that use these shortcuts.

    With Web applications, nearly all of the engineering happens in the SQL database and the interaction design, which is embedded in the page flow links. None of the extra power of Java is useful when the source of persistence is a relational database management system such as Oracle or SQL Server

    Greenspun seems to believe all "web applications" are Internet (rather than Intranet) applications. Beyond management systems (CMS and document management) I have seem few significant intranet systems that are merely a web interface to a database. Many intranet web applications interface to accounting, stock, POS, banking, quotation and other systems, where integration cannot be accomplished using a database. A Gung Ho "do it all in the web page because its fastest" approach is the quickest route to failure.

    So ASP and PHP have their place, and they're almost certainly easier to understand for a CS senior who isn't interested in reading up on the design principles behind JSP ... but that doesn't make them better.

    --
    i-name =twylite [http://public.xdi.org/=twylite], see idcommons.net
  13. Java is like Windows XP, can anybody say bloatware by node159 · · Score: 5, Insightful

    I'd have to agree, having expensive coding experience in both java and php, and having had to maintain both a JSP based HR program/portal (with NO comments, took me nearly 2 years to comment the entire thing, some people should be put down for the survival of the species me thinks), and a php portal that really stretched php to the max (can anybody say multiple persistent processes that can communicate with each other written in php), I'd have to say that java is good for:
    Server cross platform apps
    Server cross platform apps
    Server cross platform apps

    Its slow as fuck (all that crap about JIT optimization looks good on paper, but its CRAP), bloatware, and just generally unfriendly to use. Java is one of those, looks good on paper, but fails in implementation. One nice thing to say about it is that it is a very clean programming language, very nice to code in (I'm forgetting about the explicit exception handeling of course).

    PHP on the other hand knows its job, and it does it exceptionally well, and if you don't like it you can always extend it.

    Nuf said, php for web stuff, java for server apps.

    --
    GPLv2: I want my rights, I want my phone call! DRM: What use is a phone call, if you are unable to speak?
  14. JSP type 1 applications by tgreiner · · Score: 5, Informative
    What this guy describes is called a JSP "type 1" application. It (ab-)uses the JSP's ability to embed Java code directly into the JSP page (which is typical for languages like PHP). Doing this is a BAD idea.

    You will typically
    • use Java beans or some other utiliy classes to encapsulate data base or business logic access (type 2)
    • use a Java tag library like Jakarta struts to provide you with an application framework and common used tags (logic tags, bean access etc.) (type 3)


    I tend to agree with his problems with JDBC being quite cumbersome to use. This is why one will typically use data access Java beans which encapsulate data access. Also there are several object-relational mapping frameworks (e.g. CastorJDO) which will even isolate you from SQL and database details completely.

    I would even tend to agree with him on terms of how quickly one can hack some web application. One will be faster with a scripting language like PHP, but when it comes to extending/maintaining a JSP type 2/3 application will win.
  15. Discredited by dnoyeb · · Score: 5, Insightful

    From the blog

    "A project done in Java will cost 5 times as much, take twice as long, and be harder to maintain than a project done in a scripting language such as PHP or Perl. People who are serious about getting the job done on time and under budget will use tools such as Visual Basic (controlled all the machines that decoded the human genome). "

    He suggests that Visual Basic is better than Java. I will refrain from comment, the quote speaks for itself.

  16. Re:Finally by (trb001) · · Score: 5, Insightful

    Java is absolutely horrid for web applications when compared to php/perl. I recently had to compose a website in jsp and thought I'd rather shoot myself...the JVM went down constantly (it was shared, what did we expect?), the code was bloated and we had serious heap issues.

    Now, I use Java on my prime contract (large contract for the SEC) and it's a blessing...interoperable over both our platforms (Solaris/NT), works great with the CORBA base we have, we can patch stuff in easily and bounce our processes to reload individual components, etc.

    Java was never meant to be used as a scripting language...it got adapted as such because of the Java zealots. It was designed to be a high level, cross platform, portable language. Any other application of it is as silly as putting Linux on your toaster...sure you could do it, but it's not the most efficient solution.

    --trb

  17. Re:JAVA is the suv? by Hard_Code · · Score: 5, Insightful

    The second part of the course he runs (or at least writes the curricula for??) should be to actually MAINTAIN the last class's code. Then he might get an idea why a lot of people prefer Java and servlets (and to a lesser extent JSP) over ad hoc glued together scripts.

    --

    It's 10 PM. Do you know if you're un-American?
  18. Re:Finally by Lordrashmi · · Score: 5, Interesting

    JSP sucks....

    However, I currently am working to migrate our PHP web application to Java and it is going well. I am using Servlets + FreeMarker templates. Using a template system allows me to change some of the presentation details without recompiling and Servlets prevent me from killing myself because of the giant nasty hack that is JSP...

    Yes, I might seem bitter but I can see no real reason to use JSP. The only argument I can get from anyone on for it is "You don't have to recompile and deploy it". That was a good point before application servers accepted changes on the fly to the code. Now I just recompile the one servlet and Tomcat reloads it. Simple...

  19. Re:Programming lesson 101 by SoTuA · · Score: 5, Interesting

    Well, I worked at a project with no hardcoded SQL. It was a bitch. It happened because the client would NOT provide ODBC link to the DB. Therefore, we needed a middle server that got "request for X service with Y parameters", looked up in it's own service table what query that was, made it to the DB server, and returned the results in XML.

    The biggest drawback is the fact that the queries are stored in varchar fields in a table. All the queries used by the system (a nationwide chain of gas station managers). So, when you where inserting or modifying a service, you where doing things like "insert into services values ... 'select blah from blah where blah=''... " and you had to start escaping characters like mad. And a missescaped quote would leave LIVE SQL in the SQL command... I saw a case where somebody had a bad escaped ", so the "where" clause was included into the string... he wiped out ALL the functions :o

  20. Re:Finally by Bob9113 · · Score: 5, Informative

    OK, it's just a joke, but I'm interested in countering one point that some people still believe.

    It's cross-platform feature has been tainted by the agenda of the forces that dominate the respective operating system

    I am currently employed on a project with roughly one megaLOC of Java. It has a Swing GUI, EJB middle tier, and Oracle at the back. It currently runs on Windows, several flavors of Linux, and Solaris, without recompile. I do the production builds on a Linux machine and we distribute them to roughly 2000 Windows and a few dozen Linux workstations. Likewise I do the production middle tier on Linux and deploy to Solaris, and the development and testing versions of the middle tier go to Windows, Linux, and Solaris.

    Would it fit on a wristwatch? No, it's too big. Would it run on BeOS or Mac? You betcha.

  21. This guy has no idea what he's talking about. by Dr.+Bent · · Score: 5, Funny

    JSP is fantastically simpler than "J2EE", which is the recommended-by-Sun way of building applications

    JSP is a component of J2EE. Here's a tip: When you have an "epiphany" about the nature of something, it ususally helps to have at least a basic understanding of whatever the hell it is you're talking about.

  22. Greenspun somewhat misguided by flakac · · Score: 5, Informative

    I develop regularly in C/C++ (Unix and Windows), Java (J2EE), and PHP, and can't really agree with the author's contentions. J2EE is much superior to PHP for serious web applications -- the students mentioned in the article would have been much happier using WebLogic or jBoss instead of than Oracle.

    Of the three, C/C++ is obviously not well suited for developing web-based applications.

    PHP is quick and easy, but it suffers from a lack of vision -- it was never designed, and the authors don't really seem to know what they want to do or where they want to go with it (don't even get me started on how it's supposed to be "Object-oriented" now...). IMO, it's much easier to make a mistake in PHP, and code is much less maintainable than equivalent JSP pages -- just try switching from MySQL to Oracle, and you'll see what I mean. I shudder whenever I hear the words PHP and enterprise in the same sentence.

  23. Re:Look what it's competeing against. by mobiGeek · · Score: 5, Informative
    ... but Php and Java aren't even the same kind of programming language

    Agreed.

    Java can be used to create all the same types of apps that C can

    Well...no. C is used for system development (i.e. hardware banging). Java cannot be used in that environment without direct support of the libraries and the JVM (or by JNI calls to libraries written in C/C++).

    ...though C cannot be used in all the apps Java can (i.e Web.)

    Well...no. C can be used anywhere that Java can be. On the server side, most servers (including web and proxy servers) are written in C. There's nothing stopping people from writing "app servers" in C...in fact there may even be a few of those too.

    On the client side, "applets" are not a valid use of Java. Applets was a marketing ploy that grew wildly out of hand. Besides, there are ActiveX controls written in C/C++ that perform the same basic functionality of applets.

    One thing that Java has over C/C++ is its cross-platform capabilities. With C, if you want cross-platform you have to work to code it that way. With Java, if you want to break cross-platform, you have to work to code it that way (use non-standard libs, use JNI, etc...)

    As for perl, the fact that it has to be compiled every time it is run kinds of takes away from any speed advantage over Java.

    Yes and no. Perl is slower to start up than a C/C++ native application of similar functionality. Java too is very slow to start up (usually *much* slower than Perl for very small scripts).

    However, long running apps written in Perl and Java both perform very well when compared to similar C/C++. By long-running, I mean "long enough that the startup time becomes a wash". I've written web crawlers in Perl and Java that run for weeks at a time. Comparing their performance to existing crawlers written in C/C++, the performances are equivalent (though the Java and Perl bots suck up more memory).

    Development time for those bots was significantly less in Java and Perl than for equivalent C-based bots. (BTW: the Perl bots were written back before LWP was stable/available)

    The only language in common use that does everything Java does is fricking Visual Basic

    Well...no. VB is stuck on one platform (well, two if you consider MS-Java...though VB.NET is NOT VB).

    --

    ...Beware the IDEs of Microsoft...

  24. Re:Programming lesson 101 by holzp · · Score: 5, Insightful

    you could also write your application to suck up huge amounts of memory and bandwitdh for no reason but buzzwords...