Tuesday, October 02, 2007

Runner number 1698

This weekend ( 30 sept 2007) I successfully completed half a marathon in 1 hour and 50 mins. I thought I will share how it felt and how it was. How were the weeks as I was drumming up to this.

Its been few weeks that friends have stared complaining that I have dropped off the social radar and was no where to be found. Whenever they called I had my usual excuse was "I am running". "Yeah you are running away from us!" they would say and ask: "And, when are you coming back ?" So few weeks back I decided to run wherever I find a trail and pair of shoes. And actually it worked very well as I was running at new place every time and folks were happy. On the week of 20th sept. I went to Connecticut to visit one of my friend Sharad from Pilani (Rajasthan, India). We grew up in same neighborhood, pretty much a stone throw away from my house. I was seeing him after 1992. ( long time no see dude!) That week I ran on the trail by his place. Not a very long trail ( just 1.5 miles ) but was good. In order to clock 12 miles I ended up running it 8 times back and forth. By the time I was done; I must have said hello quite a few times to the pretty much all the folks from his neighborhood. Next time they see me they would recognize crazy runner from Jersey. It was just too many times for me to run past them. This was very important run as I was drumming up for my Jersey Shore half a marathon. This past weekend ( 30th sept ) I ran 13.1 miles in 1 hour 50 mins.

I was runner number 1698. It was little bit hot and sunny day for a run. The morning before run; I got up 5 am to eat and get ready to drive to the place of marathon. ( Sandy Hook, NJ ) On the way I was picking up my friend Stacy, so I thought I will make it little faster. Early in the morning it I beat all the traffic and arrived at race location before 7 am ( phew ! that was fast ). Not knowing what to do there so early I reclined the car seats and took a nap for about 45 mins, until I saw my coach. Contrary to as it might seem, for some reason I had a good feeling that this will be a good run and I am still sleepy. I remember one time I was too sleepy to run and I still ran and I had awesome run that day.

Later we assembled in the south-west parking lot before we were herded to the start line. I was very excited to be there as this was my first run. The running course was pretty flat, sunny and new for me. For some reason it felt little shorter than I expected. And for this reason I didn't quite notice when I passed 10 mile mark. I was saving my energy and breath for mad dash in last 3.1 miles. I had a bittersweet feeling when water volunteers announced that you are about 300 yards away from finish line. I was too busy noticing cheering people and fellow runners around. Little disappointed, had I noticed; I would have improved my timings. But anyway there is always a next time; and I beat my target goal by 20 mins.

After the run; I went back to 500 yards mark and ran along with few fellow team members cheering them, it was wonderful to see their achieving faces running into finish line. Few of them really tired but very happy to see the finish line and familiar faces.

My boss at work is also a runner, like she said, I like marathon for the people who do it. Running a marathon with Team is a wonderful experience. Before marathon; I met my co-worker and friend from previous company, James Whittle. He is running New York Marathon this year. Despite his leg injury; he did wonderful, I passed him along couple of times and without fail he noticed me and cheered me. It was great feeling. He is a wonderful person to work and run with.



One thing I learned from this my first of kind experience it that "If you have right coach you can pretty much do anything !!". I mean, I am not saying this just because I have to, I mean it is true. It is amazing what a disciplined coaching can do to you. In May 2007 before I signed up with Coach: Tom and Joanne, I had no idea if I could do even 4 miles, Now I am cranking 30 miles per week. And also this applies to other concepts in the life ( lets talk about them sometime later). I wanted to thank Coach Tom and Joanne, without them it was not possible. Many thanks to all the Volunteers who provided with water stops, cheered me whenever I passed them. Also, thanks to all the folks who left me informing comments on my previous posts, I was able really implement the advice and stream line my schedule. In the coming weeks as I prepare for Philadelphia Marathon, I will be taking all those cheers and putting them into good use. Next long run is next Sunday (Oct. 7th 2007) and this time I will attempt 17 miles ( 27 kilometers )



Here is the whole team assembled.




You can help by contributing towards my fund raising goal. Every dollar you donate will help an underprivileged child get basic education. Please donate generously. All donations are 100% tax deductible (Tax ID: 77-0459984). Please check if your employer can make a matching donation.

You may donate online with a credit card by clicking the button below:




Alternately, you may write a check to: "Asha for Education" with Marathon 07 for Kamal Verma printed in the memo, and mail your donation to:

Asha for Education
P.O. Box 1287
Princeton, NJ 08542

Thursday, August 23, 2007

When would you run

Running is a learning experience. It is not the final marathon run that you earn. It is the process that you go through to achieve it. You encounter problems, excuses and road blocks; every turn, but then you learn on how to eliminate them or steer around them is wonderful. Again, the final destination is not what matters, but the path you ran that led you there does.

I am sure every one who is a runner has their own experiences as I have my own. One of my prominent problems is the lack of time. Presently, I work in the New York city and live in Princeton area. Each commute is 1.5 hours to 2 hours one way. That takes away a good 3 hours; then I have to work 8 hours to justify my paycheck. Upon this are conditions that I can't run until 3 hours after a meal. And finally I need to sleep for 6 hours. You do that math. Including misc hours, I am left with not many opportunities to practice my runs. So I wanted to share my situation with you folks and gather some ideas on what you would do if you were in my situation. Please talk back to me and tell me what you think? (on the left is I charted on when I run)

Sometimes it is hard for me, not because it is physically hard, optimizing time and juggling the schedule is hard. I thought of quitting it but then something made me keep going. What do you think ? Shall I quit ?

It appeared to me that there were lot of that were working against me. To name few,
  1. Initial few weeks; I would run out of breath and could not run; I would blame it on damn lungs.
  2. Then; it was; that I would run out of steam; blame it on the carbs I din't have.
  3. Then it was that I got hurt on the track was a reason; I couldn't limp and run.
  4. Later it my friend's wedding I had attend, I din't wanted to run :-)
  5. Sometimes I was blaming it on the rain.
In my two and half months of running practice; all the permutations and combinations of above reasons was scheming against my run. But I am still running. Please share with me what would make you run and when will you do it.

I am running for the Charity?



http://www.ashanet.org/

Please feel free to browse the list of the Current Projects.

Every extra mile I run brings a hope to some not-so-fortunate child. For each mile I see it as slate;





You can help by contributing towards my fund raising goal. Every dollar you donate will help an underprivileged child get basic education. Please donate generously. All donations are 100% tax deductible (Tax ID: 77-0459984). Please check if your employer can make a matching donation.

You may donate online with a credit card by clicking the button below:




Alternately, you may write a check to: "Asha for Education" with Marathon 07 for Kamal Verma printed in the memo, and mail your donation to:

Asha for Education
P.O. Box 1287
Princeton, NJ 08542

Wednesday, August 15, 2007

Why Run Marathon


Since I started training for marathon and I would mention that to people; they always asked me "why run?". My twisted creative intent of mind started pondering for possible answers to give them. Though I am very clear in my mind on the goals for my run. I thought I would stir some of your thoughts. So here is little list I came up with on why I am running.

In the following posts; I will give more information on where I am running, How I am training, When I am running and what my experiences are? I will try to capture them in my following series of posts about my experience with marathon.

Talk back to me and tell me why you would run ? I will compile all the answers in the following posts.




Following are my reasons to run, what are yours ?



I am running for the Charity?



http://www.ashanet.org/

Please feel free to browse the list of the Current Projects.

Every extra mile I run brings a hope to some not-so-fortunate child. For each mile I see it as slate;





You can help by contributing towards my fund raising goal. Every dollar you donate will help an underprivileged child get basic education. Please donate generously. All donations are 100% tax deductible (Tax ID: 77-0459984). Please check if your employer can make a matching donation.

You may donate online with a credit card by clicking the button below:




Alternately, you may write a check to: "Asha for Education" with Marathon 07 for Kamal Verma printed in the memo, and mail your donation to:

Asha for Education
P.O. Box 1287
Princeton, NJ 08542



















Some ideas on why one would want to run.

Just pure run, a happy run!




Running from the bustling City ?





Unscramble yourself?




Running from Beer, fries, mustard and pizza-slice conspiracy ?






Running from stray dog, Or running like stray dog?



Unlike others, unplug yourself?





Saturday, February 03, 2007

Software Product Line

Lately I have been reading a lot about the SPL, methods, tools and emerging new research about the SPL. I thought I will share some of information and my personal opinions about it. Since this one of few starting blogs about SPL, I think I will start from its formal definition.

Software Product Line as defined CMU.

A software product line (SPL) is a set of software-intensive systems that share a common, managed set of features satisfying the specific needs of a particular market segment or mission and that are developed from a commonset of core assets in a prescribed way.

The idea of creating software from reusable parts has been around for decades, but success has been elusive. Recent advances in the software product line field have demonstrated that a strategic application of these concepts and use of unique vertical tools can yield order of magnitude improvements in software engineering capability. Results often gives better competitive business advantage and saves money and time. Gains can be diverted further to new gorilla marketing techniques and gain competitive advantage.

For example, hardware component manufacturers have created thousands of unique variations of one IC chip using a single pool of carefully architected, tested and reliable parts. These parts includes designs, chemical processes, testing techniques and other intellectual property resources. One manufactruing assembly line specifically designed to configure and assemble these parts, into sellable value adding component has been successfully by the hardware manufactures.

Communications of the ACM's recent volume 49, number 12 talks about it more and gives more insights. Here are links to the article(s),

http://portal.acm.org/citation.cfm?id=1183260&coll=GUIDE&dl=ACM&CFID=10705959&CFTOKEN=75070793

here is link to special issue on software product line engineering,

http://portal.acm.org/toc.cfm?id=1183236&type=issue&coll=GUIDE&dl=ACM&CFID=10705959

Saturday, January 27, 2007

555 Astable multivibrator and software product line.

So here I am, staring at bookshelf, thinking on what to read. While going through I found my old school note book where I had notes about creating electronic circuits. One of my favorite one is 555. Later that afternoon going through some shoe boxes, I found electronic components that were sitting there since long time. The moment I open the shoe box they started screaming at me: Solder me!, let me achieve the purpose in my life as a component. Get me wired and jolt me. I could not ignore their dramatic pleas to get burned with hot melting lead.

I quickly found one 555 chip and other components that could be assembled in an astable multivibrator. Lot of information related to IC chip 555 is available on web so, I will keep the description short.

An astable circuit produces a 'square wave', this is a digital waveform with sharp transitions between low (0V) and high (+Vs). This little circuit has many applications. Inner working of chip 555 and their application can be found on the web.

The time period (T) of the square wave is the time for one complete cycle, but it is usually better to consider frequency (f) which is the number of cycles per second.

T = 0.7 × (R1 + 2R2) × C1
f = 1.4 (R1 + 2R2) × C1

T = time period in seconds (s)
f = frequency in hertz (Hz)
R1 = resistance in ohms
R2 = resistance in ohms
C1 = capacitance in farads (F)

The time period can be split into two parts: T = Tm + Ts
Mark time (output high): Tm = 0.7 × (R1 + R2) × C1
Space time (output low): Ts = 0.7 × R2 × C1

Many circuits require Tm and Ts to be almost equal; this is achieved if R2 is much larger than R1.

So, here I am at my soldering station and I was able to assemble an astable mutivibrator in 20 mins. Please see the pictures.

It is nice feeling to work with real components after working with software components so long. There are significant similarities between hardware components and software components. Have long experience with software components and enough experience with hardware components I am able to draw similarities in their working, design, reliability, features, cost to manufacture, cost to support and cost & effort to use it reliably. Most importantly the assembly and manufacturing of the components. Unlike hardware product assembly lines, there no software product line that are available that can match the agility, cost & reliability of the hardware product assembly lines. This is an emerging field with lots of tools coming into market. There are many more aspects that we can compare and talk about software product line and hardware product lines. To keep this blog short I will talk about these aspects in my later blogs of software production line automation.
Posted by Picasa

Blog reboot

After two years ( Jan 2005 ) I restarted the blog with new google blogger. Watch for this space to keep you in touch on what I am doing, where I am and random musings.

Wednesday, January 12, 2005

Vacation and Scaled List

It is wonderfull to see everybody at home. I been travelling a lot and spending time with famliy matters. Weather here is wonderfull, though at the times I feel cold but normally in the range of 50 to 60 F.

Sneaking out to do some reading on "non-linear presentation techniques for saving screen real-estate and accessiblity". After doing some experimentation and some code I was able to create a simple list control for Windows.Forms and CF framework. Please refer my previous article about how to setup VS project and develop a CF Control.

List,

I am choosing simplest of all controls for demonstration purposes. Lets try to summarize on aspects of information presentation of a list.
  • List for choices - Enumerating information items as list to present user with various choices available.
  • List for selection - Allow user to select from the choices made.
  • List for an overview - Allow user to see overview of choices presented.

Focus plus context

Limitation in the viewing space presents the problem that either the overview of all the data or zoomed view of interesting subspace can be shown with linear magnification factor. Non linear magnification suggested as a technique to distort the presentation space for benefit. [Leung and Apperley, 1994]. Various ways like fisheye view, perspective wall and hyperbolic tree view are few of them. Basic idea is to present information and interact with it using non-linear magnification factor space.

Not going into too much of detail of Focus+context and related non-linear magnification presentation techniques. Intead of describing the behaviour of this list control in words, let me try to show you what it looks like. Following is the link of macromedia demo of the list.

http://img146.exs.cx/my.php?loc=img146&image=scaledlist5rf.swf

For more information search at,
http://citeseer.ist.psu.edu/cs?cs=1&q=focus+context&submit=Citations&co=Citations&cm=50&cf=Any&ao=Citations&am=20&af=Any
Design,


Here, in this article, I will show an implementation of such focus plus context technique applied to a list.

References
Leung and Apperley, 1994 Y. K. Leung and M. D. Apperley (1994). A review and taxonomy of distortion-oriented presentation techniques. ACM Transactions on Computer-Human Interaction (TOCHI), 1(2):126-160.

Sunday, December 19, 2004

Pocket PC project and developer setup

For CF control we have to do following,

  • Create CF Control solution and source code (actual control)
  • Create Windows Control solution and share the source (designer)
  • Copy them at right location and use them


Wipe you slate clean. Forget everything you know about windows/web/mobile control. Listen carefully what I say.


For any control we have following ways to look at a control

  • Control when running.
  • Control when being designed.

Reasons to highlight the abovementioned obvious perspective is due to differences in the compact framework run time and design time. This understanding of this perspective
difference will make us understand things more clearly later.

  • Control when running, is running in limited resources compact framework. Nothing but compact framework is available

  • Control when designed. It is designed in Visual studio. This requires control to interact with visual-studio and other heavy weight dlls which are not available in compact-framework.

Now the dilemma is, if we just use compact framework to generate the dll to cater design-time and run-time, we can only do so much, and if we use the windows forms regular framework to create dlls we can't run it on the CF DEVICE. In order to deal with this scenario we create TWO Dlls,

  • Control Dll (run-time dll, linked with pocket pc framework dlls) and
  • Control Designer dll (design time dll, linked with .Net PC framework dlls)

Now lets see how one/VS will use them.

  • you use Designer Dll to design the application
  • you run (F5), and the other dll (the actual CF one) gets deployed and used in run time.

Now in order to establish this connection and automatic switching of design to run-time dlls following is done. In "AssemblyInfo.cs" of Designer Dll we add following attribute.


#if DESIGN
[assembly:
System.CF.Design.RuntimeAssemblyAttribute("MySmartDeviceControl, Version=5.1.20051.3, Culture=neutral, PublicKeyToken=null")]
#endif


In summary,

  • Designer Dll designs the application,
  • Control Dll is used for running the application.
  • and above attribute does that.

Now the question is? in order to create two dlls do we write two source codes ? The answer is 'no'. Let me explain you in easy steps, Although the steps might seem to be long, but they are
described in detail for easy understanding.

1 Create a directory say at some location like following,

c:\work\PocketPC

2 Open Visual studio and Create a Windows Smart Device Application




3 Delete Form1.cs


to get


4 Open AssemblyInfo.cs and add the abovementioned attribute.




5 Add new Class "MyControl.cs" and add following code, the simplest control,



Add following code.

using System;

using System.Drawing;
namespace MySmartDeviceControl
{
public class MyControl : System.Windows.Forms.Control
{
public MyControl()
{
}
protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
{
base.OnPaint (e);
e.Graphics.DrawRectangle(Pens.Red, 0,0,this.Width-1, this.Height-1);
e.Graphics.DrawString("MySmartDeviceControl", this.Font, Brushes.Blue,10,10);
}
protected override void OnResize(EventArgs e)
{
base.OnResize (e);
this.Invalidate();
}
}
}
6 Save everything and close the visual studio.

7 Open Visual Studio and create a new Project of WINDOWS CONTROL LIBRARY, Yes, NO Smart Device, the plain windows Control Library.



9 Delete the "UserControl1.cs"


to get,



10 Now, pay attention as this is tricky part, from references, delete

"System.Data"
"System.Drawing"
"System.Windows.Forms"
"System.XML"


11Add the reference, click "Browse"





use path "C:\Program Files\Microsoft Visual Studio .NET 2003\CompactFrameworkSDK\v1.0.5000\Windows CE\Designer"


"System.CF.Design.dll"
"System.CF.Drawing.dll"
"System.CF.Windows.Forms.dll"

Now Add "Windows Forms" references AGAIN, (these are the ones you deleted in step 10). This sequence of removing and adding the references does matter. You will learn that in a moment. In short, when looking for a type that exist in more than one place, first one is used for binding. Add,

"System.Data"
"System.Drawing"
"System.Windows.Forms"
"System.XML"


to notice following,

12 Right click the project and open properties,






Add "Conditional Compilation Constant" "DESIGN", please notice that was used in AssemblyInfo.cs.

13 Save everything and close the visual studio.

14 Open "C:\PocketPC" directory and you will notice,

MySmartDeviceControl
MySmartDeviceControlDesigner





15 From "MySmartDeviceControlDesigner" and CUT (^X),



MySmartDeviceControlDesigner.csproj
MySmartDeviceControlDesigner.csproj.user
MySmartDeviceControlDesigner.sln
MySmartDeviceControlDesigner.suo

PASTE (^V) to MySmartDeviceControl



and delete MySmartDeviceControlDesigner directory.

16 Now open "MySmartDeviceControl\MySmartDeviceControlDesigner.sln". Right click and add existing item, select "MyControl.cs" and you.






17 Build the control [Ctrl+Shift+B"] When you compile you will get following warning,


'XXX' is defined in multiple places; using definition from 'YYY'


Since 'XXX' is defined in more than one place it uses from the location found first. In this case it happens to be "System.CF.*.dll". This is intented, and thus was reason for to add them in sequence.

'System.Windows.Forms.Control' is defined in multiple places; using definition from 'System.CF.Windows.Forms.dll'

'System.Windows.Forms.PaintEventArgs' is defined in multiple places; using definition from 'System.CF.Windows.Forms.dll'

'System.Drawing.Pens' is defined in multiple places; using definition from 'System.CF.Drawing.DLL'

'System.Drawing.Brushes' is defined in multiple places; using definition from 'System.CF.Drawing.DLL'

Thus following references,

"System.CF.Design.dll"
"System.CF.Drawing.dll"
"System.CF.Windows.Forms.dll"

must come before

"System.Data"
"System.Drawing"
"System.Windows.Forms"
"System.XML"

as you will notice in following image.





17 Summarizing , we have following

  • One directory "C:\WORK\PocketPC\MySmartDeviceControl"
  • Two Solutions "MySmartDeviceControl.sln" and "MySmartDeviceControlDesigner.sln"
  • Two DLLs that are generated after compiling above solutions.


18 Now these DLLS should be copied at following locations (this is very important),

"MySmartDeviceControl.dll"

C:\Program Files\Microsoft Visual Studio .NET 2003\CompactFrameworkSDK\v1.0.5000\Windows CE

and

"MySmartDeviceControlDesigner.dll"

C:\Program Files\Microsoft Visual Studio .NET 2003\CompactFrameworkSDK\v1.0.5000\Windows CE\Designer





19 Adding the control to the toolbox

Open Visual Studio and Create new Smart Device Application,





20Using the control and running the test Smart Device Test Application



The Application is running.