To Library or Not…

To all the coders out there! (and anyone else watching),
Often when writing code, we’re told to turn our functions into portable modules so they can be reused in other code later on.

This is very good and well if you want to write beautiful code – and who doesn’t? But what is conflicting with this is TIME!

No-one has infinite time, and writing a good piece of modular code always needs a good design and some good debugging.

Sometimes its just easier to whip together some code and get it working. If you need to reuse it later, there’ll need to be some work done to it, but why not just do that when the time comes? (cross that bridge when we come to it cliche).

If you’re even remotely proud of your code, then you’ll probably turn it into somewhat reusable libraries! Good on you! However, you cannot predict what your requirements will be in the future. So even if you did turn it into reusable code, it might still need some hacking later on to apply it to the future applications.

Personally, I do like my code, and seeing as I’ve got no real time constraints, I do take pride in my code so I will turn it into modules.

How about you?