Tuesday, September 30, 2008

A slideshow for educational blogs

I read and gladly report a slideshow with many links to very interesting educational blogs:

Friday, September 26, 2008

Should IT projects be insured?

I recently posted a comment on a discussion whose topic was similar to the above; the the initial question was related to the very high failure rate of IT projects.

Most of my experience refers to IT product development, so I'm not talking about other things such as insuring an IT project against political instability. As other contributors have pointed out, insurance companies will consider all the risks involved, which means that with such a low success rate software projects are not so likely to be insured, at least as a rule of thumb.

Most of the times the problem lies in the process used to manage the projects, so a better process - which can result in a more motivated team - is often the best insurance you can get.

More on this on this great book by Craig Larman.

Friday, September 19, 2008

A flexibility contest

The introduction in the Hibernate documentation reports that

A relational database is more flexible than a network programming language, so it doesn't need anything like a navigation direction - data can be viewed and retrieved in any possibile way.

As this is quite a statement, I stopped to consider it a while.

In a programming language you have to consider navigability, so if you have - as in the example - a Person class and an Event class and you want to get all events associated to a person you'll have to ask the person with something like person.getEvents(), but if you also want to get all persons associated to an event you'll have to ask the event with event.getPersons(), i.e. you have to provide accessors to both classes. And both classes hold a reference to a collection of their companion class. Moreover, when you add a person to an event you have to make sure that also the event gets modified, and vice versa.

In an RDBMS you can compose all the queries you like, starting from persons or events; the only thing you'll need is a well defined relation between the tables, which tipically translates into a bridge table. You don't even need to enforce referential integrity, though this is the path to the dark side (or is it?), as long as everybody knows how the tables should be connected. So when you add a person to an event you only have to insert a row in the bridge table.

In this sense databases are more flexible than programming languages. You can write
select *
from person p
left outer join person_event pe
on p.id = pe.person_id
left outer join events e
on pe.event_id = e.id
as well as
select *
from event e
left outer join person_event pe
on e.id = pe.event_id
left outer join person p
on pe.person_id = p.id
but this comes at a cost. You need keys. And you need indexes to manage them (even if this relates to the phisical aspect rather than to the logical one). And a bridge table to manage the many-to-many relationship, which doesn't belong in the domain at all but is a pure fabrication used to represent the model. This clutters things a bit, even if we're so used to it that we don't even notice.

The Java language gives a much clearer representation of the domain (at least, the signatures of the method do):
public class Person {
// stuff
public List getEvents() {...}
public void addEvent(Event event) {...}
}

public class Event {
//stuff
public List getPersons() {...}
public void addPerson(Person person) {...}
}
The language shields you from how the model is represented (that's where the rigidity is hidden), and it is more natural to use.

Databases can use views to simplify data retrieval, but they don't work for inserts and updates. That's where stored procedures come in handy, but... aren't they written in a programming language? Should the latter be considered part if the database or as an external means to get a higher abstraction over SQL (which in turn is a language of its own)? How far should we push this?

My conclusion? Everyone should get their act together to make sure that the quality of what they build is the highest that they can get, either when designing a good database schema or when implementing a bidirectional association. The problem is that "the highest they can get" can sometimes be a low standard, so everyone should always try to improve, no matter how high the standard. I think this rule applies not only to programmers in their own field of competence, but to men in the broader sense.

Wednesday, September 17, 2008

Moving your quick wiki

Little by little our VQWiki test installation become our VQWiki production environment; it is not enough for some project management activities, but it's great as a collaborative repository.

Should you decide to move the directory in which you store the files (we did), it is enough to modify the filesystem directory in the admin page; this creates a new folder in the specified position, in which you can copy your existing files. As an alternative, you can modify the homeDir parameter in the vqwiki.properties file located in the WEB-INF/classes folder.

In the same folder you can find the ApplicationResources.properties file, in which you can give your virtual wikis a friendly name.

Thursday, September 11, 2008

Here we are again

And this does not surprise me... all this hullabaloo about switching the LHC on, when no actual collisions had been planned, as only one path was active in a given moment... Was it just a rush to catastrophical news? Thanks to that, a teenager has committed suicide. I hope somebody will clean up their act and think before they talk or write.

Wednesday, September 10, 2008

See you tomorrow... LHC permitting?

This morning the LHC (Large Hadron Collider) at CERN, the most powerful particle accelerator in the world, was finally switched on, and a beam of protons was successfully fired around the 27 km tunnel. This is a great milestone in research, because it could lead to several breakthroughs about the "internal working" of the Universe.


The LHC is composed by thousands of elements that have to work together with great precision and very small (I mean it) tolerances. Today the system was released in a production environment, well after its components had been tested in isolation and several integration testings have taken place. I think I'll analyse thoroughly the testing process adopted in the building of the the accelerator to compare it with the software testing process, and I'm sure this will lead to interesting results. More on this to come.

As always, when dealing with things such as this, many opponents arised, concerned about the high risk involved with the experiments that could lead - they say - to the complete destruction of life on Earth (well, to say it all, of Earth itself).

A commission has been instituted by CERN to study all the possibile risks related to the use of LHC, but the results of their work still did not seem enough to alarmists.

Up to now, alarmists were wrong.

Thursday, September 4, 2008

Where's my CTRL+F?

I can't believe it... when I post a blog entry in Chrome the internal search (CTRL+F) brutally ignores all the content I'm writing...