The Hunch: 4 Times I Felt It And 1 When I Didn't, And What Were The Consequences
Tags: problemsolving, analysis
Published: 2018-08-29 17:00:00

---
title: The Hunch: 4 Times I Felt It And 1 When I Didn't, And What Were The Consequences
published: true
description: 
tags: problem solving, analysis
canonical_url: http://smartpuffin.com/the-hunch-examples/
cover_image: https://thepracticaldev.s3.amazonaws.com/i/v4ptmo8potcwvt42nyau.jpg
---
<i>This post was originally published in my blog <a href="http://smartpuffin.com/the-hunch-examples/">smartpuffin.com</a>.</i>

<hr/>

I sometimes have this feeling: <i><a href="https://dev.to/ice_lenor/problem-solving-a-hunch-356i">The Hunch</a></i><span><i><a href="http://smartpuffin.com/problem-solving-a-hunch/">™</a></i></span>. It's when I sense there is something wrong with the project, with the requirement, or with the feature, even when everyone else is sure all is well.

When I sense this, I feel like a dog who picked up the scent. I follow the scent by asking questions, until I get my answer.

Here's how it happens.

<!--more-->
<h2>Dataset Extension</h2>
Our Dev team asked the Data team to collect some new data, in order to extend our already existing dataset. We had 1000 items, and we wanted 5000 more. We told them how we want it to be prioritised, we agred on the timeline, and we left reassured.

The first deliverable was ready. They sent is a huge shared spreadsheet with 1 thousand rows. We were happy, since it meant we would soon have twice more data than before!..

I wrote a script to upload all this new data to our database. I found some small problems in the data, such as columns mixed up, or string values in numerical columns, and the Data team fixed them quickly. Nothing serious.

All was ready. I was (literally!) holding my finger above the Enter key, pressing which would upload the data to the live servers.

But I hesitated. I had <i>The Hunch</i><span style="color: #3c4043; font-family: Roboto,HelveticaNeue,Arial,sans-serif; font-size: 18.2px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2text-indent:0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; display: inline!important; float: none; text-align: left;"><i>™</i></span>. And so I didn't press enter.

I asked the Data team the very last (or so I thought) question:

"Do I understand it right: all this is the very new data? When we upload it, we'll have 2 thousand items, is that correct?"

No, they told me. They had decided to execute a clean-up project along with collecting new data for us. 600 rows in this spreadsheet are <i>to be updated.</i> Only 400 are to be created.

It took me a minute to gather my thoughts. Not a single time was the clean-up mentioned to us before. How happy I was that I asked!.. Had I uploaded the data, we would have gotten 600 duplicated items.

How, asked I, do I understand from the spreadsheet which items are new and which are old? Surely you have an ID column for updates?

No, they told me. There was no such column. There is no other way to understand that. They simply didn't realise we will have to know which exact items have to be updated - until I asked.

Long story short, after much discussion, they added the ID column for us, marked the updated items, and we uploaded all the data successfully.

But had I not have The Hunch<span style="color: #3c4043; font-family: Roboto,HelveticaNeue,Arial,sans-serif; font-size: 18.2px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2text-indent:0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; display: inline!important; float: none; text-align: left;">™</span>, had I not asked the question, we would have uploaded the bad data, and we would have learnt about it much, much later.
<h2>Square Miles Conversion</h2>
I <a href="http://smartpuffin.com/little-geo-stories-square-miles">saw a feature on our website</a>, where some geo-math was involved.<i> I immediately had The Hunch</i><span style="color: #3c4043; font-family: Roboto,HelveticaNeue,Arial,sans-serif; font-size: 18.2px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2text-indent:0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; display: inline!important; float: nonetext-align:left; text-align: left;"><i>™</i></span>: there must be a bug.

It turned out to be correct, there was a funny bug which was live on our website for 10 years, without anyone noticing.
<h2>New API idea</h2>
Our team was rebuilding a product. The original product was built some 15 years ago, and evolved chaotically.

My colleagues were in love with a particular idea. The new API was supposed to distinguish between 3 use cases that were the same in the old product.

I was very new to the team, and I wasn't completely sold on the idea. I felt like I didn't understand it enough. I thought it might be too complex for the end users. I estimated that a lot of work was needed to support the split, including categorizing the existing data and supporting backwards compatibility. In short, my first days in the new team were full of <i>The Hunch</i><span style="color: #3c4043; font-family: Roboto,HelveticaNeue,Arial,sans-serif; font-size: 18.2px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2text-indent:0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; display: inline!important; float: none; text-align: left;"><i>™</i></span>.

But I decided that my colleagues, knowing the domain area better than me, have thought about all this. I assumed they estimated the amount of work and agreed with it - before I joined them.

They assured me that yes, some work is needed to categorise the existing data into these 3 use cases, but it is rather straightforward. A person from my team will do that, and will ask 2 more data specialists for help. The results will be ready very soon. And meanwhile, why don't we go ahead with the implementation?

I voiced my concerns, but started to implement the new API.

A week after, we met to see how the data split was going.

All 3 data specialists who were categorizing the data disagreed on every single data entry.

I asked them some questions, and it became clear that they understood the use cases differently. Moreover, all my own team members - including myself - understood it differently as well.

Setting what's happening, my team members agreed to postpone the feature until there is more clarity on the use cases.

Had I not seen that the use cases and not thought through enough, we would have offered a half-baked product to our users, and we wouldn't be able to explain the reason to split the use cases to them.
<h2>Collaboration between two teams</h2>
I supervised implementing a cross-team task.

The problem was that many places used different APIs to fetch the same data. The APIs worked slightly differently and returned different results. The users saw different values and complained.

The task was to clean it all up. The purpose of the task was to:
<ol>
 	<li>Use one single API in all places, because:</li>
 	<li>We wanted to unify display.</li>
</ol>
Developer1 implemented new API calls in three places. For some reason, in two of them they overrided results and displayed something different based on some condition.

So we still had the same inconsistency as before. This solution sort of complies with purpose 1), but completely defeats 2).

Developer2 replaced the API call in one place that I pointed out as an example. Turned out, results were overrided further in the code, based on yet <i>another</i> condition.

Moreover, in the area of responsibility of Developer2 there was one more place with the old API. They didn't notice it and didn't make any changes to that place.

Again, this solution half-complies with 1), but is out of line with 2).

I found out about all this only when I replaced the API call in yet another place. While pushing my code, I felt <i>The Hunch</i><span style="color: #3c4043; font-family: Roboto,HelveticaNeue,Arial,sans-serif; font-size: 18.2px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2text-indent:0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; display: inline!important; float: none; text-align: left;"><i>™</i></span>. Because the task was so complex and distributed between several people, I decided to test all changes at once.

What I saw was that <i>all</i> of them were different from each other.

After all these efforts, customers were still confused by different data on different pages. The developers' time was spent twice. And again, it would have been noticed much later, had I not decided to double check.
<h2>When I failed</h2>
Long time ago, we were <a href="http://smartpuffin.com/gis-system-our-requirements/">implementing a new GIS-system</a>. Our old system was storing coordinates in the UTM-projection, which meant you can work with only a relatively small piece of map at a time.

In the new system, we wanted to have the map of the whole world.

We made a decision quickly: let's store coordinates in latitude and longitude, and always work with them like that. When we want to display them on the screen, we will project them as needed.

Our next decision was to split the map to <a href="http://smartpuffin.com/gis-system-map-navigation/">tiles</a> to display them on the screen. And here we also made the decision to use latitude+longitude. It seemed only logical.

I spent almost a month implementing the tiles on latitude+longitude coordinates. Doing math on the sphere is hard, and I made a lot of mistakes. It was taking forever. I just didn't seem to get it right.

Seeing how I struggle, a more senior developer proposed to scratch all that and make a decision to have tiles in flat projected coordinates, using the projection our customers were using the most.

I agreed reluctantly, since I still thought having "real" spherical coordinates was "right". I deleted the complex code and wrote the new one in just 3 days. It's been working perfectly ever since.

I didn't have <i>The Hunch</i><span style="color: #3c4043; font-family: Roboto,HelveticaNeue,Arial,sans-serif; font-size: 18.2px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2text-indent:0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; display: inline!important; float: none; text-align: left;"><i>™</i></span> back then - and, as you can see, the team lost a month because I didn't think very well about the consequences of the decision - how complex the math would be to implement.
<h2>How to do it yourself</h2>
I see many people not thinking through all aspects of their tasks and decisions, from technical to product ones, to business ones, to data collection ones.

A task, even small and simple one, often involves much more than it seems. For developers, I wrote an article <a href="https://dev.to/ice_lenor/problem-solving-thinking-about-corner-cases-47hh">helping them to think about corner cases</a> in advance, when coding. The similar advice is applicable to all other sorts of tasks.

Try to think about the problem <strong>from all angles</strong>. What other people it involves? Does it involve changing existing stuff, be it code or processes or data? Does it align smoothly with everything else? Is there a logical flaw?

It is like testing. You list positive cases, negative cases, and corner cases; you also test other classes your change could touch; you ask your users for help; etc.

It will almost definitely be <strong>cheaper and faster</strong> to spend some time investigating first, than to rush into implementation and fail later.

Knowing what is actually involved will help you with <strong>prioritization</strong>. If the task is large, you might decide to do a smaller one instead.

Sometimes, after looking at all aspects, you might make a decision to do the task <i>with</i> the flaw. You might decide to not care about a certain problem or make a trade-off. Still, you will make an informed decision, and not simply go with the flow.