Month: February 2008

Fedora Core 8 audio

Fedora Core is supposed to be “bleeding edge” technology. What you may not expect is that it puts the edge while you provide the bleeding. Suppose you want to write an audio application, something simple, gathering audio from a microphone and feeding audio to a speaker. How could it be a nightmare?
Quite easily it is right from the beginning. How many audio API does linux have? Two? Three? Well, I counted seven – OSS, alsa, jack, esd, pulseaudio, openAL, gstreamer. You may argue that not all these APIs are on the same abstraction level, yes, I agree, nonetheless you have to decide what to pick and hope that the API you picked is widespread enough among your target customers.
I had some legacy code that relied on OSS, so I stuck with that. Knowing that Alsa was the answer to OSS, I tried it out and I left wondering which was the question. Alsa is significantly more complex to program than OSS, the bare minimum playback code is longer for ALSA than OSS.
So I gave up with ALSA.
Next problem is when I tried my legacy code on the brand new Fedora Core 8. The microphone seems not to work. I tried the command line OSS test with:

 # cat /dev/dsp >/tmp/foo

just to discover that no audio was collected.
After some twiddling and after having tried the canned solutions I found without success, I decided that I need another distro to test my code.
This time too, as soon as I find a solution there is a new problem ready for it. Fedora Core 8 uses logical volumes, so it is not straightforward to shrink them from say Debian install. In order to resize a logical volume, first you have to unmount the partition in it, resize the partition, and eventually shrink the logical volume.
You can’t do this on the default install in a running system because there is just a single partition with the whole system (but “/boot”). You can’t do either from the Debian install because “etch” doesn’t manage logical volumes.
Third approach I went for another PC-like device we are developing for a customer. Before doing anything, I tested the OSS driver on this box and it worked, so I downloaded my code and … “error: missing libSDL”.
Sooner or later I will master this adversity, I’m sure, I just hope not to bleed too much in process.

Deadlock in practice

Hardly you can get a better idea of what a deadlock is than looking at this picture:
(from The daily WTF)
Incidentally this appears to be not just a real life deadlock, but also the results of software bug as most of the deadlocks I’m faced with turn out to be.
I also guess that most of the drivers and passengers involved in the jam would have heartedly approved that extra bit of testing, or that extra money required to hire an experienced professional that would have prevented a deadlock-avoiding device such as a traffic light transformed itself in the deadlock-causing device.
Talking about problem-solving, how would you recover from this situation?

No Comment

“Gentile cliente ,Per la vostra sigureza e per il tanto numero di accedere al vostro conto online abbiamo preso come misura precauzionale di blocare momentaniamente il vostro conto
Vi preghiamo di confermare che il vostro conto e ancora attivo si che funziona in parametri normali. Per confermare tutte queste click sul seguente link: .
Fare click qui per andare alla pagina dell’autorizzazione »

Considerazioni migliori,
Il reparto sicurezza


Questo email contiene le informazioni confidenziali ed è inteso per il destinatario autorizzato soltanto. Se non siete un destinatario autorizzato, restituisca prego il email noi ed allora cancellilo dal vostri calcolatore e posta-assistente. Potete nè usare nè pubblicare qualsiasi email compreso i collegamenti, né rendete loro accessibili ai terzi in tutto il modo qualunque. Grazie per la vostra cooperazione.”

What should I add? Maybe “Considerazioni Migliori” ?

Documents delivered

Documents for our adoption process have been delivered on Feb 19th. Go go go! Well the current problem is to make a homely room for our two children. After identifying the room (not that hard, since we don’t live in a palace), we stumbled on the first problem – that room has been filled, during these 11 years of wedding, with tons of stuff… mostly mine. There is a desk with the PC, two bookcases, videogames, another small PC desk, and also, at least according to my wife, a countless number of cables and wires.
It is a matter of fact that problems don’t exist alone in their space, they usually bring a number of sub-problems, pre-problems and post-problems, clustering together much like troubles.
So the pre-problem for making room is to find some space to fill without offending anyone or incurring in any legal consequence. Indeed the canonical place to store stuff that rather than throw away is better forget in some dark and cobweb ridden dungeon, is the cellar.
The last time I opened our cellar door I had to quickly grab things falling outside. Not an easily solvable problem, but a tractable one, at least. Last Saturday afternoon my wife and me went down to our cellar and started digging out rubbish and set a couple of shelves. At the end of the afternoon we were worn out, a pile of stuff waited to be brought to the recycle area, but we managed to insert some emptiness in the cellar.
Sunday had been devolved to move stuff out of the room and prepare it for the cellar, the public library or the recycle area. Given the amount of stuff moved out and the amount of stuff yet to be moved, I am quite surprised that the floor hasn’t collapsed on the storey below long ago.
In a single week end we have moved out most of the books, I think we’d better start moving out stuff faster or we’ll finish to have some help by our children.


Sometimes there is a sequence of unfortunate events all happening very close together. For example if you think that having a second car is a good backup against mechanical troubles, well it is not. Last Saturday the flagship of our little car fleet went into major troubles, while the backup already left me in Castellanza outskirts. I just called the mechanic and he told me there is problem with coils they are to be replaced. Well that’s the third time. My Scenic is going to cost me more in coils than in gasoline!
The first time the warranty period had just expired. It was a manufacturing fault so Renault offered the repair at half the price. The second time was last year. The mechanic replaced the four coils, at least that’s what he said. According to the current mechanic, three of the installed coils are of the same kind while the fourth differs.
Anyway, if this is the Universal Order, acting through the Law of Large Numbers, taking back what he gave us by the wonderful event occurred on January 23… well I feel like the old Jack Burton saying – Just remember what ol’ Jack Burton does when the earth quakes, the poison arrows fall from the sky, and the pillars of Heaven shake. Yeah, Jack Burton just looks that big old storm right in the eye and says, ‘Give me your best shot. I can take it.'”


According to the latest reports, 5 submarine Internet cables have been brought down either by “accidental” cuts or by power supply failure. Now, though I am fascinated by conspiracy theories, I am not an easy believer. But this time I found quite hard to opt for the coincidence. As brilliantly put by Auric Goldfinger in the famous James Bond movie: “Once is happenstance, twice is coincidence, three times is enemy action.”

How to get rid of their Assistant.

Aren’t assistants supposed to be useful people? Maybe also discrete and non intrusive? I suppose so. I wonder how Microsoft got the idea of the infamous assistants for their Office 97 suite. That gizmo-clip is plain disturbing and until now I haven’t found anyone who likes it. Eventually Microsoft realized it and removed the annoying thing from more recent versions of Office. Nonetheless, even living today, you maybe still constrained to use an old version with the bouncing-blinking-wobbling-barking-clip. In the (unlikely) case you don’t like it, too, you may already have discovered that there is no official way to uninstall it.
The assistant seems there to stay, offending you intelligence and concentration. Luckily I found these instructions on how to blow it out of sight forever. Simply locate the directory “%ProgramFiles%Microsoft OfficeOfficeActors” (yes, there is a space within) and then remove every file with a “.ACT” extension.
This causes no problem whatsoever to Office, just enjoy the silence.
In the case you want back later the assistant, just resist the temptation, shouldn’t be hard.

The end of the Trousers of Time

Eventually one leg or the other turns out to be worse than the other. Times ago I wrote about being down in one leg of the Trousers of Time. Now it turned out that the leg I picked up is the good one and the other is a dead end. Feww! GameLoft Milan subsidiary closed at least according to the recent news. That’s sad and somewhat beyond understanding. The firm showed to be brave to invest in the Italian game industry but then retract despite of a great sales year. That reminds me of other stories by the same French proprietors, but those are… other stories.
I wonder how it turned out the decision that the investment was a complete waste of money and resources and the studio was better closed. After nearly a year of work they considered that the team was so worthless that keeping a production line in Italy was a nonsense. I personally know some of the people who worked over there and I know they are talented and have specific game industry experience, so I can’t figure out the reason for such a drastic decision. My solidarity to all those people laid out. I know what it means, really.