If it ain’t broken don’t fix it

Yet another worthless blog… by Uberto Barbini

Archive for the ‘programming’ Category

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 »

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 »