rc3.org

Strong opinions, weakly held

Month: May 2004 (page 2 of 8)

Bluetooth superhero

Chad Dickerson’s column in InfoWorld tells the story of how he helped a stranger get their rental car reservation via the miracle of wireless Internet access. The story is more impressive than my summary suggests.

For the person who has everything

Gruhn Guitars in Nashville is selling the most important single guitar in the history of country music for $575,000. The guitar belonged to Maybelle Carter.

Silly Slashdot

Looks like Slashdot got gamed by a Nazi.

Candidate weblogs

A local paper is providing a weblog for any political candidate that wants to set one up. Unfortunately, you have to register to see them. Ed Cone has the inside scoop.

Infectious tie

After reading this, I’m glad my doctor is a woman. Via Follow Me Here.

Java and PHP

So I’m working on two projects these days. The first is an extremely business-logic heavy application. It was originally implemented in PHP, but I’m writing a Web service that implements the same logic in Java. The other is a code review of an EJB-based application. I’m reviewing the source code to find potential security problems, and even though I’ve looked at hundreds of files, I honestly have no idea what any of the Java code is for.

I know that many people love PHP, and for some applications, it’s great. WordPress is a perfectly fine application written in PHP, because it’s all about slapping a Web interface on a database. PHP is great for that. However, implementing even trivial business logic in PHP is rather painful. In my Java version of the application, I access the business logic in the following ways:

  • Via JUnit for unit testing.
  • Using a standard Java application for running batch regression tests.
  • Via a SOAP-based Web service.
  • Via a proprietary Web service implemented using a servlet.
  • From a Struts action. I have a Struts-based Web application that other people can use to exercise the business logic.

Chances are there will be other ways to use the business logic later. I know that hardcore PHP users will tell me that you can do all of those things with PHP, but the point is that doing so isn’t organic to the PHP way of doing things. Thanks to good tools like Eclipse, it’s easy to make some changes to my application, run my JUnit tests from within Eclipse to make sure I haven’t broken anything (and fixed whatever it was that I intended to fix), and then make a build and deploy it to the server. When I run into thorny problems in my logic, I can use the debugger to step through my code and root out thorny problems. For this application, Java is wildly better suited to my purposes than PHP. At the same time, my other project is a useful tonic against Java triumphalism.

The parts of the code base that I’m reviewing that I’ve seen so far are pieces of a massive (thousands of classes) application written to run under IBM WebSphere. It is a perfect illustration of why EJB is a hateful morass. Most of those thousands of classes are various views on the same core objects (granted, in this application, there are many core objects). Even though I’ve already reviewed hundreds of classes, I haven’t seen one yet that has any actual business logic in it. Right now I’m just praying that all of the classes were generated, because I would have jumped off a building if someone had asked me to write all of these files by hand. Reviewing them is bad enough. (I suspect that they were generated, because rather than importing classes at the top, in these files the full package names are used whenever a class is referenced. The package names and class names are very long, but still use abbreviations throughout. That makes the code nearly impossible to read.) I don’t know enough about the code to know how it could have been implemented more cleanly, but there must have been a way. Maybe they should have used PHP.

Food for thought

Body and Soul: And in my thirst they gave me vinegar to drink. A must read post on torture.

Answering the question

Last week, Jim Henley asked:

So the question that arises is, did we, as part of the SAP, torture former regime scientists last summer as part of the WMD search?

The answer, it seems, is yes.

Gmail psychology

Gmail is perhaps the most threading-oriented email client ever. If treats threads of messages as individual items, and doesn’t even give you the option of viewing messages outside the context of their thread. I like this approach, especially for mailing lists. The intelligent grouping of messages means less clutter in your in box, for one thing. I find, though, that the threading has a strange psychological effect on me. Seeing an archived thread that I’m not interested in back at the top of my in box because a new message has been tacked on can be depressing. Most threads I just want to go away, but some pop back up over, and over, and over, with the current count of messages right there staring me in the face. I’m not sure why this haunts mre more than just getting an individual item from a thread in my in box in my old school email client, but it does. It’s like the moments at the end of a scary movie when they guy everyone in the audience thinks is dead rears back up one last time. Maybe they need a command that says, “automatically trash or archive any further emails in this thread,” so that uninteresting threads die and stay dead, at least as far as I’m concerned.

LoveSac.com

Recently I bought a big bean bag from LoveSac.com. I’m mentioning this only to give them credit for their top notch customer service. The Sac that we bought had a red microsuede cover that unfortunately turned everything it came in contact with red as well. I emailed Kelly, LoveSac’s self-described customer service goddess, and she asked me what kind of cover I wanted to replace it and shipped it to me, no questions asked. She told me just to throw away the microsuede cover (or to give it to someone we hate). I doubt I’d ever have cause to buy another bean bag chair, but they’re a great company and I wanted to recommend them. Good customer service is rare.

Older posts Newer posts

© 2024 rc3.org

Theme by Anders NorenUp ↑