How challenging your assumptions will make you a better problem solver and software developer?

Do you often find yourself spending countless of time stuck when programming or debugging? This post provides a simple yet effective tool that you can start using right now to be more productive. If you already know it - this tool can still be a kind reminder.

How challenging your assumptions will make you a better problem solver and software developer?

Have you reach a place where you no longer find any solution to your problem. You have been debugging your codes for hours yet you made no progress. It’s time to challenge your assumptions.

Assumptions

Assumptions are actually important as they simplify the problem we are solving. However, not all assumptions are correct and necessary. Moreover, some of them are hidden yet influences our decision making particularly when coding.

Story

On the backend, I was recently working on joining two Sequelize models in an e-commerce like application. I just needed to write the model classes, add them to the current Sequelize instance and specify the type of relationship, one to one or one to many.

After this process, using Postman, a API development app, I retrieved the joined data as expected.

My colleague then requested me to accept a merge request of his latest changes and merge them into the develop branch.

After doing so, on regression testing my JOIN feature, I was greeted with a strange error. Model B was not related to model A. I had to specify the relationship, which I already did.

Not knowing to exactly how to approach this problem, I spent the next two to three hours trying to understand what went wrong. I glanced on similar issues on Sequelize and TypeScript Sequelize, to no avail.

Next morning, with a fresh brain, I checked my codes and experimented with different variations of the relationships - changing from hasOne to hasMany - which indicated that Model A could have several Model B.

The codes worked again. The data could be retrieved as was the case earlier.

Maybe out of tiredness, I assumed that the problem was everything but my codes. I still don’t specifically know why it worked earlier; perhaps the data set was limited (I implemented pagination earlier).

Side by side running lanes
Photo by Tim Gouw / Unsplash

What's the Idea?

The way we treat assumptions when solving problems are fundamental to succeed or fail. Sometimes they are in plain sight, other times hidden.

We need more effort to locate them.

Basic Way to challenge assumptions

  1. For a particular problem, identify the assumptions and make a check list for each
  2. Determine if the assumption holds true
  3. If correct, check it and proceed to the next.

Ask Questions

Whenever in doubt, ask questions to get more information on the subject. You can write them down for yourself to analyse and answer - or ask your colleagues, especially the decision makers such as the Project Manager.

For example:

  • Do I clearly understand this task?
  • Do I have enough information to proceed?
  • Dear Bob, I did not understand the requirements, can you give me a scenario?

You can also use the technique below which forces you to think differently.

Assumption Reversal Technique

  1. Write down list of assumptions, even the ones you think is correct
  2. Write the opposite of each assumption
  3. Write down new ideas based on the reversal of those assumptions
  4. Use these ideas to experiment on solving the problem.

Let’s use this technique as a way of illustrating my problem described above.

List of Assumptions & Opposites

  • My codes are still working after the merge | they are no longer working after the merge
  • The Database connection is valid | the connection is no longer valid
  • The Sequelize models are complete | they are missing
  • I’ve read the Sequelize docs and know everything | I’ve read most of the docs but missed a lot of important features

Research

Problem Solving 101 - Challenge Assumptions

Are You Stuck on a Problem? Start Questioning Your Assumptions

Quotes

“Ask questions; don’t make assumptions.” Angela Ahrendts