Editor’s Disclaimer: Note two things, one, this app won’t lose the weight for you, it just tracks your weight and calories. Also, I’m not a medical professional so don’t take it as medical advice.
After many weeks of not doing much, I’m back and ready to start a new personal project to help me lose weight! Given that weighing 157kg is terrible for many reasons, I decided to finally change that once and for all. Being the aspiring programmer I am, I decided to look into a nerdy approach to losing weight and that’s when I came across The Hacker’s Diet by John Walker.
John Walker is the co-founder of Autodesk Inc., a company that specializes in computer-aided-design (CAD). Walker wrote the book based on how he lost weight. Walker’s journey began when he realized that it was possible to do so given that he had made lots of money (legally), founded a very large company, designed the industry standard tool AutoCAD, and had a great life. Being the engineer he is, he decided to lose weight by looking approaching it as an engineering problem.
The book is broken down into three parts, Engineering, Management, and Details.
- Engineering talks about how the human body changes weight, why some people gain weight easier than others, the benefit of exercise and how to find accurately monitor your progress. All of this is explained with the help of diagrams and Excel Spreadsheets.
- Management covers how to actually lose weight with a combination of planning meals, monitoring your weight, creating a trend and making adjustments based on the trends in addition to covering how to handle some common problems (like the weight loss plateau).
- Details has some resources that can help with your weight loss journey, including an app to do exactly what I want to do (ehh…still counts as a learning experience), conversion charts, calculations, and some calorie information on common foods.
Given the book’s content, Farai’s Weight Tracker will:
- Let me add weight information
- Pull calorie count from wither MyFitnessPal or Fitbit
- Output my weight onto pretty looking charts along with a trend line
- Show other people how my weight loss journey is going.
- Predict future weight loss
- Other things as they come up
To make this app, I’ve decided upon this tech stack:
- Heroku to run the final application since it’s free, comes with a database containing 10,000 rows and relatively easy to set up.
- Python 2.7.x to run the flask application. I’m using Python 2.7.x since it has better support for Flask than Python 3.x. Plus, that’s all I know
- Flask as the Python-based application’s server framework since it’s also free, let’s me extend it easily and has really good documentation and extensions.
- Pygal to render sexy charts. Found it by Googling.
- SQLAlchemy to let me work with multiple databases without using SQL. Great since I can work off a sqlite3 database for local testing and PostgreSQL in order to connect to Heroku’s database.
- Visual Studio Code since I realized how I don’t have a license to use Sublime and it’s pretty powerful.
- Cloud 9 gives me both a full editor and the ability to test out applications live (with limitations).
So far, I’ve done quite a bit so far, but I’ve got a whole lot more to do. I just got Flask up and running and I’m now trying to see how a flask program fits all these different projects.
If you want to see my progress on FWT, the source code is on Github. In all, let’s see how this goes!