|
|
|
|
|
by pfortuny
4463 days ago
|
|
It looks similar but it is not exactly the same thing. In some sense, not being the 'writer' of the code makes it difficult for you to understand it and hence to use it as the expression of your theory, which may lead you to rewrite everything (thus 'invent it here'). However, the rational way to do it would be to try and read the outside code and reuse it as much as possible. In the same way that you read a book on Calculus and do not need to write a new one if you have learnt it. But we humans are anything but rational. |
|
In a sense, doing those exercises is "rewriting calculus" in a form that is internalized for yourself. It's the same as learning to play a piece of music: if you're a good piano player, you can read the sheet music for a Beethoven sonata and have an idea of what it's like [0], but you need to practice the piece to really understand what it means.
Maybe the design of software should also contain some kind of built-in learning process. When one encounters a new codebase, it can take quite a while to figure out where to even start deciphering the architecture... What if there was a design document with a textbook-like approach that extended all the way into the code itself: there would be "exercise hooks" expressly for the purpose of allowing a programmer to experiment with the software's internals in a controlled fashion.
- -
[0] I guess -- I suck at music, so I wouldn't really know.