If you have some experience in electronics you should know that a resistor with no electrical resistance is (apparently) useless. Why should you pay for this component?

Obviously Wikipedia has the answer for your question. But if you are wondering what this has to do with Computer Science, keep reading and I'll try to explain.

The Zero Ohm Code

One of the purposes of the Zero Ohm resistor is to be a placeholder in case another component is needed in the future. When requirements slightly change, there is no need to change the PCB, but it's sufficient to substitute that resistor with something else.

In software development we can use the same concept. Even if a feature is not needed now, it's not said that in the future a customer won't ask for it. At design time, it cost nothing to you, for example, to add an unused field in a structure, but, when the project is shipped, an extra field can require a change in the format of the saved files.

There are many things that can be done with the purpose to write easily extensible code. I will write about some of these in a future post.

Stay tuned for more happy coding!

Update

Here you can find 6 + 1 tips to write easily extensible code.


Cover image taken from Wikimedia Commons (public domain)