11 Follow the structure in the code

This chapter covers

  • Encoding behavior in the control flow
  • Moving behavior into data structures
  • Using data to encode behavior
  • Identifying unexploited structures in the code

Software is a model of an aspect of the real world. The real world changes as we learn and grow, and we need to adapt our software to encompass these changes. In this way, as long as the software is being used, it is never finished. This also means connections in the real world must be represented in our code: the code is a codified structure from the real world.

In this chapter, we first discuss where different types of code structure come from. Then we examine three different ways behavior can be embedded in code and how to move behavior ...

Get Five Lines of Code 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.