Part 1 In theory

 

The world of software engineering is full of advice and opinions on how best to write code. But life is rarely as simple as just absorbing as many of these as possible and then following them religiously. For a start, different pieces of advice from different sources can often contradict one another, so how do we know which one to follow? But more to the point: software engineering is not an exact science, and it can’t be distilled down to a set of infallible rules (however hard we might try). Every project is different, and there are nearly always trade-offs to consider.

In order to write good code, we need to apply a sound sense of judgment to the scenario at hand and be able to think through the consequences (good and bad) of a particular way of doing something. For this, we need to understand the fundamentals: What are we actually trying to achieve when we write code? And what are the high-level considerations that help us get there? Part 1 aims to provide a solid grounding in these more theoretical aspects of writing good code.