2 ms·
Sometimes you come back to a block of code you wrote a long time ago and go "what?" enough times that you go ridiculously overboard documenting it just to creat
by chowells 5y ago
Sometimes you come back to a block of code you wrote a long time ago and go "what?" enough times that you go ridiculously overboard documenting it just to create the illusion of understanding it quickly the next time.
I still don't understand https://gist.github.com/chowells79/996f2749b088d287937e3eff11055522 https://gist.github.com/chowells79/996f2749b088d287937e3eff1... on the first read, even with the ridiculous overdocumenting. On the plus side, it's clear enough what it does, even though the details of "how" are hard to follow.
Still, if there ever was a case for documenting the "how" over the "why", that code is it. It's pretty easy to understand why that code exists. It's actually quite hard to follow the details of how it does it. Those comments are excessive, but they do cut the time it takes to rediscover the "how" whenever I get curious.