Readable code starts with clear boundaries
Give functions one understandable responsibility and names that describe their result. Keep external input validation near the boundary where data enters.
Prefer a straightforward implementation you can test. Explain unusual decisions where the reason would not be obvious to a later reader.
0