Posts

Showing posts from September, 2008

New VMware vmplayer installer for Linux

Image
Since yesterday vmplayer 2.5 is out for free download. One of the tools missing in Ubuntu 8.04 was this (IMHO). Of course it was possible to install it through a more entertained process. I was surprised that VMware was not offering an easy alternative to the huge Ubuntu user base. Today I've learnt that current version is distributed with an easy (should I say Windows-like?) installer. Download the software package with .bundle extension chmod +x VMware-Player-2.5.0-118166.i386.bundle sudo ./VMware-Player-2.5.0-118166.i386.bundle Done! Thanks VMware!

Reasons not to upgrade a G4 iBook

Years ago we bought one of the latest G4 iBooks as a bit later Apple started using Intel processors. The 12" laptop served us well but now battery and hard disk were dying a RAM was just 256MB. Acting against my own advice I decided to upgrade the system instead of buying a new one. Buying RAM was not easy as mini DDR 333Mhz RAM was not popular anymore. Luckily I bought it second hand from a friend. A new battery was required to get more than one hour of autonomy again, so I bought a new battery from a Chinese source on eBay. So far so good. I knew that replacing the hard disk would be a real PITA but I fell short. I bought a 160GB 2.5" on the local shop for less than $90. I would say that physical replacement is not something you will enjoy doing more than once in a lifetime but I got the job done with only one screw missing. I had to reopen the thing because I forgot to put back the standby magnet, it was not fun. So once I thought everything was fine as the new hard dri

Sterling numbers of the second order

Image
I am sure once in a while you may have faced the problem of distributing n elements into k different groups. It does not seem rocket science but, do you know in how many different ways it can be done? Of course it is not a new problem a all, and here is where the Stirling numbers ( of the second kind ) come in handy: they tell you the ways of dividing n elements into k groups. For the Code Jam problem "Square Fields" large dataset the numbers may seem discouraging as the number of alternatives for 15 elements are: S2(15,1)=1 S2(15,2)=16383 S2(15,3)=2375101 S2(15,4)=42355950 S2(15,5)=210766920 S2(15,6)=420693273 S2(15,7)=408741333 S2(15,8)=216627840 S2(15,9)=67128490 S2(15,10)=12662650 S2(15,11)=1479478 S2(15,12)=106470 S2(15,13)=4550 S2(15,14)=105 But for the small dataset combinations are just a few after all: S2(7,1)=1 S2(7,2)=63 S2(7,3)=301 S2(7,4)=350 S2(7,5)=140 S2(7,6)=21 So brute force would have worked nicely for the small dataset case but not so for the large one.

Feeling of frustration

Image
I joined yesterday a CodeJam practice session. It seems Googlers were fine tuning the contest site for the onsite finals to be held soon. Problems were (or they look) easy but a combination of stubbornness and not thinking before coding let me in an embarrassing position (the best thing I can say I was not the worst player). However I failed to see the very easy relationship on the number of black balls (odd/even) and the final output of the Old Magician problem (too late I found out that even black balls lead to a WHITE result, BLACK otherwise and UNKNOWN was just a distraction). The square fields problem looked very much like a k-clustering problem, but here the clusters are all same size and square shape. You have to answer what is the minimum size of the squares to get a partitioning on exactly k-clusters. I can tell you how other people solve it, but you can read this by yourself. Instead I'll tell you what won't work: My first idea was to use java awt library and Rectangl

New Arduino form factor

Image
A couple of new versions of Arduino boards can be found on Arduino blog: the Arduino Pro and the Arduino Pro Mini (depicted here). Both work at 3.3V and I think that makes them ideal for battery-powered applications. In my case I'm going to create a small circuit to interface the Mini to an XBee wireless module to create a smallish wireless sensor. Hopefully I'll get much longer operation times than those Rob Faludi measured with Diecimila and XBee shield.

Klondike with a twist

Image
Before Windows I've never played Klondike (aka Solitaire). I do not like it very much as many times I've got stuck so I do not play it very often. This time roles have switched and I find myself writing code to play the the game: There is an ongoing TopCoder programming contest where you are asked to write the "game logic" code. I am a poor Klondike player and it shows in my code. There are many pages out there with guidelines on how to play it well, but sometimes the rules are too high-level . To make things worse the game is known not to be solvable in some cases . Competition will be open till September 10th.

It was about time

I've waited till the end of my holidays to upgrade the operating system of various of my computers. I was happily running Ubuntu's Gutsy (7.10) and I'm upgrading to the new Hardy (8.04). Actually it is only one month more for the new version to be available, but this time I did not wanted to upgrade in the middle of the semester. Contrary to other times, this time I decided to do the upgrade using the embedded upgrade feature of the system updater. My conclusion is that, as usual, it is a risky proposal: My laptop froze when updating the locales (a known bug as I found out later) but killing locale-def allowed the process to come to an end. Lately the system healed itself and everything seems to work as expected now. A minor complain is that now the system takes a few more seconds to wake up from suspend. On one of my desktops the experience was different but not fault free: No complains or hangs on the locale but an error message about not being able to install linux-ubunt