If it ain’t broken don’t fix it

Yet another worthless blog… by Uberto Barbini

Gpl Delphi!

Posted by Uberto Barbini on May 10, 2008

This is my plea to Embarcadero for Delphi future.

I’m not asking to release everything under GPL, only to release VCL and the as much as possible of the IDE under a dual license schema.

What is the biggest single problem for Delphi wide adoption today? In my opinion the lack of community. When I started to using Delphi, (Delphi 1.0 in 1995) there was a huge community from Turbo Pascal days, now that community of young passionate future developers has grow in professionals that spread the word of Delphi in every company they worked.

But if I look now to the main Italian Delphi newsgroups, they are frequented mostly by professionals, with everyday problems to solve. And that’s ok, but where is the future in this?

The words GPL has still a little of its marketing magic (and a very cheap one), so maybe it can attract again the kids, as I was in 1995 (ouch this hurts!).

I don’t think that in 2008 any serious firm could consider using a GPL product with the idea of breaking the license. And if they were ready to do it they surely won’t pay any license whatever.

As things are now, Delphi could have a not so bad future as niche product, but IMHO this is the only way to revive to ancient glorious days.

For a different opinion and much more details about the acquisition, I keep an eye on Marco Cantu’s Blog.


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

Embarcadero Delphi

Posted by Uberto Barbini on May 8, 2008

As you may know, CodeGear, the company of the glorious Borland Delphi, is just been sold from Borland to Embarcadero for 23M USD.

Although I’m not doing any serious development in Delphi for at least 2-3 years, I’m still very fond of it. Anyway it never made for the “web 2.0” era of development.

Without a complete renewal and probably a dual license schema (like Qt) I don’t think it will ever manage to revives again.

My personal take is that this is its requiem, Embarcadero will further cut the developing and will replace it as a convenient db-related tool.

But I sincerely hope to be mistaken about it.

Good Luck Delphi!

Posted in computing, programming | Tagged: , , , | 7 Comments »

Agile Anti-Patterns

Posted by Uberto Barbini on May 2, 2008


Nice reading, especially the comments. Anyway these are more or less “incomplete agile”.

Maybe partial Junit coverage is not agile, but it’s definitely better than no unit tests at all.

Nightly build are worse then continuous integration but are better than weekly builds, etc.

I agree that there is a kind of “click”, aka “when the team jells”, that happens when you’re correctly doing agile. Mmhh, I said one? Maybe there are several, one fore each step of agile you reach.

Not really sure anyhow, my personal experience is that when agile start to work, organizations reacts and dismantle agile teams.

Anyway I want to add other two Agile AntiPatterns I saw myself:

Agile Sweatshop

First signs: 40 hours a week is not a practice but a wish that will never came true. Iterations are fixed both in time and features, there’s no time for pair programming, spikes, crc/mindmap sessions.

Consequences: high turnover, personality problems, quality doesn’t improve much over the time. It’s like a tipical sofware sweatshop but usually managed by some “agile guru” with a bunch of underpaid newbies.

Technical Success

It happens when the Customer change his mind every iteration, and the Team continue to provide new estimates for more or less the same functionalities. At the end the project is cancelled because it’s too late on schedule but it’s still a “technical success”, that is a business failure. The best description I heard of this was at a Jeff Patton seminar at the XpDay2007 in London.

Posted in agile | Tagged: , , , , | Leave a Comment »

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.

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 »

CVDD – Curriculum Vitae Driven Design

Posted by Uberto Barbini on March 31, 2008

I’m in debt to Giovanni Asproni for this new acronim. But the fact behind the term is very well known here.

Let’s start saying that it’s a matter of fact, although a sad one, that a lot of enterprise projects are poor designed.

But, as strange it may seem, in my career I (almost) never saw a simplicistic design, they are all wrong on the over-complicated side.

So why is this happening? If they were all producted by morons, they ought to be equally distributed on both side of the Gaussian. Also I have anectdotical evidence that not everybody in the contractor world is a moron (honestly!).

So, as you may have guessed, the reason behind it is a little more complicated and it has Darwinistic-like reasons.

As contractors’ life goes, you need to keep your resume always updated to the latest hype and keywords in order to be recruited. And simply you don’t have enought spare time to learn everything, so…
a solution appears misteriously in front of you: Put whatever is the current buzzword in your next design document.

Add some new fancy framework or library to your current project, and learn it, test it, experiment with it at your usual tariff.  It’s brilliant and convenient!

I’m not sure to blame only the contractors, it’s a response to the market absurd rules. If customers were looking for developers who know how write simple and elegant code, they would get exactly that.
Instead they usually hire developers with the most buzzwords complete CV. And at the end, they will obtain CVDD applications. Unnecessary complicated, with tons of once-popular frameworks, often misused, etc. etc.

Disclaimer: in case you’re considering to hire me, I would never do anything of this sort! 🙂

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

Explicit is better than implicit!

Posted by Uberto Barbini on March 25, 2008

Today at work I gave a little help with Javascript to a collegue of mine, he’s a very bright guy but he is touching Javascript for the first time.

So after a little of pairing, we saw that in a line a class method was used as it was a standalone function.

Given that there’s no ide for javascript and the code was not properly indented, the problem is more trickier than it seems.

Later, he asked me how can you easily tell them apart… not very easy unless you start counting the braces. (if someone know a better way please tell me).

So now I have finally understood how convenient is that Python uses an explicit this for each class method.

Better late than never…

or in Italian “Fino alla bara sempre si impara”

Posted in programming | Tagged: , , | Leave a Comment »

157 + 486 = 157486!!

Posted by Uberto Barbini on March 23, 2008

At least according my first Django site!

(bug fixed in version 2.0 almost 12 seconds later…)

Anyway as little spike I created a (very useful) site that adds two numbers, for example


of course you’re free to change the numbers. Not sure how long I’ll keep it running up.

What’s the point? Actually I wanted to deploy something on my virtual host but creating this site took me 5 minutes and 8 lines of code.

from django.http import HttpResponse
import datetime
def plus(request, n1, n2):
n1 = int(n1)
n2 = int(n2)
html = "%s + %s = %s" % ( n1, n2, n1+n2)
return HttpResponse(html)

These are 7, the last one is in the urls.py (one of the 4 files automatically created by django for a new project).

from django.conf.urls.defaults import *
from views import *
urlpatterns = patterns('',
(r'^calc/(\d+)/plus/(\d+)/$', plus),
# Uncomment this for admin:
# (r'^admin/', include('django.contrib.admin.urls')),

So, all in all it’s not such a big effort! I know that maybe with Rails I could do the same in half the lines , you could do it in Python too for what it matters.

Anyway I’m still fond of Python values (aka “import this”) and Django is really really elegant.

I haven’t yet configured postgreSQL on the server, so you have to wait a little before seeing something interesting.

Posted in django | Tagged: | Leave a Comment »

To agile or not to agile

Posted by Uberto Barbini on March 23, 2008

I know I’m late, actually I’m always late so there’s nothing new here.

Anyway, some days ago, a post of mine in Milano Jug mailing list, has been quoted by .MOz on his blog.

This is his translation (my actual post was in Italian):
“Blockheads, agile or not, will never produce good code, just as even if you can produce the best software in the world but you don’t understand the domain your project is doomed: technical success is a foolish illusion.”

Maybe “blockheads” and “foolish illusion” are a bit too euphemistic for my tastes, but ok, the meaning is there.

Anyway if you don’t know me, you can think of it as a critique of Agile methods from my part, but it is not. I’m still regarding Agile Methodologies as the fastest and the most cost-effective way to develop software.

It’s only that they’re not a goal per se.

Being fair, probably 99% of Agile practitioners do agree here.

Moreover, methodology is not the Most Important Thing in Software Development, and neither the second one… probably it is the third one MITSD.

It’s like having a race between an old Fiat 500 and a Ferrari Maranello:  if the Ferrari driver doesn’t know which way to turn, or if he doesn’t know how to drive a car… he simply cannot win.

Posted in agile | Tagged: , | Leave a Comment »