Friday, July 3, 2015

Problem of autocorrect - A quick solution using Approximate String Matching

I was always curious about the auto correct feature of Google.  I mean, lets face it - it looks ultra cool especially when we type in some vague disjointed letters and Google suggests us exactly what we had in our mind.  It feels like Google kind of reads our mind !

With some time in my hand, I decided to venture out on finding how to do it.  Of course, I don't have the monstrous server farms that Google has its disposal, to make an equivalent web solution.  Also, considering the fact that I'm mostly a C/C++ guy, I decided to analyze and implement a solution more suited to the C++/desktop configuration.

A quick Google search for this problem domain yields many results.  Apparently string matching / searching is a popular research topic.  But, I wanted a more simpler solution than suggested by the results.  And what do you know, the age old classic book on algorithms - 'The Algorithm Design Manual' by Skiena, just had something that meets my needs.  Combining the solution given in the book with some extra code, I could arrive at a decent auto correct solution.  Of course, it has many flaws.  But its a good first step effort IMO.

So, without further ado, here's what it looks like :

1. Design:

Approximate String matching is achieved by finding the minimum distance between two strings.  Here distance between two strings is calculated by the no. of operations (substitutions/insertions/deletions) it takes to convert one string to another.

For ex: lets assume our input string is abiliti and we have to convert it to either ability or capability.
We would need to substitute i with y, to convert abiliti to ability.  But it would take much more effort to convert from abiliti to capability.  So the distance between abiliti and ability is much lesser than abiliti and capability.

Now if we have a dictionary(text file) of grammatically correct words, all we need to do is to compare our input string (the one which needs a correction) against each of the word in the dictionary , calculating the distance in each case.  The word with the minimum distance is the one that should be the correct one.

Easy isn't it ? Not so fast.  Its easier said than done.  And moreover, this method does have its flaws, which I will cover in another topic.  But for now, lets see how to go about implementing this.

2. Implementation


Lets say"dictionary" is a string of vectors containing the list of grammatically correct words.

lets initialize lowestCost to a high value say 65535,














Suggest would be the auto corrected string.  This does work fine in many cases.  But not all.  Anyway, the correctness of the above solution will be analyzed in another post.  But for now, even if its successful in giving the correct output, I would say it still has some basic flaws.

Can you spot the problem with the above approach ?

For one, we are unnecessarily comparing the input string with every word in the dictionary.  To take the above ex:  abiliti, my search should have compared only the alphabets starting from a.  But in the above, I continue until Z.

So to improve it further, I would construct my dictionary in a more intelligent manner.  Instead of a single vector, I would have an array of 26 vectors, each corresponding to an alphabet.  I will have a Map that maps from the letter to the exact vector.  Now, if I've to search for the word straight, I would go from my Map, to the corresponding vector list that has words starting only from S.

Our dictionary is now a map of alphabet -> vector list of grammatically correct words starting with  that alphabet.  So, instead of running through all the words, we just take the first character of our inputStr and use it as an index to directly jump to the corresponding vector list.

So, the above algorithm changes to :


Now , that the main function is in place , what about the utility function - string_compare, which is the one doing the actual grunt work of calculating the minimum distance.  How do you go about comparing two strings to calculate the minimum distance ?  Do keep in mind that we have to perform this operation for hundreds (maybe even thousands depending on the size of your dictionary).  I'll leave it as an exercise to the reader.  Skiena's book, proposes an elegant as well, using dynamic programming .  It could also be easily googled.





























Tuesday, April 30, 2013

What matters the most ?

Sorry for the lame, obvious catchy line intended to attract readers :)


I don't mean to ask this question in the grand scheme of life.  But more specific in one's career's growth.  Especially in a company with thousands of employees.  What do you think matters the most ? What makes a person standout in the crowd ?  While most folks burn out at middle management, and others just give up and move to other business, there are quite a few who stick it out in their chosen field, and grow up in a company , often reaching to the peak before they retire. I was pondering over this issue, talking to one of my friends the other day, and he said, there was some special "factor" required for a person to get noticed, to move into premium roles like, a VP or SVP.  So what's this "factor" that differentiates one person from the herd ?

Here are some obvious answers to this:

1. Skill: While this may sound to be the most obvious, IMO, this can take you only so far.  At some stage in your career, you reach a place where everybody around you are equally skilled in a particular line of work as you are, if not more than you.  While it really helps move your career in leaps in the initial stages, this cannot propel you all the way to the top, unless you are in a very small company, or you happen to be one of the initial founders.

2. Hard Work: This is might tie with no.1 as the most obvious answer.  A really worthy quality to have .  You might have all the skill set in the world, but none of them are useful, if you don't work hard and keep it honed.  But again, I've seen hundreds of employees who are damn hard workers, but they just wait and stagnate.  Most senior management see them as necessary folks with no life of their own.  This is the worst category to be in, if this is one's sole strength, for he is in the danger of depression/burnout much sooner than others.

3. Focus: Now, this is a particularly interesting talent to have.  Many people can be hardworking or skilled, but not everyone is focused on the task at hand.  I've seen many skilled engineers while away their time browsing random web pages or really hard working men, staying up until 11 in the night, with no productivity to show.  So, focus is indeed important.  But it cannot be a unique talent on its own.  Its often best complimented with the above two points.

So, now, coming back to the topic title, IMO, the one talent that differentiates a person from the crowd is.... 

4. Consistency:  Yes.  You heard it right.  IMO, this is the most important factor is differentiating a leader from the herd.  "How consistent you are in executing the task given to you !"

Its not enough to be skilled.  "Are you consistently able to hone your skillet over a period of time, and remain in business ? "

Its not enough to work hard for one stretch. "Can you do it consistently until the goal is accomplished?" 

Its not enough to be focused at one given task for a while and finish it.  "Can you consistently focus on the tasks given to you day after day without getting distracted ?"

IMO, this is what differentiates leaders form the herd.  They give consistent results, time after time.  They hone their skill-sets regularly, they are hard working and focused over a longer period of time than most.

So, if there are any of you who think you have been mistreated in-spite of being skilled, hardworking or focused at your job, ask  this to yourself - 'are you consistent enough' ?

Saturday, February 2, 2013

Pomodoro Technique

People assume that, being an Engineer in the software development field, I spend all my time working on some of the most complex and interesting problems out there.  While its true to some extent, the reality is that, its not always. Some days are filled creative tasks like finding obscure bugs, brainstorming design decisions etc., which really makes you glad you choose this field.  But, time to time, on some days, even us engineers are subjected to the "non-grey cell consuming", soul crushing , boring , mundane tasks.  And the irony is, you can't have one without the other.

Now, based on my work experience so far, I found that I have a tendency to procrastinate all these mundane not-so interesting work until the last minute.  And one fine day I walk into my office, open my office email, and BOOM ! my manager needs the report in the next hour.  You start cursing yourself for neglecting it so long, and start working on it asap ignoring even that cup of coffee you brought in to drink.  Needless to say, it causes lot of stress, and also takes valuable time away from more important things that has to be attended to on that day.  I tried many ways to get around this problem, and one of the most effective way, that really works for me, is the pomodoro technique.

In a nutshell, quoting straight from wikipedia:
The technique uses a timer to break down periods of work into 25-minute intervals called 'Pomodori' (from the Italian word for 'tomatoes') separated by breaks. 
So, this is how I tackle these mundane/routine tasks at my office these days:
1. First thing in the morning, make a TODO list of the tasks to be completed.
2. Pick the least interesting / mundane tasks and fit all of them into one of the day slots (usually post lunch, unless its required to be completed before that) 
3. Before beginning the task, start a timer of 25 mins and start working on it.
4. Take a break for 10 mins, and then start another timer of 25 mins and continue to work, so on until the task is completed.

The reason this has been working, in my opinion, is that, it brings in a psychological relief to me.  When I start a timer for 25 mins, I'm telling my mind that - "hey its ok, even if the work is boring, I've to survive it only for the next 25 mins".  It has so happened that sometimes, at the end of the 25 mins, the work no longer seems boring , and instead of the 10 min break, I just go ahead and finish it. 

If you have any other techniques to battle the routine/mundane tasks, put them in the comments below.   Cheers !

(link to the original image:  http://upload.wikimedia.org/wikipedia/commons/thumb/3/34/Il_pomodoro.jpg/220px-Il_pomodoro.jpg)

Monday, December 31, 2012

2013 - With new year comes new Resolutions !!

First, let me wish you all a very happy and prosperous new year !!

Given below are some of the resolutions I plan to abide by in this new year.  I'm not sure how long will I take to achieve any or all of them , goal is to get it perfected around 2 months from now !

1. Wake up early by 6 AM - Well, I've been practicing waking up early (than usual) for the past few days (usually i wake around 7 - 8AM most days , including holidays), and I've found  that the quiet time you get alone in the morning is totally worth the hassle.  And moreover, if this article is any indication, then, most successful people are early risers.  It also gives me sometime to read up on any interesting tech, or explore more on the ideas I might have.

2. Exercise daily for at-least 15 mins - I've been practicing this as well since the past few days.  I've to admit, this adds a huge amount of difference to how positive you are when you start your day.  I have not been lifting weights, but just simple push ups and ab exercises.  Even the small 15 mins duration, helps me boost my self confidence and makes me cheerful at the beginning of the day.  In my opinion, starting a day on a cheerful note does increase your productivity in that day.

3. Join a Gym and work out for at-least 4 days in a week - Now, this is something I've been putting off since a long time.  I'm not sure what the problem is, but seems that I'm too afraid that I'm gonna fail at this. And whenever I make up my mind to enroll, something at the back of my mind tells me not to, and pulls me back. But, with winter around, and chances of going for running/walking are at an all time low, hitting the gym is a must to stay fit.

4. Blog twice a week - This is basically to improve my writing skills as well as bring some thoughts out of me in a creative way.  Not that my English is bad, but I feel I've lot of room for improvisation, especially when it comes to articulating my thoughts/ideas in a creative and simple manner. Also, being a techie, one of the most important aspects of my job is to explain to the non-techies in a way they understand.

5. Avoid unhealthy food - Note that I've written 'Avoid', not 'Stop'.  My goal is to avoid eating junk whenever / where ever I can.  For ex: If I've a bowl of fruits / veggies vs a fried snack, guess what would I pick ? Hope you get the idea.  Indulging once in a while is no issue, but I don't want to gorge only on unhealthy food all the time, especially when I have an alternative.

Anyway, that's about it.  Would love to revisit next year and see how many of the above I got to meet !

Monday, October 1, 2012

Taxonomy of the manager species !

Here's a brief list of the kind of managers I've got the opportunity to work for in my career so far:

1. Control Freak - Thinks he owns you.  Controls every minute detail of your work.  Would throw a tantrum if you don't include him in emails.  Will cause a ruckus if you spring a surprise at him, always wants to be the one in control and hates anyone who challenges his authority.  You can grow as long as you don't threaten his position.

2. The Dude - He still thinks he's in his twenties.  Makes lewd jokes and remarks about fellow colleagues.  Discusses the latest pop videos , movies, rock concerts to show he's one in the gang.  Tries too hard to impress everyone and takes everything as a joke.  Believes in team work.  If you are under one of these "Dude's" find the nearest exit and bail out.  Unless you like splitting tab for the beer at TGIF !

3. The "Delegator" -  Believes everyone knows their job. Gives little guidance or support to the team.  His way of conflict management is to make everyone shake hands with each other. Does little team management.  Acknowledges your existence once in a while (mostly when you put down your papers).  Believes that his job ends at delegation and collecting status reports.  You learn the art of ownership under such people, but he'll do little to take your career forward.

4. The "Wannabe" -  This is by far the worst kind.  Runs his team on the principles laid down by "Philip Kotler" , and quotes frequently from popular "self help" books.  Always on a high of meeting deadlines and always on one toe trying to get things to perfection.  Believes in the company values, would sell his liver if the bosses ask and expects to get the corner office by hook or crook.  Will try everything in his capacity to achieve his goals.  Easy to spot - they come in formals , keep using words like 'in the loop', 'synergize' etc, usually the first to come to office and the last to leave.  Can be seen hanging around on weekends as well, if you dare to step in.  These are another bunch to avoid !

PS: Just my opinion, not intended to offend anybody !!

Saturday, September 1, 2012

Melancholy ....

Some days are just off, you just wonder how to pass the time and indulge yourself in random activities.  The activities themselves don't have to bear any meaning for you, you just do something as if your mind is stuck in a cycle of indecision and laziness.  And, before you know - BAM ! Its 2 AM in the morning and you are still staring at your computer monitor ! Where the time flew ? 'Ah life sucks !', you declare and continue staring, randomly browsing, munching away that unhealthy snack that kills you a little every single day, and again make another resolution (in vain). to change yourself and upgrade your life first thing the next morning.

The cycle of melancholy that seeps into your life every once in a while, is a cruel master.  It makes you its slave. It eats away any form of energy you would have.  It engulfs your mind, clouds your judgement, pulls you back into boring and lifeless routine activities. It prevents you from accomplishing anything, and makes you surrender yourself involuntarily to it.  But from time to time, it does ensure that you remind yourself how of miserable you are as a person and while you do it laughs and jeers at you.

Yet, it happens to all of us, happens to the best of us, happens to the worst of us, and almost anybody who fits the description of a mortal human being.  Melancholy is perhaps one of the constants of life, like change.  It cannot be avoided, it cannot be planned for.  Its always lurking in the corner, sneering, waiting for the right opportunity to pounce on you at a time when you least expect it.  And when it does arrive, it saps at your motivation and slowly gnaws its teeth at your character.  

The only escape from its dark, cold and foreboding touch, that I know of , is to wait.  Simply wait until it settles away, don't try too hard to push it.  It begs you to do it, it derives pleasure as you try to shake it off from you.  It laughs at your efforts on curing yourself.  It loves a fight as it knows its gonna win at the end.  So, instead, make it your friend.  You don't need to necessarily like it.  Treat it as one of those friends / relatives who you have to shake hands with once a year at the family gathering.  You hate it, but you have to deal with it and move on.  Just wait for the unpleasantness to get over, and then slowly, collect back what's left of yourself and surge past it.  Melancholy hurts, just minimize the damage you allow it to do on you.

(link for the image : http://www.phocabulary.com/melancholy)

Sunday, April 15, 2012

Self Leadership and Imagination

I recently attended a two week workshop on general soft skills / cross culture and related subjects' training.  Two topics really made me look up and take notice.  The others were good too, but the below topics really caught my attention.

1. Self leadership
2. Fostering creativity

I will not describe or discuss here as to what was taught to us in the workshop.  But I will just put down my own independent thoughts on the above topics from my perspective.


1. Self Leadership: 
I think this is perhaps one of the most interesting topics that has caught my attention recently.  We often complain of how much change we would like to bring in a "system" given the chance.  We often complain about the lack of leadership skills shown by others who hold such positions.  But when you do some introspection you realize that, leadership is in fact, not so easy.  And you realize it the hard way , when you try to "lead" yourself into "change".  The "change" could be anything , it could be as simple as "waking up early in the morning".  You can make a plan and start the process of "self leadership" into accepting yourself into this simple change, and you'll realize how hard it is ! It takes great amount of force to pull yourself out of routine and adjust yourself to a new reality. Most of us give up somewhere along the way, and say "it just isn't possible" or simple, procrastinate it so you wont feel guilty of totally giving up.  Whatever the case maybe, you need to ask yourself this - "If its so hard leading yourself, how do you think you'll be able to lead others ?"  Note that, I'm talking about "leading" and not "managing", they are totally different from each other.  Managing people is rather easy, but leading them, is hard.  And to those, who think they're already better leaders, or they think they can be better leaders, I would say your litmus test is when you start "self leadership" !  Try leading yourself into accepting a simple change from yourself towards improvement and you can gauge how good your leadership skills are !


2. Fostering creativity: 
Now this is another interesting misconception that I see most people have.  I see how often people believe that they are not "creative", and it takes some genius to be really creative.  After attending the workshop, I feel that this notion of "lone genius" is really misguided.  Creativity exists in all of us, its just that we let it go into hibernation, simply because we find it easier to adjust to routine and stay in our comfort zone.  For ex: We were asked to paint a dragon with water colors.  Now, even though I was fairly good at drawing long long time ago, I did not know I still had it in me.  But when I took those brushes and started painting, I felt I did a fairly decent job.  Now what sparked this ? In my opinion, its just that I was not afraid of the results / or in other words "failure", there was no one to judge me, and I had no critic to tell me whether it was good or bad.  I was like a child, exploring what I could  do with those brushes.  That's creativity.  Creativity exists in all of us  , but it only sparks when we set our minds free, get out of the "routine" box , stop thinking of risks and feasibility and worry about acceptance .  When we do that, we can see that we explore so many avenues which we initially thought did not exist.


Friday, March 23, 2012

Intellectual property use / abuse ?

I find that, in recent times, one of the most abused area in tech business, to make a quick buck is Intellectual Property Rights (IPR).  Not a day goes by without reading some tech company suing some other company over some insignificant piece of design, which I honestly doubt the creators would've even stolen consciously ! From protecting ownership, this IP has become more of a tool for cash-strapped companies to make a quick buck.  You know , kind of , legal extortion ! I feel as if this IPR, while on one hand protects the rights of ownership for the individual, is stifling creativity and innovation.
       Lets take the simple example of touch screen phones.  Now, Apple invaded the mobile phone market around 5 years back with its iphone 2G, and changed the landscape forever.  Not only did it bring up a barrage of copycats, it also, brought with it a slew of lawsuits, with every company suing every other company.   So, how do the other companies escape the charge , if they can't afford the royalty ? They just have to re-do everything from scratch.  You already have this touch screen technology here, but instead of building upon it and improving it, most other companies are spending so much of resources on just re-inventing the same thing, albeit with some minor difference ! Google has a search algorithm which gives excellent results, but can MS improve on that ? Or can anyone improve on that ? NO !  MS has an in-house group spending millions of dollars to do the same thing which google has already accomplished ! Why ? Because the algorthm is an IP of Google.  You either cough up millions of dollars in royalty, or make your own thing from scratch.
     Now, please dont mistake me here.  I'm not saying its right to steal the hardwork of others.  But, I wonder, if our progress will be the same, if we start restricting sharing of knowledge using tools like IP and copyright ? What if Newton had patented the 3 basic laws of physics or if Alexander fleming had patented penicillin ? Would the world have been the same ? Netwton wasn't wrong when he said, "If I have seen farther it is by standing on the shoulders of giants", I wonder, can anyone else in this day and age, dare make such a statement ? Well, they can't if they do, the giants will sue them to eternity.
     Although it seems more like a hope as of now, I wish these tech companies learn to live together and still go in for a healthy competition and not sue one other over crazy insignificant IPs.  It doesn't help the industry as a whole, and can only make it stagnant instead of taking it forward. Here's to hoping for a healthy competition .... signing off for now .... catch you in some time :)


Saturday, March 3, 2012

Project Skyrim

My immediate goal in my free time is to complete and wrap up Skyrim.  I've clocked in upwards of 40 hours and nowhere near the end.  If info on the interwebz are to be believed , I still have around 60-80 hours of game to burn.  Now, I'm the sort of person, who can't take up another game until I finish one.  So, I've this huge back log of other games waiting to be played.  And then, there's the release of Mass Effect 3 looming in my face.

So, I'm starting "Project Skyrim", which is basically completion of the game as soon as possible (2 weeks).  I'm planning to ensure that I can dedicate as much of my free time at home as possible to complete this.  Which means, giving up on watching movies, facebook, idle browsing, and reading up on game tech.  However, Skyrim being a mammoth game, I can't complete each and every quest and get every piece of that finesse armor/equipment available in the game.  So, this is what I plan to complete in the coming weeks, before I start up another game.
1. Thieves guild quests
2. Dark Brotherhood quests
3. Imperial legion quests
4. Bard college quests
5. Main quest

I plan to re-visit the game when it has a DLC and go on with other random quests and get all those rare equipment and armors in the game.

Lets see how my project goes.  Wish me luck....off to play Skyrim now !

Thursday, March 1, 2012

Oh Well....I got promoted !!

YAY !!

Got promoted to Senior Engineer.  Nice happy occasion.  It was quite some time since I had been promoted - maybe 3 years I guess.  Spoke to some of my family members, but I had to sugarcoat my new role - you know, Senior Engineer in India, is a post, you get after 2 years into the job.  Not after 8 years.  Funny how much difference the cultures make.

Anyway, this is good news for a many reasons.  First, I don't need to worry about the next promotion for atleast another couple of years.  So , it means, I can just focus on my job, and not worry about impressing anyone.   Second, I don't need to work my ass off pulling 16 hour work days.  Working for 10 hours as I do generally and pulling in a late night whenever the work demands should suffice.  Its really refreshing to get out of the rat race and finally be able to do what I want.  Which is write good programs, learn some interesting stuff on directx, learn some basic photography with my DSLR, and get to explore this country I'm living in currently - Korea.  Not to mention , spend more time with my wife and daughter along the way :)

Oh by the way, I plan to shift this blog wordpress from blogspot in sometime.  Still figuring things out on how to use Wordpress.  The main reason of the shift is the wordpress support on android and well, I see that its much more robust than blogger.  Only downer is that it doesn't allow me to post google ads.  Not that, I've too many readers here who would make me rich.  Are there ? lol !  Also, another idea is to keep this blog as it is, and have another blog in wordpress to talk mostly about my technical ramblings.  Let me see how it all works out.

Anyway, signing off for now....good night !

Monday, February 6, 2012

Life as an Engineer in South Korea - Part 1

Its quite some time since I've updated this blog.  I can come with a multitude of reasons, but honestly deep down I know its due to sheer laziness.  Sorry for that (as if you are waiting with baited breath he he).  

Anyway,  its close to three months since I entered this beautiful place and I thought of writing a bit about it here.  Usually we get enough information about Indian Engineers in US/UK or any other English speaking countries.  But information about Indian Engineers in Korea is hard to come by on WWW.  So, hopefully, this will give some insight into aspiring Engineers who're looking to take up employment here.  I'll give the information in parts.  In this post, I'll address some concerns I had before coming here (these are very common, and most people would've them too).

For the uninitiated, I recently took up job as an Engineer at one of the most prominent companies of S.Korea (no cookies for guessing ;) ) in Suwon City , S.Korea.  I had lot of apprehensions initially about accepting the job offer and life in general, at a country where, finding someone who speaks English, is equivalent to finding someone who likes Tees Maar Khan in India.  Sorry for the bad punchline, I'm not so good with analogies !

Some of the most common concerns I had were in the below areas - 
  1. Food
  2. Working long hours 
  3. Harsh climate 
  4. Language Barrier
  5. Cost of Living

Let me address them one by one.

1. Food - Food is not an issue so far, mainly because we had brought most of our Indian groceries with us here.  So I get to eat delicious Indian food daily.  And my wife seems to have found an otherwise previously undiscovered love for cooking delicious dishes deep inside her, which works greatly to my advantage.  Add to that, my office has a good, well stocked, Indian Cafeteria, which offers decent Indian vegetarian meals.  There are some pizza places, where one can order vegetarian pizzas as well.  You have a couple of Indian restaurants as well in Suwon where you can find vegetarian food.  But as a whole, being a veggie, one is at a disadvantage here.  Some of the vegetables like green beans are very very hard to find, Indian  stores are few and far , and even if you do come across the few Indian stores, Indian Rice cost like $22 for 5kgs !  So, if you are an Indian veggie, life maybe a bit tough, if you don't have enough groceries with you and your company doesn't provide Indian food.  You might find it tough to socialize with your Korean colleagues as well, as, being a veggie, you will always stick out like a sore thumb in office parties and lunch/dinner treats.  

2. Working Long Hours - This seems to be a common misconception outside of Korea.  Yes, hours are long only if you make them to be.   So far, nobody at my office has told me to stay back and work for extra hours.  In fact,it has been quite the opposite, I'm encouraged to work smart and not slog.  But this might vary across companies.  But, in general, from what I've noticed, Koreans are hardworking people.  They don't mind staying long hours in office, and they are pleased if you stay back too. 

3. Harsh climate - Coming from the air conditioned weather of Bangalore, the weather here in S.Korea does seem harsh at times.  The cold can go as bad as -16 , literally forcing you to stay indoors.  But nothing , a couple of hot pakoras with warm coffee and a thick sweater and blanket can't solve.  If you are having trouble with harsh winters, this might be an issue for you.  I've heard the summers can be nasty too, yet to experience it, so no comments yet !

4. Language Barrier - Well this is indeed a huge problem.  So much that, sometimes I fear it can potentially cause social isolation and induce loneliness.  There are some Indian families around in the city of Suwon, but the knowledge of local language is needed the most, especially when you go out to shop or roam around, where, a trivial task like asking for that grocery you want, or  checking out directions can be a huge hassle.  In office, not knowing the language can put you in a great disadvantage compared to your peers.  You develop a frustrating sense of dependency on your co-workers for even insignificant stuff like getting your computer repaired, paying your bills (At least the first few times) etc.   Meetings and most of the technical training happen in native Korean, and you miss out on them as well.  So, unless you are prepared to spend time and efforts to learn Korean, you might want to re-think about a long term career here.  I've started to train myself on Korean with some information available on web, planning to attend some classes shortly as well. 

5. Cost of Living - Yes, S.Korea is expensive compared to India or China and almost as costly as US in some aspects.  Renting an apartment is very expensive, so are vegetables and other groceries. Same goes for clothes and other household items.  But, I received a fully furnished apartment as part of my job offer from my Employer due to which I'm relatively at a safer side. Kid's education is another thing to look out for.  Monthly fees can cost you upwards of $500 in an English school for simple Kindergarten education (excluding initial deposit, travel/books/uniform and other such miscellaneous expenses).  I've not checked for primary schools, but my guess would be that it would be much more.  Medical Expenses, cost a lot too from what I heard, but there's a medical program from govt., which is kind of mandatory (I assume), which covers most of the regular ailments.  The premium for that is quite less, so unless you are illness-prone, you should be able to get along.  To sum it up,  without the benefits of housing, accepting a job in S.Korea, especially for people from India , can be daunting since the cost of living here is very high compared back home.


So that's a brief summary based on my 3 months of living here.  I'll try to update the blog more regularly whenever I get free time.  Catch you later :)


Tuesday, August 2, 2011

Pathetic state of 'Project Management' in silicon valley of India

I had a heated exchange with my boss today leaving me very exhausted mentally and irritated to some extent.  The worst part is, no matter how hard I try, I just cannot help but bring this to home - which results in a nasty snowballing effect of adding more stress as everybody else is stressed out at home when they see me grumpy.

     I can make a blog and fill it up with 100 posts about how much office work contribute to stress for a working individual in India.  Especially in the software industry.  The main reason is the disagreement and the way its handled in our so called 'modern offices'.  Have an issue with your manager, well the way to sort it out is to sit for hour long lectures on anything from 'Empowerment' to 'Turning around', 'innovation' and more management terms, which you never use in your daily life.  Don't agree with your boss/co-worker, the official way is to schedule a skip level meeting, where invariably you are taught lessons on how to get along with your boss/colleagues by your skip level manager.  You can run from pillar to post, but the end message is the same - "Just stick to the plan and get on with your work.  Your opinions can be shoved up your behind for all we care !"

    Sad really ! One of my colleagues was telling me today that "people don't leave companies, they leave managers".  And its so true.  One of the main reasons I attribute this pathetic state of project/resource management in India is to the vastly unskilled/undeserving pool of managers.  These guys were the engineering graduates of the late 90s or the early 2000s, who entered the industry during the 'dot-com boom'.  At that time, attrition was so high, a guy with 4 years of experience was the tech lead, a guy with 2 years of experience as tech lead became a manager and so on.  Naturally when the tide is slowing down and getting into a state of normalization, we have all these vast pool of people who are stuck at mid-level/upper level management positions, who are so unskilled in technical areas, you've no option but to continue using them.  And now we are beyond the previous "maintenance" projects, getting more and more of end to end development and guess who manages these ? The previously unskilled pool !
    Most of these so called 'project or resource managers', still work by the age old method of bribe/blackmail/carrot & stick for employee retention / satisfaction.  Some of the popular methods of making an employee "contribute" more to the company:
1. On-site opportunity: By far the most popular one.  Find a grumpy employee not happy with his salary/work/environment or whatever, forget about spending time at counselling him to find the root cause, just throw in the assurance of sending him onsite and rest assured he'll fall in place.  Any place from Singapore to Buenos Aires will do, as long as him/his wife and his kid's tickets are paid for and he is allowed to stay back long enough to change his location in facebook profile and paste pics about his onsite spoils.  No matter how stupid his outing was or how bad his new fake accent is.
2. Contractual obligations:  Worried about losing your fresh talent jumping onto other companies ? Worried that all you taught to the fresh minds are being stolen away by other companies at your expense ?  Don't bother about improving your in house work culture or incentives to make them stay.  Throw in a complicated contract which could result in the employee paying a hefty sum of money in case he leaves you.  You can even throw in an advocate at the time of making the contract to really strike fear into their hearts.  For best results visit the innermost parts of India where students are actually ready to sign their life off for an opportunity to work in a s/w company.  Use their poor financial situation complete to your advantage! Now that's how geniuses in HR roll yo !
3. Ridiculous notice periods:  I heard that the notice period in US is usually two weeks.  Well, welcome to Bangalore ! Here it varies any time between 2 months to 6 months depending on which company you are in.  Impossible to retain an employee thanks to your sucky company policies ? Well let us make it such that its not possible for them to find employment anywhere either.  'You can't lose if you don't play!'
4. Unbelievable lateral hikes:  Finding trouble poaching talent with your sucky bureaucratic company policies ? Tired of being rejected by anyone who's able to write a program to print "hello world" without compiler warnings or errors ? Well, here's the instant solution - give them a ridiculously high package which is more than twice the amount another poor loyal guy with the exact same skill set and experience is making at your company.  Add a signing bonus as an icing on the cake to seal the deal.  Rest assured you'll land that guy for your next induction program.  Now, to stick to your process of suckiness, ensure that his future hikes are dramatically reduced to fractions lesser than one, and depend on point 1,2 or 3 for his retention.  Also, don't bother about normalizing the salary of that honest/loyal engineer stuck with your company.  What kind of a loser sticks to a company beyond 2 years eh ?

If you think I'm trying to vent out my frustration or being sarcastic, you are free to walk in and join any software company in Bangalore and see if for yourself.  Don't bother checking the logic or the reasoning behind any of these points, unless you are in mood for some real "coaching" on how "you should first ask yourself what you've done for the company before you ask what the company has done for you" !

Tuesday, July 26, 2011

Why India is 'Startup starved' ? A theory !

More often that not we hear grandiose stories from silicon valley of how a acne covered geek working in his grandmother's basement found the solution to that 'obvious' problem which everyone overlooked and eventually made millions. And stories like facebook time and again prove that the 'American dream' very much exists even today in US. But while in our own silicon valley - Bangalore, the story is almost the converse. We have very few tech heroes like mark zukerberg, the last known public figure of rags to tech riches is the now retired ex chairman of India's 3rd largest 'services' company - 'NR Narayana Murthy'. Even after NRN founded infosys some 25 years ago, hardly are there 25 such companies to boast of in the 'silicon valley of India'. I wonder why. A little bit of idle browsing and talking to peers and colleagues in the industry, I feel partly, India's age old social structure and cultural principles have a significant contribution.

Let me explain.

1. In India, social obligations are way too high compared to the west. For ex: An average American has to play the role of a husband, a father perhaps and then a good worker. Its quite manageable. Compare that to an average Indian. He has to be a good father, husband, brother, newphew, grandson and whatnot while balancing his work life.  There are some families I know of where one person feeds everyone from grandfather to his kid brother.  One single guy.  I can only imagine how stressful would it be for that poor soul to just juggle so many relationships, while balancing his career.  Where is the time to think beyond the box ? 

2. In the west, a techie studying in college, has little or no obligations to his family, other than to perhaps pass the course if his father paid for his tuitions. In India, not only has the son / daughter need to pass with "flying colors", he needs to provide support for his family, clear his father's debts, secure money for his sis' marriage, ensure enough bank balance is present to fund is little bro's college fees etc etc. And believe me, I'm not talking about a very far fetched scenario. Many of my friends who passed out of college, have done all these. So the risk taking attitude in Indian students is way too less compared to their counterparts in the west.  I mean, how am I supposed to think of "denying" that high paying job from an "IT services" company, when my dad is neck deep in loans because of me ? The guilt of "wasting" their parents hard earned money is way too high among Indian students if they don't end up getting into a proper company after their course ends.  Starting a company is something that's only in the movies or for some rich kids is the general perception among the middle class.

3. In the west, a working techie has little responsibilities.  If,  overnight he gets an idea which he finds worth 'entrepreneuring' on, he just can pool his savings so far and start right away. In India, we are expected to save for ourselves, our kid's marriages, college education, buying a house, a car so on and so forth. We need to ensure that not only our future is "safe",  but also that our kids get into good colleges, get married and have their own kids.  The responsibility just doesn't end till they are 18, you need to ensure your kids have a spouse and job too.  Basically it means, we just don't have the right to spend what we earn. And to think of investing all that in a 'startup' ? The person should be nuts.

4. Its ok not to get married in the west. Nobody raises eyebrows, or make you a social outcast.  Complete opposite in India, and this plays a significant role in shaping your career. In India, its pretty tough to be belonging to middle class and not be married if you are beyond 30. Almost everyone will be breathing down your neck forcing you to tie the knot. And two years down the line, you "should" have a kid and buy a house. You are left with very little time for experimenting with your life, making mistakes or failing which is more often than not what happens with most start ups. The room for error is very less, so most people just tend to take the easy risk free path of 'employment'.  Like the quote from 'The Wire' - "you can't lose if you don't play".

Having said all the above, I don't mean to say that India cannot produce entrepreneurs. Its just that the social and cultural aspects of our society has quite an impact on our youth in shaping their thinking. Very few have the courage the break these social barriers and emerge successful.  These are the guys about whom we read in books and newspapers. Unfortunately such numbers are far and few in between. Here's to hoping more such success stories happen in 'India's silicon valley'. Signing off for now....catch you later !

Friday, May 27, 2011

A cookie for the happy man !

As the day goes by, sometimes I wonder.... I wonder when or what makes a man truly happy ? Is he happy when he gets what he wants? Is he happy when he gets the recognition he thinks he deserves? Is he happy when he is the leader of all ? When all subjects bow to his command ? Does wealth and prosperity really bring the kind of happiness that we assume it would ? Truth to be told, after more than a quarter of a century of my existence, I have come to believe that none of them can bring true happiness. Happiness is a state of mind and doesn't need any trigger. We as individuals determine if we are happy or not. Chasing down a dream and for that matter even achieving it wont make us happy, it just makes us empty. Makes us crave for more. True happiness is the one which we can experience without any trigger, without any precondition, without any strings attached. And for those of you who think you a are happy this way, heres a cookie from me, wishing I would one day become that happy man !

Tuesday, May 17, 2011

Sunday, February 20, 2011

learning java

Hi,
Been a long time since I updated. Life has been going on so far. BTW, just wanted to put in here that I've started to learn Java. Kinda self educating myself whenever I can spare time at home. But the hill to climb is pretty steep. Its not that I don't know anything about oo programming. Being a CS graduate, I'm quite well versed in them, but what I'm out of touch is with the lang itself. And Java has grown so vast in the past years, its hard to keep up. Anyway, I've no intention of taking up any SCJP, my intention is to only learn as much needed to code on android platform. Let us see how it goes....wish me luck, and wish that I don't give up along the way.

Friday, October 8, 2010

Old "might" turn out to be gold !


Life has been really dragging lately. After playing Mafia II and The Witcher, I don't feel like playing anything else. Watched some movies though - Dabgangg, SALT and Aisha. Dabangg was pretty average, but nice time pass. SALT was totally awesome. Aisha was quite decent.

Now coming to the topic title, I wonder what made Dabangg click in the first place? For us southies, the movie is nothing new, its a rehash of any other regular movie with the hero fighting off more baddies in ways that would put iron man to shame. So whats new about this that made it click ? In my opinion, the simplicity of the movie worked in its favor greatly. The movie is never pretentious and doesn't take itself too seriously. Its like the director told the people, "hey, I'm gonna make a movie with a bare minimum story, over the top action, catchy songs and some humor thrown in to keep you from getting bored, I'm neither making it to get any awards, or put my name in the hall of fame. The only guarantee is that it'll be entertaining and not bore you".

I would take a movie like Dabangg anyday over the pretentious nonsense thats churned out by most of the high budget production houses. I would enjoy a movie with Indian characters, Indian cities, Indian setting dealing or showcasing Indian problems instead of showing us the false, bloated, stinky rich, ultra luxurious setting of the west. Don't take me wrong, I'm totally up for movies shot in the west, DDLJ did it, Kal ho na ho did it, and both managed to pull it off very well. But to make a movie in the western setting just for the sake of it is pretty annoying, more so, when every other movie tries to do the same stuff. An ultra rich swanky NRI hunk is sad because his marriage is in shambles or his love is lost. Booo and boring !

I'm sort of glad that Dabgangg was a hit. For one, it brought back the bollywood to its root - which is India. And two, it showed that you don't need a big banner or a controversial topic or in-your-face marketing to make a movie hit. All you need is to understand your audience and make movies for them.

Here's to wishing there comes a Dabgangg 2 , before I log off. Catch you later.

Saturday, September 4, 2010

Random Tidbits

Hello random reader, there's no power in my house, so having nothing better to do than ramble on random topics.
Games:
I've almost completed 'The Witcher'. I'm in the epilogue fight with this creature called 'Zogyl' and stuck there. The game has turned out to be a lot more tougher than I had anticipated, especially after chapter V. Taking down the human enemies is pretty easy, but there're hardly any, and most of the enemies from Chapter V are mutants or monsters. And they sting and hit fast, and geralt stands like a mute spectator. Ah, so much for levelling up and being a badass witcher ! Anyway, the story is pretty average, but the gameplay is what's keeping me from leaving this game. Also, the lore is pretty awesome. You actually feel like you are living in those times, the towns are designed beautifully and the NPC walking on the streets make some interesting remarks. Anyway, more in the upcoming review once I complete the game.
Movies:
I hardly watched anything new these days. Last I watched was 'Shutter Island'. Its quite good, but nothing fantastic. A bit over-rated I would say. I wanted to watch 'Peepli Live' so much, but I just can't get time. There's still a whole big hollywood backlog - 'The Losers', 'The expendables', 'A-Team', 'Prince of Persia' , thats just from the top of the list. If I start adding the inconspicous and criticially acclaimed but not mass marketed movies, it'll continue to grow.
Other stuff:
I've started driving by Car to my office, which means, no more soaking in Bangalore rain. It adds the additional burden of having to sit through traffic jams for hours, compared to a two-wheeler. In a two wheeler, you could just zip/zap/zoom and cut across most 4 wheelers, mocking them, sniggering as you squeeze to the front. In a car, you sit and curse at the two wheeler who just whizzed past you ! But overall, I would prefer a Car on a rainy day over a two wheeler. It has also helped me keep up with some of the latest bollywood/kannada songs.
Inception Review:
I've been waiting for Inception 6-8 months before the movie released in India. Christopher Nolan is one of the most talented directors out there (watch memento) and a new sci-fi big budget , DiCaprio starring movie , what could go wrong ? And indeed its true. There's nothing wrong with the movie. Its as perfect a sci fi movie can get.
The premise of the movie is a bit 'above the head'. DiCaprio specializes in a rare skill, which has him enter people's mind, hacking their dreams and stealing their secrets for his employers. One of his vicitims offers him a new job - 'inception', which is basically the opposite of the what DiCaprio does - planting an idea into someone's mind. And what follows is a maze of brilliant CGI imagery, psychological games, some amazing stunts, car chases and what not. You can think of the wildest possible idea, and the movie gets wierder than that. Insipte of its complicated plot , the movie holds your attention, mainly because of the excellent narration. You sit on the edge of your seat, waiting to see how the movie unfolds as you are transported into the surreal world of dreams. I literally shouted 'shit' when the cinemas halted the movie for an interval.
DiCaprio walks away with the acting honors in the role of a 'psychological spy' with a troubled past. Overall the hero of the movie is the script and of course - 'Christopher Nolan' for daring to attempt such a movie and walking away with applause. Its pretty difficult to make a movie like this, more than the CGI stunts, its hard to get the concepts across to an audience. And Nolan succeeds very well in this regard.
I would rate the movie - 9.5/10. The 0.5 deducted for not providing a proper closure confusing the audience. Go and watch the movie if you like immersing yourself in a surreal world for a couple of hours. Good chances are you are gonna ask yourself at the end of it - 'Is this a dream?'

Oh, the power is back....so see you later. Let me go slay that big monster in 'The Witcher', and you go back to whatever you are doing. See ya....

Wednesday, August 25, 2010

Change of plans !

OK, my plans of finishing up my backlog isn't exactly going as per the plans. There were quite some distractions in between. First, I stumbled across this game called 'Alpha Protocol', which took quite a lot of my time. And then, my wife's incessant watching of her daily soaps kept me away from my TV, leaving me with very little time to play on my xbox 360. So I could only complete the first act of Red Dead Redemption. But no worries, I've stumbled across another super duper awesome game - 'The Witcher' on PC. Although I had heard quite a lot about this game, never got around to really playing it. And now, I just don't feel like playing any other game. Its a damn addictive RPG. More on that in another post, on another day.

Cheers !

Friday, July 30, 2010

Hello Penguin !

Booyah ! Just installed ubuntu 10.04 LTS on my system. It feels so nice to be back to "root" - pun intended ;) But I'm still struggling to turn on the advance visual effects and java 5 sdk. More later....