Self-Document Code
It is a good code-writing habit for code understanding and development.
Why
Over time, code evolves, whereas code comments go stale.
& Document
Self-documenting code does not obviate the need for documentation. Consider README files and Swagger docs. We still need those. Also, sometimes it might still make sense to leave code comments or drop a link to a confluence doc in the code in the code.
Example
Version B is a self-document code.
Version A:
1 | // The cellular range from the tower is 5 km. |
Version B:
1 | let cellularRangeFromTowerKm = 5.0 |