24 December 2008

Life as a tool junkie

Is the ultimate goal in life to get the must stuff or to use the most tools? Tools of course! ;) And by tools I mean programming related tools and frameworks.

Today I browsed the web in search for a tool or framework to use as a view, in a MVC-based spring servlet. Normal JSP code is not the easiest thing to code when you want to build a dynamic website (the definition of a dynamic website is: "Whooosh! Now it's there, now it's not").

The closest thing I've got is the Google Web Toolkit (GWT). Altough GWT has some drawbacks when it comes to integration into an existing site it is quite nice to code Java-like code and then compile it into Javascript.

22 December 2008

Loosing idle Putty sessions

I've never had problems with loosing ssh sessions with Putty until I installed a new version of Putty. I don't know if there has been a change in recent versions that affect keep alive. The solutions to the problem is to enable application level keepalive packets (not to be confused with TCP level SO_KEEPALIVE). To enable it enter a value in this field (I used 300 sec = 5 min):

20 December 2008

Howto install Windows XP with a RAID configuration

I have bought new parts in my computer. I bought a ASUS P5E-VM DO motherboard. I also bougth two hard drives since I wanted to configure a RAID system. The motherboard uses Intel ICH9 chipset (actually ICH9DO) for controlling the external IO (read: hard discs).

It was not trivial to set up BIOS to enable the drives in a RAID configuration since the mother board manual was not very helpful. It turned out that I first had to set SATA configuration to "RAID" in BIOS and then save the settings and continue the boot process. Just after the memory check a message flashed: "Press Ctrl+I" to configure RAID. It is a special configuration utility to configure RAID level and witch discs to include in the configuration. I configured RAID level 0 (striping)

When trying to install Windows XP I run into some trouble: Windows XP installation program cannot detect my RAID configuration. It turns out I need special RAID drivers on a 3.5 inch floppy drive. (Yeah a real floppy drive, no flash memory stick or CD-ROM would do). Since I did not have a floppy drive I ran into some trouble. After surfing the net I found I way to overcome this problem.

First I needed the RAID drivers from Intel. The drivers are packed into what Intel calles 32-bit Floppy Configuration Utility (f6flpy3286.zip). I downloaded this zip-file and extracted it to a folder.

Second I needed the nLite program. It is a very usefull program to customize a Windows XP installation disc. I loaded my original Windows XP disc into nLite. Then I integrated the downloaded drivers into a new Windows XP installation disc with nLite (to a local folder). nLite can then produce a bootable ISO that I burnt to a CD. So I got a brand new Windows XP installation CD integrated with my RAID drivers and it worked!

If you have a real floppy disc I guess that you can put the drivers no the floppy disc and press F6 during the Windows XP installation to load the drivers from the disc. But with my new CD there was no need for the F6-stupid-floppy-disc-press. I've heard that Windows Vista installation program has better suport for other medium (that is USB memory stick).

19 December 2008

Beware of Mysql Connector/J thread unsafeness

This week I ran into the problem of strange NullPointerExceptions from Mysql Connector/J. It turns out that (and I probably already knew this but had opressed it) the connector is not thread safe. That is on java.sql.Connection object should only be used by one thread at a time.

I though I had found a bug and submitted a detailed bug report (http://bugs.mysql.com/bug.php?id=41628). The helpful crew a Mysql told me that it was supposed to work in a thread unsafe way.

So what is the story here? Well in a real production system is is always good to use a real Connection Pool. I've tried the c3p0 connection pool (http://sourceforge.net/projects/c3p0) and configured it to max 1 connection.

Why I started a blog

I read a question on Stack Overflow (http://stackoverflow.com/questions/8921/how-can-you-tell-whether-youre-ready-to-start-your-own-blog). It got me thinking that it would be a nice idea to a have blog so I can evolve. Mainly evolve in the area of software development that is.

A blog could probably make me formulate my thoughts and problems so I can see new solutions to my development problems.

The language of the blog was English. I'm from Sweden so I could have chosen Swedish. But software development is English centered science and I need to practice my English writing skills (good thing I have spelling in the web browser...).