Reading from variables with multi-line values

Looks like this is a good start for this year :) I think this is my 6th post in Jan 2014 (Probably the highest in a month since I started blogging).. Happy about it..

Recently, I had to write a script that searches for a particular set of files and do some search and replace on it.

I used find.. But, when I tried to read the output of find in a while loop, I couldn’t get all the list of files. Thought that bash ate all the stuff and didn’t give me anything.. So googled and found that, bash is good and it didn’t eat anything.. It has all the newlines preserved..

So, the following script is what I use now, to read all the output of find:

files=`find . -name *.java`
while read -r file ; do
  echo $file
done <<< “$files”

BESH BESH BASH!!! :) (You’ll understand if you have seen the advertisement of Narsu’s coffee)

New Income Tax Proof submission

This is January and the season where most (or all) of the companies will ask the employees to submit the proof for the investments they make. Im also doing it..

For people who are in rented houses, recently, the Income Tax Department is asking for the owner’s PAN number when the annual rent goes beyond Rs. 1Lakh. Now, with this recent announcement, whom do you think will be affected?? The house owner? WRONG!!! A BIG WRONG!!!.. It is the tenant who is going to be affected.

How? Some of my colleagues’s house owner (including mine), said they wont provide their PAN number. So, we can declare only Rs. 8333 as rent per month that can be claimed as HRA. The rest is GONE!!! We don’t even get a single bedroom house for rent in Bangalore for this amount in a decent locality. Now, we are loosing a big part of our money as tax even though it can be exempted. What will happen next year? The house owners will know that they have to declare the rent as income. They are going to asses how much they are going to pay as tax and add that to the monthly rent. So, it all falls on the tenants.

Already, we are paying tax in our salary and whatever we buy has a tax associated with it. Wherever you go, there is tax. The general feeling seems to be that, most of the people who are supposed to pay tax in crores as escaping without paying anything or paying only a small amount. But, the salaried employees are SCREWED ROYALLY!! The government should do something about it..

Lets not discuss only the problems. Nobody likes to see problems. Somebody has to suggest a solution. So, Suggestions?

Lets find the real issue. So far the house owners collect as much as they want as rent and most of them will not declare this as an income and they will save (black) money. This is a loss to the government. So, government knows that a significant part of an individual’s salary is being spent as rent and they don’t know what happens to the money after it left the individual. So, they want to track the money. How this can be addressed?

  • The tenant should be able to declare saying that the owner didn’t provide PAN number. And government can decide how to take this further. If this happens, the owners have to give their PAN numbers. Also, to save the people, the government should decide on the maximum rent that can be collected in a particular area. This amount should match with the amount declared by the people (during their IT submission) staying in that area. If there is a mismatch, it should be enquired immediately. THERE SHOULD NOT BE ANY CORRUPTION IN THIS PROCESS. This will solve only this particular issue.
  • If they want to track all the money down, they can ditch the concept of cash completely. ie. There will be no cash transaction anywhere. What they should have is, everybody should get a card using which ALL the transactions can be made. EVEN IF YOU ARE PAYING A BEGGAR ON THE STREET, IT SHOULD BE DONE USING THIS CARD. To get this card, everybody should surrender their cash to the government and get their card loaded with the equivalent amount. THIS WILL DEFINITELY BRING OUT ALL THE BLACK MONEY and government will exactly know what happens to all the money. Obviously, security in these transactions has to be taken care of. Yes.. This will be an expensive activity.. But this is one time expense and the benefit they will get is HUMONGOUS for sure ( I can bet anything on this) !!!

Save the salaried employees!!!

Installing Android Kitkat on Xperia Ray!!!

Recently, I got some time to do some research at office… (We are close to a release now and all the major issues have been resolved). I know what you are thinking.. (How is it possible while he is there???). There are better people in my office.. So, it happens ;)

Coming to the point: I have heard about Android Kitkat and heard that it can run on my phone also.. So, wanted to try that out for a long time.. And utilized this time now..

Before any further: I am a Novice in android stuff. So, DO NOT THINK THAT I KNOW EVERYTHING ABOUT THIS WHOLE PROCESS. While flashing boot images, I got nervous and somehow got the guts to do these steps :D

In case you are interested to try out:

I followed the instructions from multiple sites.. But, ultimately this link summarizes the whole steps like unlocking the bootloader, Rooting the phone and install custom ROM. I used the packages from here. As wifi was not working for me, asked a question there but no response so far. Im waiting!!!


  • (Unfortunately), You need to have a Windows machine for rooting your device. Rest of the stuff can be done from a linux machine itself. That is the reason, I had to do all these things in office. (If you are planning to revert to factory provided ROM, I think you need a windows machine only.)
  • You may need to download around 400MB of files. So, have space on sdcard and have enough bandwidth.
  • If you are using Ubuntu 13.10 (like me), you need to have android-tools-fastboot, android-tools-adb package installed. This has fastboot and adb tools respectively. If you install android sdk, I think these tools will be available by default.
  • Time to do all these :)

Couple of warnings: (Go though this even if you write code who will ignore warnings and care only about errors :D) (Old joke???)

  • When you unlock bootloader using, it will do a factory reset. And you will end up loosing your personal information like me :( Fortunately, I had backed up contacts in my SIM card long back.. After that, I had added only a couple of contacts. So, the loss was little. But, lost all my SMS and call history. As these didn’t had any important data, so it was OK for me.
  • Make sure you have taken an NAndroid backup using x-Parts. Else, in case you want to revert back to the default ROM, you will be spending a lot of time finding out how..

Couple of Observations in Kitkat:

  • WiFi didn’t work for me. In my office, I can get Authenticated and Un-Authenticated WiFi Connections. I haven’t spent time on figuring out how to utillize the unauthenticated wi-fi connections. For authenticated wifi, even after providing proper credentials, it says “Connecting…” but never connects..  (Will see whether I can get it working.) But, unauthenticated connection went through. But, that redirects to a page where I have to fillup some data. I have to try that out.
  • I felt that the UI looks wise were not as great as the ones that came with Sony. ie. If you say Sony is 100%, this will be close to 80%.
  • Battery was draining faster that the factory ROM.

Nothing about performance as I haven’t installed any apps that I wanted to have due to missing wifi.

In case you tried out things or have any inputs/comments, you are always welcome.

Our Generation Vs The current generation

This post is an effect of watching a TV show and reading an article on a magazine.

When we were kids, we have seen, used, done some things. How many of such things that the current generation know that they exists/existed??

NOTE: As I dont know the english word for some of the objects that I have seen and used, Im going to transliterate them.

For example: Maththu, Agappai, Ammi kal (Our Mixey), Aattu kal/Ural (Grinder), Ammi Kuzhavi, Mann jaadi (Clay jug), Mann Paanai (Clay pot), Yeru (plough), Kayitru kattil (Cot made with wood and rope), Maattu vandi, Nadai Vandi (Helps the kids to start walking), Bommai Kudhirai (A wooden horse that keeps rocking to and fro)… These are very few objects that I have seen and used.. But the current generation (even us) don’t use..

If you see, everything is nature friendly. Nothing will spoil the nature.

We play daily on the streets for hours together after school. What all the traditional games that we have played? Ghilli (Mother of cricket), Kabaddi, Nondi (Hopping), Pambaram (Top), Goli (I think these are called as marbles), Kannamoochi (Hide and seek), Pacha Kudhirai (Kind of high jump but over another person)…

Think about how we play on summer holidays under the hot sun and come home with litres of sweat? And, how we feel when we drink a jug of water from mann paanai and get back to our games? Do not forget to remember our moms shouting at us to come home… :)

How many of the kids from this generation know that such games exist? How many kids play on streets? Also, all the games makes us healthy and strong. Nowadays, every kid is into tabs, computer games and TV. And, NONE of these is good for health..

There was nothing in our grand parent’s days that is currently being shown in TV Ads and still they survived for 60+years easily without any health issues. How many of us think that we can be as healthy and strong as them at that age? I seriously doubt, that I can be half as strong as my mom when I reach her age…

The worst part is, All or most of the things we have used/done has a history of 100s or 1000s of years. But, these became close to their extinction in the past couple of decades. Think about how our forefathers passed all these on to us and how we are going ahead. What are we passing on to the next generation that keeps our tradition alive?

What changed??

Now we have electrical equipments to do everything. We think we are saving time.. But, loosing out on everything else. Health, Tradition, History, Money, Nature…

All these activities are exercises and so people didn’t need a gym specifically in those days.. Now, we have all types of equipments and people spend a good amount of money for gym too. What is the point??? Ultimately, they are NOT saving anything.. Time or money. If they think they are saving time, I would say that they are spending the saved time in GYM or doing some exercises (that includes walking). I seriously think, this is an impact of western culture. Its time to wake up.

It is difficult now as we have become addicts to those equipments. But, WE NEED TO DO SOMETHING ABOUT IT !!!

Banana Tree

We can see in all the Tamil marriages that they tie banana trees on both sides of the entrance. Also, they will serve food on plantain leaves. Most of us know that having food on plantain leaves is good for health. But, we don’t know the reason for using tying banana trees.

Recently read that, the whole banana tree is a very good killer of germs. For marriages, there will be lot of crowd and if anybody came in contact with any kind of material that can result in poisonous effect, people dont have to run around looking for some germ killer. They can get the juice of the pulp of banana tree. In case of fire accident Plantain leaf is used to wrap the victim.

One of the things that we follow saying it is a “tradition” but actually it is a medicine :)

Happy New Year :)

Wish you all a very happy and prosperous 2014 :)

Had a nice vacation towards the end of 2013. Started reading Kalki’s Ponniyin Selvan (Again). Close to the end of 2nd part. Classic :) Seriously, In good hands (May be Shankar/Maniratnam), I hope this gets filmed. It has the potential to go beyond Lord Of The Rings :)

I can understand… They need to have the budget and it is very difficult to do justice to the novel :) Lets see :)

Physically Challenged or Specially Talented???

Recently, I was watching “Champions” program in Sun TV. This post is not about what Sun TV does or what goes behind the scenes. Its about the participants. The program is to conduct a competition between the so called “Physically Challenged” people.

Who “so called Physically Challenged”?

Somehow, physically challenged doesn’t sound right to me. It just doesn’t give the respect they deserve. In Tamil, we call them “Maatru Thiranaaligal” meaning, “Specially Talented”. I think this gives the respect due for them.

Why they deserve the special respect?

As normal people, if we face 10 problems per day, they have to face the same 10 problems + 1 more along with its side effects. (Side effects means how others approach them) Personally, I don’t think I can handle that one additional problem they face. Still they overcome their problems and lead their normal life. Some go beyond it and do more than what we can do..

Simply GREAT!! A Salute to them :) If I have written something wrong here, I sincerely apologize..

Software Development – Handling Negative Scenarios

Yeah! Im working on handling some negative scenarios. And while thinking over it, thought of writing this blog.

While writing code, we consider a few scenarios and start developing. When we give it to QA team, they start testing the positive cases first and then the negative cases. Obviously, there will be lots of issue when the negative cases are executed.

When I look at the code written, we have written a significant percent of code for handling negative scenarios than the positive cases. I get irritated when I look at a big code segment that handles some remote scenario that doesn’t have much impact on the customers. How to handle this?

What is my expectation as a customer when something goes wrong?

  • I should know that something had gone wrong in the product
  • I should know what is the immediate step that I should take. (90% of the problems on Windows are not observed on a reboot. Doesn’t matter whether it gets fixed or not. But, there is no damage done to me. Something like these should be known to the me).
  • When I take those actions, the product should continue working or resume from where it was. It should not ask me to revert everything.

What the developers should do?

Before deciding to fix a negative scenario, evaluate the following:

  • How frequent this issue might happen?
  • What will the customer loose when this issue happens?
  • Find out a corrective action at this point and see how difficult it would be for the customer to take it? (The corrective actions can be to restart the machine or process, or modifying some file or change some setting somewhere.)
  • Will the product continue to work after the customer took the actions?

Based on the answers for the above questions, handling the scenario can be decided. Some of the resolutions can be automated. Due to time constraints, if that can’t be done, we should have answers for all these questions.

If any of the questions says high impact, it is not always required to fix the complete issue. It would be good to do though. But, writing code upto a level where the system can resume without any data loss, should be good enough.

If all these questions says less impact, then “Cummon guys, Lets spend that energy for giving something kool to the customer.”

Happy to hear what others think!!!

Indian Educational System

Yeah!! Kind of a topic that everybody criticizes about and that never change…

While doing something, I sometimes think a bit deeper. And the recent one is our educational system.

In the schools, we have different subjects. If I remember right, I studied these.(Maths/Science/Languages/Social Studies/Geography and obviously Sports) upto my 10th. (Almost all the areas)

In +1, +2, there are multiple groups.(Subsets based on category)

  • Physics/Chemistry/Maths/Biology
  • Physics/Chemistry/Maths/Computers
  • Physics/Chemistry/Botony/Zoology
  • Commerce (Arts)
  • Physics/Chemistry/Maths/Mechanical

And then, in the colleges, we have specifics: (Building area of expertise)

Physics, Chemistry, Arts, Biology, Commerce, Maths, Computers, Multiple different groups in engineering..

I would say, this is a really kool structure.

What is the need for having this kind of grouping?

Dont know who did it.. But they did it well. The reason is, nobody knows what are the abilities of a child. What the kid can do good!! In the schools, they give the kid opportunities to learn almost everything. Just sample in each and every area. ie. In the schools, they are trying which domain the child is interested in. (Science/Arts/History/Sports???/Maths).. In the +1, +2 phase, which sub-domain is the kid good in. (Physics/Chemistry/Computers/Commerce/….) And in college, they identify the specific areas in these sub-domains. And this is the idea behind having these kind of grouping.

What are the (most) schools/colleges focussing on?

Just one word. RESULTS & (F/N)ame as a bye-product. They want cent percent pass rate and state first student to be from their school and job placement.

What does the (most) industries expect?

People with good overall scores in all the subjects. But, they will be working on only one domain. Why the hell a medical company is interested a person’s 10th History marks???

What is happening with people/parents now?

These guys are in a tricky situation. Reason: In the industry, they want overall percentage to be 70+. The schools/colleges want their students to go out with distinction. So, they are forcing their children to learn everything or something that the kid is totally not good at (Reason: This job pays well). The poor kids spend all their time trying to prepare for the exams. Very very few kids understands what they are studying… Seriously!!! I don’t think many kids understand what understanding a subject means :)

In my school days, if somebody is good in (only) sports, they are royally screwed!!! (I think, the schools are not giving much importance to sports as they do for studies.)

The irony!!!

The idea of schooling to find out, what the kid is interested in and what (s)he is good at and develop them in that area. But, now, it has become like people are trying to make the kids mark generator (Kids have to score marks at any cost). WTF???

What can be changed??

Schools should be a place where they find out the talent in each child and say, this child is good at these. Also, they should provide a basic platform for the kid to develop his/her area of interest. And, marking/ranking system needs to be ELIMINATED completely. This may happen over a period of time.. (Some of the schools are moving from marks to grades.)

There should be normalization of salary among all jobs. Only performance of the employee can cause a difference and not the industry as such. ie. A 10 year experienced teacher should be paid close to what a 10 year software engineer is getting paid. NOT AT ALL PRACTICAL (Not even in the ideal world!!!) :D Yes.. there are a lot of factors that needs to be considered here… (Complexity/Responsibility) But, It seems to be one way in which parents will not force their children to learn something they are not interested in… But, “experts” can think of something on these lines :)

Was about to forget the important part. FEES :) When you ask people, they will say, all course are same/great. That has these these features and this has these these features. Then, why the $&%# colleges charge 3K for Arts and 30L for Medicine??? There has to be a limit for the fees. Government HAS TO DO something to regulate the fees.

Success or not, I’ll give my best for something that I love doing it. Same with kids.. They will learn much faster and do better!! And, the quality of people at the top level (anywhere) will automatically increase.

Gnome – Beginning of the end ???


Recently came across this info. ie. Gnome is planning to remove the middle-click paste feature. I am a big fan of this feature and I use it for multiple purposes. For quicker pasting (Usability) and to make the others (mostly windows users) wonder on what this guy is doing!! (Advertisement) :D

Previously, nautilus changed quite a lot of stuff (removed tree view, removed status bar, added “intelligent???” search ie. as and when we start typing it searches for the file/folder) and after that I seriously started looking for an alternate file browser. As I could not find one yet, reverted to an older version of nautilus.

I don’t think, these changes are good for Gnome!!! I have heard from my colleagues who interacts with customers that “Customers are OK with using our product even if we don’t give new features. But, they hate when something that was working before doesn’t work any more.” Now, I realize, how true it is!!!


Get every new post delivered to your Inbox.