4 ms·
The code explains how. The comments explains why. Why does this function have to take that lock? Why is that algorithm chosen? What invariants are required to b
by roblabla 8y ago
The code explains how. The comments explains why. Why does this function have to take that lock? Why is that algorithm chosen? What invariants are required to be upheld (which is a form of "why?").
Good code comments are important. Good unit tests are important too. But both are necessary.