25-Dec

Methodology, Development

Keep it simple, not stupid!

Simplicity is beautiful. But our world is complex. How can you start with simplicity, defer decisions, and introduce complexity as needed without multiplying the effort?

1 min read

·

By Geir Sagberg

·

December 25, 2022

You've heard it a thousand times; "Keep It Simple, Stupid!", repeated as a mantra when faced with a decision that might introduce complexity. And for good reason; simplicity is often the right choice. But when is it not? And what, exactly, is simplicity?

Our job as developers is to develop solutions to problems. The problems can appear simple:

"How can I find the closest free scooter?"

Or the problems can appear harder:

"Given collected traffic data for the last 5 years, how can I predict where accidents are more likely to happen in the future?"

Regardless of the apparent complexity of a problem, experience dictates that:

  1. Problems are always more complex than they seem at first
  2. Problems can always be broken down into smaller problems

The journey of a thousand miles begins with one step.

- Lao Tzu

Let's introduce an example:

You are making a new web app using ASP.NET Core MVC:

View of a new ASP.NET Core Web App
A fresh ASP.NET Core Web App

You get a folder for your controllers, one for your models and one for your views. Simple, right? But what happens as you keep adding more controllers, models and views? Pretty soon you'll end up losing control, and will have to refactor your code, perhaps ending up with multiple layers of coupled code.

Instead