3 ms·
There's the basic hygiene of writing code: naming things, adding the right amount of comments, letting the compiler do the optimizing whenever possible. Howeve
by zwieback 5y ago
There's the basic hygiene of writing code: naming things, adding the right amount of comments, letting the compiler do the optimizing whenever possible.
However, I find that writing reusable, highly modularized code sometimes comes at the expense of readability. In the olden days I wrote what I would call horizontally layered code with relatively clear path of execution but that leads to highly interdependent modules. Object oriented code or code that uses lots of dynamic resolution of call sites makes code reading much harder. Multi-threading, at least the traditional kind, adds more trouble to figure out what happens when just by looking at the code.
I think that's why patterns are important: if we give things names people broadly agree on it's much easier to piece together how different parts of the code should interact.