Fighting with computers

Computers are not always friendly.

Friday, June 29, 2007

Hard drive upgrade season

After having passed all the subjects one of my kids was asking for a hard disk upgrade. He wanted to double his 120GB harddisk. I have written before about tools you can use to get this job done, but I am not wise enough to follow my own advice, so I decided to try new approaches to the problem. I will tell you first what did not work:

I started partitioning the drive using fdisk and formatting the new partition using FAT32. My kid's data was stored on an NTFS partition but I thought FAT32 will be ok. Well ... it wasn't: While I could copy all the data the system refused to boot. Rescue disk and FIXBOOT or FIXMBR did not fix the problem, so I ended up thinking XP is not happy booting a large (240GB) FAT32 partition, so I did a conversion to NTFS using CONVERT.EXE having the new drive as a slave one. Conversion was successful but the booting problem was not going away.

Installing Ubuntu and GRUB in a small partition did not help me getting WinXP to boot, though Ubuntu did boot without a problem. I think the problem may be that a system file is not located where it should be so boot process stops.

It was time to try a new approach (not really new ...), so I resized the Windows primary partition (boot partition has to be a primary one) to the same size the one on the old disk and then I did a dd if=/dev/hda1 of=/dev/hdb1 which basically created a one-to-one image. It usually takes a long time no matter how full your filesystem is, however this time was 99% full. At 34MB/s it took less than one hour to get the partition copied to the new disk.

This time the copy booted and worked as expected, but my kid was not happy having a larger disk with a same size partition as before. To fix that I booted the system with Knoppix 5.0.1 (as I did before to copy the partition using dd) and I used Gparted program to get the NTFS partition resized to fill up the hard disk available space. Now it's a 240GB NTFS partition which is less than 50% full and my kid will start the process of filling it up with dubious content. Mission accomplished.

Monday, June 18, 2007

AMPL: A Modeling Language for Mathematical Programming

In my quest to get some calculations done, as it seems my math knowledge is less than good enough, I have had to resort to use other tools I can handle. Serendipity led me to AMPL language developed at Bell Labs (by Brian W. Kernighan et al.).

AMPL is used by Operations Research practitioners to solve Linear Programming problems. But the fact that AMPL is mostly a language to express math problems does not mean it can solve them. If you have a LP problem you can express it using AMPL but you need a solver to actually solve the problem. AMPL can work with may different solvers (some free others are commercial) and the solver you use may also depend on the nature of your problem. For example, your LP problem might have non-linear constraints that some solvers can't deal with.

You can download a free student version of AMPL. You can also obtain different solvers and I am using the free student version of LOQO solver by Princeton's Robert Vanderbei. Another possible choice, without the need of installing any software, is to use the on-line version at NEOS Server, where you can chose among a wide selection of solvers.

But if you do not feel comfortable with commercial software and/or do not want to pay for the uncrippled version there is some hope as GLPK is a subset of AMPL and it is free software. Unfortunately GLPK does not handle the non-linear constraints of my problem yet.

Saturday, June 09, 2007

Meet Processing

The sample below shows a five minutes piece of code that animates a chain made of nine particles linked with springs. Although the inner core of Processing is made in Java, it is a nice tool for people not familiar nor interested on the full glory of details of Java applets but willing to create some graphical software.

Click on the applet to shake the chain ...

To view this content, you need to install Java from

Built with Processing

Joost about to leave beta

I was told about Joost some time ago at the most unexpected place by a person I just met. After having lunch with Alvy (from Microsiervos), Francisco (Mystrands' founder) and Victor Fuente. Victor showed me Joost player on his laptop. It was kind of weird because we were having a drink by the beach and it seems that pub did have an open wifi with a decent bandwidth. I was shocked: that thing really worked quite decently, so I guess the result has to be even better on a standard Internet connection.

You still will need an invite while they are in beta to try it out, but you can register your email address to be paged once the beta is over.

But, what the heck it is that Joost thing? Well ... (in case you are too lazy to click on the link above) ... Joost is a P2P TV tuner software. You can receive a good number of TV stations with a decent quality.

Sunday, June 03, 2007

Reanimating a PSS120

Our old Philips MP3 clock died last week. It no longer works or starts up. In the past I was able to reset the unit to get it back to life, but this time the trick didn't do it. After reading on the net I saw many customers had to return their units with a similar problem, I guess there is a not so weird condition that reset does not cure.

I managed to open the unit without breaking it and I checked the battery that seemed ok. After unplugging and plugging back the battery the unit was working again. You will need the right screwdriver for the task as it has many small screws.