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 .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 “full-blown 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.


After researching how to do bind variables in Java (see the very end of http://philip.greenspun.com/internet-application-workbook/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, Python, 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).

Full post, including comments

Hamas and the New York Stock Exchange

A recent story in the New York Times discusses the old story of Saudi oil money financing Palestinian terrorism.  What’s new is the revelation of the size of Hamas’s budget: $10 million per year.  Hamas is probably the world’s most successful Islamic political organization, delivering on its goals (see my Israel Essay for some quotes from their old Web site), admired by hundreds of millions of people worldwide, and a constant presence on the world’s TV screens and front pages.


By contrast, consider this story on Richard Grasso, who got his buddies on the board to pay him $140 million for his work as a manager at the New York Stock Exchange, 14 times the total annual budget for Hamas.  Hamas had to start their enterprise from scratch and develop it in the face of opposition from the heavily armed Israel Defense Forces.  Grasso inherited a #1 position in a market with little competition and a smoothly functioning organization.  Members of Hamas risk their lives every day in their efforts to kill Jews and eliminate the State of Israel.  Grasso took no personal or financial risks, only showed up every day and collected a paycheck once every two weeks.


It seems that Grasso has now resigned and the NYSE is casting about for his replacement.  Why not draft some managers from Hamas to head up the NYSE?  With a tiny percentage of the budget that Grasso required for personal walking-around money, Hamas is steadily defeating a state of 6 million people.  Imagine what these men could do for the NYSE.  The AMEX and the NASDAQ would be liquidated (perhaps literally).


[Some might take issue with the implication that Hamas is more successful than Osama bin Laden’s Al-Qaeda.  Al-Qaeda has managed to kill more infidels, notably in the September 11, 2001 attacks, and has widespread popular support worldwide.  Hamas, however, has managed to preserve effective sovereignty in its territory while Al-Qaeda provoked a U.S. invasion, indiscriminate bombing, and the killings of many thousands of its members.]

Full post, including comments

Real estate prices killing CD sales

Went to a party last week in Boston’s North End.  Most of the folks there were young people who work for airlines.  This is a prime demographic for the music industry.  Yet they were not playing CDs.  A tiny apartment in Boston costs $2000/month.  This has dual effects:  (1) young people have no money to buy CDs because it all goes to their landlords, and (2) young people have no space to store CDs because every square inch of their apartments is already devoted to something more essential.


Had these folks given up on music?  No!  They were paying for digital cable TV, which includes 50 channels of commercial-free music at no extra charge.  They’d hooked up their cable box to their stereo and were happily flipping among the stations.


One flight attendant, a vivacious blond Floridian, said that she had a lot of music on MP3.  She doesn’t like computers, though, and hadn’t downloaded anything from the Internet.  Her brother had a big old music collection that he had ripped onto his computer.  Periodically the brother would select some material for his sister and transfer it onto her MP3 player.


The CD celebrates its 21st anniversary this year, having been introduced in Japan in 1982.  It is tough to milk $billions in profits from a 21-year-old product that has never been improved, especially in a First World economy where things like digital cable TV are developed and marketed.  We really should give the record company executives credit for being grandly ambitious….

Full post, including comments

Democrats committing political suicide with gun laws

Talked briefly over the weekend with Chrissy Gephardt, daughter of Democratic Presidential candidate Dick Gephardt.  She is working for her father’s campaign so I tried to offer at least one helpful suggestion:  “You dad doesn’t have a prayer unless he becomes a pro-gun Democrat.”


Why does the rabble vote Republican?  This question has been looked at in this blog before, in the posting entitled “Democrats = mediocrity; Republicans = lottery ticket”.  It might be too much to ask Democrats to give up their devotion to mediocrity and pandering to public employee unions.  But shutting up about gun laws would be a small change that would yield an enormous number of voters.


Why are gun laws so important?  Consider Johnny Paycheck.  He has no freedom of speech, at least if he wants to keep his job.  He has no freedom of action; a hierarchy of managers tells him what to do all day every day.  Johnny Paycheck has no wealth; all of his income goes for rent and payments on his SUV.  He has no pension; his retirement mutual fund is being eviscerated by managerial looting at American public companies.  Johnny spends about 40% of his income on various taxes so that rich people don’t have to pay taxes.


Why does Johnny support the Republicans then, the party of corporate looters and tax cuts for rich people?  He expects rich people and the government to take away all of his money and freedom, regardless of which party is in power.  The difference to him is that the Republicans will allow him to keep his gun, the one shred of personal dignity that he has left.  The Democrats want to take away Johnny’s gun, his last vestige of personal freedom and manhood.


Perhaps if gun laws made a difference alienating half of America’s voters might be worthwhile.  It would be nice to strip America’s underclass of their ability to perpetrate violence.  But the gun laws proposed by the election-losing Democrats are feeble pathetic measures that serve only to annoy gun nuts.


You can have a powerful semi-automatic rifle… but it can’t look exactly like a military “assault rifle”.  You can get a machine gun but you need to fill out some forms.  You can buy a pistol but unless you fill out the right forms you can only kill 5 people with it before popping in another magazine.  These then are the achievements for which the Democrats have sacrificed their relevance to American government.


Gephardt’s Web site doesn’t put the harassment of gun lovers #1 on his agenda but it is there and that is enough to lose him any election.  His charming daughter is clearly ready to follow him into politics because she managed to ignore the idea without anyone liking her less…

Full post, including comments

Barbie is the key to everything

The Saudis have figured out that Barbie is a major cultural force (story).  An American woman a couple weeks ago was equally clued in.  We were talking about the best environments for teaching children to program computers (perhaps a questionable project these days, rather akin to teaching children other Third World skills that are irrelevant in a developed nation, e.g., soaking manioc).  She was an expert in the area and it seems that no progress has been made since Logo (1970s) and that, in any case, hardly any kids were learning anything substantial about programming.  Such kids who were doing anything with computers were mostly boys.  She observed “I hate to say this but what we really need to get girls excited about computers is a Barbie programming language.”

Full post, including comments

fat, dumb, anti-depressed, but not happy?

Here’s a curmudgeonly article from Orion that claims that one-third of Americans are on Prozac-like antidepressants.  Yet not everyone walks around with a smile on his or her face.  Why not?  The author ascribes our malaise to spending too much time driving alone in our SUVs to Starbucks compared to Europeans who walk to gatherings with friends.


(Question for the comments section:  Do we believe this statistic that 1/3rd of us are on happy pills?)


[Wow, this sure got a lot of comments.  It does seem that the 1/3rd number is a vast overestimate (sadly for shareholders in drug companies).  Pilots at least are safe from pill-pushing shrinks because the FAA won’t allow anyone to fly who is on antidepressants (http://www.aviationmedicine.com/psych.htm).]

Full post, including comments