Know Your Audience
To write effective source code, it’s important to know who you’re presenting it to. If you’re going to confuse someone, you’d better know who deserves the apology. There are, in fact, three audiences for our source code:
- Ourselves
My handwriting is so bad that sometimes even I can’t read it. It’s practically useless unless I concentrate on writing clearly. It’s the same with code. You have to be able to read what you’ve written immediately after you write it, but also perhaps years later when you come back to it. Who would have expected to come back to archaic (relatively speaking) COBOL code to fix a Y2K bug?
- The compiler
The compiler doesn’t care what your code looks like, as long as it doesn’t have any syntactic errors. The ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access