Object Oriented programming

An old friend of mine used to say “Quando è fatto bene si vede subito”, which can be roughly translated into “When it’s a good software you can see it from the start”.

Here’s an example:

class user_class {
  var status = -1;
  var stato = 0;
  var name = ”;
  var last_name = ”;
  function user_class() {
    $this->stato &= $this->status;
  }
}

While I might understand that stato and status are probably the same variable that changed name in time… It’s funny that they are initiated with different values and then set as the same thing! 😀

Software evolves in time.

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s