Ways to Learn the Most From Video Reviews

The video reviews can be a challenge.  Often times the pace is WAY too fast, and you need to go back 100 times to see what the instructor did, or other times, the video is 2 hours long, and you don’t really feel like sitting the the whole lecture :).  Here are a few tips for maximizing your learnin’ while watching these videos.

First, download the videos!  The is not the most straightforward process, but since we’re all coders, it shouldn’t be too bad.  I use a great tool called Youtube-dl.  It can be downloaded with Homebrew on the Mac.  Just enter the following command into your terminal. `brew install youtube-dl.`.  From there, navigate in your browser to the video you’d like to download, right-click and choose “copy video url”.  Then go back into your terminal and type in `youtube-dl + The URL of The Video You'd Like To Download`.  Give it a few minutes and you’ve downloaded the video!  (Btw, make sure you are currently in the directory where you’d like the video to download to).  
From there, I like to open the video in VLC.  VLC let’s you watch the video at different speeds, so if you need to speed up or slow down the video, it’s super easy.

Another important tip is to really try and follow the train of thought by the instructor.  Understanding that is one of the keys to programming.  Try to truly understand why the instructor did something a certain way, and how he or she came to that conclusion.  If they didn’t know how to do a certain thing, pay close attention to how they figured it out: What they googled, code they tried, etc.  It’s inspiring to see someone not get frustrated, and to just solve the problem!  Also pay close attention when they get errors and can’t figure out how to fix it.  That is such a common problem, and one of the most important aspects of programming, and to see techniques for how to dig yourself out of that hole are invaluable!

I used to try and code along with the instructor.  Now I believe that’s not the best technique.  I think it’s more important to just watch closely, take a few notes if you have to, but coding along will probably mean you’ll end up with tons and tons of typos in your code, and you’ll spend too much time trying to fix those little errors, and you won’t internalize whatever programming concept the instructor was trying to teach.

Good luck!

Struggles with Logic and Conditionals

Struggles With Logic and Conditionals

A beginning is a very delicate time. Know then that it is the year 2018, and understanding conditionals is one of the most important aspects of learning to code.

It really does seem easy when someone gives you a real-world example of a conditional. Like, "If the milk is green, don't drink it. Otherwise, drink up!". That makes sense. But somehow in the early days of understanding the logic and the flow of coding, conditionals can get really, really confusing.

One of the toughest parts of understanding conditionals was all the 'opposite ' conditionals. Like, in the milk example, it might make more sense in code speak to say something like, "If the color of the milk equals green, do whatever the inverse of drinking is. Something like !drink would be how it might look. So it can be quite common to have to do all these little bits of logical acrobatics in order to understand why something would evaluate one way or another. 

Another example, more in line with something you might actually see deep within the folds of code , would be something like this:

if a <= b && b <= c

    puts "do this"


    puts "wait, do this"


In this statement, the code is making two evaluations, and if they are both true, the code in the first block will execute. Otherwise, the code in the else block will execute. So, if a is equal to or less than b , AND b is equal to or less than c, then you are free to pass safely within the mines of Moria (random LOTR reference).

For the most part conditionals are that simple. Of course, with all things coding, it can get really complicated, really quickly. Nested conditionals can add extra layers of confusion upon first glance, but usually if you stop and slow down, you'll get the logic of it all.

There are also many ways to write a conditional. I suppose most coders develop habits over time and start writing the conditional statements which are most comfortable to them, and upon seeing new ones can get freaked out. I know, because it's happened to me! Just take your time, go slow, and make sure to google everything you don't understand!



I had an idea early on during the Flatiron section on ActiveRecord and Sinatra to  design an app which would be based on my job as a music venue booker.  A booker constantly needs to create new shows at the venue he or she books at, and needs to modify that event many times throughout the booking process.  So I decided to create an app that does just that.  Because I'm still a little early on in my understanding of relational databases, I chose to not implement all the functionality I would actually need to use this tool, but to create more of a starter project for something I might eventually create as my skillset and knowledge for the subject increases.  Basically, I kept it simple.  A user(or, booker) is able to create an account, choose the name of the venue they book for, and create and modify shows.  
In terms of what that means in ActiveRecord speak, it means a User(venue) "has many" shows, and that shows "belong to" a user.  I created two databases: One to manage the users(venues), and another to manage the shows and the users(venues) they were associated with.  
The user is then able to go in and create as many shows as they'd like.  They can input relevant information for that particular show, including the headlining act, support act, start date, start time, a short description of the show, and a website for the headliner.  The user is then able to view all the shows in their database, and modify any of the shows.
The app uses restful routes and uses the CRUD method to create shows, read shows, modify (edit) shows, and destroy (delete) shows.  Hopefully we won't have to use that last method too much, because venue bookers hate cancellations!

Comparing Basic Programming Fundamentals To Music

Often times when I get stuck with a particularly vexing programming dilemma, I'll try and think how I can relate the issue to music, something I'm quite comfortable with.  For example, when I was first learning about the concept of functions and methods, and how they took arguments passed into them, I would think about how I hook up my studio gear.  The way sound gets passed through one component to another is a slightly similar concept (ok, there are actually many differences when you really think about it, but that's fine).

Another fun thing I like to think about is how there's so many ways to do the same thing in programming.  The different ways you can iterate over collection sometimes reminds me of all the different ways you can play the same thing on an instrument.  Like, on bass, I could play one baseline in like 5 different spots on the neck.  Each one would sound slightly different.  Similar concept with enumerables, only the results don't necessarily sound different...but they do produce different results!

For a beginning to intermediate programmer, relating core concepts to things you are already familiar and comfortable with is a good idea.  It helps to make programming less scary and more friendly.

CLI Data Gem Project

CLI Data Gem Project

For this project, I decided to create a CLI Gem that would scrape vintagebassworld.com, to give the user data about many different vintage bass guitars. Since I am a bassist, I found the project to actually be super informative and actually really helpful! 

My original approach to coding this was based on Avi's video, CLI Gem Walkthrough. At first, everything was going great, but because I was perhaps a little too ambitious about how I wanted the data to be structured, I hit a wall pretty hard. I was assuming it was going to be easy to be able to search by Brand, Model, or Year. That proved to be very difficult, because searching by year would have to be a massive web scrape of over 100 websites within the vintagebassworld.com domain. So after a full day of coding, I decided to scrap everything and start over with a simpler, more top-down approach.

After watching Avi's second video, https://www.youtube.com/watch?v=Y5X6NRQi0bU, I decided to model my 2nd attempt after this structure (with some of the original structure as well). This worked out well, and was much simpler for me to see the data flow, as it was more in line with the code I've been working with in previous Flatiron lessons. My top-down approach made sense too. The user is presented a list of 5 brand to choose from (this was hard-coded. I didn't see it necessary to scrape the website for the brand names). Once the user makes their selection, a new instance of the Scrapermethod is created, which in turn creates a new instance of the of the Brand class. Once that happens, all the other Scraper methods are able to do their thing. The #scrape method is able to return a list of all the available models of that particular brand, and at the same time, make new instances the Model class, and add those newly created classes to the Brand instance. The user chooses which model they are interested in, from there the #scrape_instruments method is called, which returns a list of every year that particular brand was manufactured. It also creates a new instance of the Instrument class, and adds each instance to the Modelsobject.

Once the user chooses which particular year they are interested in (or, as it is defined within the code, Instrument, the scrape_description method is called, returning the description, as well as adding the description to the instance of Instrument. 

I had some major challenges doing the scraping, because the website I was scraping from is old, and has all sorts of weird drop-down menus, and menus within menus and all that confusing stuff. Also, the site was not coded with specific CSS class names. At best there were 3 or 4 CSS classes to start from. Eventually I determined the best way to get the data was via XPATH. Not ideal I guess, but it did work. After a few refinements, I was able to get data via iteration. One big challenge I had was string interpolation within an XPATH. When finding XPATH links on Chrome, quotes for CSS classes are single quotes. It took me some time to realize why my string interpolations weren't working: Because the #{}syntax only works with double quotes!!! I also learned about escape sequences within a string. Like, when you need to actually have a quote inside a string. So I learned about ` and all that good stuff. 

All in all, a great project! I was great to go out on my own and learn how to do things without the option of asking a question on learn.co. All that trial and error throughout the process, as well as all the research, is what it's really all about.

Why I Decided To Learn Software Development

I first got excited about software development when I learned how to automate computers.  As a booker for music venues, I found that I could cut down my time doing tedious, repetitive tasks by at least half.  Doing this allowed me to focus my energy on booking good music.  It also created a more stable system of booking. It meant less typos, double bookings, miscommunications, and cancellations.  At some point, I started keeping track of every little thing I had to do more than once.  Anything that made that list would be automated.  I got every piece of software that could help with the automation process.  I learned AppleScript, and used it to control just about everything.  
I was so proud of all my scripts, I showed them to a few of my programmer friends.  The response I got was basically, "Dude, you're about 3 steps away from being a programmer.  You should just learn programming!"
It was around that point that I realized that I really enjoyed the process of scriptwriting and automation, not just because of all the time I was saving, but because it was really fun and challenging- I got a kick out of it!
So I started messing around with JavaScript, HTML, and CSS.  I took a few starter courses online, and had a really good time with it.    After doing a few of those courses, I realized I wanted to take it a step further and really learn how to use these tools.  I tried the Flatiron Bootcamp Prep course.  It was definitely the most challenging of all the programming courses I had tried.  But again, I really enjoyed the challenge and loved working my brain in that way.