Indiana Jones and the Temple of Ruby

Indiana Jones and the Temple of Ruby
Photo by Mike Swigunski / Unsplash

Week Four Summary

This has been a really insane week, and a lot of new material for me, which is why it's taken so long for me to write this one up. Not to mention a few personal issues that rendered me mostly useless for the weekend. Enough excuses, on to the good stuff!

I wasn't sure I was going to talk about this, but now I definitely have to. Our class was having some issues with the way information was being presented, and collectively decided to change the direction of the course, or at least the way in which it was implemented. I have to say that one of the most amazing and reassuring things that I've experienced was the open-mindedness of the course producers, and the instructors leading the class. They immediately responded to our feedback positively and worked with us to determine what the most effective course of action would be.

Going forward, there is no doubt in my mind that they have our collective best interests at heart, and that they are willing to look at our feedback and implement it very quickly!

Anyhoo, on to the show:

Monday

Intro to Ruby

This section was absolutely insane from me. Coming from JavaScript to this kind of language was really jarring, but also for the other languages we'd been introduced to (HTML, CSS, JS), I'd had some background. This was a fresh clean ocean, and we dove in headfirst.

Main takeaways:

  1. Ruby is a language written for programmers to make things more semantic.
  2. Semantics is the idea of a language/words having discreet and logical meaning. I think. I'm still working on that one.
  3. Ruby Documentation is thorough, and a great resource to get around this (on Linux) is Zeal-Docs. I'm going to use the crap out of this one.
Tuesday

In an attempt to not overwhelm (and the fact that I took terrible notes on Tuesday), I'm going to keep Tuesday's to just the main takeaways:

Main takeaways:

  1. How to use the Map function in ruby (applying a function to each item in a collection)
  2. Privacy and Classes in Ruby, or how we keep some things super secret and how we control where we can use variables (scope).
  3. The Luhn Algorithm. Whoa. Stay back.
Wednesday

Review Day: No new material, but we tried to replicate the MBTA problem we'd done before, but this time using Ruby. Kind of interesting, definitely a pain in the ass.:

Thursday

Thursday was the day where I gave up on ruby (according to my notes, "ruby is fucked"). Luckily I was able to move through that by Friday, but we'll get to that later. A lot of this day was figuring out some conventions and installing some interesting packages in SublimeText.

One of the things I wanted to share was Rubocop. When I kept getting error flags, I got to learn a lot about best practices! It was fantastic and useful to be able to get instant feedback on how to improve my code, and learn best practices along the way!

Main takeaways:

  1. For Ruby, best practice includes a comment before every class explaining what it is and why you're putting it there.
  2. Best practice for testing if something is true or not, is to just add a question mark (e.g. check_if_true === BAD if_true? === GOOD)
  3. You can combine (or subtract) arrays.
    [12] pry(main)> friends + coworkers => ["Amy", "Bob", "Chris", "Amy", "Chris", "Daryl"] [13] pry(main)> (friends + coworkers).sort.uniq => ["Amy", "Bob", "Chris", "Daryl"] [14] pry(main)> friends | coworkers => ["Amy", "Bob", "Chris", "Daryl"]
Friday

Rails App & API

This was definitely the most interesting day through the week. We used varying strategies to help understand what was going on in conversations between Clients and Servers, and it was incredibly helpful. We formed into groups and walked through how our basic app that we'd built worked while hosting a client server and a "dumb" server simultaneously.

Main takeaways:

  1. HTTP Verbs: GET/POST/UPDATE/DELETE
  2. Clients are things like your computer browser, some command line requests, etc. while servers are machines connected to networks that respond to commands/requests
  3. APIs are essentially a way to interact between an application and a program or database (an interface), and it's a set of urls that returns representations of resources.

Summary Pt 2

So yeah, this was a crazy week with lots of learning for students and instructors alike. I spent a reasonable amount of time goofing off, which is something I'm actively working on. Focus is incredibly important in life, and if you can't hold your attention, then you're going to suffer when working on deep problems. So this week will be doubling down my focus and my participation, and I'm looking forward to logging the results next week, where I'll include my rescuetime summary.

Anyways, thanks so much for tuning in to this week's "Andrew learned a lot of weird stuff, and it's mostly incomprehensible".

I'm your host,
Æ