|
|
|
|
|
by sstangl
1850 days ago
|
|
In my experience code quality falls out from making mental simulations easier to produce. Abstraction boundaries should be drawn where mental processing starts feeling burdensome. When running abstract mental simulations, do you assume that I/O operations succeed or fail for knowable reasons? It seems likely. If the code were expressed to match your mental simulation, for example by not performing I/O within the function, but by merely receiving I/O messages from a foreign actor, it seems like you're not far away from offloading the full mental simulation to something like quickcheck and writing down explicit invariants! |
|
I love my IDE. I love interfaces, type systems, and static checks. ADHD pretty much forced me into a very functional programming style, because mutation is so more to think about.
Conversely, some of the most inscrutable and buggy code I've written was when my meds were a tad high and I could easily reason about really complex interactions.