Code Reading

Why Read Code?

To improve your coding skills, read code created by skilled developers.

Read well-made open source projects for each language to learn how to code properly in that language.

What You Learn

There are many attributes of software code that you will learn by reading existing code:

  • Indentation: Proper formatting and structure
  • Comments: How to document code effectively
  • History Header: Version and change tracking
  • Function Structure: How to organize and structure functions
  • Architecture Patterns: Common design patterns in practice
  • Error Handling: Best practices for handling errors
  • Testing Approaches: How experienced developers test their code

How to Practice

  1. Choose a well-regarded open source project in your target language
  2. Start by reading the main entry points
  3. Follow the flow through the codebase
  4. Take notes on patterns you observe
  5. Try to understand why certain decisions were made
  6. Apply what you learn to your own projects