A List of Practices

This appendix contains a list of various methods and heuristics that are described throughout the book, including where to find them.

A.1 The 50/72 Rule

Write conventional Git commit messages.

  • Write a summary in the imperative, no wider than 50 characters.

  • If you add more text, leave the next line blank.

  • You can add as much extra text as you’d like, but format it no wider than 72 characters.

Apart from the summary, focus on explaining why a change was made, since what constitutes the change is already visible via Git’s diff view. See subsection 9.1.1.

A.2 The 80/24 Rule

Write small blocks of code.

In C-based languages like C#, Java, C++, or JavaScript, consider staying within a 80 × 24 character box. That corresponds ...

Get Code That Fits in Your Head: Heuristics for Software Engineering now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.