venerdì 27 novembre 2009

Libri Tech in Italia

Ho scoperto da poco che moltissimi libri che ho comperato negli anni da Amazon.com, sono disponibili anche direttamente in Italia sul sito di Libreria Universitaria, come il recente "Growing Object-Oriented Software, Guided by Tests".
Benissimo! :)

lunedì 23 novembre 2009

CleanCode/1 - Procedural code vs. OO code

In questi giorni sto leggendo "Clean Code" di Robert "Uncle Bob" Martin e volevo regalarvi alcune perle che mano mano sto trovando.

Nel capitolo 6 - Objects and Data Structures, pagina 97, circa l'antisimmetria fra il codice procedurale e il codice ad oggetti.

Procedural code (code using data structures) makes it easy to add new functions without changing the existing data structures. OO code, on the other hand, makes it easy to add new classes without changing existing functions.

The complement is also true:

Procedural code makes it hard to add new data structures because all the functuions must change. OO code makes it hard to add new functions because all the classes must change.

So, the things that are hard for OO are easy for procedures, and the things that are hard for procedures are easy for OO!

Ma anche "est modus in rebus" ;)

Mature programmer know that the idea that everything is an object is a myth. Sometimes you really do want simple data structures with procedures operating on them.

Ammetto candidamente di non aver mai pensato alle differenze fra i due paradigmi in questi termini. Anche per quello mi considero in cammino...

giovedì 19 novembre 2009

Agile è come...

Agile è come il sesso adolescenziale
Chi ne parla tanto, per lo più non lo pratica.
Chi lo pratica, non ne parla più di tanto.
E comunque non ce n'è più di tanto in giro! ;)
--
Uberto Barbini - it-milano-java-jug - 19/11/2009