Inversione

Negli ultimi tempi ho maturato un’idea: quando scriviamo codice non implementiamo funzioni, implementiamo bug. Come effetto collaterale questi fanno qualcosa di buono che funziona ogni tanto.

Questa inversione del punto di vista mi porta a essere estremamente avaro di codice, meno ne scrivo, meglio sto.

Mi viene in mente un articolo di Jeff Atwood intitolato YAGNI di cui riporto un paragrafo:

As developers, I think we also tend to be far too optimistic in assessing the generality of our own solutions, and thus we end up building elaborate OOP frameworks around things that may not justify that level of complexity. To combat this urge, I suggest following the YAGNI (You Aren’t Gonna Need It) doctrine. Build what you need as you need it, aggressively refactoring as you go along; don’t spend a lot of time planning for grandiose, unknown future scenarios. Good software can evolve into what it will ultimately become.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s