Understand why before how

Imagine that your manager or project manager tells you they are considering making the background of a landing page a video instead of an image. They're about to hire a consultant to make that video. They want to know from you how difficult it would be to embed that video. What is your first reaction? Most engineers start thinking about the how right away, and then diligently provide a timeline estimate. This is a mistake. Your first instinct should always be to understand the why first. Is the goal to increase user engagement? What will the added latency of a video load do to engagement? Are you going to need additional technical effort to make sure that slower devices (e.g. mobile phones on 3G) aren't negatively impacted by that latency? Do they just want the page to feel more dynamic? Is there is a Javascript-only solution to this problem, that can be delivered in a few KB instead of a few MB?

You can't fully understand how until you understand why

In many cases, without understanding the reason for the request, you're going to miss important details about how to perform that request. As an engineer, it's easy to assume your job is just to translate what the business wants into code. Unfortunately, the business doesn't really know what they want, they just have a hazy idea of what problem they need to solve. It's our job to help them figure out exactly what they want. Without understanding why, you can't understand how. Understanding why gives you the best clarifying questions to ask. 

Consider the previous example: once you understand the why, the technical requirements could completely change. You may even realize that the task will do the opposite of what the business wants (video = poor load speed = decreased engagement). In this case, you might have saved the business an expensive video production, an expensive experiment to test the results, and an expensive reduction in user engagement. Without understanding why, many of these details may have been missed.

This applies to all types of tasks

A nuanced understanding of the why behind a request can affect the way you approach all kinds of problems, not just user-facing ones. It affects the naming of variables, classes, and database fields. It affects trade-off decisions between latency, simplicity, and maintainability. Every decision should be made with the perspective of "why does the business want this?" It will help you write better code that better communicates business intentions to future maintainers.

Don't be afraid to ask, it will be worth the time

Unless there's an urgent production issue, I always make sure I understand the why behind a request first. In the long run, it always turns out to be worth it. This style of thinking has saved businesses I've worked for thousands of hours in development on unneeded work, in addition to other costs. Even for simple requests that should only take a few hours, I make sure I understand the why before figuring out the how.

Comments

Popular posts from this blog

Feature design process

The many benefits of working in small increments

The two qualities of great software architecture