Favorite Classified Ad

This is probably my favorite classified ad:

Wanted: 30 Chinamen and a zeppelin for elaborate practical joke. Can you help? Please call on 07829 821 72

I have no idea what the context was, but it is a great ad.

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();
  }
}

Economy

Heard somwhere:

The economy is so bad, I got a pre-declined credit card offer in the mail.

Minimum Wage and Skill

The minimum wage has increased steadily in the U.S. even as the average skill of a high school graduate has fallen. ~philg

A very interesting thought.  Somehow the skill level of the workers doesn’t seem to come up when discussing minimum wage.

Toothpaste in China

I understand that tooth paste companies have a hard time selling in China because conventional wisdom over there says, “Tigers don’t brush their teeth and look how healthy they are.” Also there is a very different perception of what a “fresh” mouth should taste like. Mint and typical US flavors don’t feel clean. That is why you will find things like green tea flavored toothpaste in China.