Null Object Design Pattern is cargo cult programming

Nuestro buen amigo Javier Caceres nos comparte su artículo:

Null Object Design Pattern is cargo cult programming

I like the notion behind the Null concept. Null does not mean anything. Null does not mean empty. Null means a reference to nothing but it’s still something between us. Null has the same effect on us that the black holes because it makes people think about it in different ways. Some people consider Null a good return value, some others consider it an error sign and more time you spend in the software industry more meanings you find.

To me Null it just like another constant value that it particularly warns about an undefined status. To me Null means “undefined” in the same manner that zero specify the smallest non negative number. However cargo cult programmers have created funny definitions around it and Null has evolved to a design pattern. The following implementation shows a sample of the Null Object design pattern.


Ver más aquí.

Fernando García Loera (Community Program Manager – Latin America Region)

Icono Ferglo 40x116twitter 40x40RSS 40x40facebook 40x116linkedin40x40xbox 40x40

Que es un MVP? / Tips para ser MVP