Hudson EC2

Hudson is a continuous integration server that will watch a source code repository and automatically build and test the code whenever it is updated. There is an interesting plugin that lets it integrate with Amazon EC2. If you need more server resources to build and test the software, Hudson will simply bring a new instance up on Amazon, use it and then shut it down.

Since the actual source code in a project is typically not going to require much bandwidth to move around, this would work a lot better than trying to use EC2 for other on demand applications–like video rendering that are both processor and bandwidth intensive.

Tapestry Run on Startup

Tapestry has an @Startup annotation that allows you to mark items in your AppModule to run them at startup.  Here is an example.  I needed an application to check to see if there are any users and if not, add one.  The code below does this. The only difficulty was getting Hibernate to commit the transaction. Tapestry uses a HibernateSessionManager.  Once I had a reference to this, I was able to commit the transaction.  The @CommitAfter annotation does not work within the AppModule.

@Startup
public static void createAdminUser(Session session, HibernateSessionManager hsm) {
  //figure out how many users are contained in the system
  int numberOfUserAccounts = session.createCriteria(User.class).list().size();
  //if there are no users, go ahead and create the admin user
  if(numberOfUserAccounts < 1) {
    User user = new User();
    user.setUsername("admin");
    user.setPassword("adminpassword");
    user.setRoles("user,admin");
    session.save(user);
    //commit the hibernate transaction
    hsm.commit();
  }
}

Blackberry Torch

The Blackberry Torch looks like a nice form factor for a phone. I like the idea of a larger screen, but I’m not willing to give up a real keyboard to get it.  This looks like the best of both worlds.  Unfortunately it is only going to be available for AT&T at first. It looks like this is mainly aimed at getting a phone to compete with the iPhone.

Here are a couple of the hardware highlights:

  1. 5 Megapixel camera
  2. Slideout QWERTY keyboard
  3. Wifi
  4. GPS

Not only is the Blackberry Torch phone new, but the operating system is new as well.  It sounds like it will be pushed out to other phones in the future, but the curve line of phones doesn’t appear to be on the compatibility list.  This seems a little odd considering that the track pad version of the curve is something like a year old.

The operating system on the Blackberry Torch seems to be targeted at “social functions” (like everything these days). The browser looks much more like what is on the iPhone and similar to what Opera is like on current Blackberries.  It allows for the multi-touch style UI where you can pinch and unpinch to zoom.

Tumblr vs. WordPress

Brett Kelly has a post about why he uses Tumblr instead of WordPress (or something else) for http://nerdgap.com.  Here are a few of his major points:

  • Tumblr is hosted so he doesn’t have to mess with the server or install.
  • Tumblr limits what he can do, so he has to focus on the content instead of fiddling with other stuff.

It is an interesting read.  As someone who started off using TypePad for Productivity501 because of his first reason, I’m not sure he’ll feel the same way a few years down the road when reason number two starts really limiting what he can do. I finally bit the bullet and got some really good (and expensive) hosting in order to not have to worry about the server side of things.  Like Brett, I’m perfectly capable of managing my own server, but it can be a huge distraction from writing.

Still, I’ve found it very useful to have the flexibility that I get from a self hosted install of WordPress.  Brett is basically saying that “content is king, so lets eliminate anything that distracts from great content”.  I don’t agree.  Content is very important, but it is just as important to do intelligent things with your technology.  In fact, the revenues from two of my sites have gone from paying for a couple bills to paying the mortgage, taxes and insurance on a 4,000 square foot house when I stopped focusing so much on content and started trying to be smart about how I used and customized the technology.

I want to checkout Tumblr based on Brett’s recommendation, but I still think that the flexibility from self-hosted WordPress is very necessary if you want to turn a blog into a significant source of income.

Good and Bad Programming Languages

Often when someone says a particular programming language is bad, they are referring more to the common practice associated with that language than the language itself. Many times they are really complaining about their own poor programming habits more than the specific language. Sometimes these habits are shared by the entire culture built around a particular language.

Perl is a good example of this. People complain about how difficult it is to read and then proceed to write awful unreadable code. Perl can be very readable, but its terseness makes it easy for people to write huge lines of code that do 10 or 11 different things. You can do the same thing in Java, but most people try to avoid a single line that is 500 characters long because it is a pain to scroll back and forth sideways to read the code.

Sometimes the lack of a particular restriant can inspire horrible code.