Reinventing the Wheel
I write code. And so often when I write code, I’m compelled almost instinctively to re-write code that already exists. Suppose I need to extract some text from a PDF. There is a wide range of software which can do this well. But my first instinct is to try and rewrite this software from scratch.
While some of my fellow computer scientists, software engineers and coders are surprised, sometimes even critical of this behavior, others have confessed to being tempted to do the same thing.
Problem
I’ve been reflecting on why I do this, and there are a couple of explanations.
1. Understanding. Rather than understand how the 3rd party code works, I’m tended to write my own code so that (at least in theory), I’m guaranteed to understand the code. The cost of writing an application from scratch is almost always greater than the cost of reading through the 3rd Party code and understanding it — but irrationally, this doesn’t seem to factor in.
2. Security. This is a special case of understanding, where I’m worried about the question, “will this code behave in some strange way?”
3. Code Quality. I’d like to write code and maintain its quality in a certain way. This is as much about format and style, as it is about quality. Any new code will just pollute my code base. Hence, rather than…