Tuesday, March 3, 2009

KISBNS

Keep It Simple, But Not Stupid!

The idioms KISS (Keep It Simple, Stupid!) and KISSALAP (Keep It Simple, Stupid, As Long As Possible) are great methods to get your code up fast and keep it stable. Surely writing code for something you'll probably never use can only make thing unnecessary complicated and therefore unstable and unmaintainable.

BUT:
I often see pieces of code where people tried to keep those principles, but forgot to refactor in time until it's too late. What I mean is, people tend to start copying pieces of code, thinking 'making this piece of code more generic while I would only use it twice is not simple enough.' Maybe that's true. But then they copy it a third time, or code it again because they forgot it allready existed somewhere.
In these cases making a generic method, class or whatever the first time would have been a better idea.

So as soon as a piece of code is obvious to reoccur several times, extract it immediately before it's too late!

6 comments:

  1. Wij zijn een informeel en laagdrempelig juridisch advieskantoor. Wij hebben als doel om informatie en juridische ondersteuning toegankelijk te maken voor werknemers die met een Sociaal Plan te maken krijgen. Wij doen dit binnen werkgeversbudgetten zonder kosten voor de werknemer.dutch lawyer

    ReplyDelete
  2. Fortunately there are lots of sites that provide reviews so you should have no trouble finding all of the information that you need to make the right decision. http://www.ggetintopc.com

    ReplyDelete
  3. As discussed the latest version of Windows is Windows seven, alcoda software the name coming from the fact it is the 7th release of the home windows OS range.

    ReplyDelete
  4. Likewise talked about those most recent form about Windows will be Windows seven, alcoda programming those name advancing starting with those truth it will be the 7th arrival of the home windows os reach.

    ReplyDelete
  5. amazing article.... great job by the admin....

    ReplyDelete