by 10ren · 17y ago · 0 comments
Reusing code seemed like a sensible thing to try to do (you should reuse code!), and the existing code itself was actually pretty clean - just not designed for what I wanted to do next.
Therefore, I've decided in future to try out making prototypes that are strictly prototypes. If I want to try something new, I'll make an entirely new prototype. And see how that goes. At the very least, it will probably be more fun. :-)
I mention this here, because of the article's description of "honeymoon code" vs. "maintainable code".
This is something I keep fighting against myself on, but it makes my code more portable...
As soon as you see a pattern appear in your code, something idiomatic that you've done a couple of time with small variations it's high time to abstract out a library function.
Do that a couple of times and you'll see the size of your functions diminish as if by magic.