titiritero: design decisions

During this week I refactored titiritero and in particular the implementation of the gameloop.  The gameloop is a control structure that runs the simulation (give live to model) and updates the views. There are to ways of implementing it:

The first one, is with an infinite loop with a Thread.sleep inside, something like this:

shouldExecuteGameloop = true;
while(shouldExecuteGameloop ){
   this.runSimulation();
   this.updateView();
   Thread.sleep(simulationInterval);
}

The other alternative is using a Timer object and making the gameloop class to implement TimerTask interface, something like this:

Timer timer = new Timer(gameloop);
timer.start(simulationInterval);
...
gameloop.onTimerTask(){
   this.runSimulation();
   this.updateView();
}

I choose the first alternative because with the second one it could happen that the execution of a single loop of the gameloop takes to much time, so there could be more than one thread working simultaneously on the same object, producing an anomalous behaviors of the application.

Open source: new versions

In the last couple of weeks some new versions of open source projects have gone live.

In my opinion  the most interesting one is the first RTM release of Linq provider for NHibernate (NHibernate.Linq), at the moment it is a separete download, but it seems that it will be part of NHibernate’s Core package in future releases. [read more]

Also related to NHibernate, on July 14 it was published Castle Active Record 2.0 beta 1. It includes integration with NHibernate Search, basic Linq support and a feature to enable in-memory test. [read mode]

Spring Framework Team has schedule the release of Spring.Net 1.3 RC1 for July 29th, followed by the GA version on August 10th. [read more].

Finally, Sharp Architecture released the first RTM version on July 15th. [read more]

I hope to have some time during this week to show some examples of the new features of these new releases.

Enjoy it!

Wind of change

It’s been a while since my last post. It is because some things are changing: I ‘m leaving my job to continue my career in a another company, I’m working with my colleagues at university to implement some changes in our course and finally I am working on some proposals for upcoming conferences and publications (CodeCamp, IBM Developer works, Agiles2009, etc.).During this week, I will be posting some information about this proposals, so be around!.

Visual Basic migration

One more time this morning I have been asked about VB6 to VB.Net migration. I have my opinion about this topic.

If you have a VB6 application that is working well and that maintainance is relativaly easy, then, why do you want to migrate? Just because .net is cool?, no that can’t be a reason. The reason that I have started hearing these days is: «Microsoft won’t give us support for VB6». Ok, that is a good reason, but there is still another questions to be answer:

A) Do you want the same application (from user perspective and from technical perspective) running in a new platform?

or

b) Do you want to take advantage of the capabilities of the new platform?

If you answer is B, then I most of the cases you don’t need a migration, you need to build a new system, maybe you can reuse some assets like database schema, some stored procedures, etc.

But if your answer is A, then there are some useful resources you can count on. First of all lets hear the voice of Patterns & Practices Group at Microsoft: Guide for upgrading VB6 applications to VB.Net and VB6 to VB.net upgrade assessment tool. I think these resources are a good starting point to understand the implications of the epic.

There also some interesting materials provided by Artinsoft (a company specialized in software migrations) . They have developed a tool to automate the migration process and they have also written some articles about it: Design application migration strategy and some more specific ones.

Hope this help.