Sunday, January 22, 2017

Simple solutions to seemingly difficult problems

At a company where I once worked, we used a tool which provided a few functions which we used to create the code in our applications. We were not able to modify the generated code, so we could only use the functions available to us.
Of course, we didn't have all the functions that a normal programming language would have, so solving some problems was not so easy.

We had a feature, where we could define the translation for a string in various languages. When the user selected the language in the front end, the translation of the string for that language would appear on the screen. And we had a function which gave us the translated string so that we could create other strings with it. This was sufficient for all the initial applications that we built.

Once, the team got a requirement that needed us to know which language the user was using. We checked, and found that we didn't have a function for this.

Following the process, we requested the supplier to develop the new feature, and they said that it would take a few months.

This wasn't ideal, and we were looking at other options, like what features we could delay in order to push this one up the priority list. We also looked at the option of paying more money for getting this feature sooner.

We then held a meeting to decide on the best solution. It was here that I realized that there was a much simpler solution. In fact, the problem statement itself contained the solution.

All we needed was a string called language, which would be translated into the language selected by the user.

Sometimes, the best solutions, are the simplest!