3 ms·
You need to make your functions smaller and more generic... This is something I keep fighting against myself on, but it makes my code more portable...
by blhack 17y ago
You need to make your functions smaller and more generic...
This is something I keep fighting against myself on, but it makes my code more portable...
- jacquesm 17y agoMaking them generic is key to code reuse, smaller is sometimes only to improve readability. 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.