Code to throw away.

20 Nov, 2021

2 Mins Read

The thing that is fixed in code is the change. While lot of books and philosophy is done towards how to reuse the code, very little is focused towards the change!

The reality of the life of the code is very different from the literature around it.

All the reusabilty and other thoughts look good in books. In reality I have hardly seen any code is re-used. This is not to diminish the reusabilty of the code. But only if you code to re-use it then this is obviously heading towards disaster.

Just have a look at any corporate project and you will get an idea of how much code is reused.

For a services company it is alright, but if you are making a product, the code must be agile enough as the team itself.

There are products which are still released with new versions. But then if you look at the code, it is age old. The nightmare is of the new coder, who has the resposibility of releasing the new features with the age old codebase. What is being done here, is simply write new codes with new standards which are bent according to the old codes! The new code standard never stands the new standard or the old standard.

The Code which can change

If you focus on the iteratability of the Code, then the code becomes agile enough to change. Keep all the standard best practices for reusability and all the text book coding rules. At the same time focus must go to iteratability of the code.

This is the reposibility of the coder and for the coder. Makes the developer experience a lot better.

Instead of a huge framework, it is much better to write small libraries. These libraries can be plugged in as needed and removed when necessary.

Removing of library should be as easy as using it. Without leaving a trace, if you could remove a library, then it is well written code. All in all if your code can be brought in at ease and thrown out at ease, then it is a success for all.

Write your code to be thrown out at ease.

Happy Coding.