Making Farai’s Weight Tracker: The (Terrible) Alpha Build

So, after months of on and off work, I’ve finally made a terrible alpha build for Farai’s Weight Tracker. As it is right now, it’s a massive mess of spaghetti code as I tried to hack solutions on the fly. It’s good to see it get this far, but in all honesty, it’s a mess.

To make FWT, I used the following tools;

  • Python– The language I’m most proficient in since I use it a lot in college.
  • Flask– A Micro Web Framework which I picked up since it gives me the freedom to define how to do stuff my way (posssibly to my detriment)
  • Pygal– A data visualization tool to make the weight graph. It’s pretty easy to use and it’s very powerful
  • SQLAlchemy– An Object Relational Mapper (ORM) used to abstract database queries.I picked it because I was working between SQLite (testing) and PostgreSQL(production).
  • bcrypt– Pretty overkill but it’s purpose is to authenticate me. I left the hash exposed in the source since bcrypt is really hard to crack, so it should be fine (not that this is a very secure application)
  • I also used virtualenv and virtualenvwrapper to create virtual environments to better manage dependencies.

Setting up the development environment was horrible, but thanks to some diligent googling, I was able to install certain dependencies (like psycopg). As it is, it works (i.e. it works on my machine), but it still needs lots of work. For one, I intend to run it on Heroku where I can run both the app and use Heroku Postgres for the Database. I also need to make the UI look better, clean up the code and support multiple users.

This application, while imperfect, was a great learning experience to make. Being able to cover many tools and get the basics of how they work was great.I only wish that I spent more time learning the tool before implementing something.

If you want to checkout the code, you can go to the Github Repository. Otherwise, It’ll be a few weeks before I look at fwt again. Right now, I have to focus on another project, classes and upcoming hackathons.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s