Pages

2013-10-19

.. small joys ..

"All of today's code compiled. A fair chunk of them test-case covered. Yay.."

Here doggie.. here's a dram of whisky for you. Good boy. :P

2013-09-19

On how they killed my watch

Early on, I figured I need a watch that "Just Works (TM)". The search took me to my first "Timex Ironman Triathlon" digital watch. And, work it did. A beautiful piece of art, it is. It bore the rain, the sweat and the shower. It bore the drops and crashes. It bore it all. Until one day, three years later, the battery drained out and I had to change it at a service center. The next day, the watch died after a dip in the bay of bengal.

The service man had not fit the back cover properly after replacing the battery.

After the swearing, yelling and crying, I went over and got myself another "Timex Ironman Triathlon". Which ended with the same fate two years later. So, I went for it again the third time. This time it lasted 5 years and died because of the same reason.

Yes, my next watch is also going to be the same "Timex Ironman Trialthlon". But this time, I am gonna buy the necessary tools to fix the battery myself. I am fed of unskilled idiots ruining my happiness.

2013-09-17

Freescale Codewarrior MCU 10.2 on Debian Jessie (amd64)

These are largely notes to self. So, dont sweat. Go elsewhere for entertainment.

Freescale Codewarrior MCU 10.2 requires a 32bit environment to work. So, you need to first set that up.
$dpkg --add-architecture i386
$apt-get update
$apt-get install gcc-multilib g++-multilib
$apt-get install libexpat1:i386
$apt-get install libxt6:i386
$apt-get install libswt-gtk-3-jni:i386
$apt-get install libswt-gtk-3-java:i386
$apt-get install gnome-themes-standard:i386
Codewarrior looks for "libexpat.so.0", so we need to create a link for it.
$ln -s /lib/i386-linux-gnu/libexpat.so.1.6.0 /lib/i386-linux-gnu/libexpat.so.0
Run the installer as root and install the IDE into /opt/Freescale. After the installer is done, replace the contents of "/etc/udev/rules.d/25-pemicro.rules" with:
SUBSYSTEM!="usb", ACTION!="add", GOTO="kcontrol_rules_end"

ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0035", GROUP="plugdev", MODE="0664"
ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0042", GROUP="plugdev", MODE="0664"
ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0058", GROUP="plugdev", MODE="0664"
ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="005E", GROUP="plugdev", MODE="0664"
ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="005F", GROUP="plugdev", MODE="0664"
ATTRS{idVendor}=="1357", ATTRS{idProduct}=="0001", GROUP="plugdev", MODE="0664"
ATTRS{idVendor}=="1357", ATTRS{idProduct}=="0503", GROUP="plugdev", MODE="0664"
ATTRS{idVendor}=="1357", ATTRS{idProduct}=="0504", GROUP="plugdev", MODE="0664"

LABEL="kcontrol_rules_end
The above rules are required to make your USB-multilink programmer work. Your 'user' should be part of the 'plugdev' group. Launch "/opt/Freescale/eclipse/cwide" and all should be well :)

References:
  1. http://mcuoneclipse.com/2012/03/06/mcu10-2-on-ubuntu-12-04-64bit/
  2. https://community.freescale.com/thread/311460

2013-08-10

"Poverty IS a state of mind"

Lately, Mr. Rahul Gandhi, the heir apparent, (apparently) stated: "Poverty is just a state of mind. It does not mean the scarcity of food, money or material things. If one possesses self-confidence, then one can overcome poverty". And, the whole of India (online/offline/in-the-restroom) blew up into a state of anger calling it a "mockery of the poor". But no one really thought about it twice. No one really did.

Yes, I am looking at this from my shoes. And, I think it fits the argument. If you take a casual stroll through the streets of Madras, you are bound to bump into atleast 10 beggars (taking an optimistic count). You can easily classify them into:
  1. Old people
  2. Differently abled people
  3. Children
  4. Homeless able bodied young people
The distribution of the "under poverty line" people in the above categorisation is (honestly) unknown. For the sake of argument, lets assume there is an equal distribution. That means, 25% of the "under poverty line" people are "homeless able bodied young people". Now, what do these people want/desire/expect in their lives? A car? A fridge? A house of their own? A fancy gadget? A fancy lifestyle? Top of the line fashion clothing? NO. They want three meals a day, clothing enough to clothe, a shelter enough to shelter.

A day of "construction labour" fetches 350 INR a day. And, Madras has enough construction happening, that you have a job for the next 10 years. Walk into the closest "Amma's mess" (government subsidised food joint) and you get three meals for less than 30 INR a day. Throw another 50 INR on public transport travel and such. And, another 20 INR for sundry expenses. You still save 250 INR a day. For 5 days a week, and 4 weeks a month, you get to 5000 INR a month as savings. Figure the rest.

Yes there are exceptions to the rule. But, how many are the exceptions? The exceptions are hardly 5% of that 25%. If that 25% were productive, imagine where the rest would be? YES, "poverty is a state of mind". One can sit there on their asses hoping for the world to save them, or move it and save their own. Its their choice. Its their state of mind. So please, for hells sake stop your dramatic emotionalism and move on. Period.

Edit 1: The "construction labour" is just one of the many examples. There are so many other such.

2013-02-17

Resolutions

It IS quite late in the year to take resolutions. But well, whats the fun in riding with the herd (like resolutions are any fun at all.. bah).
  1. Stop searching for an alternate to GNU Emacs to write C++ code. Inspite of the zillion times cc-mode fails with template code, it still does the job in a much lesser painful way.
  2. Stop trying to migrate to clang (for atleast the forseeable future (6 months?)) from g++. Deal with the complicated template errors. Just deal with it. Its fine. The c++11 sweet-spot is too good to lose.
Now, what was I drinking?

2013-01-10

BSNL internet connection hates street lights?

I swear, that I am not effing kidding.

For the past one month, my BSNL Internet connection at home has been a PITA. It disconnects at around 18:00 and comes back online at around 6:00 (the next day), every day, like clockwork. My first guess was that the BSNL folks mis-configured my port or something. But Google brings up another theory:
People are complaining that the BSNL internet connection hates street lights. Some weird interference between the street light power cables and BSNL cables is affecting connectivity. I first laughed at the idea. However, seems like they do have a theory. My internet connection goes for a toss when the street lights come on. And, they are restored once they are off.

I dont think I can explain this to BSNL customer support without losing 10 years of my life because of sheer stress. Guess its time to call another ISP. Sigh :-/