Re:Write code that is easy to delete, not easy to extend
by foobarian on Sunday February 14, 2016 @03:53PM
(#11099949)
My experience has been that shitty code tends to be shitty because it accesses "magic global state," so it's hard to coral it into a single module almost by definition. This happens usually because of rushed deadlines; it's often hard to plumb through an extra parameter if there are many touchpoints or a lot of tests to fix, and easier to just stuff something into a global variable and ship the code.
[ Parent
| on HN ]
Re:Write code that is easy to delete, not easy to extend
by eru on Sunday February 14, 2016 @04:56PM
(#11100172)
That's why a language that forbids magic global state (or at least makes you clearly tag every tiny instance of it) can be so useful.