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:
Intro to Ruby
- Ruby is a language written for programmers to make things more semantic.
- Semantics is the idea of a language/words having discreet and logical meaning. I think. I'm still working on that one.
- 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.
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:
- How to use the Map function in ruby (applying a function to each item in a collection)
- Privacy and Classes in Ruby, or how we keep some things super secret and how we control where we can use variables (scope).
- The Luhn Algorithm. Whoa. Stay back.
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 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!
- For Ruby, best practice includes a comment before every class explaining what it is and why you're putting it there.
- 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)
- You can combine (or subtract) arrays.
 pry(main)> friends + coworkers => ["Amy", "Bob", "Chris", "Amy", "Chris", "Daryl"]  pry(main)> (friends + coworkers).sort.uniq => ["Amy", "Bob", "Chris", "Daryl"]  pry(main)> friends | coworkers => ["Amy", "Bob", "Chris", "Daryl"]
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.
- HTTP Verbs: GET/POST/UPDATE/DELETE
- Clients are things like your computer browser, some command line requests, etc. while servers are machines connected to networks that respond to commands/requests
- 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,