Foreword

Meet Bob. A few years ago, Bob decided to start driving an electric car in an effort to reduce his reliance on fossil fuels. Despite now running his vehicle entirely from renewable energy, Bob still takes steps to conserve energy where possible.

  • He turns off the engine when his vehicle is stationary.
  • If only travelling a very short distance, he prefers walking over driving.
  • Should anyone else be travelling in the same direciotn, he will offer to give those people a lift.

Nobody thinks Bob is weird for behaving like this - in fact, these are the very same behaviors that Bob has always practiced, even before switching to an electric vehicle. If Bob were to leave his engine running while parked, or if he were to drive twenty seconds up the road to buy a newspaper, people might say that Bob was using his vehicle irresponsibly. If he didn't offer lifts to people traveling in the same direction... well then they might say even worse things about him.

Conserving fuel is something that car owners simply accept as being a good idea. Most people are aware of the high price of fuel and are familiar with the things that contribute towards fuel consumption. Fortunately, measuring and monitoring fuel consumption is very easy because the associated metrics are all highly visible - the dashboard of a vehicle displays its current fuel level in real-time and almost all petrol stations advertise their fuel prices clearly in large illuminated letters on their forecourts (particularly frugal drivers watch these prices very closely).

The penchant for saving energy is not purely limited to the realm of car ownership - we all get electricity bills and we all know that we should turn things off when we're not using them. Money may be the main driver for our energy-usage behaviors, but there is something more primal going on here; in the back of our minds, the very notion of waste feels awful to us. No matter how far we've emerged from the primordial soup, our desire to conserve resources is an instinct that runs deep within our ancient heritage. Modern humans simply hate seeing things go to waste - renewable or otherwise.

So why then do we seldom apply this same instinct when it comes to building digital applications? Perhaps it's because the impact is so much more difficult to measure or that the wastage is too abstract to comprehend - but in reality, the principle is exactly the same and all digital products have, in various capacities, an energy footprint. This book aims to take our natural inclination to save energy and apply it to the domain of building web applications. It aims to show you that by prioritising sustainability, you can both save money and build better software.