Time keeps moving

Time keeps moving

È da tempo che non scrivo qualcosa qui e qualcuno avrà anche notato che alcune cose qui pubblicate sono sparite.

Bene, il motivo è che ho sdoppiato la mia attività in rete facendo diventare questo uno spazio più personale e di riflessione, mentre le cose più tecniche le ho spostate su alessio.sclocco.eu.

Notizie dell’ultimora per tenerci aggiornati:

  • Mi sono laureato;
  • Non sono più membro del direttivo di Metro Olografix e quindi nemmeno più presidente (ma sono comunque socio);
  • Continuo a vivere a L’Aquila ma spero di andare a vivere ad Amsterdam ad Agosto;
  • Da pochi giorni il mio caro portatile data è stato sostituito da un nuovo portatile battezzato “barnabo“;
  • Sto imparando a fare fotografie, giusto per aggiungere altre attività alla vita.

Non ho intenzione di abbandonare questo spazio ma, dato che lo userò per cose più personali e di riflessione, vi consiglio di aggiungere ai vostri bookmark/reader anche il sito che vi ho indicato prima 🙂

The art of commenting code

The art of commenting code

It’s simple, I’m reading some old C code right now (but it’s a general thought really) and it lacks comments so I’m trying to understand what it does for using it proficiently, I know that I’m not a “comment guy” cause I only now and then put comments in my source code, but managing a medium C++ project in the last few months (my bachelor thesis) I’ve finally understood what to comment and what not.

First of all I don’t like commenting every line of code, it’s stupid and it’s wrong, good code must be readable also without comments, comments are for helping readers to understand the “whole thing”, so they must refer to widen pieces of code, pieces that you can understand also without the comments but that with them become more easily to be understood by you.

So I’ve started to comment the critical point of my code, the decisions taken and the rationale beside them and I’ve found, finally, what I absolutely need to comment: data structures.

The rationale it’s simple, if algorithms have a behavior that you can follow to understand them, data structures haven’t, you can’t understand them if they want, or better, you can but you have to spent lot of time trying to find every use of them and it’s not cool, absolutely isn’t 😉

So, I started to comment my data structures, their fields, how they must be used and the meaning of them, why don’t you ?

(This is all because the code I’m reading right now has no comments and some strange graph data structures with fields not understandable if you are not the author, and I’m not)

Una conversazione

Una conversazione

M: non si può!
I: probabilmente no
I: ma cosa ?
M: sicuramente no
M: andare via
M: senza avvisare
M: senza dire niente
M: non si può
M: dovrebbero vietarlo
M: ci vorrebbe uno che lo vieta
M: che arriva e dice
M: “non si può”
I: bhe
I: casomai renderebbe tutto solo piu’ complicato
M: non sei d’accordo?
M: può darsi
M: però sarebbe di consolazione per qualcuno
M: o no?
I: salutarsi e’ bello
I: ma casomai chi se ne deve andare non reggerebbe una cosa del genere
M: dici?
I: io preferirei non dover salutare
M: forse anch’io

Anniversari: Metro Olografix CAmp 2008

Anniversari: Metro Olografix CAmp 2008

Nel 1998 mi sono imbattuto in una splendida associazione di nome Metro Olografix, nello stesso anno mi sono imbattuto nel sistema operativo che uso ancora oggi (GNU/Linux), non dovrei scrivere post commemorativi ma dovevo in qualche modo dire al mondo che questo Agosto, dal 21 al 24, si terrà la seconda edizione del Metro Olografix CAmp (MOCA per gli amici).