What exactly is a local maximum?
I am not using the mathematical definition of the term. For the purpose of this discussion, let’s have two functions of effort spent vs value generated.
Initially, both functions are linear in nature, where spending more effort generates more value. Spending more effort leads to diminishing returns after the point where the most value is generated.
Now you have to make a decision about which function you choose:
The first requires a lot less effort to reach the point where you generate the most value. The caveat is that it does not generate as much value as the other option in the end.
The other option is a “global maximum”. It is a decision, which if you take it, will need high effort. The advantage of taking this decision is that it will generate more value before you reach the maxima.
To limit the scope of this discussion, we will limit the functions to the point where the maxima are reached.
Let’s assume that once the maxima are reached, no more effort is spent.
Also, let’s not argue about where the points are on the graph. The graph is not to scale.
So you might be thinking “boring problem” or “how does it relate to my job?”. Well, let me give you an example:
The library conundrum
Let’s imagine a scenario. You started working on a new greenfield project at your company. You have to architect the frontend, so you start working on how the codebase will be structured and which libraries will be used.
State management is an important choice to be made. You think about using a server state management library since the dashboard you are building is a UI that displays some data to the end user. You research which server state management libraries are popular at the moment, and you see two of them being talked about a lot — React Query and SWR. You also have to keep in mind that nobody in the team for the project has used either of them before.
You start evaluating the two of them and come to the following conclusions:
- React Query is a powerful library that can handle both queries and mutations. It has a steeper learning curve compared to SWR. It does a lot more than SWR can, and you’ll be extracting a lot more value from it. But it requires a lot of educational effort to be made
- SWR is a simple data fetching library. It cannot handle mutations, but the learning curve is very gradual and the developers will pick it up quickly
Which brings us to the original conundrum:
- You could use React Query. It would have a steep learning curve, and the developers would take more time to get onboard with it. It could also slow down the development a bit in the initial phases. A steep learning curve would also mean that a lot of mistakes would be made before best practises are established.
- Or you could use SWR. It is simple to get onboarded to and does not require a lot of configuration to get working. But the issue with SWR is that it does handle mutations and might be missing some things. Due to the simplicity of the library, there will be fewer mis-steps and development speed will not be affected.
In an ideal world, there would be a right decision to be made with a book explaining why. Since we don’t live in an ideal world, we often have to make decisions based on incomplete information and an optimistic mindset.
The time dilemma
Do you know what’s worse than making the wrong decision? Making the right decision but leaving it half done
Making a decision is one thing, but driving it is another. If the decision you take requires more sustained effort, you have to make sure that the effort is actually put in. Otherwise, even if you commit to the “higher effort, higher final value” option, you will never extract the full value. The incomplete work will live in pieces and cause more problems
On the other hand, if you have to spend less effort, it might be comparatively easier to get it prioritised. It will also reach its full potential in less time.
Post completion shock
Let’s say you chose the "lower effort, lower final value" and then drove it to completion. At the end of it, you are not happy with the value you have extracted. Now that the decision has been made and the work is completed, you can’t do anything about it.
You feel like you should have taken the other decision, even though it required more effort to be put in. You would have received more value out of it on completion. What if…
Making the choice
Looking for an answer? I don’t have one. Ask an experienced engineer and they’ll tell you.