CLI Project - Craft Beer Menu

Posted by Corey Martin on October 11, 2020

A Lesson in Procrastinating why you shouldn’t do it!!

https://github.com/CoreyM21/beer_cli_project

For my second entry into my blogs, I am going to talk about my CLI project which I am very proud that I built but also the danger of procrastinating! This is a lifelong trouble of mine and honestly, it only becomes worse the more I am not confident in a subject. Per example, I have never coded before and I have never written a blog before before and today is when both things are due for me to continue on! So let’s take a look at what my CLI does, how it was for me to build, and where I could have done much better!

Craft Beer Menu

My CLI, or Command-Line Interface, at the advice of a fellow student is very simple. The program greets you with a welcome message and asks you to type in a fun word to describe a beer you’d like to have. My thoughts being when you are out enjoying a craft brewery and interacting with the menu in how you feel that day. You could type in a fun word and then it would give you a list of beers associated with that word. You then see the list, pick a beer and it gave you the beers: name, tagline, and description. I also wrote in some options so you could pick a new word, list the beers again after you made a pick but wanted to see your otpions again, and exit out of the program when you felt like it. The example below is if you put in the word ‘stout’. I put ‘??’ where the program takes in a user input.

- This is the Craft Beer Menu!

Type in a fun word to describe a beer you’d like!

?? stout

That is a fun word! Let’s see what beers are associated with stout:

  1. Misspent Youth
  2. Coffee Imperial Stout
  3. Sunmaid Stout
  4. Lumberjack Stout
  5. Truffle and Chocolate Stout - B-Sides
  6. Mr.Miyagi’s Wasabi Stout
  7. Old World Russian Imperial Stout
  8. Stereo Wolf Stout - Prototype Challenge
  9. Small Batch: Nitro Breakfast Stout
  10. Blonde Export Stout

Choose a number listed Or type ‘New Word’ for to search under a new word Or type ‘List’ to see that list again Or type ‘Exit’ to get out of here!

?? 4

YOU CHOSE: Name: Lumberjack Stout Tagline: Blueberry Bacon Stout. Description: Lumberjack Stout is an intense beast that took its inspriation from what an actual bona-fide lumberjack might have for breakfast. Flavours of molasses, chocolate, smoke, berry, coffee and more, with a low bitterness, leaning this beer firmly towards the malty side.

Choose a number listed Or type ‘New Word’ for to search under a new word Or type ‘List’ to see that list again Or type ‘Exit’ to get out of here!

?? exit

See You Later and Remember to Drink Responsibly!

-

And that wwas the poject! Very simple and easy to understand! I wanted to get more complicated but the advice of a fellow student plus PROCRASTINATION stopped me there. I am proud of it though. Only a month ago, I would have no idea what I was looking at let alone writing it, so I am very happy there!

Issues when building and solutions found!

My very first issue came when pick an API to pull from. I picked the API I used pretty early because 1. I love beer! and 2. It had the info I wanted about the beers. The information included Name, an ID to pull up that info easily, tagline for the beer, descritpion, food pairing!, and recipe. I did though have a panic attack when I realized the beer avaible in the API was limited to craft brews! The description of the API does not includde that info nor does it tell me where the info stops! So I panicked and went scouring through other API’s but most required keys or I couldn’t figure out a creative way to manioulate the data. This of course was started week of deadline…..first issue should really be when I started but yeah, that goes without saying!

Second issue came actually with finding a way to loop my data! I was having a couple of issues where I wanted the word to list again and couldn’t figure out how to do it. Or I wanted to show the list again! I eventually, after watching some videos and scouring google, figured out I had written the nessecary code already! Just needed to call on it properly!

Finally, the issues I had were with submitting the project. I had the CLI project built out but what else did I need and I was running out of time! I needed this blog post and a video walkthrough. As of writing this, I still haven’t done the walktrhough and that will be fun challenge as I have about 6 hours to submit this!! But it will get done and this leads me into the last thing I want to talk about in my blog.

The danger of Procrastination and why it stopped me from building something just a bit better

When I thought out how I wanted my project to go, I ended with about 85% of what I wanted my CLI to do.

-Yes, you type in a word and it shoots you a fun list to choose from. CHECK!

-Yes, you pick a beer and it gives you the name, tagline and descritpion. CHECK!

-Yes, it lists the beers again and Yes, it allows you to choose a new word! CHECK AND CHECK!

-And I got to show a little personality with some fun messages when things work. It pomps you with “See you later and drink repsonsilbly” when you leave. When you type repsone that doesn’t work, it reads, “Huh? YOu must be dinking a little early! Try again”. So that was fun and I got to be a little silly which is totally me!

But what did I want it to do more more?? What more could I want??

I did want to write into the code where it pprints out more slowly. Instead of instant result, I wanted it to print out more slowly so that you could see your results as they printed out to you!

I also wanted to go another layer deep! As it stands, I meet the requirements needed for my project. But I wanted to give the user the option that once you picked a beer and got your results, you could then get a food pairing or the recipe for the beer! I think that would have been fun and after this project is submitted and reviewed, I think I might do these things to it for my own sake and because it gives me an idea for an app for two buisnesses I am aprt of. So theres that!

If I had started when I wanted, I would have spent week 2 just doing flare! Adding in small pieces here and there. But in conclusion, I was warned to keep things simple! Do what is needed, maybe a bit more but don’t bite off more than you can chew! My program does what I want it to do! I will definitely play with it some to see what more I can do with it and maybe for the future, it will be inpsriation to build out some apps that I have ideas for. What if I could do this same idea for the Donut Maker I work with! I am feeeling like something sweet! Here is the Strawbeery Cheesecake donut! Its description and best drink pairing i.e. an ice coffee with caramel or a rose wine. I don’t know but theres the start of an idea and thats all I need!

…..but I can start that tomorrow. I am feeling kind of tired right now……lol