Monday, October 30, 2017

A short fairy tale

She saw him.
He saw her.
He said, "I love you".
She said "I love you too".
And they got married and lived happily ever after.

Why does this never happen in real life!!?!!

Tuesday, June 13, 2017

Getting the best out of someone

I was at the barber shop, and he asked me how I wanted him to cut my hair. And I had my opinions, and I started telling him exactly how I wanted it. He didn't understand what I said, so he asked me questions, and wanted me to explain.

I was tired, and didn't really have the patience, so that day, I said, "Just do what you think is best."

And he spent a long time on that hair cut. Even when I thought it was done, he would go on and cut that one hair which was a little bit longer over there.

And then he asked me one more question, and this time, I told him, "I already told you, just do what you think is best."

And that's when he told me, "Yes, you said that. That's why I'm putting all my heart into this haircut."

If you want someone to put their heart and soul into a job, just tell them that that's what you expect from them. Don't tell them how to do their job. They'll  ask you for help if they need it, they'll figure it out.

Trust people to do their best!

Saturday, April 29, 2017

Notes on react-native

Follow the instructions in the tutorial to install react-native and to create your application.

To run the application
$ react-native start

Then in a different window
$ react-native run-android






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!