Re:How to reduce the cognitive load of your code
by ktRolster on Tuesday March 29, 2016 @10:55AM
(#11381903)
When you're really good, you learn to FIX IT NOW while also not making a hack. Your code becomes flexible enough to handle that kind of change.
[ Parent
| on HN ]
Re:How to reduce the cognitive load of your code
by chimprich on Tuesday March 29, 2016 @12:19PM
(#11382576)
You can't anticipate every emergency change required to the codebase. Sure, you can make some intelligent predictions about certain points in the code and encapsulate possible changes but it's impossible in the general case. Trying to code to future possible requirements is often far more harmful because of over-abstraction than occasionally having to perform a quick hack and then fix it later.
Re:How to reduce the cognitive load of your code
by ktRolster on Tuesday March 29, 2016 @08:44PM
(#11386177)
Yeah. It's a balance between "build as little 'framework code' as possible;" and "build the framework as you go."
I say 'framework code' but it could be called structural code, or glue code or something, too.
Re:How to reduce the cognitive load of your code
by st3v3r on Tuesday March 29, 2016 @01:43PM
(#11383283)
That's assuming it's your code. Most of the time it's not your code. While one would hope that the rest of the team writes flexible code as well, that's not always the case.
Re:How to reduce the cognitive load of your code
by ktRolster on Tuesday March 29, 2016 @08:57PM
(#11386230)
Then settle for making the code better than it was when you started working on it.
Re:How to reduce the cognitive load of your code
by szatkus on Tuesday March 29, 2016 @11:14AM
(#11382043)
Usually it's not my code :/
Re:How to reduce the cognitive load of your code
by mathattack on Tuesday March 29, 2016 @02:08PM
(#11383514)
I'm not that good to pull that off with other people's code. :-)