To use my sansa mp3 player as a workout guide. I want it to tell me which workout to do, how many reps, how long to rest etc.
To be able to track long-term how I’m doing. Am I working out regularly? Am I lifting more weights than when I started?
To be able to record when I deviate from a workout. Maybe a friend shows up and I work out with him, doing something totally different from what I planned. I want to be able to record that, and be able to make up my original workout on another day and record that too.
To sit down at the start of a month and map out my workout schedule for the month. Or 3 months. Or 6 months. Whatever I find works best. But the point is to have long-term goals and not just go to the gym and see what I feel like doing.
To be able to connect my sansa and run one program/command and have it sync databases.
To integrate with google calendar. Ideally to both edit and read, or read-only if that’s too hard.
There will be two components: a database-driven rails app and the sansa app. Since I’m a rails programmer, the idea of a remote device is strange. I’ve come to think of it as a remote computer that has its own database. The databases then will get synced up with another database hosted on a web server (or a local computer, if you don’t have a web server). Mostly, the sansa will be creating rows of exercise logs.
The app will be responsible for managing workouts, exercises, and goals. Synchronizing the goals with exercises in a robust way is proving to be the most difficult part. If you have a goal to work out 2 times per week and increase weight by 5% each time, have you met that if you do one workout one week and two workouts the next? or if you jump 3% one week then 7% the next? If you have a goal to do an exercise 10 times, and you do it 10 times but 5 of those times you did 2 reps instead of 3, have you met it? etc.
I’ve come to divide goals in two parts: time-based and weight-based. I can mark that I want to do a certain number of a certain workout (ex. upper body) or that I want to increase my bench press from 100lb to 140lb.
I’ve come up with a sort of linear goal storage schema, and where I store a # that means simply how many times I’ve done an exercise, and the goal component has a simple formula that can derive a goal amount based on the #.
n updated each time the workout is done ie. a WorkoutLogEntry is made
n updated each time an exercise is done, ie. an ExerciseLogEntry is made
v1, v2, v3, v4, v5, v6, v7
VariableFunction given an input n, returns a value for the variable
WorkoutLogEntry sansa writes this
workout_id null if it was an unscheduled workout
ExerciseLogEntry sansa writes this
workout_exercise_id null if it was an unscheduled exercise
SetLogEntry sansa writes this
workout_exercise_id null if it was an unscheduled rep
v1, v2, v3, v4, v5, v6, v7
The rails app will have the standard create-read-update-delete so that workouts, exercises and reps can be managed.
There will also be a section to list/tweak logs that are copied off the sansa, in case I didn’t record it right.
There will be a generator where I can specify days of the week and a start and end date, and have it generate a bunch of WorkoutDate rows for me.
If I get really fancy, some graphs showing the ExerciseGoalRep derived weight amounts for an exercise compared to my actual exercise log entry weight amount.
The basic layout I’m thinking of is a list of exercises followed by reps on the top. On the bottom will be a “message” that tells you what to do. Using the scroll wheel and center button, you can get context menus that then allow you to manage any aspect of the exercise. Essentially, it’s a WorkoutLogEntry editor.
Very basic mockups:
Startup screen, choose workout:
Choose workout Today: Aug 22 Aug 20 Upper body 2 *Aug 22 Legs 1* Aug 24 Back & bicep New workout
General workout screen:
Bench Press 12x90 10x100 8x110 Tricep Pushdown 10x60 9x70 8x80 ------------------------ Bench Press 100lb
General workout screen:
Bench Press 12x90 10x100 8x110 Tricep Pushdown 10x60 9x70 8x80 ------------------------ Rest 30s Set weight to 110lb
Select 30lb rep with scroll wheel, click middle button:
Bench Press -------------------- | "10x90 rep" | | Mark Done | | Mark Not Done | | Change num | | Change weight | | Delete | | Insert rep after | --------------------- Tricep Pushdown 10x60 9x70 8x80 ------------------------ Rest 30s Set weight to 110lb
Select bench press with scroll wheel, click middle button:
Bench Press --------------------- | "Bench Press" | | Mark Done | | Mark Not Done | | Delete | | Insert ex. after | --------------------- Tricep Pushdown 10x60 9x70 8x80 ------------------------ Rest 30s Set weight to 110lb
How to handle cardio? One-rep exercise where weight amount is minutes? Need one additional linear variable “difficulty”?
How to make the app operate like a very simple database? Ex. associations/joins, unique ids. Load everything to memory? How smart should the log writing be, just write everything that’s in memory and repeatedly use that method, or for performance will I need to try to be smarter about it?