Semplice è meglio che complesso, complesso è meglio che complicato

>>> import this
The Zen of Python, by Tim Peters
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!

P.S. Sono reduce da un'affascinante tre-giorni di Python al CERN. Tutto qui. C'è molto da imparare, ma imparare questa roba è piuttosto piacevole. Eh già.

Questo articolo è stato pubblicato in Geek attitude, Scienza e dintorni, Zen da taschino. Aggiungi ai preferiti: link permanente. Scrivi un commento o lascia un trackback: Trackback URL.

2 Commenti

  1. Pubblicato 27 ottobre 2007 alle 11:40 | Link Permanente

    Nonostante il mio celeberrimo pessimo inglese ho letto e apprezzato. Solo "nested" non ho capito cosa significhi (in opposizione a "piatto").

  2. Pubblicato 28 ottobre 2007 alle 12:39 | Link Permanente

    "Nest" é "nido", "nested" si traduce con qualcosa come "annidato". Ha un significato piuttosto preciso in programmazione informatica, ma siccome quesi aforismi funzionano bene anche in senso figurato, potremmo in generale tradurre come: "spianato è meglio che sovrapposto" o "lineare è meglio che arzigogolato" ( o anche "liscio è meglio che gassato", "crostata è meglio che millefoglie" :-) )

Scrivi un Commento

Il tuo indirizzo Email non verra' mai pubblicato e/o condiviso. I campi obbligatori sono contrassegnati con *

*
*

Puoi usare questi HTML tag e attributi: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>