Monday, December 29, 2008

Spear and Nib

Two more things that i did to idle out my time. Inkscape rocks for me so far
                                                         

         

Ancient tried and tested Weapon!!
[ Could not get the overlap of the spears perfect, still Inkscape illiterate!!]



The Nib is mighter than the spear....-Deepak ;-)


Inkscape and me

After getting throughly inspired by Mahesh bhat's art....and also because i was amazed by what he could churn out using free tools, i too tried my luck with inkscape. and  this is the result. I dont know if it worth a dime... to others...but i like my first inkscape creation..







 I will not say that i could understand everything with inkscape, but i could grasp a couple of things here and there, like drawing lines and terms like fill, stroke gradiant....and how you can make rounded rectangles etc etc. But then there is a very long way to go. I am still stuggling to merge diffent strokes ( ex. each of the eye hair patterns is drawn separately)....Let me see how long this interests me :-).

Thursday, December 25, 2008

Two more CCM's ( Cost Cutting Measures)

My friend Govind also known as GMW had written a real hilarious post emphasising the measures to cut costs being taken at our company (RAT). Since, I too work for RAT and also know AppuKuttan a.k.a AK who is notorious for having recuited me ( Rumors are that after he recuited me he never got a promotion!!), I wanted to inform you folks about two new measures that AK took after GMW wrote the post.

Eine

The where rumors that AK has been thrown out of his house by his one and only wife, because he could not clean up the garage on a sunday. While we were all sympathizing and trying to help AK by cleaning up his garage which had everything from the first toy that AK had, to the rolling pin used by his wife for various other purposes apart from making chappathis.
   It seems that only when we did this cleaning that AK had a brainwave, ( It is a mystery as to how he can have a brainwave, and our folks are trying to investigate hard....standby for the news ). Next day, the canteen sported a handwritten poster ( remember we have stopped printing....to save trees and costs associated!!)

                                                                           " Garbage Sale"
               There are a lot of used and unused items in the office inventory. These items are no
               more being used by anyone and hence, there shall be an auction to sell these. ....
               blah blah...


Even before i could finish the whole poster ideas started running through my brains ...
The only unused items I was really aware of in the office was the brains of most of our "so called" managers. Are they for sale? Who will buy them ?

thankfully the lower part of the poster clarified a little bit more

               Items for sale :
              1. Tubelights, bulbs --> We are using only candles remember!!
              2. Toilet paper      --> Being indians we should use our ancient methods of
                 answering       nature calls. Also RAT will promote this under the"
Connect with our
               Nature
" program. However, for visitors coming from other centers we shall provide
                used Newspaper.

"Oh my god...Newspaper...there will be news all over thier xxtt...Jesus.".i gasped. Even then i could not connect to the nature in this rare way...
            
              3. Calculators   --> We will be providing abacuses for those missing the calculators
                 badly.
              4. Toilet taps, sinks etc --> These used items are no more needed due to clause (2)
                 above...so please grab them

I could imagine myself grabbing the toilet taps and sinks after reading the last one....And even before i could get back to my senses, GMW appeared from the door and said, "Hey do you know they have put another notice in the cafeteria below"....

Zwei

GMW on the way to the lower floor of our office, asked me..."Hey tell me do you think we should bid for the toilet paper, maybe we can find a method to use it in our printers!!....". " Why not...How about purchasing all the bulbs too, we can smash them on Appukuttan's head" , and i am sure we can start a game in our Friday Parties...similar to darts !!', I said in frustration....

The notice said that all the telephones will hence be used only as intercoms. To make any call outside the office we were expected to use the coin phone which was put near the entrance of the cafe. I just glanced to see two repairmen fixing a dirty yellow box which looked like a coin phone. The notice also mentioned that this coin phone was unique and would work only with even fifty paise coins. I smirked and said, "GMW, with the salary they give us do they expect us to carry one rupee coins!!. Man thats a lot of money. ". Also, it was written below in bold that people are expected to use voice modulation as often as possible instead of intercom as that would ensure that our voices where always bold and strong!!.

And finally as i moved to the coffee machine i saw that power cable was disconnected, and a paper stuck near a handle which seemed to be a new attachement, which said...

" Move handle to grind beans and get coffee powder. This machine gives only black coffee..."
Note: The above only holds if the user adds coffee beans. Water is provided free of cost until further notification
                                                                                                                        -- Appukuttan
GMW winked and poured some coffee beans which he had managed to flick before Appukuttan got the bright idea, and I moved the handle...Well, This cup of coffee is definitly not everyones








Wednesday, December 24, 2008

Its a matter of a few letters!!

It was bold and clear "356C KEMPEGOWDA BUS STAND" in front of the bus. The cool Vajra bus had finally increased the font of the text that they display on the LED board which helps the commuters to know the route the bus is planning to take and which stops can they alight off the bus.  However, it was not just the new large font that had grabbed my attention.As the text scrolled i suddenly was shocked to see a new destination which i was unaware of till now :-). It read " ELECTONIC CITY".

For those how have not noticed it yet...Yes, the "R" is missing the word "Electronic City". Though it might have been a bit wierd situation if i had to explain the spelling mistake to someone new in the city, I still was content that there were a few other embedded engineers who were suffering the disease of mispelling words. But then, we all know about the study which showed that people could still interpret a word as long as the first and the last letters were spelled correct,which make "Electonic" == "Electronic". ( Sorry for abuse of the "C" syntax ).

So as lng as u r able to undrstd this line and not plnning to take prt in a spelldown contst it dos nt mattr if u eat a few lettrs...wht say?


Saturday, December 20, 2008

ScribeFire - A useful Firefox plugin

The two most versatile tools or let me call it "Software Tool suites" I have come across so far in my  IT career are eclipse and Firefox. The former is a extremely extensible IDE for a multitude of languages and also has features to extend its functionality immensely. The latter is an extremly cool browser which probably will soon become the most widely used browser, especially after the recent security alert sounded by Microsoft.

Though blogging is still very new to me, i tried to explore what are the tools available to ease this experience. And guess what, I found atlest half a dozen tools that are meant to enhance your experience on the internet. I smiled at myself and thought, hey how about if my browser could support this ? I would have a single window to do everything. I tried to search the firefox plugins which could help me with my blogging. ScribeFire is one of the plugins i found and right now i am typing this in the scribefire window.

ScribeFire has a bunch of features likes storing your blogs as drafts so that you can upload them later, read previous blogs, create new categories for your blog and do a lot of formatting etc. F8 is the default hot key for this plugin. You can choose the options page and set your preferences. The setup is one time so you need not bother about keying in your login Id and Password everytime. However, you might not want to do this incase your pc is being used by multiple users, though the settings are profile dependent i believe. Providing links and attaching pictures as painful as a mouse click.

Hence, for those like me who love to have everything packaged into one tool and also are trying the waters of blogging, Scribefire is a very good option.

Monday, December 1, 2008

"CRISIS" - Can we get behind it?

"Crisis", this 6-lettered word never seems to vanish from the life on an average Indian. Though scores of years have passed since the National flag flew over the red fort, yet we still live in a state of uncertainity. In the the early years after independence, we suffered from Food and Financial Crisis. Thanks to the the Green revolution and operation flood, we do not have to depend for our food needs on other countries greatly today.

When our young nation was just about beginning to stand on its own feet, we had to get into war's with our neighbours. India, with its Non-Alignment stand did not buy it any support from western nations. The only thing that follows a war is Economic Crisis. As we struggled with our economy, we some how mananged our industries and slowly started to grow. From Only Ambassadors and Premier Padmini's we started pampering ourselves with Maruthi's.

On our way through the 90's and 2000's India came a long way, but not without its share of problems. Be it the Hindu-Muslim conflict that bled us more than once or the 1993 serial bomb-blasts in Mumbai. We had a security crisis as more and more infiltrations started to happen through our highly porous borders. As power changed hands at the Center, but not as much as an ear was lent to the warnings issued time and again about the defence problems and lack of political support in eradicating illegal inflitration.


The latest crisis being the economic crisis with started in the west and when everyone was about to say that it will not effect us, we find ourselves looking at our plunging sharemarket and wonder if we are really insulated from it. The Terror-Attacks in Mumbai last week shows that we are now facing a new type of crisis and this is the security crisis. A common man no more can be sure that he will be returning home safe because there are a whole bunch of terrorists sitting somewhere planning and plotting to ensure that maximum damage can be caused to human life and property. Though it is quite meaningless to argue what could and should have been done, The question which is worth giving a thought is how long should we continue with this. Is there no end to the common man's perils ? Does living under one or the other crisis a part and parcel of being born in India.

I dont believe that. I trust that we have the right to build our destiny. We are as much to blame for all the crisis as the government or any other agency. If it were not for our turing a blind eye towards these problems they would not have loomed over us as catasthropes...We can get all these crises behind us only if we are willing to do the right things at the right times.....

Monday, November 17, 2008

µTorrent - using it with Kerio

If you are using torrents to download stuff (legal or illegal ;-)), you would be aware that it works based on the rule that
"The more you share, the more you get to download".
There are lot of forums where people have asked the million doller question; "How do i increase my download speed?". More often than not the answer is that "you should share more". If  you are someone like me who connects to the internet world through a router you would have to do something known as port-forwarding. If you are someone who spends a lot of time on Internet then i expect you to have a firewall.

I use Kerio Firewall in the free mode and µTorrent Client to download stuff via torrents. By default, Kerio will not allow in coming connections to your µTorrent client; Even if you have the port forwarded... You have to keep an exception in Kerio firewall to be able to accept connections from other peers. Which means unless you allow Kerio to allow to peers to connect to you, µTorrent shall not give you a very good download rate.

Now if you are wondering how you can do this? It is quite simple. Here is small guide
  1. Right click on the Kerio icon in the lower right hand side.
  2. Go to the configuration screen and choose the Network Security subscreen.
  3. Click on the Packet Filter button
  4. In the new screen that shows up click on Add
  5. In the screen that shows up fill in details as shown below. In the section called Local the number 39313 is the port that µTorrent is using




  Once all this is done you can test if th port is really getting forwarded properly by http://www.utorrent.com/testport.php?port=PORTNUMER



You should be done!! Happy downloading!!

Friday, November 14, 2008

Spotme - Cool device with cool features

The past two days have been extremely fruitful as i spent a major portion of both these days in the "Freescale Technology Forum", also known as FTF. The event hosted a variety of lectures by Freescale experts and other industry majors.

The really eye-catching or so to say attention grabbing device of the event was a device by name spotme. The device is a
"All-in-One Participant Communication Tool".The device has a wide LCD screen with a qwerty keypad which can be used to key in messages to other participants. To the right of the device, we find 6 buttons which are used to navigate to various screens and services. The built-in radar can be used to scan for other participants. The device will also let you navigate to other participants. The schedule for the events and the feedback can be collected using the spotme device.

I found the device very useful in spotting other participants and exchanging my business card with them. One can take notes, reply to surveys and also send messages to other participants. Below is a snap of the device i picked from their website.


Thursday, November 13, 2008

The I2C bus - learning the hard way

After completing a I2C bus driver recently ( and struggling a bit in doing this activity), I thought i would just pen down something which might be of interest to others who are doing similar activity. For those who are new to I2C bus; In a nutshell, I2C is a synchronous bus with only two lines ( usually called SDA and SCL which stand for serial data , serial clock respectively) for communication. I would be just re-doing the work if try to explain the whole I2C bus here. A very detailed description of the protocol is availabe here.

The reason for me writing these few lines here are to draw your attention towards a specific problem that one might face when using the IIC bus.

The Start
The story began on a very fine monday morning when i just started the system and did some basic debugging and finally got the bus to run. I was really happy when i saw the RX and TX happen smoothly and the Philips IIC interface based EEPROM getting updated. Everything was fine and i took my much deserved coffee break.

The Coffee Break
Two sips of coffee woke up the paranoid engineer in me and i wanted to somehow break my drivers functionality, secretly hoping that nothing bad turns up. I started putting breakpoints here and there and corrupting status variables, resetting the systems at odd points etc just to see how the system worked. Suddenly, disaster struck and my Rx interrupts vanished. Might be a glitch, so i just pressed the reset button in the debugger window and try to do it again. Oh My God!! Now even my Tx interrupts vanished. After stuggling for some time with the debugger controls and trying single stepping through my code several times i found myself looking a big zero. I could not figure out how the code had to do something with my hot coffee else why should it suddenly stop?!!. I just powered down the whole system, went out for my lunch.

Problem Found
Post lunch, i ran the system again and suddenly i heard the chime from the debugger saying it had hit a breakpoint. What is this now, i thought and just looked in to the debugger window; Aha, My Tx interrupt is back.. i just disabled the breakpoint and hit go. Now both my Rx and Tx intterupts where coming alright and the data was all flowing smooth. So, what had happened earlier?? After wondering, struggling and googling for about a couple of hours i figured out that what happened. The IIC bus was being held low. This typically happens, when the slave device is transmitting data and the master undergoes a restart or reset in which case the slave might pull the bus low and would be expecting the further clocks to come to it via the master. Since, the master module has undergone a reset, it is not able to create the clocks without doing some intialization ( sending of START condition), which it fails because the slave has pulled the bus (SDA) low.

Hence, after spending about more than 8 hours with the IIC bus and reading a lot of material i was a bit wiser now knowing about this potential problem with the IIC bus where in your bus can be simply hung for a long time because the slave has no way of knowing when to release the bus. (The power-on of the whole ckt had removed this state from the slave in which case the slave device had relinquished the bus.)







Tuesday, November 11, 2008

Great message presented in a wonderful format



Unfortunately, to view this fully you will have to right click on the image and choose view image. I could not get this to show up completely on the page without messing up with the image.

Saturday, November 8, 2008

Making Ubuntu a bit more better looking

The one thing that appealed me in UBUNTU was the cool effects when you navigate, move or close a window. The slight wiggle that you get when you drag the windows makes it look a bit flashy. It looks even more flashier on my 19 inch ultra bright display. To make my desktop look a bit more cool, i started out this new journey and started looking at themes and wallpapers for UBUNTU ( my attempt to work with TUX).

After going through various forums and many more other related sites, I discovered that UBUNTU supports something known as desklets. I found two categories gdesklets and adesklets though i am not qualified enough to tell how different are these from each other. However, I chose to go go with adesklets simply because these were written in python and i am python literate. However, understanding these adesklets is still beyond my reach.

One can install it via synaptic package manager quite easily. Once installed i could easily download the various adesklets from here ( you can also do it via the following command sudo adesklets_installer in the terminal window). If you are running UBUNTU Hardy and are running on a 64-bit AMD machine then you will run into issues. It makes me smile, because so far nothing with UBUNTU has gone without me spending some time reading forums ( a lot threads!!). Please have a look at this in case you hit a road block.

You can install a lot of cool looking desklets and use your imagination to create great looking desktops. So let your creative juices flow!!.

Tuesday, November 4, 2008

The forgotten colors - Red, Yellow, Green

          I remember when I was a kid my teacher had told me during a class on road safety that Red means stop, Orange means get ready and Green means now you can proceed. However, looks like this simple piece of information is no more a relevant of part of our ever improving ( as they claim) system. I am forced to believe this because of the indifference shown by the people towards the traffic signals. I travel for about an hour (one way), to my office and get to see a lot of traffic junctions. However, not once have I seen the traffic lights being respected fully. At some traffic islands, the red light takes a different meaning all together, as it hopelessly tries to signal as stop and the motorists just bother to slow down a bit just to ensure that they can slam the brakes if a cop pops out around the corner.

          I know this traffic junction, where every day the traffic lights keep blinking and motorists keep moving at their own will. In fact, someone who tries to adhere to the traffic signal is often rebuked by other motorists. The traffic police is often blamed of not managing the traffic in Bangalore. However, I wonder if it is really possible to manage the vehicles if no soul is ready to follow any rule. It is like asking the doctor to treat cancer, when you cannot give up smoking.
         
          Can making stricter rules solve the problem? Maybe yes, but personally I feel that more the rules, more will the people who will try to break them or find some loop hole to break the rule. What is needed is a system where people realize this problem and understand that some rules are for their own benefit. In in fact, I would not even call the traffic lights a rule or law, it is just a discipline which shows that "You" are concerned for the well being of other motorists who are using the road. It is probably very easy for a rash driver to jump a signal and he might do it very successfully because of his driving abilities, but there might be others who might try to either mimic their actions or be a victim because he just followed the traffic signal without bothering much ( after all that is why they are there?). Life is precious and losing it because of something as trivial crossing a traffic island is indeed very unfortunate.

If you are reading this and belong to the category of people I have mentioned above, please spare a moment and give it a thought.

Friday, October 31, 2008

Embedded Coding Style

My recent tryst with some "C" code written in Assembly like fashion has forced me to write this article up. I have been programming embedded systems for quite some time now. For those who are not aware, most of the embedded processors ( for the automotive domain) come with substantial amount of RAM and ROM spaces. Hence, it makes sense to write some what architectured code ( if not 100% for efficiency and optimization reasons).
"C" coding can get pretty messy sometimes if we dont architecture the code appropriately because of the very nature of language. "C" is a procedure oriented language and hence doesnot provide very clean natural organization of data ( like in case of C++, where classes can be used to hold all the logical data and operations together). Hence, personally i have used structures in C to hold all my data-memebers in a single nutshell.
There are some good and bad parts about a Structure. The good part is that it encapuslates all the data i need into one shell. The bad part is padding. If you dont arrange the members in your struct carefully you will end up eating up more memory than you would really need. Typically arrange the smallest member on the top and progressively the bigger ones so that there are fewer padding holes created in your stucture variable.
The other hint that i got from both Nec and CC compilers is to use scopes sensibly. What that means? Simply, choose a scope for a variable based on needs. There is not much gained by making all your variables global. Hence, as far as possible try to limit the scope of your variables to whatever is the minium needed. Also try to ensure that scope you have chosen, explain the logical boundaries of the variable
Ex.
void My_StateMachine(void)
{
switch(state) /* make state global if there is something which is using the state outside of this function, else make it a static inside the function */
}

Why am i telling you all this? Well you already know the answer in the first line of this article. It is much simpler to maintain software where the scope of variables are limited logically. Too many Globals means that too many blocks of softwares can change the variables in your system. This can lead to hard to solve bugs in future.

Monday, October 27, 2008

TV Games Shows - Beckoning a RatRace

In recent few months there has been a spur in the number of TV games shows and competitions esepcially for children. It is a wonderful moment for the veiwer and the parents alike to see the children perform in front of the camera. I loved to see these competitions and enjoy them a lot. However, As I see more of these I observed something disturbing.
There seems to be a rat-race that has been started by the parents to ensure that their child is in front of the camera for the longest duration. This in turn boils down to a lot of pressure on the young shoulders to perform well in the competitions. To add fuel to the fire, there are comments by judges which encourage more competitive spirit and emphasize on practice. While, I agree with the comment of the judges when it comes to the hardwork part, I do not agree with the part of competition. I feel it is not correct on our part to pressurize the young minds to get into the competitive mode at such an early stage.
Personally, I have always been encouraged to compete with others in very mode of life by my parents. After running the Rat-Race for 18 long years i realized that somewhere in this run i forgot to enjoy the journey. While i fully appreciate the fact that being compentitive is very essential, One must also realize that what is more important is that one enjoys his childhood.

I read a statement in a cafe once which stated,
"Goal is important, but it is more important to enjoy the journey to the Goal"

I find that remarks from the judges and the attitude of the parents concentrate only toward the first part of the statement. What we forget is the second part of the statement. The children as also in a very awkward situation, because it is very difficult for them to explain the situation. It is wrong on our part to assume their silence as their consent to our veiwpoint for them.

Sunday, October 26, 2008

Ubuntu - Installation adventure

When Srinivas told me that UBUNTU was becoming one of he most preffered flavors of LINUX i did not believe in his words. After a bit of pondering and browsing around i finally thought let me give it a shot. I downloaded the 700 mb installer. Ubuntu's latest flavor 8.x has some cool features which really are helpful for a Windows lover (Read Unix illiterate) like me.
My Sunday morning started of with writing the *.iso file into a CD. Be sure you do this at a slow speed because I wrote it at maximum speed on a "NOT" so good cd and the installer failed!!.
You can install this version of UBUNTU like you would do any other software like MSOFFICE. No need of formatting or making a new partition...When you reboot your PC you will get an option of using ubuntu. Aint that cool....you cant do that even with windows ;-).

However, if you thought that my life was all rosy...beware!!..Life is never rosy...I figured out that i could not get the needed resolution on my wide screen monitor. Infact, i also realized that i had to download the NVIDIA dirvers to make this thing really usable. I am no LINUX geek, i just wanted to own a decent OS :-(. However, I did not give up and started of by downloading the NVIDIA drivers from their website. However, a lot of command lines are needed to run it and there are a few things that is needed to get it running. I stuggled with various things try to first get the resolution right thinking that i will install the drivers later...BIG mistake...Get the driver installed first then do the rest. You will have to configure the Router before you can connect to the net. I made a list of things that i would need to look up and downloaded the pages from my windows partition and then used them as a guide to get my Ubuntu talk to external world via the router.
The NVIDIA drivers need to be compiled for the UBUNTU kernal, hence you will have to use the Synaptic Manager to download Libc libraries. Stop the Xserver by using
sudo /etc/init.d/gdm stop
run the executable that you have via
sudo sh DriverName.run
then restart it using startx or /etc/init.d/gdm start
and then you should be done.
You will also get all the missing resolution and speed that you were looking for...
And trust me it was a moment of Triumph for me as i loved the graphics and the clarity. It was really worth the effort...One step towards making friends with TUX.

Saturday, October 25, 2008

No Smokin!!

On the 2nd of OCT, 08, The law against smoking in public places was passed and officially atlest it was an offence to indulge in smoking in public places. I would consider this as a very bold step because it is not something which would have been easy to get through especially with big companies involved in manufacturing of cigarettes.

As i write this it is almost about 3 weeks since this law was made. I have seen a lot of agencies supporting this cause ( willingly or unwillingly) and have put up banners and notice boards with messages stating the law. However, I guess a lot more needs to be just done than putting these messages and banners. In a country like India where the rules are heavily controlled by big-shots sitting in Air-Conditioned chambers, it is extremly optimistic to assume that the law would be incorporated in just a few weeks. I am sure it is not a very rare site to see government officials and Police officials smoking in public places and voilating the law themselves. However, what I still appreicate is that finally a rule was passed and it was considered necessary to make it an offence.

Personally, I dont mind people smoking. I have always believed that it is an individual's responsibility to decide what is good or bad for him, provided he does not effect any other individual without his consent. However, more often than not public smoking causes inconvenience to other bystanders. Hence, I belive the government should go another step further and instead of marking all places with "No Smoking" signs, should also mark a small set of places as "Smoking Zones". Though this might not go too well with a lot of people who consider smoking as a crime, I would say that this way both the non-smoker and the smoker is happy in his own way. There is no need to dictate one's lifestyle here, all that is needed is isolate the ill-effects of ones from the others.