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."
← Back to Stories (view on slashdot.org)
It pollutes the environment and wastes gas...
Strange women lying in ponds distributing swords is no basis for a system of government.
Well, then I guess we better quit using it or else face huge gasoline deficits! I am sorry, but JAVA and SUV's are so totally different that the comparison is pointless. JAVA may be slightly slower than other languages, but it provides for rapid development and portability that are a developer's dream. JAVA is the developers' programming language.
stuff |
Pinto?
Anybody got a mirror?
"City hall" in German is "Rathaus" Kinda explains a few things......
and .net is a tank rush (some will recognise the reference :)
A voice of reason. It is refreshing to see a diffrent viewpoint in this time of Java craze. In my own experience (and I work for a web development house) you can cut down time of development by factor 5-10 using a weakly typed scripting language such as PHP.
Let me also state that apparently, according to the article, JAVA is bad because i'd have to move a question mark in a query. Well... if you need a programming lesson, how about not hard-coding SQL strings? If I decompile your great JAVA/.NET /ActiveX component that I downloaded, can I get at all your hard-coded passwords, query strings, etc? If so, I don't think you can blame JAVA.
stuff |
What's next, articles comparing P2P filesharing to looting and plundering on the high seas?
---
DRM is like antifreeze, to the MPAA/RIAA it's sweet, to the consumers it's poison.
/me wonders what the Firestone tires of programming is. Then goes to RTFA.
OK, I've heard Java called a lot of things and I know it has its faults, but I really don't think the SUV comparison holds water.
Nobody ever started using Java because they wanted to compensate for a small penis, which is the only possible reason for buying an Hummer.
People couldn't type. We realized: Death would eventually take care of this.
http://www.google.co.uk/search?q=cache:geODEmYjHpM J:blogs.law.harvard.edu/philg/2003/09/20+&hl=en&ie =UTF-8
Jeez, the server is slow already with only one comment. You'd think Harvard could afford a little better given the current tuition.
At any rate, from the article: "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)."
This is all fine and good, but the machines that "decoded" the human genome were performing a simple task really and did not require much in the way of alternative paths or any complex programming. For simple tasks or projects, yes VB is pretty handy. For other tasks, or requirements that may need a bit more complex programming, VB will not cut it.
Visit Jonesblog and say hello.
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!!!
Where ANSI C is the jeep of them all. C++ is a two-door which looks nicer but is slightly less useful. C can be used and abused by anyone anywhere and will obviously outlast Java, but anyone with money to throw and show off (at the cost of wasting enormous resources) will get the SUV. Smaller programmers here and there (not smaller in importance) will use the bicycle which would be Perl. For now, I'll just take a walk (BASIC)
"Give orange me give eat orange me eat orange give me eat orange give me you." -Nim Chimpsky
As a language Java is simply too much formal.
It is my opinion that formalism doesn't help too much in avoiding bugs, what really helps is a strong experience in designing software.
Clueless Java programmers can and will write baldly designed software despite of any formalism enforcement.
SUV's start up instantly!
"Consider yourself a member of a virtual corporation with Mr. Torvalds as your Chief Executive Officer." - Linux Advocac
Weave's rushed tongue-in-cheek SUV vs JAVA comparison:
Its a bad comparison from a non programmer..
come on people hwo small is the java vm in phones.. java programs at 30-60 k in totla..an SUV?
Now MS NET that is an SUV!!!!
Don't Tread on OpenSource
Yeah, and who needs static or initialized local variables anyway. Oh you mean I should use assignable consts for that? Yeah that makes sense.
All errors in this comment are mine. Corrections are considered a derivative work, and punishable under copyright law.
So you're 16X more likely to kill other developers when your Java program crashes?
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
Java is not slow. I ran benchmark that called
assembly language routines to do floating point
calculations. It's 90% as fast as "C". Wahhh.
Mommy!
what they would compare BASIC to model T?
Someone spoke for that overbloated thing that is Java.
Sun really beat M$ in THAT game. If you want to do anything in Java you need a hundred classes, calling a million methods and passing them several times.
PHP and ASP are much more simple.
Java joined the complexity of the Windows API with the speed of an interpreted language, along with some bitches as strong-typing, millions of similar classes.
PHP
cut(bread)
ASP
bread.cut();
Java
knifeh = new KnifeHandle
knifeb = new KnifeBlade
k = new Knife
k.Attach(knifeh)
k.Attach(knifeb)
_try()
{ bread(k.cut)
}
catch (Outch)
{
dial.dialnumber(911);
}
how long until
Our students this semester in 6.171, Software Engineering for Internet Applications have divided themselves into roughly three groups. One third has chosen to use Microsoft .NET, building pages in C#/ASP.NET connecting to SQL Server. One third has chosen to use scripting languages such as PHP connecting to PostgreSQL and sometimes Oracle. The final third, which seems to be struggling the most, is using Java Server Pages (JSP) with Oracle on Linux. JSP is fantastically simpler than "J2EE", which is the recommended-by-Sun way of building applications, but still it seems to be too complex for seniors and graduate students in the MIT computer science program, despite the fact that they all had at least one semester of Java experience in 6.170.
w orkbook/software-structure), which turns out to be much harder and more error-prone than in 20-year-old C interfaces to relational databases, I had an epiphany: Java is the SUV of programming tools.
After researching how to do bind variables in Java (see the very end of http://philip.greenspun.com/internet-application-
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). But the programmers and managers using Java will feel good about themselves because they are using a tool that, in theory, has a lot of power for handling problems of tremendous complexity. Just like the suburbanite who drives his SUV to the 7-11 on a paved road but feels good because in theory he could climb a 45-degree dirt slope. If a programmer is attacking a truly difficult problem he or she will generally have to use a language with systems programming and dynamic type extension capability, such as Lisp. This corresponds to the situation in which my friend, the proud owner of an original-style Hummer, got stuck in the sand on his first off-road excursion; an SUV can't handle a true off-road adventure for which a tracked vehicle is required.
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. Mostly what you get with Java are reams of repetitive declarations at the top of every script so that the relevant code for serving a page is buried several screens down. With a dynamic language such as Lisp, PHP, Perl, Tcl, you could do bind variables by having the database interface look at local variables in the caller's environment. With Java the programmer is counting question marks in the SQL query and saying "Associate the 7th question mark with the number 4247", an action that will introduce a bug into the program as soon as the SQL query is modified (since now the 7th question mark has been moved to become the 8th question mark in the query).
If you want an over complicated project, use Java.
I like JSP, JFC based apps are painful to code, use, implement and maintain (depreciation is my friend).
Just a thought from a friendly MIT student.
Something intelligent here.
What they are teaching them, as with any material used in education, has some distanse from production projects. .NET and you'll see what I mean. BTW, this guy has his students playing with raw SQL and the like, while production developers use OO abstraction layers for persistense like Hibernate, JDO or EJBs as they see fit.
Try throwing in LDAP servers, SMS/GPRS gateways with PHP or
These students are using Java like they would be using PHP in a small website project...
Phillip Greenspun == Hot air balloon of programming pundits
It's 10 PM. Do you know if you're un-American?
Why is J2EE always forgotten about when it comes to Java? I dont know of anything that comes close to J2EE.
Try to have transactional management across different operations on Solaris, Linux, Windows, etc., with Oracle, IBM Mainframes, etc. Now add a new database vendor, switch a few Windows boxes to Linux boxes, etc. J2EE makes all this much easier to manage and cope with.
Seeing these elements run in 'containers' the objects are already started up and waiting to service...wrecking your 'java is slow' arguement.
...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.
I just wanted to say that I admire the stylish and capable manner in which you dealt with that situation.
Thank you for making this world a little better.
All errors in this comment are mine. Corrections are considered a derivative work, and punishable under copyright law.
While I don't agree with the article, in general, I do think that the phrase, "It doesn't corner very well" is strangely appropriate for both Java and SUVs.
My opinion is that Java is a great language and has great portability. It is a good language to learn for the future. Visual Basic is the tool of Microsoft's own agenda. I know Visual Basic 6.0 great, but I was handed some code using VB.Net and I was unable to get the new structure down without significant time. Now if someone has only has .net, what will they do when they want to update my 6.0?
Scroll ahead to java. The programs I wrote years ago are still applicable and can be updated by anyone with any good working knowledge of java. In addition, Java is not going to radically change its structure on a whim or for a business decision.
Microsoft's quest to destroy other languages may render you redoing your applications every 2-3 years and even then, you may find that server functions suddenly stop functioning because of an autoupdate.
For me, Java is the way to go for now. Others may go with VB. It doesn't matter as long as the job gets done and we can stop this arguement. BTW, look at the job openings for a java programmer vs. VB.
-SenatorPerry
http://www.newberrycollege.net
Delete that damn teddy bear icon! For the sake of the Earth do the same thing!
You mean like Kaffe?
The Java class library, the language standard, and even the bytecode itself has been pretty well documented in many sources across the web. There's nothing preventing you from making your own version should you wish to - it's just that most people have decided that one of the existing implementations are "good enough" for their uses, just like many people decided that Windows 98 was "good enough."
I personally still don't buy this "Java is an SUV" argument. A programming language is a tool, and a bad programmer can write horrible code in any language or environment. I've said this before on ./, but knowing which tool to use and why you're using it is the most important thing to realize when you're programming.
I wrote this reply to prove a point. I took a positive case for JAVA only to see the number of people who were willing to present actual test cases where JAVA didn't work that well, and I got several. I will be using them in my talk today with Sun. Thanks for your help! :)
stuff |
Apparently he's lamenting MIT students' inability to program in Java, and blaming the technology rather than the users. He also doesn't seem to be writing about Java at all, but rather JSP pages with "pages of" Java embedded which is horrible form, but typical of students in my experience. Ok enough trolling.
Here is where I believe that conclusion came from: Java provides the best methods (that I know) to build very abstract code that can be reused in the best possible way. So, if you set out to print "hello world" and use java, you might just be tempted to build a dictionary class and a spellchecker so that the main class can have one line saying something like
System.out.println( Spellchecker.correct( "helo werld" ) );
and it will be corrected automatically to what is most likely meant by that. Ok, this example is possible in any language, but many such things are particularly well implementable in java, which is why the temptation to make something big out of a small task is higher and thus development time incresases at first. This is, however, a GOOD thing, if you actually reuse the code, which will (in theory) reduce the time needed later.
You mean Java is gas-guzzeling, oversized, hard-to-park, and basically pointless for 90% of the suburbanites that own them?
Java is the SUV of programming tools .NET, building pages in C#/ASP.NET connecting to SQL Server. One third has chosen to use scripting languages such as PHP connecting to PostgreSQL and sometimes Oracle. The final third, which seems to be struggling the most, is using Java Server Pages (JSP) with Oracle on Linux. JSP is fantastically simpler than "J2EE", which is the recommended-by-Sun way of building applications, but still it seems to be too complex for seniors and graduate students in the MIT computer science program, despite the fact that they all had at least one semester of Java experience in 6.170.
w orkbook/software-structure), which turns out to be much harder and more error-prone than in 20-year-old C interfaces to relational databases, I had an epiphany: Java is the SUV of programming tools.
Our students this semester in 6.171, Software Engineering for Internet Applications have divided themselves into roughly three groups. One third has chosen to use Microsoft
After researching how to do bind variables in Java (see the very end of http://philip.greenspun.com/internet-application-
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). But the programmers and managers using Java will feel good about themselves because they are using a tool that, in theory, has a lot of power for handling problems of tremendous complexity. Just like the suburbanite who drives his SUV to the 7-11 on a paved road but feels good because in theory he could climb a 45-degree dirt slope. If a programmer is attacking a truly difficult problem he or she will generally have to use a language with systems programming and dynamic type extension capability, such as Lisp. This corresponds to the situation in which my friend, the proud owner of an original-style Hummer, got stuck in the sand on his first off-road excursion; an SUV can't handle a true off-road adventure for which a tracked vehicle is required.
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. Mostly what you get with Java are reams of repetitive declarations at the top of every script so that the relevant code for serving a page is buried several screens down. With a dynamic language such as Lisp, PHP, Perl, Tcl, you could do bind variables by having the database interface look at local variables in the caller's environment. With Java the programmer is counting question marks in the SQL query and saying "Associate the 7th question mark with the number 4247", an action that will introduce a bug into the program as soon as the SQL query is modified (since now the 7th question mark has been moved to become the 8th question mark in the query).
Strictly enforced standards, naming conventions, etc make Java the ideal language to force "developers" in India or Romania to use.
More structure == easier to figure out wtf is going on. Imagine the Perl code that would come from a $6/hr code monkey in Banglaore?
Conformity is the jailer of freedom and enemy of growth. -JFK
Dear Sir,
and we at our organization thank you for taking the time to contribute to the content of the world wide web. Feel free to do so more often and we hope that you receive more interesting replies than this one.
Sincerely,
Mr Blinky
Google cache of the blog entry.
.NET, building pages in C#/ASP.NET connecting to SQL Server. One third has chosen to use scripting languages such as PHP connecting to PostgreSQL and sometimes Oracle. The final third, which seems to be struggling the most, is using Java Server Pages (JSP) with Oracle on Linux. JSP is fantastically simpler than "J2EE", which is the recommended-by-Sun way of building applications, but still it seems to be too complex for seniors and graduate students in the MIT computer science program, despite the fact that they all had at least one semester of Java experience in 6.170.
w orkbook/software-structure), which turns out to be much harder and more error-prone than in 20-year-old C interfaces to relational databases, I had an epiphany: Java is the SUV of programming tools.
Also below:
Our students this semester in 6.171, Software Engineering for Internet Applications have divided themselves into roughly three groups. One third has chosen to use Microsoft
After researching how to do bind variables in Java (see the very end of http://philip.greenspun.com/internet-application-
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). But the programmers and managers using Java will feel good about themselves because they are using a tool that, in theory, has a lot of power for handling problems of tremendous complexity. Just like the suburbanite who drives his SUV to the 7-11 on a paved road but feels good because in theory he could climb a 45-degree dirt slope. If a programmer is attacking a truly difficult problem he or she will generally have to use a language with systems programming and dynamic type extension capability, such as Lisp. This corresponds to the situation in which my friend, the proud owner of an original-style Hummer, got stuck in the sand on his first off-road excursion; an SUV can't handle a true off-road adventure for which a tracked vehicle is required.
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. Mostly what you get with Java are reams of repetitive declarations at the top of every script so that the relevant code for serving a page is buried several screens down. With a dynamic language such as Lisp, PHP, Perl, Tcl, you could do bind variables by having the database interface look at local variables in the caller's environment. With Java the programmer is counting question marks in the SQL query and saying "Associate the 7th question mark with the number 4247", an action that will introduce a bug into the program as soon as the SQL query is modified (since now the 7th question mark has been moved to become the 8th question mark in the query).
-Adam
Can SUVs remain fashionable when only unfashionable people drive them?
.NET, building pages in C#/ASP.NET connecting to SQL Server. One third has chosen to use scripting languages such as PHP connecting to PostgreSQL and sometimes Oracle. The final third, which seems to be struggling the most, is using Java Server Pages (JSP) with Oracle on Linux. JSP is fantastically simpler than "J2EE", which is the recommended-by-Sun way of building applications, but still it seems to be too complex for seniors and graduate students in the MIT computer science program, despite the fact that they all had at least one semester of Java experience in 6.170.
Speaking of SUVs... (see below), at a recent gathering in suburban New Jersey I noticed that nearly everyone else had arrived in an SUV. The drivers were overwhelmingly middle-aged married suburbanites with children. When one encounters a young, good-looking, city-dweller the chances are very high that he or she will be driving an inexpensive compact car of some sort. If you see an SUV in the distance but can't see the occupants because the glass is too heavily tinted, chances are that it is 35-year-old mom and two kids. A Suburu sedan, by contrast, is often occupied by a young single urbanite.
How much longer can the popularity of SUVs continue? Many of the drivers are getting so old that their fragile bones really can't handle the stiff suspension and harsh ride over bumps (my 40th birthday is in a week and whenever I'm picked up from the airport in a BMW X5 or similar I can't believe how little isolation is provided from potholes, etc.; it is actually more jarring than landing the DA40 at 67 knots).
So how is it that SUVs remain in fashion when 99% of the owners of SUVs are unfashionable?
# Posted by Philip Greenspun on 9/20/03; 3:34:38 PM - Comments [14]
Java is the SUV of programming tools
Our students this semester in 6.171, Software Engineering for Internet Applications have divided themselves into roughly three groups. One third has chosen to use Microsoft
After researching how to do bind variables in Java (see the very end of http://philip.greenspun.com/internet-application-w orkbook/software-structure), which turns out to be much harder and more error-prone than in 20-year-old C interfaces to relational databases, I had an epiphany: Java is the SUV of programming tools.
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). But the programmers and managers using Java will feel good about themselves because they are using a tool that, in theory, has a lot of power for handling problems of tremendous complexity. Just like the suburbanite who drives his SUV to the 7-11 on a paved road but feels good because in theory he could climb a 45-degree dirt slope. If a programmer is attacking a truly difficult problem he or she will generally have to use a language with systems programming and dynamic type extension capability, such as Lisp. This corresponds to the situation in which my friend, the proud owner of an original-style Hummer, got stuck in the sand on his first off-road excursion; an SUV can't handle a true off-road adventure for which a tracked vehicle is required.
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. Mostly what you get with Java are reams of repetitive declarations at the top of every script so that the relevant code for serving a page is buried several screens down. With a dynamic language such as Lisp, PHP, Perl, Tcl, you c
Java, n.
The Philosopher's Stone of the alchemists, the Second Coming of Christ, the Maltese Falcon, and the fourth Star Wars movie, all rolled into one. A technology for developing programs that will run on any platform, and crash in a different way on all of them. A mighty acorn that grew from a tiny Oak. An idea whose time has come, leaving General Magic to sleep on the wet spot.
-Godling's Glossary
Please help metamoderate.
Yes, it's now documented, the students at MIT can't even do a simple JSP page. Some even have problems with fundamental math, such as counting to seven or even eight!
posts that portray Java in a bad light even when they are based on fact? Slashdot is supposed to be a discussion forum. If Java is truly great as its advocates suggest - post some facts!
**Our students this semester in 6.171, Software Engineering for Internet Applications have divided themselves into roughly three groups. One third has chosen to use Microsoft .NET, building pages in C#/ASP.NET connecting to SQL Server. One third has chosen to use scripting languages such as PHP connecting to PostgreSQL and sometimes Oracle. The final third, which seems to be struggling the most, is using Java Server Pages (JSP) with Oracle on Linux. JSP is fantastically simpler than "J2EE", which is the recommended-by-Sun way of building applications, but still it seems to be too complex for seniors and graduate students in the MIT computer science program, despite the fact that they all had at least one semester of Java experience in 6.170.**
but they should be able to do them in all three of the choices they had, or was the course subtitled: "gaining profiency in one of 3 systems for doing one kind of a web project"?
and jsp is simpler than j2ee? jsp is part of j2ee, heres a clip from somewhere
***"What Is JSP?
JavaServer Pages (JSP) is a Sun Microsystems specification for combining Java with HTML to provide dynamic content for Web pages. When you create dynamic content, JSPs are more convenient to write than HTTP servlets because they allow you to embed Java code directly into your HTML pages, in contrast with HTTP servlets, in which you embed HTML inside Java code. JSP is part of the Java 2 Enterprise Edition (J2EE).
JSP enables you to separate the dynamic content of a Web page from its presentation. It caters to two different types of developers: HTML developers, who are responsible for the graphical design of the page, and Java developers, who handle the development of software to create the dynamic content.
Because JSP is part of the J2EE standard, you can deploy JSPs on a variety of platforms, including WebLogic Server. In addition, third-party vendors and application developers can provide JavaBean components and define custom JSP tags that can be referenced from a JSP page to provide dynamic content.
"***
and are we a little generic here (from greenspun)**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).**
that's nice, what kind of a 'project' is this project in this? the whole point in using java in projects like this is that you can reuse the code in other parts straight(heck, make a game for a java phone, then use the _same_ compiled classes on the server to determine if the uploaded scores are legit that you use for game engine on the j2me device). sure there's other points as well, like not tying yourself to microsoft(though, that is a point for php as well).
and really, people who use visual basic for big projects don't except to live long.. or be taken seriously on slashdot. surely you can do it seemingly cheaper when anyone can do it(but if mit produces people who aren't able to learn any language that suits the job best in reasonable time i've kinda lost my respect for them).
world was created 5 seconds before this post as it is.
They require lots of power, and the capabilities provided by that power consumption aren't needed by 99% of the people who buy them. That' pretty much describes SUVs.
If the auto market were like the PC market, though, then you wouldn't be able to buy anything except a SUV.
"Supposedly this situation has been improved in JDBC 3.0 but this example of Java's inferiority to C interfaces from 20 years earlier should remind you to be skeptical of vendor claims for the advantages of new languages and development tools."
:(
Wow! You're right! I guess because Java has a minor annoyance that supposed to be fixed in the next release of that specific API, that the whole language and libraries are worthless and we should all go back to C for everything! How brilliant! I will never trust Sun again when they say "Java is a revolutionary new language whose main feature is that you do not have to set variables in PreparedStatements by ordinal value! We are basing our whole language on this!" Big fat liars.
It's 10 PM. Do you know if you're un-American?
Hmm. The site was slashdotted before the great unwashed could see it. If the sites posted in articles get Slashed before anyone other than subscribers get to see it, then only subscribers will get the karma that inevitably goes with the posting of mirror to the slashdotted site, or posting content from the site. Not that that sort of Karma is ideal, but it does count the same. How about mirroring wimpy sites like this on slashdot itself? Or maybe doing something with the lameness filter?
eleven plus two / twelve plus one
Aparently his whole argument is that Binding variables in JDBC is hard....
what the FUCK is hard about it?...
try using something like OCI, and then talk to me about hard.
So it's not quite as easy as other database APIs, it's still pretty bloody easy....
Advanced users are users too!
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.
Anyone got a mirror? Damn thing's /.ed already.
Downmodding is the refuge of the weak. Don't downmod, make a better argument!
Summary: Like an SUV Java code may run anywhere, but it is over-engineered for smooth roads^H^H^H^H^H^H^H simple programing problems
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?
This article almost sounds like it was written by someone who really doesn't understand programming, like all those (currently unemployed) folks who bought a "Learn VB in 24 minutes" book in the late 90s and decided to call themselves programmers. A complex enterprise system requires a tool (not necessarily Java) that can handle the needs of the project at hand. To extend their analogy, there actually are people who need SUVs for towing boats and going on mountain climbing expeditions, although they are in the minority.
You will typically
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.
He must know how trollish he is being here...
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.
I suspect there are projects which wouldn't, you know. How about a nice web applet with 3D rotating thingies in it?
But seriously, even if his example about database interaction is correct (I don't know if he's really going about it in a way that works to Java's advantage, or if he's stuck in his scripting language ways), we must all know that there are situations in which Java's nature will mean it is the best tool for a job.
Game dev and music blog
I've never seen anything as bloated as Java apps like NetBeans, Forte or WebSphere Studio. I've seen NetBeans use 200-300 MB of RAM and WebSphere Studio use over 600 MB of RAM on my machine. They had to upgrade all the machines in our group from 833 MHz with 512 MB to 2.4 GHz with 1 GB and WebSphere is still the slowest launching app and biggest memory hog I've ever seen.
Quite a contrast from previously editing PHP code in EditPlus.
Beware: In C++, your friends can see your privates!
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.
Thank you. I replied mostly out of interest to see what kind of responses I would get, to use for my talk, but also because of the more advanced thread you picked up on :)
stuff |
there already is an anon non karma whore post of the article... mod it up instead of this whore!
Plenty of legitimate criticisms can be formulated against Java, JSP and JDBC, but I think we can safely ignore what this guy has to say about it.
Always keep a sapphire in your mind
Java is like a Boeing 777. You come into the cockpit thinking "Great. My car has a wheel, three pedals and a stick and that is all I need to get to the store. What are all these 1000000 buttons and switches and panels here?" Then you find out it can fly. You will then know what it is good for, and will want to use it as well.
You still forgot to create the dial object...;-P
I'm writing this from work. We have lots of production projects, and none of them use LDAP yet. At my company, SQL is considered the right level of abstraction; using "raw" SQL is not considered a problem. Also, people want a variety of reports off the data. If you look at the database as merely an "object persistence layer" you won't slice and dice reports nicely. Embrace SQL. It has value.
If you don't get why it's an SUV, then you didn't read the article.
The point is that most programmers use Java because of its premise of programmatic power. While the metaphor may not stretch to every use of Java, Greenspun talks particularly about WebApps in general, and JSPs in particular. His only point was that while Java *is* powerful, for a low or mid-end Web application system, most of the engineering has to do with designing the database correctly, and integrating everything tightly. Perl and PHP are widely used because they're not as verbose in such situations, and a more powerful language is NOT needed at the presentation layer, and Java _is_ infamous for its boiler plate requirements.
This, and this alone, is why he likens Java to SUVs, because of the metaphorical holier-than-thou driver, who buys into a $100k Hummer because supposedly it can handle hardcore 4x4ing, but in reality knows it's only driving to Bed, Bath, and Beyond and back. Personally, I'm not often a detractor of Java, but I have worked a good deal with Perl for such things, and in this respect: I agree with him.
--- What
thanks for the google link BTW
He lost me at Visual Basic.
The problem I see that he doesn't address is that most webapps I see start out as a paved road, then turn into dirt roads, then get really steep, then the road runs out. So whaddaya do then? Re-engineer the entire application in a different language?
How can "Java == SUV". it does not support operator overloads?
Maybe Java.equals (SUV).
Offtopic, Inflammatory, Inappropriate, Illegal, or Offensive comments might be moderated up.
I suggest that if his students are struggling to use JSP, then they should blame the instructor. Oh, wait, he IS the instructor.
...I found his followup comment on SUVs to be not only wearyingly trite but a little misogynist and racist. SUV drivers are "unfashionable"? What the fuck does that even mean coming from an ubergeek? Caucasian mother or people living in suburbia are somehow awful? You have to live packed in the middle of some annoying, smelly city full of assholes to be acceptable?
It would be more obvious if Sun didn't spend millions of dollars marketing Java as the answer to everything. That clouds people's perceptions. *Especially* management types that don't have the experience to tell the hype from the reality.
http://www.welton.it/davidw/
I don't want to start a holy war here, but what IS up with you java fanatics. I have been waiting here on my Spark Station Ultra 5000 for 20 minutes as my java database attempts to replicate a 17 million row table. 20 minutes! At home, on my AMD athlon 2000+ running Mandrake linux with postsql the same operation would take 2 minutes, if that.
Also, while this is happening, Oracle won't work, and evertyhing else screeches to a halt. Even jmacs (JavaEmacs) is struggling to keep up as I type this.
I won't go on into the laundry basket of other problems with this machine. My packard bell 450 running slackware and Mysql lite runs faster than this machine at times.
Java Addicts, flame me if you like, but I'd rather hear some intelligent reasons why I should use Java over faster, cheaper databases.
I would expect students with an M$IT pedigree to have better taste. It proves that any sampling of programmers, even at an elite institution, will have some percentage of lamers.
an ill wind that blows no good
This was posted in a blog. So why are people paying attention again?
(No, I don't think we should waste the Earth's resources, but how much would you like to bet that the whack job that set the Hummers in SoCal on fire a few weeks ago drove a car to those dealerships, and once you're into driving thousands of pounds of fossil-fueled steel around it's just a matter of degree....)
I'm curious if any of you filthy hippies:
1. Realize that a SUV is necessary in the city because of the shitty condition of the roads. Try driving a normal car in Boston, and then tell me how much you spend on flat tires and wheel alignment.
2. Live where something called snow falls in the winter. It's a white icy powder that makes driving anything without 4WD very difficult.
3. Have children. The SUV is merely the station wagon of today. Get over it.
4. Own a business where you must transport clients and equipment frequently. It's easy to say everyone should drive a Honda Insight or a bicycle when you DONT HAVE A JOB AND LIVE IN YOUR PARENT'S BASEMENT.
5. Realize how much more pollution is caused by city buses and older cars. It's not just us rich people who cause major pollution, but you poor people too!
I am getting quite tired of these silly comparision between programming languages. Obviously, depending on the requirements of the task you need to complete a certain programming language may prove to be more useful than another. Obviously you aren't going to want to write an interrupt service routine or other such time critical platform dependant piece of code in java. But for something that needs to be platform independant java may be a viable solution.
So... pick a language, then do your job. repeat.
Obviously you aren't going to drive an SUV in a Formula 1 race, but maybe if you need to transport 7 people and tow a 20 foot long boat up to the mountains, it might be a good choice.
Grrrrr... don't bother me, I'm thinking.
While the man may bew a nice and educated guy and a readable Blogger, he's gotten way into serious bullshitting territory here. Shure the Java Overhead has lot's of SUV characteristics and is nearly pointless when you're doing projects on the scale of those he mentions for example, everybody knows that. But he obviously hasn't gone beyond anything more that larger content management with his thoughts. In big business, with 20+ *real* developers and serious OOP on a single project you'd get laughed at if you bring up this article.
We suffer more in our imagination than in reality. - Seneca
No one can tell what that site is running! ...trying to run. ...failing miserably to run.
Right now, Java is the easiest way for me, as a developer, to get off of Windows and onto Linux full time for software development purposes.
While Java's cross-platform compatibility isn't perfect, it's the best option out there.
[Digging through 14 years of archived emails...]
Here ya go. Somebody should find good descriptions for the C#, Java, Perl, VB and [insert your favorite language here] of the day.
For those of you who are old enough to remember that line... (SIGH)... Yeah, my degree's in Fine Art, hence the website. I use whatever language is at hand to do my online art apps... usually the one with the least amount of actual coding required before I get what I want out of it. JAVA's graphics stuff is a little hmm.. hard?
stuff |
students of a teacher that hates Java are struggling with Java. story at 11.
Just raise the taxes on crack.
- Some students are bad at writing JSP pages, which mix Java and HTML in a complex and hard to maintain way (which, as he acknowledges, is not recommended by Sun, because looking at long term effects it's not such a terribly good idea; may be OK for a term project though).
- ???
- Therefore, Java is the SUV of programming languages. Mind you, programming languages. At most, this is a library issue, with a specific set of libraries, most of which aren't even part of the core Java library.
Yes, if you just want to hack something together in one semester or less and immediately throw it away after the course is over, then by all means use PHP. No, use Zope. Heck, you might even try using the Ars Digita Tcl thingy, see if that measures up. Just keep in mind that you can't code the same way in JSP/J2EE, as that requires more careful planning and a different approach (like another poster already mentioned, don't hard code your SQL queries).So the students didn't know how to do this. Fine. Why didn't Phil teach them how to do it properly? It's not like JSP is a library explicitly designed for a different task that will make it hard to do dynamic HTML pages -- that's it sole purpose and use, but you got to use it properly. Enough of this rant now.
Java can be platform independent because it includes a very larg class library structure.
C also have a large library that is provided by the OS that you #include. C++ has the STL and some other libraries
I believe thats why java feel awkward to a lot of programmers not familiar with its class libraries who want to use c system calls or shell calls to get the job done. The java folks created this because cross platform compatability is hard without this.
However the argument that java is significantly slower than c is pretty much moot. For test and XML processing its almost right there, and significantly easier to write code. All the extra data structures and types allow coders to use more efficent structures easily, usually resulting in faster code. (Similar to the way Perl coders can write blindly fast code easily using the built in Hash functions)
I'm not saying Java is better than everything else, just use the right tool for the job your doing.
Two or three years ago I made some posts to comp.lang.java.programmer ('too much cream in the coffee' amongst several). Since then I have not had any reason to reconsider my feelings, which at the time were (amongst others):-
1. Java memory management is unacceptably weak. Classes loaded into two separate executable processes consume code memory in both processes, which equated at the time to some 24M per process just to load the Swing library. To say 'memory is cheap' is nonsense. The primary objection is that when a second instance is loaded, all the classes get laboriously loaded back in from disk. This means Java is only really useful as a single server-bound process using multiple threads to handle client requests, and not as a general-purpose language for writing front-end client applications (unless you want to make everything a single big monolithic app).
2. The designers of Java claim that property syntax (i.e property accessors get/let) are 'syntactic sugar' and dismiss them but see no problem with the syntactic sugar of inner classes - this kind of arrogance is simply unacceptable. cf: also iterator support
3. JDBC is simply far too low-level to be a standard DBMS support layer (cf: Perl/DBI and ADO) and its performance is simply appalling.
4. Support for dynamic expression evaluation and runtime type determination is very weak and/or awkward - in the case of dynamic expression evaluation, the Java compiler would be required to be on the target machine!.
5. At this stage C# appears to be a far more pragmatically designed language. I posted in some depth on this topic and despite dozens of flames at the time, one poster summed up the argument by pointing out that no other poster had been able to successfully refute my criticisms.
6. Of the scripting languages, Javascript, ironically, is by far the most orthogonal and for the complexity of the language, in my opinion offers the most power and predictability. Of the other scripting languages, I can only speak for Perl and Python. Perl I love but I also hate the metacharacters for variable declarations and the 'strange' (or 'magic' if you like) way filehandles behave when stored in a variable. As for Python, any language in which whitespace has syntactical meaning should have been strangled at birth. Sorry, but whatever Guido thinks this is a very very bad idea.
And SUVs are a great analogy. Big but underpowered, roll easily in an accident, block other people's view of the road, look tougher than they are and finally, driving one is definitely telling the world you have a small penis.
The "problem", if there is one, with Tcl is that it is not fashionable. Instead, lots of people just use it to get their jobs done quickly without lots of chest thumping, willy waving, and enterprise enabling.
http://www.welton.it/davidw/
I regularly recoomend PHP to people for web applicaitons - a huge amount of the work that is needed on most web sites is best suited to something like PHP - a scripting language. I am a Java devleoper though, and was an early adopter of the technology. Use the tool that suits your problem. If you are looking to hack something together for a web site - use a scripting language. If you are building something that will be reusable and extensible, have an actual architecture, and warrants the design and implementations complexities that are simply not well suited to scripting languages, then use a language like Java. I don't personally recommend VB for anything really, though I realize it has a fanatic following as well. As for .Net, well, let's see if it is still the big "MS-thing" when it has been around long enough for anyone to actually have the experience to claim to be a .Net archiitect. Right now, there simply hasn't been enough time to achieve that.
As far as the article - the guy is an idiot, and his view on software development is clearly limited to a very narrow scope of the problems. The real worlld is far more complex that he apparently realizes.
The heights of genius are only measurable by the depths of stupidity
Sun engineers thoughts
from the article: "People who are serious about getting the job done on time and under budget will use tools such as Visual Basic"
VB development can be quick and easy, but its a tradeoff for the price you will pay later when you want to put your app on the web. After you consider the costs for win2k server, SQL server, and maintaining the servers (patch,reboot,what memory full ?!?! reboot again) you will regret not using a *nix based solution. sure *nix might take more time to program and deploy but once it is up it's easier to maintain.
Also what is the point of the class ? to teach students to slap up code on the web ? or how to develop stable, robust and secure apps if the purpose is the former, then he is right, but if the latter i would stay away from VB
Sanity is the trademark of a weak mind. -- Mark Harrold
This guy is using JSP for a simple database access app. OF COURSE it's overkill. OF COURSE people using scripting languages are having an easier time.
Maybe you could say that JSP is like an SUV, compared to scripting languages when you're trying to do a simple web app that accesses a database. That's taking a Hummer to 7-11.
But when I code, I'm going into battle. I need a military humvee with this frigging thing mounted on it.
So what this jackass is really saying is that the quality of the students and teachers at MIT is currently pretty piss poor.
Java is not my favorite language (and Web Programming is about the most boring thing in the world AFAIC) but I have to use it. I picked up JSP in less than a week, greenhorns we've hired need less than a month.
Sounds to me like they should be investigating the professors for not being able to convey a simple concept even when they have months to do it.
I think that this is a bad analogy, as I have seen hard core Java apps that are less than 70k in size (Think Embeded cell phone/PDA apps) thats not an SUV. This guy hates SUV's and he Hates Java so he has equated them. Automatically makes this a bad analogy and more of a rant. In fact In my experience there is not a lot in this life that makes a good analogy to software engineering
Personally I dislike Java, Mainly for its unpredictable garbage collection and all the issues listed in the other comments above dealing with incompatable JVM's,deprecation etc, etc, etc. And I have had some rough experiences in mixing Java with Reused Legacy Code in Other Languages(Situations where Management,Customer and 3'rd Party Vendors don't give a lot of choice as to waht languages you can use)
What really scares me is that there is a big push for a real-time Java for the military in hopes that Ada can be replaced with Java:
Java in Mil Article
J-Consortium
JCP
--Im an oven mitt, not an engineer! (SLArbys Radio Commercial)
Correct me if I am mistaken, but didn't ArsDigita move everything to Java for its ACS framework? Or was this blamed to the evil VCs, too, in the revisionist phase of Greenspun history?
For providing examples of invalid syntax in PHP, ASP, and java!
-CausticPuppy "Of all the people I know, you're certainly one of them." -Somebody I don't know
This guy's article is utter crap. Phillip Greenspun is either a moron or nothing more than a common troll.
w orkbook/software-structure), which turns out to be much harder and more error-prone than in 20-year-old C interfaces to relational databases
JSP is fantastically simpler than "J2EE"
J2EE is a collection of java techonologies which includes JSP, not a single development paradigm. JSP can be used in a model-view-controller as a view or used to write simple stand-alone applications.
After researching how to do bind variables in Java (see the very end of http://philip.greenspun.com/internet-application-
Riiiight... Because there is only one way to do this in Java.
First off this is not an inherent problem to Java, but a problem of developer implementation.
Prepared statements are only one way to communicate with databases. You can create your SQL any way you'd like and even bind parameters yourself an then execute a regular Statement.
This is all moot anyways if you plan on teaching students what the real power of using an Object-Oriented language. Most people that have to do this sort of thing for a living would have a bstracted the database layer into objects that thier view is using. The actual method of database connectiving is not irrevelant, but certainly not a hindrance to productivity.
A project done in Java will cost 5 times as much
Good thing he provided research to back that up... Oh wait a minute, he was just trolling again.
5 times more expensive? Hmmm.. apache/tomcat is free. Eclipse is free. You can pull down an SDK from Sun for free.
Well maybe he meant that it will take 5 times a long and of course time=money. Nope. He said that it will "take twice as long ". Confusing logic to say the least.
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.
Sure buddy, tell that to Oracle. Oracle happens to use Java for its business applications.
Applications based on Relational databases is where Java excels. The java language isn't the reason, its what is being done with Java in the real world that matters.
There are plenty of tools some free some not, that take databases with referential integrity constraints to build objects (JavaBeans, EJBs, JDO, Torque, whatever) with child-parent releation ships and automatic persistence.
Its really a shame that this guy is allowed to teach at MIT.
Here's an idea: how about teaching students to use the right tool for the job? He should leave the zealotry at home unless he could back it up something more than an uninformed tirade or a ridiculous apples-to-oranges comparison with an even more idiotic analogy.
"If they have both, tell them we use Linux. And if they have that, tell them the computers are down." -Dave Chapelle
It's time they take action against this wasteful, polluting dinosaur.
How can anyone compete with Microsoft and Intel, when Windows is the standard platform that software is written for? How can Sun get anyone to write anything but niche-market software for Solaris and Sparc? Java is the answer. It's the alternative platform; in effect it's an operating system to rival Windows. Its virtual machine approach has advantages of portability and security.
.NET is its answer.
Microsoft sees the threat;
Its always a bug waiting to happen
this paper it's "objective" >>
Why is it that every time we have to hear about Java, it's something negative? I, for one, think Java is a great language. It's quick and easy to develop, multiplatform, and, hey, it's fun! Why not post something positive about Java?
hey!
... But the more I read, the more I code, the more I continue to learn and experience in the sfotware development industry - The more I begin to begrudgingly admit that the man is right more times than not. And I hate being wrong, so it's not like I'm particularly pleased with this turn of events.
To the contrary, it seems that it was -I- who was wrong by way of arrogance and hubris. I'd developed dozens of web apps, I'd been on teams designing and developing enterprise, corporate and consumer apps - I thought he was just full of it. What'd he know?
But as I started working with junior developers more, planning and managing projects more, rewriting inherited projects years after designing their previous incarnations - I started to see an eerie parallel to what the man had said.
Even if you still think yourself the ultimate programmer, incapable of mistake or misstep, impervious to making a bad design the first time through a problem - there still comes a time in which you work with developers less talented than yourself, developers less experienced than yourself. Therein you will painfully learn the wisdom of what tools, truisms, and technologies actually -help- make successful projects, and which just hinder.
I still find him to be an arrogant, pompous, ass; but what wise-ass hacker isn't? It's our calling card.
// "Can't clowns and pirates just -try- to get along?"
Sure I do. How else do you think I keep my hair is such fine condition?
There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
Who do you think keeps Franz and Digitool in business? Hobbyists? I don't think so; they'd be using one of the free implementations. Your "no one in business computing considers using Lisp" comment shows you don't know what you're talking about.
I myself use Scheme in my employment, and it's helped a lot.
"For a database driven application, how do you propose not to have hardcoded SQL statements?"
The SQL statements should be parameterized and built as needed. I don't do code reviews any more, but I always failed code that had hard-coded SQL. Its bad programming; it adds to cost of maintenance, and doesn't allow it to be easily built so that you have RDBMS independance.
This is Basic DB Programming 102 stuff, and shouldn't be revolutionary.
Yes Philip is correct in SOME sense... Java can be "bulky" for small tasks however I would recommend using Python for procedural software communication/implementation (database calls, file transfers, communication, OS hooks) and extending with/to JPython (calling any libraries/classes you REALLY need for any business logic) finalizing with hooks into a highly structured full blown Java class or J2EE application.
Perl is an ugly beast with all the ad-hoc modules and the capacity of forgeting what you scripted 6 months later. Even Larry Wall admits it has grown and grown (but no parent would ever call their baby ugly..) Perl is good for algorithims and reg exp but sucks for anything over 300 lines unless that what you are maintaining on a daily basis.
If it's just "web page stuff" as Philip one would do best with pyxhtml, Spyce, and pyblosxom....
Philip does not define the criteria for success in any part of his post or what he is trying to accomplish... All the functions that he "mentions" have already been written before.
It might be helpful (for those who don't know) to learn a bit about the ArsDigita experience with Java. aD was philg's old company and developed a toolkit (the ACS) based on Tcl and Oracle. The software was a bit kludgy in many ways but had the advantage of being fairly scalable and written close to the database, so you could tune the queries and generally figure out what was going on. The lack of typechecking in Tcl didn't matter too much because SQL queries and stored procedure calls are checked at compilation - and besides, if you keep the edit-test cycle down to under a second you can quickly find bugs.
The rewrite of the system in Java, based on using database abstractions and (would you believe) HTML abstractions was a complete crock and ended up being not only slower than the Tcl/SQL version, but less maintainable and much more buggy. I think they got something out of it in the end, after dropping 90% of the extra complexity and object-oriented-itis, but there's no way Java plus an object-relational mapping layer was the right implementation language.
OpenACS and Java makes a similar argument to philg's, but more coherently and less trollishly. I agree with his essential points however. And what he writes is based on experience, both with managing a web development company and with teaching students.
-- Ed Avis ed@membled.com
" Pray tell what is the problem with hardcoded SQL statements?"
Because SQL is not really a standard; every RDBMS has special ways of doing things via unique SQL verbs that are non-portable.
Therefore, given the ability to hardcode SQL, programmers will choose the path of least resistance making it difficult, if not impossible to provide any degree of RDBMS independance. That means if you want to switch from DB2OracleSQL Server, the cost is non-trivial.
This is bad for ISV's, and can be costly for companies wanting to switch RDBMS's to avoid vendor lock-in.
Its why you hire people like me with 20 years of experience, even though we make 6 figures, because decisions like you want to make will eventually cost companies millions of dollars because its done without the benefit of experience.
Yes, I've been doing this stuff before anyone had *invented* DB. I'm not smarter than you, I've just seen stuff that you've only heard rumors about.
No language is without flaws. In C, the golden boy among die-hard geeks, you spend as much time managing memory and pointers as you do creating application logic. C++ saves many of those problems while introducing new pseudo-OO constructs that have peculiar and arcane rules governing their use. C# opts to provide far too many keywords for nearly identical behaviors and then renames half of them to look "new". Perl is terribly powerful, but can become obfuscated and impossible to maintain if used most efficiently. VB glosses over so many basic programming principles that its users waste time and CPU cycles re-reinventing the wheel. I can't say I know what's wrong with many others because I haven't used them, but no language is perfect.
That said, Java has terrific benefits and some deadly flaws. JSPs, for one, are a mess. Embedding code for even such simple tasks as displaying dynamic fields is error-prone and difficult to maintain. Add to that the fact that so many JSP developers leave reams of business code in the JSPs themselves, and the hackish nature of JSP comes to light. This is not, however, a simple Java problem, and it plagues any similar templating languages. I have seen some ASP pages that were phenomenally large. Bad practice is bad practice, irregardless of where it occurs.
Java also suffers, as many know, from serious memory issues. In the rush to provide a single language platform for applications across all aspects of software engineering, Java tries to do too much in too many places. Java can be embedded inside phones for small Internet clients and video games, or loaded onto the largest servers for massive Java-based enterprise integration applications. It does both of those things exceedingly well, providing powerful abstractions at both micro and macro levels. The grey area in the middle is where most people stumble. Drawing the line between "enterprise" and "standard" code libraries is very difficult, and many "enterprise" features remain in the "standard" version of Java, adding to the bloat. What's worse, only within the last couple years has the question of memory consumption begun to be addressed in earnest by Sun engineers. There are many lights ahead, however, be it the improved base memory handling in Java 1.5, or the eventual integration of Apple's VM-sharing innovations into the Sun Java proper.
Java being staticly type has other problematic side-effects; namely, as data and systems outside an application change or as the application as a whole needs to grow and adapt to new requirements, single small changes in a few classes can explode into massive alterations throughout the system. Again, much of this can be mitigated with rigid adherence to preferred OO practices. If those practices are not enough, there are a number of freely-available APIs and libraries to allow for more dynamicity and looser coupling between tiers, almost certainly easing these upward transitions.
At the end of the day, any software development group wants the tool that gets the job done. No project I've ever been associated with chose Java because of market hype or buzzword psychosis. They chose Java because it presented the most complete set of enterprise service abstractions in a single platform, without needing vast amounts of glue code to aggregate them into a single, homogeneous enterprise application. I have also never been on a Java project that failed, although many stumbled along the way. Java is not market-successful simply because it is hyped, or because it is trendy, or because I say so. It is successful because it provides developers more tools in a single toolbox than other comparable languages.
A lot of people here jump very quickly to defend Java, and the same people jump to slay Pascal or Ada. But each language has its purpose, and if you use it for that purpose, it shines like a diamond.
I use Java - when I need some cross-platform web-based code or whatever. But if I'm running a quick script, I'll write it in Perl. If I'm doing some quick Windoze jobbie I'll write in VB. I use the correct tool for the job, rather than adapting the job to fit the tool. And if a few more of you stupid "college graduates" would learn to do that then just maybe the software industry wouldn't be quite so screwed up.
disclaimer: I'm currently working on an Oracle/.asp project. I code Java at home (not very well, yet!)
SQL Generator? And it handles subselects, inline views, grouping, multiple outer joins, and functions?
Or - is that too difficult to generate, forcing you to make up for this thru additional application code and reduced application functionality?
If it's anything like any other sql generator, then it's the latter. That's great for trivial applications by amateur or otherwise junior programmers. However, robust and powerful applications typically require SQL is that requires the above capabilities. Time to take a SQL 101 class.
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.
What's wrong with being the SUV of programming languages? I like SUVs. But if he called Java the Minivan of programming languages I'd be offended.
(S+C) x (B+F)/T = V
For example,
http://www.cliki.net/Database
I personally use Pg most of the time now, but I used to use CommonSQL (that comes with Lispworks), on which UncommonSQL is based. That really makes database access dead easy in Lisp.
His rant sounds like a programmer with 3-5 years of experience who wonders why all those "old guys" "just don't get it".
Meanwhile the old guys are laughing and figuring out ways to make code run for generations, not until he leaves after 6 months of his "coding".
He's a nightmare because he's smart (smarter than me in most ways), but he doesn't have the experience to understand, *really understand* the implications of his choices. He thinks 18 months is a long time, and I architect systems that take 18 months to build, and I want a 12 year lifecycle out of this code *minimum*.
He's building the Golden Arches, and Java is buildign Pyramids.
We are seriously thinking of using a Prolog rules engine to handle the connectivity issues in a real-live commercial project. A pilot has shown we can replace several thousand lines of Java with a hundred or so lines of prolog, plus change the rules in the field. So we may actually deploy this, Honest!
Luckily there are several Prolog implementations (as well as several rules engines like JES(S?)E) available for Java.
So there is some use of those acedemic-type languages in the real world.
-- ac at work
A bare chassis with a 500hp engine.
"Open the pod by doors, Hal" > "I'm afraid I can't do that, Dave" sudo "Open the pod bay doors, Hal" > alright
So, does this mean that Java is helping to finance terrorism now?
"If someone were to say to you "I'll just write this little script, it won't take me long" I'd advise that you either (a) fire them or (b) run for the hills. They have no idea what they're doing. In the long run, all you get is grief. "
.
Clearly, you have way too much experience on your hands
You were mistaken. Which is odd, since memory shouldn't be a problem for you
The "published metrics" I have seen suggest that Ada and C++ are neck-and-neck with each other -- development speed, bug rates, and such. Ada may have a slight edge, but it is nothing to write home about. This supports the notion that tool-based security is a weak one.
The old notion of car safety was to put the burden on the driver while the Ralph Nader approach was to build safer cars. As it turns out, the biggest safety factor remains the "nut behind the wheel" -- go to the IIHS Web site and look at the relative safety of the different car makes, and the pattern follows driver demographics more than anything else (a Toyota Corolla is a lot safer than a Geo Prizm -- they both come off the same assembly line in California).
Along the same lines, the biggest factor in software bugs is "the loose screw behind the keyboard" rather than issues of language design.
That's a pretty interesting quote, considering that Celera Genomics (the human genome folks) uses Java for both their annotation processing and end client for viewing the genes.
Writing a controller app for manipulating serial ports isn't nearly as demanding as handling 3d modeling. I'm not impressed.
"Do you happen to teach Comp Sci at MIT?"
No, I work for a living.
Also, I have to live with the results of my technical choice for a decade, unlike some trendy professor from Boston who, in two years, will be promoting some other new technology trend.
That's not a flame, that's just the truth.
Depends on the application. Check out JDO (Java Data Objects), Hibernate, and Castor. They are all OO->DB frameworks. Your app works with objects, and all the various things objects have, properties that return scalars, properties that return other objects (relationships), properties that return lists of other objects. They map those onto DB statements, which may be generated at application start in a fraction of a second. Usually you build your object model, and then an XML file or two describing the relationships between your objects, and it Just Works. The XML can be autogenerated from the classes themselves if needed.
You would be suprised how many "robust and power applications" do not in fact require much out of SQL at all. Hence the various pushes/ideas with object databases.
Now, if your app is a large reporting app, doing massive SUMs and GROUPings, sure. This doesn't cut it. But it's amazing how the majority of apps just manipulate a set object model.
and laugh. This is what they teach at MIT???? Even here in Spain there are better university textbooks about web development.
In about 1997, Phil Greenspun wrote in his How to be a Web Whore Just like Me book in Chapter 8:
"You should learn Java. I predict that it will gradually supplant C over the next ten years. Java is going to be big. You heard it here first."
In this particular post, he is not saying that Java is not ever useful or practical. He merely states that people who develop in Java are often using a tool that is not especially suited to the task -- that it's not always the right tool for the job. This is exactly like a single guy who does nothing with his SUV except do a one hour commute to work and home -- it works, but there are more practical solutions.
I don't mean to sound like a complete troll, but why on earth do we give a rats ass about what Philip Greenspun thinks.
After reading through his "website", I can only conclude he's a nobody...
Are we going to start picking are "blog celebrities" with particular reasoning?
He comes a across as nothing more than CHEAP with blindingly genious statements such as "java is the suv of programming"
I use different kind of languages to express myself, I just like argueing like 'french' is better then 'dutch'. That just depends in what enviroment/country you are, the more knowledge you have about different languages, the better.
You can use JSP just like a template engine as well, if you want. Sun calls this JSP "model 2", i.e. use servlets for control, and only use JSP for the "view" just like any other template engine.
It has one advantage (I tried freemarker etc too), which purists might find a disadvantage: sometimes you can "sin" and use a tiny little bit of Java code on your JSP. Also most template engines have some built in logic for if/else or some even have some simple loop structures. Why learn yet another language (even if simple) when you can also use Java. Just restrict yourself and confine your JSP-java to the simplest possible use. It works well and is a practicle solution, while still giving a clean MVC structrure (which template engines try to force on you).
As someone who used an overly complex PHP "application server" for a project that was screaming "decent seperation of logic and presentation" I think the guy is on some nice drug.
PHP is fine for smaller applications. It is an utter desaster for large applications that need maintenance and the ability to be coded by many inidividuals. Every bit of templating done in PHP has to be done by hand or you have to have intimate understanding of the code for the "application server".
JSP allows you to use Java's strengths in that the logic can be done in servlets, beans etc and implemented as one line JSP tags. It's overhead heavy for small projects but excellent for larger ones where you will still be able to figure out what the code does if the original developer left or got fired. This is similar to ASP.Net I imagine.
His comparisons say nothing about the scope of the students applications or the tools used. Anyone doing a whole application in JSP is going to suffer, and this is because JSP is not meant for this, and a comparison of JSP and PHP on this basis alone will make PHP seem better than it is.
As someone else mentioned: Use the right tool for the job.
So its an overly expnecive, resource guzzeling, enviornment destroying, and is used by by inconsiderate americans who want to feel bigger then themselves. wow, that does sound like Java.
Explain to me where again is the "bloatware" in the most stable version of Windows yet?
Can you ping me now? Gooood! | Manhappenin.Net - Things to do
Because I want to avoid any company's product/service LIKE THE PLAGUE that would hire a moron like you.
Here's your programming lesson. I'll "speak" slowly so that even you can understand.
Stooored - Prooo - ceed- uuures. Now can you say that?
Just because MIT students who had one Java course previous to his software engineering class could not understand how to use Java properly to build webapges, doesn't mean Java is bad for web applications.
I also teach a second year software engineering course using Java to write web applications. My approach, however, is very much different to MIT. I actually took the time to run tutorials on how to write a proper application using servlets and jsps IN CLASS! That's the only way, imo, to teach these "beginners" how to write programs properly.
The MIT approach (as well as most large universities) is to let the students learn the tools themselves while they cover the theory in class. This sounds all good on paper since theory is the "essence" of computer science while being able to compile and run a program is more of an "accident". I believe, however, that since the "accidents" are what is keeping eveyone employed, we have to teach the proper way to code using CLASS time. Espeically in an introductory SOFTWARE ENGINEERING class.
Anyway, with support from the right IDE, programming web applications using servlets and jsps (a subset of J2EE) is pretty easy even for second year students. BTW, our students also had only one other course in Java.
I have written a paper on my experience and it is here
Cheers
This missive contains a few blaring warning signs of a guy who has not learned best practices for Java programming, and indeed is very naive about the needs of enterprise software development.
Well, the guy indeed was a founder of a (profitable) enterprise. Please adjust your buzzwords.
In the context of Web application programming, he declares: "Mostly what you get with Java are reams of repetitive declarations at the top of every script so that the relevant code for serving a page is buried several screens down." The rationale for this statement is nowhere to be found, and it's anybody's guess what in the world he's talking about.
If you look at a typical Java source file, you'll see that this is quite true. Excess of boilerplate code is quite usual for Java applications.
Again, no further comment, except to note that no one, I mean no one in business computing considers using Lisp.
Lisp is indeed considered, used, and deployed by businesses. Go and see it in action.
I expect that seniors and grads at MIT are very smart, but good software engineering discipline usually requires years to learn, even by the smartest cookies. To expect it after one semester is another clear sign of enormous naivete.
*moan*
I hear people using that argument to justify clumsy tools since the days when C++ became fashionable. Yes, you got to learn a lot to be a good developer, but when one tool takes eons longer to master (compared to existing alternatives) without any visible productivity boost in return, I say it is a poor tool.
Lisp is the Tengwar of programming languages.
While I think Phil exagerrates the cost of a Java solution over a scripting based solution, he does hit the nail on the head with Java's dearth of support for named bind-variables and flexible SQL support.
This is more cultural than technological. SQLJ has been available for years and handles bind variables in the same way that C does. But nobody uses it.
There's a tremendous distaste for SQL databases in the Java community. A major component of the Java community seems to have evolved out of the OO purist / Smalltalk view of things that view relational databases as an abomination to be avoided, or at least wrapped and hidden with an object-relational mapping layer. This is due to many varied reasons: dealing with objects alone is very empowering, and becoming an expert at SQL and relations is a discipline unto itself that many Java developers choose not to undertake.
If one DID actually try to learn the technology behind SQL and databases like Oracle, they'd discover a tremendously powerful engine for storing and retrieving data, that doesn't necessarily require elaborate model-view-controller architectures for good maintainability.
Simple web applications can be written with packages of stored procedures and a minimal data binding framework to JSP pages in a snap. In fact, this seems to be the approach ASP.NET and ADO.NET has been taking. Apple's WebObjects took this approach too, though with an object/relational mapper underneath (and "Fetch Specifications" instead of , or in support of, stored procedures).
Struts was the first real stab at a good data binding framework for JSP and is wonderful, but generally wasn't dynamic enough until the introduction of the DynaBean.
In summary, I think Java can definitely achieve the productivity levels of PHP and Perl, but the default recommendations from Sun are not the approaches that lead to these levels of productivity. I would suggest that the learning curve in Java might be higher to achieve this productivity, but it certainly is possible.
But I also think that the Java-based techniques do tend to favour a certain level of modularity that PHP and Perl and traditional VB/ASP based approaches do not favour out of the box, thus leading to a very unmaintainable approach. I think the Java community over compensated with "too much" modularity, but there are signs this is calming down.
-Stu
People bring up Php, but Php and Java aren't even the same kind of programming language. Php is pretty much web only, whereas Java can be used to create all the same types of apps that C can (Not saying this is a good idea, just that it can be done.), though C cannot be used in all the apps Java can (i.e Web.)
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.
The only language in common use that does everything Java does is fricking Visual Basic, and if java is an SUV, then Visual Basic is what? A jumbo jet that can't fly, but has to taxi everywhere? A 1800 Wheeler with an engine by yugo?
ad logicam Claiming a proposition is false because it was presented as the conclusion of a fallacious argument.
I wanted to post in /., then I stop because there are so many posts already, but then, I read a while and did not see someone point this out.
The database problem with ? in the sql statement is a blessing. If students cannot count it, he/she doesnot deserve to program. I remember the old SQL style by appending sql pieces together. Tons of problem because special charaters and spaces, and security problem. The ? the author talks about is the prepared statement. How pity.
To get to fields in the database, you actually can just use name or index such as:
recordset.getString("Mycolumn");
or recordset.getString(3);
No difference than other API. I know one VB programmers who learn JSP and JDBC in no time.
I myself did not go to MIT, I don't even major in computer science, and JSP is just a pickup in a day for me.
I think this article is an insult to MIT students and community versus Java. My proof? Just go and ask some MIT computer science students about how long it would take them to use JSP and JDBC?
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.
Java is the SUV of programming languages.
You mean big, slow, and gas guzzling?
GIJ.
I wish it was more complete... DroidQuest doesn't work on it (RH8).
-uso.
What you hear in the ear, preach from the rooftop Matthew 10.27b
His observation boils down to "Java is not useful for database backed websites," not that the language is inherently bad.
It should hardly be a revelation that languages like PHP that were explicity designed for web development are much better suited to it than a language whose origins are as a cross-platform embedded systems (TV set-top boxes) language.
Use the appropriate tool for the job at hand.
The whole SUV-bashing thing is childish. Does anyone complain that a Corvette owner isn't trying to corner at 0.98g or whatever the current spec is?
You forget to mention something else Java is good for: potentially hostile embedded environments. e.g. smart cards (Javacard) and mobile phones (J2ME and CLDC).
Notice how most of the fancy phones coming out have Java games and stuff on them? Motorolla is running a JVM on top of Linux for their phone software. There are lots of hardware accelerators for J2ME out there as well (aJile, zucotto, etc, etc).
The problem with Java is more the API's on top and the class file format, IMO. Too much deep inheritence is used, overloading methods, etc... and that is quite taxing on the JVM. Calling a method in Java is very expensive as it requires searching a table up the superclass hierarchy in order to find the appropriate method (matching the name and descriptor). (this can be cached but must take into account polymorphic call sites).
I'd like to keep the high level language syntax, but redesign the JVM with speed AND security in mind.
Disclaimer: I am doing a PhD that relates to Java.
Java itself is quite a nice language, and the amazing speed it can be compiled (as opposed to C) is testament to that.
The libraries, however, are huge and often not well-designed, and it's depressing how much baggage you need to carry.
JSP, well, it's quite a pig. Three different ways of writing web pages, huge config, and even more monstrous packages (like Struts) whose config alone dwarfs what you would think your web app size should be.
There are alternatives, enabled by Java even. Wouldn't be right to plug mine here tho.
1) Your table structure isn't exposed to your client app - ie., you can more easily change it;
2) Performance is better because the procedures are precompiled and optimized;
3) Security is better. Your table structure is really hidden instead of just obfuscated, you can limit the client's permission to execute a particular set of procedures, and you don't have to worry about SQL insertion attacks.
Use any reasonable database API to get columns out by name instead of by position, and it works out nicely, particularly considering that if you change the column name in the table you can alias it in your stored procedure query.
Those who can, do Those who can't...
-1 Uncomfortable Truth
I agree with what you're saying, but I think the original poster was talking about the ODBC/JDBC "Sql passthru" ability where you just build the string, and then pass the entire SQL string through.
Completely horrible and unmaintainable, and I have programmers still tell me "its the best way to do it".
Ahh, the good old ==. We are talking about Java, and instance of something, and an SUV, a tpye label assigned to various other isntances. The headling won't compile, you need to say Java == SUV.class but that's not quite right either. So what the headline should say is...
Java instanceof SUV
We'll ignore the bad naming conventions, specifically it should be a lowercase J. Dont forget also that Java instanceof 3GL and Java instanceof OO.
My favorit happens to be Java instanceof ToyLanguage. The difference between men and boys? The size of their toys!
--Shemnon
did you go to College? did you take ANY programming class that was taught by someone that you would gladly recommend to be part of your Development team today? PHD in Compsci != programmer Sure they taught you to make a hello world program in fortran using a mini-frame 25 years after those were the industry standard, but they could not program their way out of a paper bag. Sure I did not go to MIT, but I never met a Compsci professor that was also a programmer I learn more in as week on Google Groups than I learned in 4 years for $50k
Comparing languages to car types is just plain stupid.. I don't care if you are Philip Greenspun, you lose a lot of credibility in my book for saying something dumbass like that.
Saying java is like an suv doesn't make any sense, especially if you don't provide any other comparable metaphores for other languages.
If you mean that java is big and has a lot of features, just come out and say it.
Bloated code, shared JVM... this isn't a JSP or Java problem, it's yours, d'oh! JSP scales very nicely, and unlike Perl or PHP, you have lots of control over scheduling, load balancing, distributedness, etc.
If you thought you could just mosey on over to JSP and employ your existing Perl/PHP skillset? Sorry, no! Unlike weakly object-oriented / typed languages such as Perl/PHP, Java requires that you know what you're doing.
Approaching a rich API such as Java through JSP, from a Perl/PHP orientation, is a recipe for disaster. It would be like going to perform knee surgery on a patient after having been a bikini waxer.
That said, to whoever's working the backend of your JSP website, they probably need to get a clue about tag libraries, JSTL, Struts etc. Go find a good book on those subjects, for example
Java for the Web With Servlets, Jsp, and Ejb : A Developer's Guide to Scalable Solutions by Kurniawan.
Big Daddy, Johnny, Burp, Aunt Zelda, Scott, Slurp, Big Momma
Where else can you feel so safe, but completely fuel inefficient? Plus, if you run into someone else's code, you'll be just fine.
Give me a fish, I shall eat well for a day. Teach me to fish, and I will eat well until some idiot patents it.
If this is really true, MIT and its CS professors should reexamine the program. If CS students cant write JSP and ASP.Net etc. at the top ranked school then "Lord have Mercy".. Forget about learning LISP and all this crap and teach the students how to code.
I think the problem is no matter how many companies that have million dollars revenues that someone starts, they are not doing their job if they are not fulfilling the students needs.
It is f'ing piteful that MIT students cant learn Java. Especially if they know C or Lisp. Get with the program!
Languages don't write bad programs - people write bad programs
In my experience the result of this approach limits the database queries to simple selects of lists or individual objects, updates, and inserts. That's fine for many prototypes of simple applications (with very simple data models).
But it breaks down as you add more functionality to the application. For example (keeping it very general) lets say that you want users to select a category to drill-down into for further work. You might start out with just a category name being selected and presented to the user. However, the next step is usability will be to add additional attributes to the name - so that the user has a sense of which categories have the most activity, most pending 'requests', or whatever. So you then need to also select attributes for each category like:
* number of orders/requests/etc performed in last 24 hours
* total number of articles/orders/etc
* number of orders/requests/etc in a critical status
How do you generate the SQL for those attributes. Now, if you are writing your own SQL - you could just join the category names with an inline view of your orders table (grouped) to pull all attributes in a single query. Beats running two separate queries.
So whether it's developed as one or two queries - how would a sql generator build that last query? And if it can't - do you generate 90% of your queries, and then do just 10% by hand. Does that sound useful?
The interesting bit isn't what he has to say about Java. It's the fact that he's the last person on earth who thinks 'if programming languages were cars' is a novel and useful analogy.
++ Say to Elrond "Hello.".
Elrond says "No.". Elrond gives you some lunch.
There's a pair of books that make interesting reading together. One is Paul Graham's On Lisp. Whatever you may think of his statements against other languages, he knows Lisp and he does an excellent job of explaining how to use it well. I didn't understand how to use Lisp macros effectively until I read it, or why to use them.
Shortly after reading it, I read Modern C++ Design by Andrei Alexandrescu. Reading that, I started to understand some of the power of generic programming. If you understand when these two books are explaining two very different implementations of the same things, then you have grasped the essence of some very powerful techniques.
Frankly, generic programming is one place where Java is still definitely lagging. Fortunately, there is currently an effort to fix that.
Lisp's greatest strength is also its greatest weakness. The language eschews nearly all syntax. All structure within a program that would be expressed syntactically in other languages consists of levels of parentheses and order of arguments to various functions, macros and special forms. There is great power in this. It means that what you add to the language fits in seemlessly. That is the point of Graham's title for his book. Read the first chapter for his explanation.
Unfortunately, this very scarcity of imposed syntax puts a burden on the programmer to format for clarity and to learn to read in a language where some of the familiar signposts simply are not present. That task is certainly possible, but it puts many people off.
The net will not be what we demand, but what we make it. Build it well.
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 probably says more about the poor teaching than the Java language itself.
Null Pointer Exception
Bad practice is bad practice, irregardless of where it occurs.
So then it does matter where it occurs?
Sorry, I was agreeing with you up until you hit one of my major pet peeves.
the site is slashdotted. way to knock over that!
-- I am. Therefore, I think!
You want to know what I really think happened?
:)
Someone at Harvard wanted to load test their server configuration, so they turned to Phil and said "can you post some flame bait and then get it posted to Slashdot for us?"
So you see he's not a troll, just a resourceful engineer
microsoftword.mp3 - it doesn't care that they're not words...
If someone can characterise that "resonance", they might make a great deal of money.
AFAIK no language has ever been designed on the basis of known programmer preferences. Instead language designers usually have some agenda they wish to promote with their language. This is the "tail wagging the dog" IMO. If you want a language to be popular, then poll developers to find what they want and then implement it.
I tried PHP/perl for web applications, and both of them suck donkey's ass. Lame or none OOP, lame or none OOD, no strong types, performance sucks (yes, java is FASTER for web applications if done right). Also- impossible to understand code (esp. perl), lack of propper IDE (for java- try eclipse or netbeans). In PHP- most of syntax/elemental errors pop up only when running the page, no compile time checking, as there is no compiling. Also in PHP, lame database abstraction layer last time I checked. What about connection pooling? I don't know about MVC frameworks for PHP/perl, but either they are lame, or rarely used. What about object persistency or Object-relational mappers? Never got that far in scripting languages. Take a look at jakarta.apache.org if you don't believe me- tons of projects aimed at making java even more suitable for coding web applications than it already is. Java is WAY BIGGER on server side/web applications, than it is in GUI/desktop applications. A few things- JSP sucks, use Apache Velocity or other template engine with java. If you need extreme performance, get Resin (www.caucho.com) instead of Tomcat, it can run 2x-4x faster depending on situation (maybe more if you use JSP+custom tags extensively). Learn some MVC web application framework and use it- otherwise you'll get an ugly application. Well, I think that's enough for now.
P.S. I code web applications for living with java, and I enjoy it.
--Coder
Those things sound like stuff you'd write for those useless reports the bosses always want, comparing apples to porcupines. Most database apps I've seen use pretty simple queries; it keeps your memory overhead down, and makes your app run more smoothly.
If you're using multiple outer joins for anything other than reports, your schema's probably screwy. Subselects? Talk about memory usage.
All that stuffs fine if you're working for the government, and they can buy you a billion dollars worth of hardware, but if you're putting together an app for accounting and inventory control for a relatively small company, and you're using those types of queries, you're going to make their hardware scream for mercy, and them very unhappy with the speed of your fancy new app.
ad logicam Claiming a proposition is false because it was presented as the conclusion of a fallacious argument.
'record time with minimal resources', and you got it done in 'about nine months using VB.
Hmmmm, that doesn't seem like 'record time' to me. record time to me is something like 'we need this done in two weeks' or some such.
You are in a maze of twisty little pasages all alike.
.....just like an SUV, it is big, bloated, and only used by soccer moms (which in turn frequently crashes)
http://db.apache.org/torque/g /ojb/
http://db.apache.or
http://www.hibernate.org/
...otherwise Arianna Huffington would be telling me that I'm supporting terrorists...
If you disagree with me on social issues, then it's pretty clear that you are a narrow-minded bigot.
Yep, you have to agree with the guy: if you don't understand a tool, it probably will be harder to use. You then might not do as efficient a job, which means the end result most likely will be unsatisfactory. Duh. Futhermore, if you're not sure what you're doing, your design may be less than optimum. And of course bad design has not impact on performance. Double duh.
You say that Java is great for what it's supposed to be used for. Tell me, exactly how many times has Java's purpose changed?
Seriously, I can think of at LEAST two or three times where Sun has just up and announced that Java really wasn't intended for a market that they spent huge amounts of resources trying (and failing) to court.
First, it was intended for occasional applications and then mostly to create better interactivity in web browsers via applets. Java was the best way to make interactive websites and do stupid things like Slime Volleyball. And that was where the focus was.
Then, when Sun realized that applets were stupid (Flash is a much better tool, though only slightly less annoying), they shifted to desktop applications. In the future, everything will run on a JVM and it will not matter if you're running Windows, MacOS, or Unix! All hail the portability ideal!
Of course, when THIS concept failed miserably (at the hands of evil, evil Microsoft, of course-- couldn't be Sun's own crap-ups that caused Java to fail), they decided that maybe the embedded market was where they were meant to be. All that work on Swing, AWT, and the like? Oh, that's only for niche app developers who don't represent Java's REAL potential-- all along, the REAL focus of Java has been the embedded app!
And now that they're finding that Java "enabled" mobile phones and devices tend to have horrible speed, interfaces like molasses, and don't really do much of anything more than their non-"enabled" counterparts, they're shifting gears again. It's the SERVER market, and dammit, it HAS BEEN the server market all along! Those embedded people-- what buffoons! Those apps people-- didn't they KNOW?
I have had friends who did extensive work with Java in all of these fields: applets/web, applications, embedded, and server-side. With the exception of my server-side friend, each of my buddies has been left out in the cold by Sun when their market suddenly stopped being "hot". Sun just dumped support for entire segments of the industry (how much work is going into their formwer darling, SWING?). Each one of them was, at one point, using Java for what it was "supposed to be used for" at the time.
So, tell me, surfsalot, exactly why the hell I should believe that Java is good for "what it is supposed to be used for" when Sun hasn't even figured out what its target market is? You can bet your ass that when Java is KILLED on the server side by Perl, Python, and their ilk, Sun will find some other niche market in which Java has finally found its "real purpose".
Maybe then, you'll come around to what Java and Sun really are.
Absolutely, Give me PERL/CGI over WebSphere anyday. In fact, compiling code for an interpreter is laughable. Java should be a scripting language. Compiling millions of lines of Java is such a joke it is no longer realistic with Makefiles. You have to use ANT which doesn't support any other platform. The benefits of a scripting langauge far outweigh the benefits of byte code in my opinion. My experience with the WebSphere is that the web application claims over CGI are exaggerated especially with regards to performance. Furhtermore, the expenses of porting from WebSphere 2.0, 3.0 to 4.0 are far greater than any other C porting expense I've had to date. Java may be write once, run anywhere, but Java/XML/JSP/XSL/XSLT code written for application servers is not. The switch to EAR, WAR and J2EE was expensive with no discernable payoff. Web application servers are a waste of time because the standards change so fast.
However, 1/2 million lines of C/CGI scripts written 7 years ago compile on Solaris, AIX, and Linux with only one person spending two-weeks porting code that is still run in production today. Because ANSI C is a mature standard it is far closer to "write once, run anywhere" than Java is if the authors of the C code know it needs to run on multiple platforms and stay within the ANSI C/ POSIX universe.
While I agree that if you use Linux in your environment, then there's probably no reason to use anything else the PHP. I've done a ton of Java development - some really big projects - and for home, I pretty much use PHP. So, I agree up to that point.
But there's a few issues I have with the parent:
I just want to get the little database app that should be done in 2 hours done in 2 hours. Java has lots of type-checking, etc. that's usually unnecessary for my simple reporting/collection of database data.
Sure, for collecting info from a db, that might be ok. But 2 things:
1. Type-checking??? I don't find getting an Integer from a Number column too tough. I will say tho, that if your using Text/CLOBS, then that can be a pain, depending on your db.
2. As long as it's just reporting/collecting your fine. But get an app that needs calculations and stuff done and a strongly typed language becomes an asset.
Plus imho Tomcat is a pain in the ass to configure, and you gotta keep javac'ing, and so on.
Well, if anyone ever puts a compiler of any kind on a production server they should be shot. There are plenty of ways to precompile Java webapp JSPs and then deploy the WAR out to Tomcat with only a JRE installed. That will bypass any kind of need for any compilation. This is why your production boxen are different from staging/build boxen.
I'm not trying to bash the guy, but it's clear than many notions about why something sux or doesn't is due to lack of experience. I'm definitely of the mindset that there is a right tool for the right job. No way in hell would I ever try to do a enterprise scale app in PHP or Perl. However, for proof of concepts and small sites, PHP/Perl is great.
I dunno, this is kinda the typical stuff you get with people who haven't used Java very much and don't really understand how to apply it and what it is really meant to do and not to do.
He said reverse the order of the *words*, not the letters.
Those who can do, those who can't teach. ;)
His analogy was bad, his understanding of Java is poor and he blames the language. JSP is a completely different language from Java, and yet he assumes that the students "experience" (as if anything in college can count as "experience" [other than drinking yourself silly]) in Java prepares them for writing a web application...
Hey 1000 monkeys with MSDN can write Windows
The other list of languages which former users appreciate Java:
- Asm
- Cobol
- PL/1
- Paskal
- Ada
The rest of us, who already know Lisp, Python, Haskell, ML and Perl, have a real problem to love Java - nobody wants to move from a better language to a bad one.Less is more !
Well SQL is a good abstraction level to work if for no other reason than most DB used today talk in it (but not all). If you use JDBC then you need to talk in SQL. But what you can do is:
Have a separate set of classes that coral the SQL into a DB service ancestor class.
User Prepared statements (minimizes sql injection problems), where possible.
Subclass the basic DB service class to provide wrapper classes to specific DB tables. Have mneumonic java style access to the table and accessof and modifier methods for all fields.
I have a field defintion class and the subclass for a table craates an array of these defintions which are used to automatically create the prepared statements for select, update and create, (when needed)
Any DB service class that accepts any SQL text like a where clause, have as a private method which can only be called directly from one of your wrapper classes.
Filter all parameters in for nasty characters to shield against sql injection issues.
What you end up with is applications that no longer have hard coded SQL in the business logic but have SQL in a controlled and central place. With a place you can put "adhoc" code where needed but still out of the business logic and under central control.
It is a very bad idea to embed SQL thoughout your business logic. We had a case where that happened then the DB data supplier changed and the table defintions and field names changed and hundreds of embedded SQL statements had to be changed. A real nightmare senario. The centralized pattern described here allows you to solve the SQL construction problem once in the DB service class, which although one might argue is 'hardcoded' still. It is no more harcoded than your Java statements. You have to have the code for talking to the DB in some form and SQL if carefully used and controlled is a good, expressive way to do it.
I don't like stored proceedures because your applicaton is now out of your control, and out of view, like say all those cells with formulas in an Excel spreadsheet. While things work, they can be very hard to debug and coordinate, often times between different teams in an organization.
The ease of scripting with the power of java. You can include any Java component and interface it with the most intuitive web scripting language around. Oh yeah, it's cross platform, too (runs as Java app).
I sig for world peace
Java doesn't cost a thing if you don't use a specific feature!
JIT optimizations have a cost and the VM startup time has a cost but Java was never meant to compete in startup time, however it will beat the pants off of Perl/PHP in any "real" performance evaluation (that actually tests perl/php code and not C++ calls from perl/php). And it can beat C++ in long running applications, I have been a C++ programmer for 7 years before using Java and while back then it was slower it is definetly as fast today.
Actually, C is the dirtbike of the progamming world. Small & fast, but don't try doing long distances.
Higher Logics: where programming meets science.
Discerning programmers should check out WebObjects. Seriously, I'm a huge PHP fan but WebObjects has spoiled me. For those projects that need a little more panache (ie. medium to large web applications) WebObjects is da bomb.
I hate to say this if people cannot code in oop or Java they should not take programming languages but stick to scripting like VB maybe Philips students should just do VB scripting.
I develop with JSP and PHP, too. In my experience, PHP is vastly superior to JSP when it comes to web applications. PHP let's me do what must be done in a very straightforward way. Because PHP is a scripting language, it comes with certain advantages in dynamicity (?) that Java can never offer. In the web-world it's all templates and stuff that includes other stuff which in turn includes other stuff. With PHP you can build a very non-redundant web application that is highly dynamic.
Java was not designed to handle the string-laden environment of the WWW. The fact that Sun simply wants everything on earth to run on Java doesn't mean that it's actually productive to do so. And trust me, we had a fair share of web-based Java projects.
The only thing that bothers me in PHP is, it's ugly-ass object paradigm - if there even is such a thing. I have been hoping PHP would advance more towards namespaces and stuff like that - but hey you never know what the future holds!
But it makes up for it with it's really fun function library. With some skills you can write very high level code to attack some pretty high level problems.
just try switching from MySQL to Oracle, and you'll see what I mean
That's really not a problem if you're using an extra DB layer that can be maintained separately - just like you should when using *any* language. And as someone who has written DB layers in Java and PHP I can attest that writing it in PHP was much easier than with Java, leading to more stability too.
Oh, and PHP's speed is absolutely horrible compared to Java, I guess it's slower by a factor of 10 or more (because it compiles pages every time from scratch - duh).
You can go faster, but only where Microsoft wants you to go today.
C++ could be compared to a train. Once built, the train runs only on a particular railroad. To travel to another country, with different width between rails, you need a mechanic to do manual adjustments (ever travelled to Russia?).
But I wouldn't want to drive this train, because it crashes if you make the slightest mistake. Laborious effort must be taken to remove CO2 from each component of the engine, otherwise it will displace all the oxygen and the train will grind to a halt.
Java, I think is more like a tank. It doesn't crash much and can go anywhere you want, but much slower than a train or rollercoaster, and only with a batallion of support trucks who bring along its framework.
-
The first paragraph says Java's "useless for large scope projects" and the second paragraph says "run on Commodor 128" and "unfortunately it required 256k of memory".
Tell me. Now that it's the 21st century what large scope projects are designed around the Commodore 128 or any other machine with less than 256 Megs of memory?
Java is a language like any other. If you've been programming since the 70s you might not like the structure of the language. It's not what you're used to, but that doesn't mean it's useless. A cliche about old dogs comes to mind. Fortunately for you there are many options when it comes to programming languages.
-sweatyb
It breaks my pluginses, my precious!
The implication of the delusional Greenspun is that VB is fit for anything more than noddy applications - this needs laughing at long and hard.
oh brave new world, that has such people in it!
> Those things sound like stuff you'd write for
> those useless reports the bosses always want
> comparing apples to porcupines. Most database apps
> I've seen use pretty simple queries;
> it keeps your memory overhead down, and makes your
> app run more smoothly.
A few thoughts:
1. If you think reports are useless, then you probably put tape over the guages on the dashboard of your car as well. I can't help you there.
2. And you deliver customer portal, don't you want to show info about sales they've made in the past, credits they've accumulated, savings they've made via your 'preferred customer program', etc? if not, then you're behind the curve on portal design. if you do - are you going to send them a separate application? Or are you going to run some of these queries from your portal. Hint: pick the last option.
3. Most database apps only do simple queries. You're right. That's because the average developer wants to keep the job simple, can only write basic SQL, and doesn't have experience with usability.
4. Yep, it can take more memory. Then again, memory's cheap.
> If you're using multiple outer joins for
> anything other than reports, your schema's
> probably screwy.
5. The schema shouldn't be limited by your inability to code multiple outer joins or deal with optional data.
6. See #2 above. The concept of a 'report' being something that somehow is done in other applications is antiquated. Transactional apps have a choice: deliver only transactional views of the data - and force the user to guess what the heck's going on or go to another app, or encompass some basic reporting in the transactional app.
> All that stuffs fine if you're working for the
> government, and they can buy you a billion
> dollars worth of hardware,
> but if you're putting together an app for
> accounting and inventory control for a
> relatively small company, and you're
> using those types of queries, you're going to
> make their hardware scream for mercy, and them
> very unhappy with the speed of your fancy new
> app.
Don't know where to start, but here's a try:
1. Use a real database
2. Tune it right
3. Put it on reasonable hardware
4. Identify the performance needs (based on usability objectives) for each step in each use case. Some queries will have to be lightning-fast, others won't. Learn the difference.
5. Redundancy in the database is your friend, just got to manage it right. It will allow you to take queries you would have thought would be very slow, and run them at blazing speeds. This is also best-practice.
I do this all the time and it always results in fast applications that users *love*. There's no need to limit your use of the database to trivial queries unless you're just prototyping, aren't being paid enough to finish the work, or are using ISAM files.
It's a very elegant formalization. There's no "forall" or "exists", which eliminates many philosophical tangles. Induction is done by recursion, and you have to prove that the recursion terminates by showing that a nonnegative integer metric decreases on each recursion.
Years later, after object oriented programming came out, it became clear to me how to merge Boyer-Moore theory with object theory. Boyer-Moore theory doesn't have "hiding", and it needs it. Shells should have private and public functions, and if an object cannot be distinguished via the public functions, it should be considered equal for proofs that use only the public functions. This allows fixing up the mess with constructive set theory without adding more axioms.
Microsoft has sponsored Universities, and gives out Awards to good students. It's important for the University people to keep good relations with their masters so that the money keeps coming. Philip Greenspun knows this very well, so bashing Java (which doesn't bring in the $$$ to the University) and favoring .NET ($$$ to the University) is in line with the policy of keeping the donors happy.
I would slit my butt-cheeks with a razor-blade and sit in a bowl of rum before I would recommend using it for UI app
Thank you. That's going in my quotefile.
--grendel drago
Laws do not persuade just because they threaten. --Seneca
You jump the wrong way.
.net infrastructure is directed very strongly towards web applications, I would assume that doing such things would also be fairly simple.
I think it is possible that the problems seen in the class that Greenspun mentions says less about Java as a language and more about MIT Computer Science Students. It is possible that the average MIT Computer Science student is just as inept as cs students all over the country.
First, it is a fallacy to think that one semester of Java is going to qualify a person to make a DB backed website in that language. I think it safe to assume that the group using PHP has at least one person in the group that has done just that using PHP. That person is likely doing all the DB coding. I can't vouch for the group doing C#, but since the whole
One major problem that the Java group may be facing is that they rejected J2EE as being too hard. On the contrary, it is meant for exactly the type of applications they are trying to develop. I think they would have saved themselves a lot of headaches by using J2EE instead of JSP and JDBC.
I think that before rejecting Java as a valid platform, Mr. Greenspun should first look at the experiences of the students involved in the course, and realize that the route chosen by the Java folks is actually harder than using J2EE.
IANAL... But I play one on
Really, unless the language really sucks, library availability, quality and pricing are all crucial in choosing what language to use.
Bias : Coming from Perl, I absolutely love CPAN. Readymade libraries that do a lot of the heavy hauling makes sure many hard tasks become manageable.
In the web development world, a good templating engine will gain your productivity. Make sure its caching design and capabilities are good - a proxy server will not save you in all scenarios. At work, we use Mason. I haven't tried the competition, but Mason does the job and those who've tried the competition have seemed pleased.
Stop the brainwash
so a prof is saying that because it is more difficult for his beginning students to use java as opposed to other web offerings, java is not a good choice for building enterprise web applications?
...i think none.
what insight does this give into real-world development?
I thought the only School that sucks was the school in which I studied.Even harvard is in this list.
.NET but that is because of Visual studio not because of C# or any other .NET language. .NET and Java "technologies" are almost identical.
How can they compare PHP with Java.
Java is Slow compared to C++:: Remember no NFL, If you want Garbage collection, Buffer Over flow protection, fine grained security in language then Java.
I agree there is better database interactions in
Comparing Java and PHP is like comparing Oracle and MSAccess.Oracle is tough to use and complicated, it does not mean it is useless.
No, no, you've got it all wrong.
Java is the programming tool of choice for discriminating wanna-be hackers.
}:-)
If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
Sure, and sometimes they result in a 5x or 10x increase in the number of lines required to do something, for no measurable benefits whatsoever.
I guess it just depends on whether your conventions suck because they try to be too clever, or whether they're well thought out and designed from the programmer's perspective.
If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
Hey, I have been saying this since the beginning of Java. I looked at it, tried to get excited about it. Tried to force myself to use it, but found that I was wasting time learning Java instead of getting constructive work done. I couldn't care less what technology comes from whom. I only care about productivity ... getting the job done quickly and easily and easily maintainable. None of which can be done with java.
Maybe you only need an SUV for a 45 degree dirt road, but it would be a mistake to say that the web is a nicely paved horizontal highway. Sometimes you need that SUV (I drive a little Volkswagen, so I wish I didn't need to mention gas-guzzling SUVs to support my argument, but...)
I recently finished (well, is anything really ever finished) a large project using Ruby. I developed my own object persistence and a simple MVC mechanism. It works great, and we got it done MUCH faster than I could have in Java. Now I am going to rewrite in Java, though. I can get Struts and Hibernate for free and they take away much of the effort I spent in Ruby. I get multiple scopes to pass variables around, connection pooling, and other goodies for free.
Sure, ok, I can now get a lot of these things with Perl, PHP, or Ruby now. But I can't easily take my PHP objects out of my web app and use them in a standalone GUI. In mod_perl and mod_ruby, it isn't safe to run multiple versions of the same library, or really multiple applications in the same Apache instance. I could set up jails, but my servlet container already sandboxes my apps for me.
Trust me, I don't love Java. I think it is huge, bloated, overarchitected, sometimes slow, but like I say, sometimes you need an SUV.
(but for your real car get a Volkswagen)
Comment removed based on user account deletion
Thanks, I needed a good chuckle. I look forward to reading about your projects in future issues of RISKS digest.
Yes, Tomcat sucks. Use JBoss. (Or even JBoss with tomcat pre-embedded.) Also, learn how to use Ant. I type three letters and hit return and the system works out all the dependencies, compiles any files necessary, syntax-checks XML descriptors, bundles everything into jar, war and ear files as appropriate (building the jar descriptors for me), and deploys the final single archive file onto my web server. Then it prints out the URL to click to test the result, in case I've forgotten it.
C programming is kind of a bitch if you don't use make, too.
GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
Comment removed based on user account deletion
Enough Said.
- these are not the droids you are looking for -
School projects do not have to be maintainable, scalable, reliable, documented, etc. Real world project have requirements these kids have no idea about (yet).
When the time comes to design a little corporate web site, MySQL and PHP may just be fine. But if the problem involves millions of hits, and back-end connectivity to a legacy system through CORBA, another tool may be appropriate. I find it quite ignorant that Greenspan condems Java without even looking at the project requirements.
Under capitalism man exploits man. Under communism it's the other way around.
Thanks, guys, for giving the Sun E450 (philip.greenspun.com shares that 5-year-old machine with photo.net) and Harvard's little blog server a workout.
Don't assume from my posting that I'm in any personal hurry to learn VB and PHP! But having so many bright young people in 6.171 gives one a fun opportunity to take a high-level look at the programming tools of the moment.
What would I personally prefer to use? The same thing that I would have wanted to use 10 years ago: Common Lisp, CLOS, plus an ML-like type inferencing compiler/error checker. I find this preference, shameful, however, and try to keep it concealed from young people.
Just yesterday I ran into a friend. She's a 23-year-old graduate student in computer science at Harvard. Conversation rolled around to programming tools. Unprompted she said "What I think would be best is Common Lisp Object Systemw with a modern type system". I was stunned. I thought it was only dinosaurs like me that clung to Lisp.
I had a second ephiphany for the week... Believing that Lisp circa 1982 plus some mid-1980s ML tricks thrown in is better than all of the new programming tools (C#, Java) that have been built since then is sort of like being a Holocaust denier.
With Java the programmer is counting question marks in the SQL query and saying "Associate the 7th question mark with the number 4247", an action that will introduce a bug into the program as soon as the SQL query is modified
Hey man, why don't you advise your students not to use inline SQL? As much of a speed improvement as you'd get with Prepared Statements in Java (all those "?"s), why not advise them to use a stored procedure instead?
(Instead of blindly griping about Java.)
I'm a 2000 man.
I still waffle between the two (regardless/irregardless) but I see the latter so often it starts to sink it. I still dislike it and pause for a good minute every time I have to choose.
At any rate, WordNet defines it, although somewhat dubiously. They're certainly not Webster, but are often indicative of general language trends:
irregardless
adv : in spite of everything; without regard to drawbacks; "he
carried on regardless of the difficulties" [syn: regardless,
irrespective, disregardless, no matter, disregarding]
Perhaps it's a flammable/inflammable duality? Perhaps irregardless is "regardlessly regardless"?
Gotta love language.
Sorry to do this to you man, but I can't come through on you this time. :( I couldn't get the extra 5 into my friend in time.
So, maybe we'll run into each other this weekend; if I'm around after the show, I'll give you a call.
Another stupid narrow argument presented by a narrow minded blowhard. Yeah, starting from scratch for a project for an 8 week class, you want to develop some trash code you're going to throw away. However if you want your system to scale, run on a huge cluster without resorting to running to the database for every piece of data, and build up a readable codebase to allow for more than the intial programmer to navigate through the garbage easily then Java is the better way to go. perhaps Java == SUV because it can handle a hell of a lot more load? BillyBobs Fruit Stand e-commerence site might be appropriate for Perl, but Charles Schwab and eBay aren't.
I'm not that old, but in programming, 43 is now ancient.
But I don't think young men fools, because being a young man, I understand that I share the same foolishness.
The primary difference is I *know* I'm a fool; these guys don't understand they are.
I work on a project that has five thousand classes and executes on windows, linux, aix, and solaris. The project has stringent security and performance requirements, and meets all of them. I've worked on large projects in C++, consider myself an expert in C++, and even have a deep appreciation for C++ and acknowledge its superiority in various realms, but I am confident in saying that if my current project had been written in C++ then it would have taken at least twice as long and would still have many more bugs.
- First they ignore you, then they laugh at you, then ???, then profit.
Well, I disagree.
.NET, and Sun are just as ruthless about extracting value--read up on the JBoss/Sun issues, or the similar arguments between IBM and Sun over J2EE. Yet for some reason, Java gets used by programmers who would never consider .NET.
.NET programmers like them... like Web Services for starters.
1. Java has been hyped. Undeniably. LISP has not been hyped--it has been advocated by individuals. There's an important difference. When I see multi-million-dollar ad campaigns telling me how great Common LISP is, you'll have a point here.
2. Graham's wrong here, but his argument makes sense coming from a non-programmer's perspective. In fact, Java has managed to get millions of programmers using proper exception handling and automatic memory management--two major revolutions that should have happened decades ago, but no other language or technology managed to make it happen (outside of narrow contexts like the LISP community, of course). That was a high aim. It's just not something a non-programmer would notice when comparing C and Java code.
3. Ulterior motives are generally a problem because compromises are introduced, and resources redirected, to serve the hidden agenda. Unfortunately, a lot of Java APIs have the feel of something thrown together in a real hurry to counter something Microsoft announced. Plenty of Java APIs are such a botch in their 1.0 incarnations that they get completely abandoned and replaced with a ground-up respecification in 2.0. Even core classes turn out to be fundamentally flawed, and are replaced. Sorry, Vector sucked, we're using ArrayList this month. SAX 1.0 was a mistake, rewrite your code for SAX 2.0. Hashtable didn't work out, we've got something new called HashMap.
4. Sure, people who used to have to use C++ love Java. And people who had to use MS-DOS loved Windows when that was introduced.
5. Maybe you're using Java for the sheer love of it. I'm using it because it seems to be the only viable career path for me right now that doesn't involve whoring myself out to Bill Gates.
6. Java APIs well thought out? Ha! See #3 above. Then look at EJB, where you can't even run the same code on a different container on the same machine! And I just love having no unsigned integers and no integer overflow exceptions.
7. See #3 and #6. Then try using Java to generate the current date & time in the current time zone in RFC2822 format, something which damn well ought to be a one-liner in any Internet programming language.
8. Fact is, Java is just as rigidly controlled as
9. I'm an atypical programmer: I want my code to be fast, compact and bug-free, and I feel ashamed when it isn't. However, I'm aware that I'm very unusual in this regard, and I think that in general, Paul Graham is right--Java isn't aimed at solo hackers. Of course, that isn't necessarily a bad thing.
10. Yeah, this is kind of a weak argument. I could write off countless technologies on the grounds that 'dozers and
11. Plenty of people in the Java community who like the language are nevertheless concerned about what might happen to the language if Sun gets into serious difficulties.
I avoided Java for a long time, precisely because of the stink Paul Graham identifies. When I eventually started using it, I discovered that it did have some advantages. Yes, it's often painful and tedious compared to Perl, and there are a few really boneheaded aspects to it, but it's still a big improvement over C++. For that, at least, I am grateful.
Actually, the big mystery to me isn't the widespread use of Java, it's the widespread use of C++ when Objective-C is available...
GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
So "Jak and Daxter", "Ratchet and Clank" and "Sly Cooper" are all implemented in Lisp? I'm impressed, as they're easily the best 3D platform games available for PlayStation 2. In particular, Jak and Daxter's total lack of between-level loading screens is a beautiful piece of work.
GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
Yes its much more clean for 3 honda civics to drive in tandem than for everyone to pile into a SUV.
Last time I looked SUV has emissions inspections just like other cars....
Sigh. This isn't that complicated. If you're coding enterprise-level web sites (and by enterprise level, I mean you're coding Ebay, not Mom's Apple Pie Recipe Sales) Java is certainly worth the extra effort. You're doing heavy hauling; you NEED an SUV. But you don't need advanced OOP, OOD, strong types or any of the rest of the stuff you mentioned for the typical web site just as you don't need 300HP to haul a trunk full of groceries. Use the right tool for the job. If you're coding small web apps for a living and you're using Java, you're wasting your time and ripping off your customers.
I wonder if Python is not there because
;-(
Zope has won the space that greenspun was trying to conquer with his now defunct ars-digita product/company.
I think it is rather sad also that Python is
not available to be used in the google programming contest. Google uses python heavily throughout their development process. Yet they do not promote it in their contest.
If you use java you are supporting terrorism :)
Maybe title was supposed to be:
Phillip Greenspun, Phd == SUV
8-PP
Funny that he claim a project done in Java would be harder to maintain that PHP or Perl. Some example of his opinion with little fact to support.
In fact, one could make an argument that it is more strongly typed than Java.
Python, however, is dynamically typed. It has its advantages and disadvantages with a statically typed language such as Java.
There are good arguments for using a dynamically typed language in conjunction with doing unit testing which serves to demonstrate program correctness, rather than mere syntactical correctness. Relying on your compiler to save you from a stupid moment (and let's be honest, we all have them) can get you burnt just as easily.
With that said, a strong static typed language does relieve you from many simple coding mistakes, but you should be unit testing in a large system anyway. Let's be hnoest: those sorts of bugs are the easiest to fix in a complicated system. Much more difficult is finding and removing flaws in encoded business logic. No compiler or code analyzer is going to help you there. Unit tests will.
Partisan bickering about typing mechanisms doesn't address the larger issues of software validation and correctness.
no wonder decoding the human genome took so freakin' long!
that Phillip "Greenspun: Java == SUV" is the same as
PhillipGreenspun.says(Java.equals("SUV") == true);
I cut my teath in web programming writing perl and javascript. I then moved on to PHP, and led development of an e-commerce app in PHP (with a little C here and there). Then got thrust into some ASP (ech), before becoming diving headlong into Java. I've never looked back.
Java has drawbacks, but the difference between paradigms such as OO Perl and PHP are so misrepresented it makes me want to cry. As someone who spends a fair amount of time mentoring people in Java programming, I'd like to first support the assertion that nobody learns how to program in college. They learn how to solve algorithmic problems, and maybe know a little about OO.
The strong typing, file-system coupling, and general stickiness and complexity of Java are all _features_ of a language that was developed in response to a concrete need. I love PHP (do my dev for personal projects in it still), but it doesn't cut it for big-iron app development, and neither does (any form of) Perl. I'm in charge of architecture for an online banking system, and I think I know a few things about application complexity and code maintenance- and I'll tell you that nothing beats PROPERLY WRITTEN Java in these categories.
1) You can certainly write working applications more quickly in PHP/Perl if you're a novice. The interfaces are easier to learn, the simple stuff is pushed to the top SO THAT YOU CAN do things quickly and easily.
2) You can do things 'More Than One Way' more easily in Perl / PHP without strong typing and hard-locked OO hierarchies. This is a strength for lightweight development, and an increasing pain in long-term, distributed and enterprise development.
3) Java APIs for simple things ARE often difficult, because they're designed to do more than your casual user needs. Take a look at SAX (interestingly named 'Simple API for XML') if you want an example of an extremely difficult-to-use interface to a common technology. The spend a few years developing and tuning XML applications, and you'll begin to understand why the guys at Sun did it that way.
4) Don't confuse Java development with EJB / JSP development, which is the misguided attempt by Sun to provide a MS-like solution for people who don't know enough to be allowed near the good stuff. THAT is a guzzling SUV, and you don't get nearly enough for the price you pay to run those applications.
5) Anyone wanna compare performance benchmarks? On servers these days where it costs $1000 to get a box with a 2GHz proc & 1BG of RAM? Sure, Java users more of that glut of resources than other languages... because you're paying for two things: platform independence, and JVM-managed garbage collection.
PHP & Perl will always be the kings of prototyping and lightweight application development, but will never be able to compete with Java-style frameworks for long-term maintainability, complexity management, and scalable & distributed architecture.
Sounds like you need to learn when to use === in PHP.
With a dynamic language such as Lisp, PHP, Perl, Tcl, ...
After all these years, he's still miffed that tcl was displaced by Java in his AOLServer. I noticed that none of his students were using tcl either, which must have displeased him greatly.
Binding variables are trivial in Java if you prepare a statement. Here's what Greenspun himself has to say about it:
Note that JDBC, the Java database connectivity library, uses "?" as a bind variable. It is up to the programmer to count the Nth occurence of the ? in a SQL string and bind a value to that. As you can imagine this process becomes error-prone if the SQL statement contains 15 or more variables, a very common situation in real applications. You can also imagine the possibilities for introducing subtle bugs if the SQL query is changed and the bind variable sequence numbers are not properly updated.
So what he's saying then, is that his students are having a hard time counting!
And what's language is the little red tricyle with the bell and the flowery basket?
It would be more accurate to say that it did suck a lot.
JSP was a copy of ASP, created to keep Java as "the web language" and stop the VBScript insanity.
Of course, in the process it copied most of the insanity in ASP, moved a lot of ASP developers with bad habits to JSP, and trained a lot of Java developers into the really bad habits of that type of development.
However, to the merit of JSP, the Java zealots were the first ones to try to fix the mess:
After the first batch of books advocating bad practices, it became common advocated wisdom that application code belongs in Beans and Servlets, and JSPs should be dealt with as cleaner, glorified print-out statements.
Obsessive use of JavaBeans and extensible, Custom Tag Libraries can easily remove most, and often all, of the need for Java code from any JSP application. It looks and feels more like Coldfusion development, which is very nice for HTML interfaces.
And now the Expression Language is essentially a template engine with a scripting language that is not very different from Freemaker et al. The main advantage I see on this is to let you deal with Java code in JSPs not as an aesthetic preference, but as a capital sin (validate the code and refuse anything that has <% or %>).
Now ASP.NET copied most of the improvements and added a few of its own. And the same people who hated ASP find it very appealing now in its new shape.
Perhaps you still would prefer your own TemplateEngine+Servlets combination, perhaps not. But the hacks have changed a lot. They might be worth revisiting.
Freedom is the freedom to say 2+2=4, everything else follows...
Then why use Java (see also post of blibbleblobble).
Perhaps read Lisp as an Alternative to Java to find out that JAVA is not in a position to outdo a programming language with its roots in the 50ties.
CC.
TaijiQuan (Huang, 5 loosenings)
...you dishonest prick! Your article cited problems with Java's interface to databases and the web, and then drew a conclusion about the language itself from that. Nope. Doesn't fly. Does JDBC suck compared to embedded SQL? Yes. Do servlets suck compared to PHP? Yes. Does Java suck compared to C++ or Perl? No. C++ and Perl have had better interfaces written for them, but this has nothing to do with anything inherent in the language.
Don't label something "offtopic" unless you know the topic well enough to tell what's on topic.
No, I'm New Here
The space shuttle!
--
Internet Explorer (n): Another bug -- that is, a feature that can't be turned off -- in Windows.
You're the first post I've seen here to actually describe a PHP weakness explicitly. I'd be interested in seeing more examples if you have them.
"Those who have never entered upon scientific pursuits know not a tithe of the poetry by which they are surrounded."
Sorry! There was an error: Can't find a sub-table named "E:\Program Files\UserLand Frontier\Guest Databases\ops\datafiles\aggregatorData.root".
The error was detected by Frontier 9.0 in mainResponder.respond. Webmaster: weblogmaster@cyber.law.harvard.edu. Time: Mon, 22 Sep 2003 20:25:32 GMT.
If you'd read the line about reports, you'd know that I wasn't knocking reports in general, only reports that only show W in terms of a completely unrelated Z, using outer joins on X and Y in order to relate two unrelated sets. Apples, not to oranges, but porcupines.
Second, I can show all kinds of history without resorting to huge, bloated SQL queries. Simple is elegant, and if you think bad developers prefer simple queries, you're living in a dream world. I've seen sixty-line queries that could shut down 50 node cluster. Most times hugely complex queries are the result of a schema that wasn't thought out correctly.
And memory is only cheap if you're running a few complex queries at a time. If you're running 50 or a hundred, it's not cheap, and if you're running a thousand, it's fricking expensive.
I don't know. I guess my point is that, yea, sometimes you have to use a complex query, but most times you can get by without, and making the extra effort to go without usually has positive performance benefits.
ad logicam Claiming a proposition is false because it was presented as the conclusion of a fallacious argument.
I think Greenspun wrote something similar regarding his Ars Digita University web app class. I don't have the link, but at that time he let people choose either C#/ASP.Net or Java, and his comment was that all the people who chose .Net finished the assignment on time, while few of those who chose Java did.
.Net), I'll have to say that it seems to be both more powerful (in returning some of the C++ features that Java took out) and easier to use than Java, mainly because it feels like it has been reconsidered based on what has worked well and what hasn't in Java.
I've heard similar comments from the software demo guys at a major software company (NOT MS).
Having done client-side apps with C# (not web apps, no ASP.Net, just
Unfortunately, I really don't want to use Windows for servers (clients are okay), so I'm not likely to be able to take advantage of this unless Mono (go-mono.org) succeeds, but I think that C#/ASP.Net is probably a better TECHNOLOGY (though not necessarily better CHOICE yet) for serious web apps than either Java or PHP.
"Those who have never entered upon scientific pursuits know not a tithe of the poetry by which they are surrounded."
SQL Generator? And it handles subselects, inline views, grouping, multiple outer joins, and functions?
Yes, a SQL Generator can handle all of those things, and do so elegantly, and be quick running and easy to use.
I am making such a thing myself. Initially in Perl, followed by a C version. Go to http://search.cpan.org/dist/Rosetta to see it (you may want to wait for r0.18). My time frame is to be mostly done within a few months.
Or - is that too difficult to generate, forcing you to make up for this thru additional application code and reduced application functionality?
All of the other generators I know of have this problem, hence my making of a better one that does not.
-- Darren Duncan
With all due respect, Greenspun's students don't know what they're doing and Greenspun's as clueless about J2EE development as they are (and his ignorance has cost them much extra development time). He writes:
[JSP] still seems to be too complex for seniors and graduate students in the MIT computer science program, despite the fact that they all had at least one semester of Java experience in 6.170.
First off, I bet 6.170 never covered JSPs, so the students are newbies to this and having to pick it up.
Secondly, JSP is for building the presentation layer only and should contain only custom tags and no business logic. As any J2EE developer knows, business logic should be kept in Java and exposed to JSPs via custom tags and servlets. Trying to do it all in JSPs is asking for trouble (as his poor students have found).
I think before he makes any more grand statements about J2EE, Greenspun should learn how to use it.
The Hummer H2....
I foudn this on The blog and thought is was worth
reposting here:
-------
I read with interest the findings of a recent Standish Group report aptly named 'Chaos 2003', which regularly diagnoses the health of IT projects in the US. I was flabbergasted by what I read. Project overruns have increased from a 'low' of 63% in 2000 to a staggering 82% in 2003. Over 51% of these projects are in serious trouble with 15% of them failing outright. And of those that complete, only 52% deliver on customer feature expectations.
Jean-Georges Schwartz
" I've been writing web applications since the late 70s (initially for the NSA before we made it public)"
The "WEB" came into being with the development of HTML. This in turn came out of the CERN physics lab in 1991. But you were developing web apps over a decade earlier? I don't think so!
This analogy would only work if the similarities between 'Java' and 'SUVs' are meaningful, and lead to comparable conclusions. Instead, Greenspun focusses on one aspect of Java, and pulls figures (5 times the expense) out of his ass.
As it stands it's a nice soundbite, but that's all.
Preferences > Homepage > Customize stories on homepage > Authors > Zonk > Uncheck
Yeah Java sucks, but my l33t programming skillz let me code scripts in php/perl/python/basic++/z80 assembler much faster!
Compiling is foolish, interpreters are much better. Let compiling happen at startup time, I just distribute the source code to my applications.
And variable typing == evil. Only weak minded foolz typecast their variables. I like all of the pretty failure messages my app displays!
Sigh. Is it possible that people can write CRAP code in any language? Should some people just be kept away from source code period?
There are a great many people who think that because they can understand a PHP hello world example, they are programmers. You know the type. They're closely related to those who think that because they can install Windoze and establish a network connection they are immediately "systems administrators". There are also a great number of people who rate the quality of their project based upon how many acronyms it involved. "How could it be bad code! I mean I used JAAS, and EJB, and JSP, and JMS, and J2EE, and JCA, and OJB!"
Java is NOT perfect, and I'm not defending Sun. But it stands as what it is: an attempt at a post C++ OO language, with cross platform as a fundamental requirement.
A big chunk of the reason for Java's momentum is that it appears to be a "standard". The introduction of C#/.Net seriously muddies the waters here. Personally, I think C# and Java will beat each other bloody in the world of perception/marketing. The winner? Scripting languages.
Sun has already acknowledged that Java's lack of scripting capability is a major deficit in their current offering and plan to correct that. A while back, Ted Hseih did an analysis of the language market. What was obvious in his results:
Java gained market entirely at the expense of C++
: the market for various scripting languages never budged.
The war between Java/C# means that scripting languages have a chance to improve their standardization. Personally, I think the leading candidates for a new king of scripting languages include Python and Jscript/Javascript. Python is mature and can co-exist with every major development environment out there(Java/JVM(Jython), C#/.NET(still a little weak, but getting there) and Unix/C). JavaScript is a true multi-vendor standard(ECMA) that even Microsoft supports, can be compiled, is assured longevity due to its use in browers-and with stuff like TIBET(www.technicalpursuit.com) is getting some real programming functionality.
Spin me a flash trading app, talking tcp/ip to a trading system which interfaces with an exchange. I love PHP as much as the next guy and yes for alot of its applications java is way OTT, but it allows me to build a system, from infrastructure backward which covers all the system components in a manageable, homogenous way. So if I ask one of my developers to get into a section of it, there tends to be, more visibility as to how something works. C'mon guys, whatever happend to thinking out of the box?
How could this drivel make it on to Slashdot?
A typical article from an old-school hacker not willing to put in the effort to develop reusable components.
To extend the SUV analogy further (not that it's necessary, but I really can't resist), it takes more gas to take off from the red light, but once on the highway you set the cruise control and ride easy.
I might never use Java for something quick-and-dirty, but even Greenspun's example of the difficulty binding prepared statement variables has been solved repeatedly (OR mapping with XML, anyone, anyone?)
I'll start by agreeing that Java is not *the* solution to *any* web application. However it *is* a very good framework for complex applications that need to make efficient use of hardware and system resources, and that need to be developped and run on heterogenous systems. The problem is that 99.9% of all programmers, and visibly Mr Greenspun, don't have a fucking clue about what it is i'm talking about, and really ... why should they? 99.9999% of all web applications will never sustain more than a couple of hits a day, will never live past a year or two, or will never do anything complex. What matters is "how fast can we get this thing out the door". I should know, i've been there. With all this in mind, who cares if your database and filesystem get hit on each HTTP request? Who cares if you can only run your application on microsoft windows while shelling out license fees for each CPU? Who cares if you can only develop your application on microsoft windows, using microsoft software after shelling out developer license fees? Who cares if your application runtime that listens to port 80 is occasionally vulnerable to a remote buffer overflow exploit or two.Those issues are virtually non-existent for most developers. So that's all good. PHP is your guy. Be my guest, use .NET.
So for the remaining few web applications out there that may sustain, say, 5 million unique dynamic page views a day, how do you make efficient use of hardware and network resources? the basic answer is custom caching layers, shared data resources. Use that RAM to its fullest capacity. reduce I/O. reduce filesystem access. reduce database queries. pool those database connections (PHP and most other frameworks do offer built-in DB connection pooling, but it stops here, this is not caching). If something only needs to be looked-up once, or read once, it should stay in memory. period. The Java Servlet container specification which is a *small* part of the J2EE framework lets you do just that: A Java servlet container can run on a single Java Virtual Machine while listening to port 80 for incoming requests. Each request is processed in a new thread. Your caching layer would live in various singleton class instances inside the Java VM, each request-processing thread can interact with the same in-memory caching layer: read data from it, put data into it. Your caching layer can be simple or complex and anything inbetween. You can write yourself, use someone else's or buy a 3rd-party's caching framework. The point is, you absolutely *cannot* do that within a PHP or Perl framework. Because the scope of your runtime in those frameworks lives within a single request. Subsequent and concurrent requests have no way of efficiently sharing in-memory data without going thru the database or the filesystem on *each request*. Again, this is moot for most developers. But a strong in-memory caching layer as part of your web application run-time can go a long way to build applications that scale better.
Building an application "on-time" and "under-budget" as touted by Greenspun must consider many many MANY factors. If you need an application for which you are 100% sure you won't need to scale it beyond its original user load, then taking a bit of extra development time ahead of time to build a more efficient application is prolly a bit overkill.
The other thing people forget about Java is the fact that its run-time runs in a "virtual machine". Provided you have a Java Servlet container implemented in Java that directly listens on port 80 ( tomcat, jboss, etc.), that is, without going thru apache and mod_jk, there is just *NO WAY*, some script kiddie will ever crack your server thru port 80. Why? because in the worst case yeah, they might crash the Virtual Machine. But they ain't going to exploit some remote buffer-overflow vulnerability that'll allow them to instantiate a shell as root. *that* is a latent, potential problem with any unix daemon written in C that runs directly out of the operating sy
Extraordinary Vacations. Exceptional Prices
I see /. is having it's weekly "Real hackers don't like Java" rant.
/. language bigots make me sick.
Give it a fucking rest. Seriously. A lot of people use Java because it is the best tool for their tasks. Likewise, there are many other languages I have used (C, C++, LISP) which are fantastic for different kinds of tasks.
In general I prefer Java because it is quick and painless for solving the kind of problems I'm coding for. Your milage may vary, but stow the continual JAVA IS EVIL crap - it is dull, boring, wrong and monotonous.
There would not be so many Java programmers if the language sucked.
I come from a C,C++ background. I used to do a lot of graphics hacking where C was my weapon of choice for speed concerns. I know about making things go fast. These days, Java and OpenGL meets all my speed concerns, so that's what I use.
If you don't like JSP, don't use it. Note that JSP IS NOT Java, it is a set of libraries you can use - like servlets or J2EE, it is only one of many ways to crack the Web-App nut. But if you find that one way of doing things does not suit you, don't trash the whole damn language.
You
... just a guess.
-pyrrho
I have been running a multi server site with resin for a few years now. I haven't seen any of the versioning issues that you mention, even when I converted from Apache/JServ jdk1.1 to resin jdk 1.3.
I do think that the full 3 tier setup is probably a pain in the ass. Maybe a lot of people are resorting to this complexity without reason.
Moving to a war deployment was the best thing we ever did. We have an ant script that checks out the entire web app from cvs, tags the tree, compiles the app, tests and deploys the war to our staging server.
I have found that Java web apps can be more fragile than say perl/CGI so you have to take care , but the advantages for complex sites outweigh the problems.
Well... that's what happens when you have a high-end hardware company write a programming language: They're drumming up some business!
Social scientists are inspired by theories; scientists are humbled by facts.
...people do. Stupid people.
-pyrrho
Java sucks. Its slow , its all touted "cross platform compatability" is a bunch of hogwash . Sure if everyone is running the same JVM fine , it works . But people dont and Sun doesnt even properly test there different JVMs . They tend to all be incompatability and require little workarounds (hello porting C to different languages) . Java imposes guadafual OO require menets ; sure OO makes sense , but they take it way to far . Then java load times are just plain horrible , and quite often can lead to users just saying "fuck it ; lets try competitor XYZs app" . .
Anyone who uses java does so because they are lazy . Java is for and by lazy programmers who dont even bother to properly make sure things work from one release to the next.
Sun distributed (use google to find it) an internal memo telling its staff not to write important programs in java because it was inherently unreable and unstable
Plain and simple ; Java sucks .
Why waste all this money on processors? Instead let's spend five times as much on development by doing projects in assembly. That way we can spend more on the development CPU power required as well as the office space for more programmers. Don't forget the HVAC costs for those offices. And then add up the increased costs of supporting code that is more difficult to troubleshoot and add enhancements to.
myCategory.getOrders().size();u ests().size();z e();y Category.getOrdersByState(state);
.get() runs a select. This can be lazily cached very very easily (most object persistance frameworks support caching and lazy objects).
myCategory.getReq
myCategory.getCriticalOrders().si
myCategory.getCriticalRequests().size();
m
Or various other ways. The idea is to map the logical functions into the object model so that the code does not have to be concerned with the underlying data model.
getOrders() returns an object that implements List. size() runs a COUNT query.
This instantly allows the object model to fit into your existing programming methods. This means that getOrder() returns a real Java list, just one that happens to transparent run SQL queries on access. It would have all the common functions a List does, size(), iterator(), etc. Depending on the type of relationship.
Yes, this is overhead. However, it's amazing how fast it actually does perform, thanks to intellegent caching which you do not get for free writing raw SQL statements. Caching of course depends on your implemention. Would be hard to cache if you were running a cluster of boxes. You get the point.
Part of your mapping defination is weither or not the getOrders() list should fill on creation of the category, or weither it should fill on access, or weither it should fill in blocks of 10 or 20.
It is big - my family and I are protected
It has a lot of utility in it
If some kid cannot handle / afford one - not my problem
If some asshole thinks of Java as way to script web pages and does not care / understand J2EE and Objects - he just made big unemployable ass of himself.
Java makes my objects sing.
\begin{humor}
That's funny. I had a couple of sophomore co-ops down here at Georgia Tech build a significant J2EE app with JSPs, servlets, and an Oracle back end in a semester. They had only one semester of prior Java experience. Perhaps you should beef up your CS curriculum up there at the "Georgia Tech of the North!"
\end{humor}
In all seriousness, I enjoyed your article. I thought you were too hard on Java, but Java's honor has been amply defended in other posts.
I think you're too critical of your affinity for Lisp. After starting out with Pascal and the C languages (C, C++, Java) and discovering functional programming later in life, I find myself drawn to Lisp (and ML, and
Happy Hacking!
Chris
Well web stuff is a server app. When was the last time you saw an entire PHP web site running on the client side?
Karma: It's all a bunch of tree-huggin' hippy crap!
-
Teaching Computer Science at MIT. How many of you would be asked to teach Computer Science at the most prestigious tech school on Earth?
-
Founded ArsDigita, and wrote large tracts of the ArsDigita Community System in TCL. That company and product became the foundation for many Fortune 500 companies' websites.
-
Through his evangelism, course developments at MIT, and the ArsDigita University, helped to bring web courses like MIT's 6.171 to mainstream university teaching.
-
Wrote two of the best technical books I have ever read, and put them up for free in HTML on his website:
Internet Application Workbook and Philip and Alex's Guide to Web Publishing
-
Created and developed Photo.net, which averages 6 million hits/day. See more statistics here.
The above are why I question the intelligence of people who post comments like: So to answer these supposedly rhetorical questions: We do care about his opinion. He has built more large scale scalable web applications the many of us will in a life time. He was CEO of a company that developed and supported commercial projects for Fortune 500 clients. He has spent the last decade making critical insights into everything. Let's make our own conclusions then.So do you really believe you use Prepared statements to minimizes sql injection. Ever given a thought what's actually happening on the DB-server? Heard about hard-parsing/soft-parsing/no-parsing? I wouldn't like to have you near a real DB.
People seem to say this a lot. I can only assume you're using Java 1.1 on a Pentium-75. Or worse, using Microsoft's diseased mutation of Java 1.1.
I wrote a MUD client in Swing (because I wanted something simple but with my favorite features, and because it was a way to teach myself Channels and StyledDocuments), and it runs perfect on a P2-400 in Win98. I repeat: perfect. No slowdowns. No slow drawing. On a Pentium II.
As usual, most programmers suck and therefore most programs suck. Learn to program well and your Java programs perform well. It really is that easy.
Solution: don't hire inexperienced (err, bad choice of words) -- I mean weak -- coders. Forcing everyone to use a child's language like Java and enforcing getFoo() setFoo() crap anywhere is like forcing me to use training wheels on my mountain bike.
Cool. Show me ( in Java, no JNI allowed ), how to retrieve the free space on a hard drive partition. Let's say the Java app is running under Windows 2000, just to make it more specific.
I can't afford a sig!
We have been trying .Not for 4 months and it sucks bad ...we just wrote the whole app in a month in Java
Seems like this another paid M$ fud on Java like they are doing in Linux
So you don't use the general case malloc() and free()? You have your own case-specific versions? Or didn't you know that malloc and free are tailored toward a general case of memory allocation and alternative version could be much more efficient if the size of the chunks were known ahead of time?
- I don't need to go outside, my CRT tan'll do me just fine.
Ok, that was just so you would look at my post (Java was never designed to do EVERYTHING.. one day this may be different though..)
If people want scripting languages.. Java does that too.. Look into things like WebMacro..
Introspection is one feature that Java/WebMacro handles nicely..
#set $user = $DB.Users.fetchOne("where ID = '7777'")
Name: $user.firstname $user.surname
Email: $user.email
We developed a multiplatform system (originally Linux, now Solaris) that is the equivalent of having a c backend and a php frontend that has no hardcoded SQL queries in its scripting or core levels and handles server high server load on a single machine. This system was written in under 4 weeks, and supports LDAP, JDBC (Any Database). It has connection pools, content management / access control, reporting, threaded handling, caching of data (the list continues)... We did it!
WebMacro, there is nothing it can't do!
In his latest post to his blog, he mentions that what he would like is a Lisp with a more modern type system. I believe this type of language is often called an "object-functional" language. There are some nifty languages out that kind of fit this model, Dylan probably being the most complete one so far. However, it doesn't have a mathematically formal type system like ML, and is missing some new type system features like parameterized types. MIT's Goo system is nowhere near as far along in development, but looks like a logical progression of Dylan (returning to the more traditional prefix syntax) with an infusion of some modern type theory.
A deep unwavering belief is a sure sign you're missing something...
Widespread use of object persistence layer is one key difference of J2EE from other web development languages.
Using these technologies eliminates the famous 'impedence mismatch problem' between OO paradigm and ER schema and you may even develop the whole enterprise ready applications w/o writing a single SQL query.
In addition to MVC frameworks like Struts, WebObject , and etc it's where the strength of J2EE lies IMO.
I prefer the Perl-like approach of having different operators for string or numbers. It reduces confusion, at least for me. Except, that in Perl you keep accidently using the number comparison out of habit. Thus, whatever is chosen for the operators, it should not too closely resemble the current common languages. When using PHP, I tend to make my own comparison functions. Besides, usually I want to trim spaces from the edges before comparing anyhow, so the functions serve 2 purposes. And, you can control type mismatch crash messages better.
As far as the merits of strong typing versus "scripting" (dynamic typing), I think it is personal thing. What F's up person A may not F up person B nearly as much. I myself prefer dynamic typing, for static typing results in too much code. The errors caused by slogging through more code and formalism are greater than the errors caused by dynamic typing for me.
More on my dynamic typing opinions can be found here
Table-ized A.I.
Let me preface this by saying I like Java because I am lazy, but I hate it because like a weird programmer's crack it has rotted my skillz and made me functionally unemployable.
As a former Adobe employee who spent quality time making web applications using: 1) Apple's Web Objects 2) JSP / Tomcat 3) JSP with JBoss / Struts / Tiles / etc. 4) Perl I have to say that I preferred 3. Especially Struts & Tiles which finally got rid of the crap we had to put up with before.
As for database we used Oracle, but we were switching away to SQLServer because of usurous Oracle licensing fees.
What I want to know though, is C# a better glue than Java? Feature wise I really liked it, our Architect liked it, but politically we could not use C# because "ooh, Microsoft made it". Yes that is a stupid attitude but such is life in a big company.
PS: similarly, politics dictated the use of Webobjects. Steve told John: "we _should_ use Webobjects [for our project]". Ugh.
For the curious the project (Adobe Studio) got cancelled, but was live for a year or so to underwhelming user demand (all 25 regulars, hehe, bless ya!).
Well all I can say is I use Oracle for my DB and I have tried with their prepared statements to do SQL injection. Haven't been able to break in yet.
Maybe you have never used prepared statements. You set up the statement before hand, usually hard coded in your code so not a problem. You have established the template for the query ahead of time and it is cached typically in the DB server saving the optimization compilation time.
When you do get around to using the statement then you fill in the fields individually. The usual injection schemes take advantage of the fact that you are concatinating text to build the SQL. In this case you have broken that process and there is not string concatination process, so most if all injection problems disappear.
So what DB did you think was a real DB?
Have you every done SQL injection with a prepared statement that the prepared statement part was not a concatination.
I dont know but other DB's might not do it the same way on the server side. If they don't than that is a problem. But does not seem to be one with Oracle.
That would explain this incredibly crappy troll.
I agree the Java platform currently (in its "standard" form) lacsk entry to mid-level ease-of-use that PHP and other scripting based platforms allow, and also
However, check out WebObjects (Apple's Java SE based Web development and deployment environment). It blows away PHP and the others, and
If it doesn't blow your mind (particularly the DirectToWeb and DirectToJavaClient frameworks) then you're probably dead already
Seriously, check it out (in fact, run don't walk to get a copy). It enables development on Windows and MacOSX and deployment on any Java 1.3.1+ environment (pretty much).
Cheers,
Ashley.
PS I am not an Apple employee although I have done some WebObjects training for them and received educational grants (ie Macs to use in research etc).
Those things sound like stuff you'd write for those useless reports the bosses always want
I don't think you would survive very long in the business world. "Why boss, this report idea is stupid. You don't need it. Here, I will make you a trivariate politronic inventory system instead."
Table-ized A.I.
If you have two UI windows and 40k lines of code, Visual basic is not better. Yeah, doing UI stuff in java isn't all that fun, but if you have a large amount of actual code that needs to be written, or any kind of complex algorithm then you'll probably want to do the UI in VB and the actual 'code' in C#
autopr0n is like, down and stuff.
No, I meant a couple years ago, but it's wonderful I can map memory in Java now. I suppose I serialize my object in there if I want to use it to store an object's properties?
The C/C++ thing, thanks for asking, I say that C/C++ is a single language which is distinct from C and this is because C/C++ is a multiparadigmed language. One of the paradigms is traditional C.
C++ alone is another question. I go by what I see in language benchmarks and note that C++ apps invariably use streamio, I don't. I've used C++ since 1994 and always felt that stream classes were sort of an example of how to make something object oriented, and to make the example succinct, simultaneously acting as an example of how NOT to make one.
I don't like using stream classes to do IO, therefore I must be talking not about C but C/C++. Indeed, you cannot know what kind of language I really use until you know the paradigm I prefer. Do you doubt there is an excellent paradigm in C++? There are paradigms in C++ where you do not use pointers!
This is the scary thing about C++, isn't it? The unknown, it immediately implies that it will be hard to understand, doesn't it? Any ole paradigm he wants!?! Scary.
universal database API: well, I have not worked very much with databases, my work with Sybase gave me the impression that they had libraries for any platform, at least they did the platforms I needed.
Posix threads? GUI? There is a lot of GUI toolkit--- OH. UNIVERSAL!!!! I get it. Show me all the choices Sun has made for me in C++? No they havn't. IBM made XML/XSLT parsers though, except they merged it with Xerces/Xalan now.
RPC? Well, the
was
CORBA... and there
will be
CORBA in the future. But I'm not advocating it. Frankly, I think RPC is not a great thing. Why exactly do you want to impose a function call idiom on a message send, exactly? I mean, messages and function calls can be handled differently with great success, because they are very different things... basically can be well handled asynchronously, messages are by their nature asynchronous. I had to work on a Java application which was using RPC (CORBA actually) and it had a dead lock. It took a while to find it. It was a totally different program with an infinite loop. Because the programmer liked thinking about the message as a function call, ther program had no way to react to a non-responsive application that did not reply to a message. Modern RPC now generally provides a timeout mechanism. So you can handle the call as a message. See, after the time out, what if the application answers... well, the function is over, I'm sorry, too late! But it's really just a message. Handle messages, it's fun. That's my advice.
I do like RPC for desktop plugin type functionality. It's good then because the idea is you are designing for local calling (LPC), and the use of RPC just means that you can actually have plugins remotely located. Cool.
Like a desktop clock that really is the same clock for the whole company ---no, the whole WORLD! Yes, that's it! But if you are designing something meant to be distributed and not provide a single experience like a desktop with remote parts, then it's actually easier to handle communication as communication rather than as a function call.
C/C++ is a Swiss Army Knife because it's multiparadigmed. You therefore have multiple blades, they all work differently.
There are libraries for everything and class libraries for everything you care to name.
Furthermore, these days there is probably an OSS solution that is free as in decently-done, or possibly done by IBM.
Hell, even the creator of C++ thinks there should be a garbage collector in C++.
No he doesn't.
he says:
I'd like to see the C++ standards committee explicitly acknowledge that garbage collection is a valid implementation technique for C++, but I don't want to make the C++ semantics dependent on a garbage coll
-pyrrho
Evil, wicked, twisted porn link in the above! And a vaguely amusing picture of the back of a bare-naked lady including her bare bottom!
Stick Men
Thanks for illustrating my point perfectly. When you get to that kind of a code size, you start needing to actually know what's in a variable. Whether by strict coding standards, or by using a standard language feature, but you do need to make sure which one is a string and which one is an int and which one is neither.
_You_ obviously already understood this. At which point, yeah, I don't doubt that you can write a good program in PHP or any other language. (If not necessarily with the same ammount of effort.)
However, half the blogging monkeys out there who go on a "Java sucks, PHP rules" rant, _don't_ understand this. Their rants are based precisely on "PHP rules because it lets me never declare variables, use them uninitialized, and won't complain when I alternate assigning ints, strings and arrays to the same variable."
Unlike you, they're _not_ using any clever coding standards to overcome limitations. Au contraire, they're happy and proud that they can throw together an unstructured code disaster, without any design work or even without any basic forethought. _That_ is what they like about script languages.
_Your_ programs may well still work correctly at 600,000 lines of code. But try getting one of those monkeys to write a similarly sized program, with their unstructured weak-typed approach, that they're so proud of. I can guarantee that it won't work anywhere near correctly any more. In fact, chances are it won't even work at all.
_That_ is my problem with such blogs/rants. That in the end they're not even about Java vs PHP, they're really just about prototyping vs writing maintainable code. They're judging whole languages and paradigms based on little more experience than throwing together a 10,000 line unstructured spaghetti-code prototype. Out of which 6000..7000 lines are just HTML, anyway. And then extrapolate that experience as, "hey, look how quickly I threw those 5 pages together! This must be the One True Way to program anything. All that structured programming and type checking is just a sucky waste of time."
Which, as you discovered yourself, is just no longer true when you get in the hundreds of thousands of lines range.
A polar bear is a cartesian bear after a coordinate transform.
You don't use prepared statement to avoid SQL-injection. You use it to avoid server-side parsing. Make sure you only call prepared statement once per unique SQL in each physical DB-connection? Quit hard to do if you have a connection pool. But this is the way to go for max scalibility.
To avoid parsing is the number one thing here.
(using bind variables).
Avoiding SQL-injection is just some thing extra you get for free. But this can be achived with
statement aswell.
Doh.
Didn't even read the code...
I feel not unlike a fool.
Stored procs are compiled and optimized at the SQL database level. They offer a public interface to your data. Never send direct SQL code. It is unmaitainable as there is no decoupling between the data and business logic.
The above is so obvious to me I feel that I must have missed why you'd think SQL inside the code is a good idea. Beside using a SQL engine which doesn't have stored procs of course...
If you use Java then you should know a little about using design patterns and using public interfaces. Then you should also know that you should probably prefer PostgreSQL instead of MySQL. Stored procs are simply a must if your application is to grow to any length.
Yeah, so Java's the SUV of languages. No argument there. We've got a big contingent of (Swing) Java developers in the company I work for (MCI... rub it in). It takes them months... years even to put out updates to existing programs.
I, on the other hand (I'm gonna get flamed for this, I just know it) have been using QBasic to build scripts and basic programs and have been accomplishing the same thing in only hours or days.
Yeah, it's antiquated. Yeah, it's sluggish and akward. But it's free and works on the limited machines the company allows us to use.
So, if I were to continue the analogy, QB would be the Vespa of languages; it's slow, doesn't have many upgrade options, doesn't have a big following, and ultra-economical... but it'll do exactly what you tell it to and hardly complains about it.
Last year I was on a project that required 17 Java programmers to complete a 3 month project that could have been completed by 1 PHP programmer and 1 systems programmer in 30 days... why would the company proceed in this manner. 1) its like a new tool-toy, its used for everything even when it should not be. 2) its politically correct. 3) its all part of the marketing campaign that must be one of the most successful in hi-tech...
http://tinyurl.com/odo9 http://blogs.law.harvard.edu/philg/comments?u=phil g&p=1762&link=http%3A%2F%2Fblogs.law.harvard.edu%2 Fphilg%2F2003%2F09%2F20%23a1762
--robin
...Boycott Disney
I have a very good book on my shelf by Greenspun that taught me a lot about web programming, but from a very theoretical view.
At first glance, the SUV analogy seems to make sense, but there are a number of key differences. One thing going for the analogy is the idea that if you're going to get a cup of milk at the street corner, a Hummer is overkill when a motorscooter will do. If his students' project was the equivalent of getting a cup of milk than they were probably in over their head with Java.
Where the analogy falls apart is in the idea that SUVs are loaded with features that aren't really used. True for SUVs, not true for Java. Also, SUVs (particularly the big, fancy ones like Hummer's) are typically for people with lots of dough who don't care that they're not getting their money's worth. (Profit on a Saturn is $300 a car, profit on a high-end SUV can exceed $15,000.) Unlike SUVs, Java can be downloaded and used free of charge. It's available to the masses and, not only that, virtually all of the feature are used to great effect.
I think Greenspun uses an SUV as a comparison because he's (possibly unconsciously) taking a dig at Java. People already have a fairly negative worldview of SUVs. He mentions that his friend with a Hummer got stuck in the desert, indirectly suggesting that this is what happens with Java. The truth of the matter, of course, is that if Java was an SUV, it would not get stuck offroading. It's the one vehicle I'd want to have if I were stuck in the mud.
Maybe Greenspun's rant should be ignored entirely, though, because he says things like:
JSP is fantastically simpler than "J2EE", which is the recommended-by-Sun way of building applications, but still it seems to be too complex for seniors and graduate students in the MIT computer science program, despite the fact that they all had at least one semester of Java experience in 6.170.
JSP is obviously part of J2EE so the sentence fails to make sense. I think he means JSP vs Servlets (or vs. EJBs). He seems unaware that Sun's actual recommendation for web sites is JSP Model 2 (not used in his test.) What distresses me most about this sentence is that MIT CS students have gotten this far and are not using MVC. Something's wrong in their curriculum.
His side rant on binding database variables is also flawed. He's upset about the Java's SQL "PreparedStatements" using question marks for variable binding. Even if he's using JSP Model 1, he still shouldn't be dropping that kind of code in the middle of his JSPs. He should be centering his criticism at the JSTL's SQL tags, where the SQL code should really go.
I think the bottom line is that Sun has spent little effort concentrating on JSP Model 1 and as a result, there is little support from Sun for inlining business objects and database code directly into JSP files. However, they did create a framework that allows programmers to build their own tag libraries. And the tag libraries out there are pretty impressive. Shortly after JSP was released, a vendor rewrote all of Allaire's ColdFusion tags as Java tags. When I read that, I immediately realized that Java was a much better investment of my time than most commerical off-the-shelf solutions.
At what point would you switch from say Jython to Java in your experience?
Thanks!
I'll check into that. Thanks for the info
Ok, I love a good metaphor--- wait, I mean, I even love bad metaphor... but I just don't see Java as the power tools to C++ swiss army knife. I see Java as the kind of quick construction mechanism. Like staple guns, where C++ would be the nail gun.
Regardless, that's probably pushing the metaphor too far. Basically, Java is great if it really is faster to develop or deploy. I have not seen that yet. I've inherited Java programs with bad memory management problems. The code is very C++ like in that I don't see how it's quicker to write than C++. It needs to be compiled. I just don't see the advantage. For me to believe in a VM type solution or scripting language, I need to see the programming metaphor change or at least to see it handle a special problem domain.
I see that java is getting the kind of support needed to support the B2B problem frame. I see how it has things making it nice to develop custom business systems. Not because of Java, mind you, but because of it's standard class system and the support of Sun, IBM, HP, etc. to make it fully featured in that area.
Judging as a language, I don't see the benefits. As a platform... of course I see the massive support and some working solutions which is all it takes to convince me Java is worthwhile.
Where we really disagree is C++ inappropriateness for high level work. I don't believe that. You can have automatic garbage collection if you want, in C++, you can use pointer-free paradigms (though I think that's overkill, best to limit pointer handling, but allow it), you can get as high level as you like.
The only wrench in the works there is that there are too many choices, there are messy and even bad paradigms available in C++. Perhaps it's personal, but I don't mind the jungle. I think it's possible and worthwhile to have a lot of options and have to learn the meaning of each option before attempting to use it.
e.g. if it's a big problem that the C++ stdlib does not have a GUI library... then I'd say, standardize one, you dont' need a whole new language for that, imho.
-pyrrho
ArsDigita was a big scam. It was the typical dot.com embarrassment. Phil Greenspun has a lot of balls to show his face in public (or on the net) after the fall of ArsDigita. My company paid him hundreds of thousands of dollars to make a simple server based on his Tcl based ACS. ArsDigita did not deliver anything and took the money. Turned out we weren't the only customers to get screwed and class action suits followed. Phil Greenspun was ousted. But he got away with the money. Now he can brag about his DA40.
I will always remember visiting one of the ArsDigita branches and was shocked to see the rampant spending (40 boxes of $3000 sun flat panels) and the completely inept employees....not to mention their main focus was to recruit more employees, not deliver servers. The employees assigned to our server project were less than concerned about doing work and very concerned about getting rich. Arrogant as they were, they described their leader, phil greenspun, as a "megalomaniac".
Incidentally, the friend with the hummer to which Phil refers, is weapons collector, Rob Silvers (also inventor of photomosaic.). The same employees described him as "insane".
First - the premise is that it is the fault of the SUV that idiots buy them who have *never* driven further off of the pavement than the sholder of the road. Secondly - as one who has programmed professionaly in Asm, Fortram, Basic (not VB), Pascal, C, C++ *and* Java, IMO Java fills a nitch and does so quite well. That is an OO language that is not tied to the past/hardware/os. I am sure that all of the other various languages mentioned in this thread are *very* cool. But come on folks - they are tools. Get a little perspective! Anyway - Java *is* Cool!