Workout Tracking Solution

I love to exercise. It gives me an excellent chance to relax and preserve my overall goal of maximizing my physical strategic margin, or keeping maximum function as long as I can. (I want to be able to wrestle with my grandkids as long as I can.)

I also love data. I love to track everything and know that if I care about changing something I should probably track it. I am also becoming more aware of a tendency to focus on long term goals instead of achieving short-term success and moving on from there. For several years, I have recorded if I worked out our not and give myself a 1-5 score for the category fitness. (As I do for my wife, relationships in general, devotional living and stress.)

While I have enjoyed looking back at my monthly graphs and reports, there have been several trends I’ve noticed that have been very insightful for me. I also am motivated to meet my goals when I know I am accountable to myself and anyone (my grandkids again?) who are going to look at my data. However, one of the things I have never been able to crack is how to track my workouts. I thought about making a simple text field that I can search, but how could I see my progress over time. When I was primarily a runner, I used to make graphs showing my mileage and overall pace improvements, but how could I show improvement with the diversity of workouts that CrossFit is providing me.

When I had to list my goals, I went back to my values. In this case they are:

  • Don’t get hurt (learned this one from experience)
  • Frequency: workout every day in some way if possible (yes, diversify)
  • Diversity: don’t long-neglect any of the core principles: Strength, Stamina, Cardiovascular Endurance, Flexibility, Speed, Power, Agility, Accuracy, Balance and Coordination
  • Improvement: improve in all core principles

With this in mind. I would like to track workout’s at the most granular level, if I could do so quickly. So, in setting software requirements, I look at the questions I would want to answer. Some examples where (T) is a threshold (must do) and (O) is an objective (want to do):

  • (T) Have I worked out frequently this month? (=> calendar view over varying times)
  • (T) Am I improving? (=> need to show incremental progress; chart)
  • (T) What is my PR for overhead squat? (=> query that lists PRs for all workouts; make this public?)
  • (T) What is my last score for “Cindy”: (=> that would be on PR page, so named workouts and movements would have to be in a similar query)
  • (T) What are my last 10 scores for Cindy (=> time series query from previous)
  • (O) How many Watts did I burn this week? (=> need to track Work / Time)
  • (O) Is my ability to do more work faster improving? (=> need to index performance)

Next, I wanted to look at the data format when I just write down my exercises:

  • Run 3.65 miles in 20 minutes (=> need to record, distance, time and workout name)
  • Cindy: 28 rounds (=> need a database of crossfit workouts preloaded)
  • 5 rounds Cindy, 15 Squad Cleans (#145), 5 rounds Cindy in 13:48 (=> need to record reps of named workouts)
  • Bench 245 x 10 x 3 (=> need to record reps, weight, rounds | might not have time)
  • Bike 6 miles in 25 minutes (=> same requirements as running)
  • Climbing for 2 hours (V4+!) (=> need notes field; might not have distance or reps)

All together, I had enough to start on the database design, which I always do on paper and ended up looking like this:

ER Diagram

Basic Entity Relationship Diagram

In listing out the basic data, I clearly needed to track weight and distance, in addition to the time duration and quantity that the basic exercise was performed. In order to connect between a workout and a specific instance of an exercise I created a join table value named an exertion. The tricky part would be the set of characteristics required to derive power from each movement. For example, the bench press would move a distance of my arm down and up with a resistance equal to the weight on the bar. My agile strategy was to input the data and start recording what I could and then figure out how to deal with the data later when collected.

The results of my initial web application are below:

Workout Entry

Some features I did incorporate were the ability to create an exercise on the fly when inserting data. I wanted to make the data input quick and painless. I also made the four input fields very basic, and not tailored to the exercise in question. A future iteration on this would be to disable fields that are not relevant to a particular exercise. Through using the chronic gym and rails virtual attributes, I made the input general as well, so you could type in 6:41 for a mile run time or something like 6 min and 41 seconds or even 401 seconds. I haven’t incorporated it yet, but I also would like to input the distance in meters or miles and have either one work seamlessly. In any case, this format is going to work for now. I plan to collect data for a couple months, then play with adding the ability to track progress and some basic validation on the form elements. Please let me know if you have any comments or suggestions how I can make this better. This might already exist, but I haven’t found it, and I want to get this to work with my overall system and will probably stick to a custom solution, so I can own my data and adapt the system over time.

*Edit:* Check out this site, science behind sweat I probably can improve on this, but looks cool.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.