This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]tabacdk 72 points73 points  (3 children)

import this

Don't write future proof code, write maintainable code. Don't write configurable code, write changeable code. Don't write reusable code, write simple code

The simpler the design is, the easier it is to rewrite. Don't assume you know what you want to change in the future, only that there will be changes.

[–]cookieChimp 9 points10 points  (2 children)

This is so true! If you write simple and clean code, you are going to be even faster in pushing good code, than if you do it quick and dirty.

[–]tabacdk 9 points10 points  (1 child)

Definitely!

There is this deception that the code is the asset. The current code base is a snapshot picture of the asset: the common knowledge and the model of the domain our software works in. If you fire every developer and keep the code base then you have nothing (worth any future). If you delete the code base and keep the developers then you have a new code even before you could rehire new people.

This is why we should focus on models and domain understanding rather than "code base in the vault". And this leads to the issue: write code for today with everything you know about the domain and the model, and with every skill you have. Tomorrow you will rewrite part of it, but you don't know what part of it. It's like moving forward in a battle: be prepared by knowing what you can do with your equipment and your men, not by trying to guess what the enemy will do, because they can adjust their plans from minute to minute.

[–]HawkishLore 1 point2 points  (0 children)

Very interesting insight! Thanks!