Comments are great to document code and make it understandable by your future self or your colleagues. In some cases, however, they could be noisy. To avoid this, consider:
- Descriptive variable names
- Extracting logic into methods
- Adding extra checks in case of assumptions