Working backwards to solve problems —Reverse engineering

Daniel Fiott
Nov 4 · 3 min read

let’s start by playing a game

There is six cards on the table faced down with numbers from 1 to 6, the highest number wins the game. I pick a card and you pick a card, your card is the number 2, and I look at mine and I say I want to trade.

Would you trade your card with mine ?

Most people answer yes and I understand the logic of that as the number 2 is quite low, it kinda sucks to have 2 from 1 to 6.

Now let’s reverse engineer the question.

If I had the card number 6 would I trade it ? How about if I had the 5 , I don’t think so right ? And if 6 and 5 won’t trade neither the 4 and so on.

So let’s apply this method of thinking to solve a goal

Goal: read 40 books in a year.

Each book consist of 60000 words average comes around 2.4 million words which need to be read in a year, but if you divide them by 12 it comes 200,000 words per month, which is around 50000 words per week and 7000 words per day or around 15 pages a day. Working backwards from the goal can create an easier solution and a more possible tasks.

Let’s applying this method in software engineering problems

We have a submit email form which does not work. The form consist of an email field and a submit button as shown in picture below.

Let’s reverse engineer the process flow to figure out the problem.

As you can see we started the flow from the browser side where checking if the input was recognised by the form then if request was actioned either POST or GET, then by checking if request was received by server and so on.

This example is a rough example as you can go in more detail to figure out exact where the problem is occurring but by going backwards from the solution or goal can help you figure out the problem along the way.

Daniel Fiott

Written by

I write about different things mainly Software Development and Devops, Writer for medium, Filmmaker as a hobby.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade