If it ain’t broken don’t fix it

Yet another worthless blog… by Uberto Barbini

Archive for April, 2008

VirtualBox: the ultimate desktop WM?

Posted by Uberto Barbini on April 21, 2008

I’m not easily impressed by software products, but when I tried VirtualBox I was.

I need a windows enviroment for some graphic applications for my photos, alas there is no viable alternative (=time-effective) to closed products for raw pictures workflow at the moment.

So I decided to install a Virtual Machine running Windows inside my linuxbox (gentoo). I had heard of this VirtualBox and I wanted to try it against my necessity.

It’s also a nice use of that Win license I’m not using since I removed win from the pc.

I tried WMware, Qemu, Parallels before, so I’m not completely new the the concept of VirtualMachine.

VirtualBox is a new player, it’s almost completely open-source but you need the closed (but free for personal use) version if you want usb to work (I do).

I was surprised by it’s responsness, no visible lag in mouse moving, no visible slowdown in desktop graphic (I’m not interested in 3d anyway), only a little slowdown in hd performance. About the latter, maybe I should try to mount directly a partition on VirtualBox instead of the big file approach.

Moreover I’m impressed by the nice interface and about how much user-friendly a VM can be. Powerful as they were, WMware and Qemu are not easy to setup and tune. It took me 20 minutes (plus XP installation time) to setup a complete working enviroment on top of linux.

Actually I had everything but the sharing folder working in 5 minutes, it took to me some google searching to discover that on gentoo I had to merge it with the following use:

use additions emerge virtualbox-bin

and after sharing a host folder (mySharedFolderName) from the gui you need this command (from a Windows shell) to use it:

net use p: \\vboxsvr\mySharedFolderName

Then I defined a new usb rule for my devices and I started working on my trial version of Lightroom on Windows on Linux, without glitches. Amazing!

Btw, looking at the forums, seems that everybody is using VirtualBox to run some Adobe application on Linux… open source alternatives do exist, but they are so inferior from a photographer point of view (even an amatour one) that they’re not worth comparing at all.

Advertisements

Posted in computing | Tagged: , , , , , | 1 Comment »

Oracle Sql tracing

Posted by Uberto Barbini on April 15, 2008

Have you ever felt completely stupid, after desperately searching for something that you know there must exists. But utterly unable to find it?

And then discover it exactly under your nose?

Here, it happens twice a month. I’m still unsure if I’m getting worse in not seeing things or getting better to find them eventually.

Anyway I suppose that everybody know Oracle. That is everybody who knows what a RDMS is.

So we have this nice XE version that allows you to try it and test your application on your laptop, without having to buy expensive licenses.

Probably they know that developers are completely morons when it comes to configure stuff like db server or http servers… hey, I was unable to configure my VCR until I bought one with fancy on-screen menus.

So after installing XE you are left with have a nice web configuration tool, with a convenient entry from your start menu.

If you download also SqlDeveloper, you have a complete and powerful enviroment to test your application against Oracle, including SP debug, completely free (as in beer).

Now let’s say that you want also trace sql statements from your application… no way to do so from SqlDeveloper, although there are two tabs called “DBMS output” and “OWA output” with a “trace on” button, thery must be there for something else. At least I wasn’t able to see any output there, same thing with the “show logs” window.

After some time spent on google I came out with a faq and some instructions: it’s not that I don’t like SQL*plus but… common guys, we’re on 2008 now! There ought to be something fancier than that!

To make a long story short, go to your “Database Home Page” and click on:

home / administration / monitor / sessions / sql

and that’s all folks!

Posted in programming | Tagged: , , , , , , , , | 1 Comment »

Which school of programming fits you best?

Posted by Uberto Barbini on April 13, 2008

As usual, latest Martin Fowler’s post is a quite interesting reading.

As Programming Techniques are becoming more and more mature, we should consider to enter in a new arena: instead of bragging each others about what’s the correct way to program, we can jump on the brand new “School of Software Developing” concept.

I already have done the next step and borrowed some ideas from old jap movies. Let me clarifies with an simple example.

How do you place yourself on the eternal question about exceptions? Should they be checked or unchecked?

Speaking for myself (and whoever else?) I like the way Java let you to create an exception that *MUST* be explicitly handled by your class users. But I don’t like the way checked exceptions are used by Java libraries. That is 99.9% checked exception and 0.1% of unchecked.

I think that one should be very vary to pose such a burden on other programmers. 99% of exceptions are really cases in which something did spectacularly wrong (OutOfMemory) or some nasty bug in your code makes impossible to continue (DivByZero, TypeCastError).

Being forced to manage and exception, should be an extremely rare event. When a casual programmer would encounter one of them, there ought to be a very good reason. And he should feel ice-cold drops of sweat run down the spine while considering how to check the exception.

It’s only logical to assume that everything that can goes wrong will do it, eventually. So connection problems, allocation of spare resources, etc. should be always be protected by try..finally blocks.

Generally speaking using exception for completely predictable failures, like a files that doesn’t exist or wrong values from users, is a bad practice to begin with.
OK, stop blabbering. Now the funny part. Maybe you’re agreeing with me, maybe you’re thinking I’m nuts, or maybe you’re not knowing what I’m speaking of. No problem!

I’ll declare that this is the CleanWater School of handling exception, kiyomizu 清水 in Japanese. Because certainly you want a super-cool name for your school.

You don’t like it? Create your own school about handling exception and we can duel each other at dawn next to the waterfall. Or maybe we can meet for breakfast at Starbucks.

Posted in programming | Tagged: , , , , | 2 Comments »