Thursday, February 24, 2011

Creating a Body-for-Life App

It dawned on me that after I hit 30 I'm kinda really putting on some belly cushion and it's gaining fast.  I had done "Body-for-Life" several years ago but back then I didn't stick to it very well and ended up quitting.  The eating 6 meals in a day was very hard to get used to.  Plus the the whole working out thing ... it's just difficult to get motivated and stay motivated for the entire 12 week program. 

These days I'm a software developer by day and so I spend long hours hunched at my desk.  I'm a creature of habit, which means I'm on autopilot with my head full of algorithms.  Since I haven't really developed a routine of eating right or doing exercises daily, it's very difficult for me to integrate that into a new daily routine. 

What I do get motivated about is trying to develop the next "thing"...  an app, a website.  Something cool.  Number of cool things developed so far: 0.  And do I know how to write an iphone app?  No.  But I'd thought I'd figure it out along the way and I might as well share the experience for anyone else who is interested.

So in this very first blog post I will show how to create an application that helps with the Body-for-Life cardio work out.  In Bill Phillips book, he talks about doing cardio every other day for just 20 minutes.  It doesn't sound like a lot, but he says it's all you need, and it's actually pretty intense.

The way the cardio routine works is that you start off with a level 5 intensity.  Where 1 is laying down and 10 is sprinting for your life.  You do level 5 for 2 minutes to get warmed up.  Then for minute 3 you go to level 6.  Minute 4 you go to intensity level 7.  In the 5th minute you up it again to level 8 and so on.  You go all the way up to level 9 and then come back to level 5 in the next minute.  You repeat this pattern 4 times (20 minutes).  The last peak you try to get to a level 10.

But the problem I have is that when I'm running or doing jumping jacks (say, in my living room, cuz I'm too lazy to drive my ass to the gym 10 minutes away even though I paid for the dang membership) I need some kind of timer to look at.  I can use my stop watch app inside my iphone but I also forget which intensity level I'm supposed to be at.

So I thought for my first app, I would attempt to write a application that shows you a stop watch counter plus the intensity number.  I know, I know, you were expecting something more impressive?  Yeah, but I gotta start somewhere.  In addition, I'm more of a web developer, not an objective-c programmer.  But I have heard about this project called Phone Gap that allows one to port a web page writting in HTML/CSS/Javascript into a native app.  So for this first app, that's the route I will attempt.

In my next post, I'll talk about how to create the counter and intensity display using javascript.

No comments:

Post a Comment