As I was starting at Flatiron, I became really close friends with a few people in our cohort. One of the discussions we frequently had was how people were taking and keeping notes. Everyone was using something different, and it was one thing that we have always been unable to really collaborate on. Some of us had more free time then others, and so some of us would have really complex and complete notes while others would barely have free time to do the lessons let alone take notes! When the Sinatra module started, we really wanted to start sharing notes. The problem was that there were no easy solutions out there for this. We could share Googe Docs, but these really lacked some of the things we really wanted in a collaborative tool. For most of us, the ability to use Markdown was a huge MUST. There are some notable (pun intended) notetaking apps out there, but a lot of the ones that really do exactly what we wanted were not really notetaking apps at all — they were coding repos like GitHub or documentation apps like GitBook.
Today I want to talk about my first CLI project for Flatiron School: Foodexplorer. I want to cover a few mistakes you might make with your first Ruby project by talking about a few of mine and how I fixed them. On the way, we’ll also cover some fundamental things to know about executing Ruby, and some questions that came up in my very first code assessment with Flatiron School!
My intent was to design a simple command line application, called Macrocounter, that could calculate a person’s recommended macronutrient ratio for their specific fitness or weight-loss goals. Typically this is broken into three categories: lose weight, maintain weight, gain weight. There’s research behind the approach of balancing our intake of proteins, carbs, and fats that support different fitness-specific goals. Using some fun little math formulas developed by researchers, we can take in a user’s attributes (hereafter: attr) and use that to calculate their macronutrient ratio. From there, users would then be able to search for a food, display it’s macronutrient content, log it to their daily food list, and it would calculate their current intake of nutrients vs their allowable intake. The set-up was simple, and the objectives achievable: