rc3.org

Strong opinions, weakly held

Month: July 2004 (page 7 of 8)

More on PHP vs J2EE scalability

Ian Kallen weighs in with his thoughts on PHP vs J2EE when it comes to scalability. He points out that most performance issues with Web applications stem from mistakes that can be made with any platform.

Update: More from the PHP side of things. Here’s Jeremy Zowodny arguing against using database abstraction layers in PHP, and instead using the DB-specific functions and wrapping them in a DAO (data access object) layer, although I doubt that’s what PHPers call it. In the Java world, I’ve become a big believer in the use of persistence layers (or at least Hibernate) over JDBC mainly because it’s a huge savings in terms of lines of code that you have to write. Since I’ve been trying Spring, though, I’ve decided that abstracting away Hibernate with Spring and a DAO layer is the way to go. I’ll probably change my mind again soon.

Two big numbers

So, two big numbers were reported today, and I’m not sure which is more impressive. The first is that Technorati is now tracking 3 million weblogs. I would conservatively estimate that this site was in the first 50, or maybe 500. Astounding. The second is that Wikipedia is up to 300,000 articles. The Encyclopedia Britannica contains 85,000 articles. And the articles are no joke, either. I can’t remember the last time I wanted to know more about a particular historical topic and didn’t get some useful information out of Wikipedia. The first generation of dot coms may have blown up, but the user-made web is growing faster than ever.

Love the book? Hire the author

In my previous post, I mentioned Joshua Bloch’s book Effective Java, which should be on the bookshelf of any Java developer. The Server Side reports that Bloch is leaving Sun for Google. I had heard that Google hands a copy of Effective Java to every Java developer they hire, so it makes sense that they’d bring on the author.

Exploiting your own weaknesses

Recently I’ve decided to give up computer games for the most part. I’ve been a huge fan of computer games since before I even got my first computer. Before I had a computer I went over to friends’ houses and played games on their computers. I can remember visiting a friend’s apartment when I was in college, and his showing me the game Civilization for the first time. I played for like 6 hours straight, completely tuning out the world. Not healthy. Anyway, what I find is that when it comes to computer games, I have an addictive personality and that more than getting joy out of them, they mostly trigger compulsive behavior that prevents me from doing stuff I enjoy more, like hanging out with my wife or going to the movies or reading books, and stuff I have to do, like get my work done.

What I’ve recently discovered though is I can exploit this compulsive aspect of my personality and use it to my own advantage. For example, anything that feels like the sort of game that I get addicted to triggers that same compulsion. For example, I’ve learned that I work best on projects that have a bug database. I find that I’m more motivated if I can get the psychological payoff of fixing bugs and seeing my bug count go down. By the same token, at my job where we review code, I found my productivity went way up when they added a graph to our code reviewing tool that shows how much progress each member of the team has made on a graph. The scorekeeping really helps keep me focused.

Once you become an adult, these sorts of weird personality quirks are pretty much hard wired, I think, so your best bet is compensating for them rather than getting rid of them.

I’m a flip flopper

I’m sympathetic to John Kerry when people call him a “flip flopper.” As an example of my own pathalogical flip flopping, look at my plans for this very Web site. Awhile back I said I was considering migrating to Movable Type. I installed Movable Type, I wrote a script to import my archives into it, and then I started hacking on the templates. Then I stopped and decided to just stick with what I have. A few weeks ago I decided to migrate to WordPress. I started hacking on the templates and working on an import script, then I stopped. My latest idea is to write a replacement for this package in Java, using Hibernate and the Spring framework. It’s going pretty well so far, and I have to say that from what I’ve seen up to this point, Spring is amazingly cool. Who knows whether I’ll finish the project, but if I do, I’ll stick it up on Sourceforge — I still have a project set up that was originally for the Perl/PHP stuff that powers this site. For my primary purpose — getting a feel for how Spring works without doing irreparable damage to the real projects I’m working on — the weblog software project is going great. The data model is based around the Atom API. I figured other people have already been doing the heavy lifting when it comes to weblog software data models, so it’s easier just to build on their work.

As far as the Spring framework goes, there are a couple of things that stand out as huge wins right off the bat. The first is the wrapper for Hibernate. I thought Hibernate was already pretty clean as far as APIs go, but Spring makes Hibernate even easier to use. I recently read Effective Java by Joshua Bloch, and it led to a total rethinking of how I think about checked exceptions (versus runtime exceptions). Spring’s wrapper of Hibernate turns a lot of checked exceptions into unchecked exceptions, making things adhere more closely to my thinking on how exceptions should work (more on that later, along with a review of Effective Java). I can also vouch for the degree to which Spring eases the development of unit tests. I can already tell that this application is going to be much more suited to full coverage with unit tests than an application I’ve ever worked on, and that’s due to the architecture that Spring encourages. Overall I’m very pleased, and I expect to add Spring to my standard set of tools immediately. I haven’t explored the Spring MVC features yet, so I can’t tell how well they compete with Struts yet.

Bloglines updated

Bloglines has been redesigned. There are definitely some nice changes, including the ability to publish items to a links-style weblog as you read them. I’m not sure I’d use it given that I already have this site and my del.icio.us account, but it’s a nice addition either way.

A problem with few solutions

If you want to make yourself a bit sick, read David Remnick’s New Yorker article on the political situation in Egypt.

Optimism

Anyone else think that John Kerry has chosen John Edwards as his running mate in large part to counter the current Bush campaign accusation that Kerry isn’t an “optimist.” I guess the whole flip flopping thing is old news now, because it seems like since Ronald Reagan died, Bush and company have been roaming the streets telling anyone who will listen that they’re optimistic and that Kerry isn’t fit for the Presidency because he’s too pessimistic. Needless to say, John Edwards’ perpetually sunny disposition will certainly add an air of optimism to the Kerry campaign — Edwards seems to have a knack for appearing cheerful and hopeful even when he’s going on at length about just how screwed up the country currently is. In any case, I’m glad Kerry chose Edwards, I think he’s better than any of the other options, and I’d like to see him get another shot at a Presidential nomination down the road.

Update: And to add just a note of puzzlement, is anyone else baffled by the Republican strategy of pointing out that Edwards was Kerry’s second choice behind John McCain? I’m not sure how crowing about the fact that John Kerry, accused of being a typical Massachusetts liberal, wanted to include a moderate Republican on his ticket is productive for the Bush-Cheney campaign. “In this era of increasingly polarized politics, that rotten John Kerry wanted to work with Republicans! What’s wrong with that guy?” Umm, OK. (For what it’s worth, I thought a split ticket was a bad idea and I’m glad that Kerry and McCain didn’t wind up on the same ticket. I like John McCain, but I’m perfectly happy with him where he is.)

PHP vs Java in terms of scalability

Chris Shiflett discusses the news that Friendster has dumped J2EE for PHP to achieve better scalability. The bottom line is that you can write large scale apps in Java or in PHP. I’ve seen plenty of examples of both.

Should Sun open source Java?

It sounds like the official debate over whether Sun should open source Java was interesting. I would have like to have attended Java One just to see that. I give kudos to Sun for putting on such a debate in public.

Older posts Newer posts

© 2025 rc3.org

Theme by Anders NorenUp ↑