14 novembre 2011

E poi dicono delle Poste Italiane...

from the ups dept.

Ecco il giretto che sta facendo il mio Kindle...

Bergamo, Italy 14/11/2011 5:45
14/11/2011 3:02
Koeln, Germany 14/11/2011 1:49
Bergamo, Italy 14/11/2011 1:06
Koeln, Germany 13/11/2011 18:36
Louisville, KY, United States 13/11/2011 4:19
Louisville, KY, United States 12/11/2011 5:25
12/11/2011 0:38
Bergamo, Italy 12/11/2011 4:41
Campbellsville, KY, United States 11/11/2011 19:12
United States 11/11/2011 17:18

...e poi dicono delle Poste Italiane! Che diavolo di giro del mondo si sta facendo?

11 ottobre 2011

eXtreme Polymorphism

from the object-oriented dept.

Idea idea! What about polymorphic conditionals? In such a way, we don't need the if, else and related keywords. Let's try in Ruby:

Great, isn't it? But wait, someone already invented this! :-)

Ruby is a great language, however it has too many keywords that could be substituted with object-level messages. Simplicity always leads to elegant solutions, and Smalltalkers know what I am talking about.

11 maggio 2011

The Observer Pattern and Syntactic Sugar

From the simplicity dept.

The Observer Pattern is a convenient way of updating collaborating objects upon status update. It happens that the .NET Framework and in particular the C# language provides native support for it, in the form of events.

Uhm. This approach to design patterns is incorrect to me since it requires to add a good amount of syntactic sugar only to handle this in a more "integrated" way. The real problem is that in this way language designers and users learn that every and each interesting capability should have its own syntax.

A radically different approach is provided in Smalltalk. The Object (yes, the Object class) provides convenient methods to handle status updates through the updating category of methods: changed, updated, addDependent, etc.

So, what's simpler? :-)

18 aprile 2011

Don't Manage Complexity with Bruce Force

from the xp dept.

Last Thurdsay I was discussing with my XP Team about the Single Responsibility Principle.
The coach pointed out the relation with Rigidity and all of sudden something familiar came to my mind.

In the last years I've worked on a well-covered projects where almost every new feature required a tremendous effort fixing the entire test suite. The real problem there is in objects with very low cohesion and high coupling that prevent us to concentrate on a specific area of the code when thinking about a concept.

In that team however all the people were smart and "fast", so the underlying problem was, in fact, dominated with Bruce Force. The problem with Brute Force is that it doesn't scale well, and prevents you to really go at full speed.

So, don't use Brute Force in your projects ;-)

28 febbraio 2011

Class Naming

Ecco un elenco di parti di nomi di classe che sarebbe il caso di smettere di dare perché poco speaking e OO. Sono casi particolari di questo smell.

  • helper
  • manager
  • adapter
  • provider
  • utils (peggio ancora testutils)
  • entity
  • formatter
  • serializer
Thanks Antonio Ganci per la collaborazione nel trovare i nomi ;-)

25 febbraio 2011

Belle persone

E' quando apprendo che esistono o sono esistite persone come questo medico che sono contento di vivere in questo mondo.


16 febbraio 2011


Why can't I use lambdas or methods for TestCaseSource?
It's a limitation of .NET Attributes: only statically instantiated stuff can be used as arguments.

04 gennaio 2011

Smalltalk and Ruby

from the agile dept.

This is my post in the attempt to embrace the Smalltalk way of doing things. In the process, I'm following Davide's course.

The power of Smalltalk is due to the language and its environment, that of course has a bunch of native, old-style C-code for its VM. The question I want to answer is: how much power is hidden in the VM and how much in the ST part? Is the VM hiding something to us?

Let's compare the ST VM to the Ruby VM. Why Ruby? Because the Ruby and ST object models are very similar, and some principles are shared between the two - however, the Ruby syntax is far more verbose (e.g. 40 keywords vs 6 of ST). And because both are written in the old-school C language.

How big is the Smalltalk VM (SqueakVM for instance) compared to Ruby (MRI)?

squeakvm/win32 r2249

22006 .c LOC
33404 .h LOC

ruby 1.9.2 p136

722475 .c LOC
32253 .h LOC

hey, RubyVM's about 30 times bigger than SmalltalkVM! This is a raw evidence that the power of Smalltalk is not in the native/C part but in the Smalltalk part (surprise!?).