These last few days has been really busy not necessarily in office alone but in home as well. After all these years in college studying some text books  i finally had time to read some books that made me feel WOW . it just feels good to read books that u like. now i m not reading books alone but also a lot from the archives of blogsphere that i had missed. the first on my list of archives was Joelonsoftware. Then when i was reading through some of his articles this one caught me also because of something that happened to me last week.

 I noticed how almost every kind of military strategy, from air force dogfights to large scale naval maneuvers, is based on the idea of Fire and Motion. It took me another fifteen years to realize that the principle of Fire and Motion is how you get things done in life. You have to move forward a little bit, every day. It doesn’t matter if your code is lame and buggy and nobody wants it. If you are moving forward, writing code and fixing bugs constantly, time is on your side. Watch out when your competition fires at you. Do they just want to force you to keep busy reacting to their volleys, so you can’t move forward?

Now in this article( actually a blog before it was called a blog but everyone knows that don’t you 😉 ) he was actually talking about something we all face every now and then, that is not getting that ” motivation/ interest ” to start doing our work once we reach our office.

This struck me as i felt real bad for a while last week not that i had trouble starting up but i had trouble finding answer to a small part of the task i was working on. It was a very simple one ( or so i thought ) , to resize a text box in a winCE app.

 My plan was to maximize the box and resize it back with a help of a separate button click that does this. the problem started when i found that the GetWindowRect() and GetClientRect() returned values that was shall i say incorrect 😉 . Now i used these functions coz i planed to get the location of other controls on screen in the same window and place/resize the text box relative to them. Cutting out all that rant i figured that the SetWinodowPos() places the control relatively to the parent control by default. so i ended hard coding the coordinates of the textbox and now it works on all displays of different CE based devices. For this i spent an entire day and i couldn’t forgive myself for wasting valuable time. after a while i consoled my self remembering Thomas Edison’s quotes

Results? Why, man, I have gotten lots of results! If I find 10,000 ways something won’t work, I haven’t failed. I am not discouraged, because every wrong attempt discarded is often a step forward…. 

As a hind sight i thought i could have avoided this whole episode by making a new window and put the textbox there ( thanks to that suggestion from M Karthikeyan ) but i learnt what works and what doesn’t at least with regard to window placements .It doesn’t mater when sometimes u cant do ur best as long as u keep learning.

So run . if u cant run , walk. if u cant walk , crawl but keep moving as new day will give new hope and new people who will help u solve any problem.

Advertisements