PierWorkout

The Pier Workout application is a weight-training recording page, an example is Weight Lifting. It allows one to store a log of workouts, and provides recommendations based on previous exercises. This is accessible from:

Gofer new
	smalltalkhubUser: 'JohnCBorden' project: 'PierWorkout';
	package: 'Pier-Workout';
	package: 'Pier-Test-Workout';
	load.

After loading the code, a workout can be defined by:

(PRPathLookup start: (PRKernel instanceNamed: 'Pier') root path: '/John Borden/Todo/Workout') addChild:
	((PRWorkoutLog new) addWorkout: (
			PRWorkout new addExerciseEntry: (
				PRExerciseEntry newOf: (
					PRExercise name: 'Bench Press' weightUnits: 'lb'
					details: 'Flat bench with bar') weight: 200.5 times: 12)
			);
		name: 'test';
		title: 'Test';
		yourself).

For adding new exercises, create them with something like:

PRExercise name: 'Deadlift' weightUnits: 'kg' details: 'Barbell from the floor'.

Original I stored my workouts on a page, and manually updated them throughout the workout, this workout app is better because it provides recommendations, and is more manageable for larger data.

An example of conversion/backup code is:

"self is the above PRWorkoutLog
(PRWorkoutTest new workoutsBasedOnString: 
'|2016-Mar-13|Dumbbell Incline Bench|65|4
| | |60|11
| |Cable Tricep Overhead Extensions|145|5
| | |140|7
|2016-Mar-9|Dumbbell Flye|50|12
| | |47.5|14
| | |45|13
| |Back Squats|180|9
| | |160|7
| | |100|12') do: [ :e | self addWorkout: e ].

Improve the workout experience:

  • Improve the recommendation engine
    • If I start doing an exercise that is not recommended, the engine should reset - this seems to be the best time to set the recommendation
    • If I switch an exercise in the middle of a recommendation, it should not list the three from the workout, only two - #updateRecommendedEntries needs to know when the last set is done
  • Filter the workouts that are displayed (this could depend on the recommendation)

Changes made with PierWorkout:

  • The server for this is several time-zones away from where the workouts are done, and it is common for the workouts to take place near midnight for the server timezone, with a long workout, some exercises end up on one day, and the rest on the next day. To check if a workout is in progress, it works well to check its date against: (DateAndTime now - self timeZoneDifference) asDate yyyymmdd - more details can be found here (examples for Pharo require replacing crtab with cr; tab).