2008-05-15

Canned Mistakes for Java

I don't usually like to announce vaporware projects, but I have to get this one out to motivate myself to push it on.

Canned Mistakes are small applications that demonstrate relatively common problems, such as different kinds of memory leaks or unbuffered I/O, documentation on how to diagnose the problems using jstat, VisualVM, DTrace and YourKit, and instructions of how to work around and fix the problems.

Why? To provide a controlled setting for learning and truly understanding situations which, in the wild, have too much pressure attached to allow careful reflection.

Leave a comment if you think of a specific situation that should be covered.

2008-05-12

Catastrophic hard drive failure

Well, that's why you're supposed to do backups. Thinking about doing backups and setting up RAID-1 doesn't actually protect against data loss. Oh well, I didn't lose anything irreplaceable.

2008-05-11

Spring view and resolver for Quercus

I've been playing around with Spring MVC support for Quercus, and gotten a first beta ready for publication. It's missing VFS support for non-unpacked WARs, among other things.

You can get it by running the Mercurial version control application command:
hg clone http://www.gueck.com/hg/p2j

The web interface to the repository is http://www.gueck.com/hg/p2j as well.

2008-04-10

Gastronautti on taas elossa

Gastronautti on taas elävien kirjoissa, ilmeisesti uuden yrittäjän voimin. Laitoin ensimmäisen koetilauksen juuri sisään, pitäisi tulla tunnin sisällä. Katsotaan kuinka käy.

Päivitys: soittivat pariin kertaan kun tilaamaani tuotetta ei ollut saatavilla, ja nyt tunnin ja 20 minuutin päästä toimitusta ei vielä näy.

Tunti ja 40 minuuttia kulunut, soitin tilaukseen ja kuulema kuski on kiinni ruuhkassa.

No niin, ruoka saapui kahden tunnin ja 20 minuutin kuluttua. Pippuripihvi Beefy Kingistä oli ehtinyt jäähtyä, mutta alla olevat ranskikset olivat muuttuneet lämpimäksi massaksi. Kokonaisuuden pelasti pippurikastike, jossa oli riittävästi ytyä.

Tilasin myös pakasteleipomuksia, joista raportoin sulamisen jälkeen.

Ilokseni voinkin raportoida, että Alénin cookiet ovat todella mainioita, ja olisi varmaan pitänyt tilata niitä vähän vähemmän, jo hammashuollonkin kannalta.

2008-04-06

VMware Server 2 beta is now usable

The previous version of the VMware Server 2 beta I had tried had massive user interface problems, but the current version is almost usable. The only ridiculous hoop it forces you through is that you must enable logon as root and set a root password, since modern Linux distributions don't do this anymore.

My OpenSolaris Indiana PR2 image works better with the beta than the current VMware Workstation.

2008-03-27

Amazon EC2 is now ready for production use

Today is the day Amazon Elastic Computing Cloud (EC2) became ready for production use.

Werner Vogels announced the launch of two crucial features: customer-specific IP addresses and geographically spread out sites.

Previously every machine you started was assigned a random IP address, and you had to have your own load balancers, or hope that none of your clients had misconfigured their DNS.

This also gives us hope that we can serve non-US customers through Amazon EC2 someday, as the availability zones can be easily extended to the EU and Asia.

The currently available zones are:
AVAILABILITYZONE us-east-1a available
AVAILABILITYZONE us-east-1b available
AVAILABILITYZONE us-east-1c available


Amazon calls these features Elastic IP Addresses and Availability Zones.

2008-03-21

Mikael's Java library pack

These are the Java libraries I end up using in many if not most of my projects, from the least known to the most popular:

Generic Algorithms for Java (jga) provides really easy tools for common collection tasks. Alas, this great library has languished unmaintained for a while.

Google Collections contains the same kind of functor functionality as jga, as well as useful collections utilities. There is only an alpha release available at this time, and it is unclear to me whether Google is committed to maintaining the library in the future.

Joda-Time lets you handle dates and times in a way that leaves you refreshed and invigorated, instead of wanting to scratch your eyes out, like the standard library date/time functionality. It is in the process of being included in the standard library at some point in the future.

Apache MINA provides nice, just abstract enough interfaces for building network servers for lesser-known protocols, and takes care of the nitty gritty details of the high-performance networking requirements.

Grizzly approaches the same area as MINA from a different direction, and might replace it in my use, especially as it's a part of GlassFish, and thus deployed into production with every GF installation.

Spring Framework does a whole lot of J2EE related gruntwork and boilerplate, saving you the trouble of re-inventing those wheels. Instantly improve the quality of your codebase by telling junior developers to only touch JDBC through Spring. This library is a gift that keeps on giving.

Google Guice provides a subset of Spring's functionality. It has excellent potential, but only a few developers and few users outside Google.