3 ms·
I think the best test is to read the code yourself. If it's not obvious what it is doing, the side effects it may produce, or the assumptions made when executin
by miccah 6y ago
I think the best test is to read the code yourself. If it's not obvious what it is doing, the side effects it may produce, or the assumptions made when executing it, then you probably need to add comments or refactor to answer those questions.
I try to keep in mind that the code I'm writing will eventually be maintained by someone else years from now, who never knew the context of why I'm writing this code or the function I am trying to achieve with it.