Week 3 Day 5 – Time’s Flying…
Week 3 is already over! Time is seriously flying. That’s the strangest thing though. It’s ALREADY the start of week 4, and yet, I feel like I’ve been studying code at a/A for 3 months. An incredible oxymoron in this case, at least I think so. It could also mean I’ve been learning at an incredible pace, 3 months worth of material in 3 weeks, that would also make sense since my head’s been feeling hammered with information and projects. I’m literally drinking from a firehose at this point, but it’s SO well worth it.
Yesterday was a solo day. I don’t know if I mentioned it before, but all it really is, is a day where you have projects you work on by yourself, which has both its positives and negatives. For one positive, you get to work at your own pace. Whether you’re normally slower, or faster than your pairing partner, you’re not rushed or slowing down your pair when you work solo. Another positive is the ability to tune out the rest of the world and just code. Pop the headphones in, put some dope tracks on and crank out the projects. A negative however, and I feel like it’s a fairly huge one, is that you don’t have two minds working on the same difficult project, which is one of the benefits of pairing to begin with. If you hit a snag, you’re in it by yourself until you ask for help. And sometimes when you’re trying to solve a bug, you get tunnel vision. I find that I debug a lot better with a partner, and that’s just because the both of us have different perspectives and can approach the same problem in different ways.
Today’s project was creating our own version of ActiveRecord, albeit a lite version. It really enforces the knowledge of how ActiveRecord works. Just like I mentioned in the previous post, it really helps to demystify the magical things that Rails does under the hood. We created our own versions of attr_accessors
, as well as our own versions of save
, update
, find
, etc. I definitely hit a couple snags here and there where I didn’t understand the objectives of what the instructions were asking, but given some time and a bit of research, I was able to figure it out. I learned how to use Rail’s ‘inflector’ library, which was a really cool way to play around with strings, like converting a word into its plural form, or vice versa, which was important in defining or accessing specific classes or variables dynamically, which brings me into metaprogramming.
Metaprogramming is NOT easy to digest. I know I mentioned it yesterday, but I really need to bring it up again today. Our homework from the night before and the ActiveRecord project relied quite a bit on metaprogramming, specifically define_method
. The homework was pretty difficult when I was working on it, but after yesterday’s project, I’m really beginning to get the hang of it. And so here’s my parting advice and lesson that I learned from yesterday that’s not really coding related.
It’s okay to be uncomfortable and unsure of something that you’re just starting to learn. It’s okay to not understand something. But as long as you keep at it, and keep practicing, it’ll click. No matter how hard the topic is, like metaprogramming, Rails associations or SQL multi-level joins, keep practicing it, and it’ll make sense.
That’s it for tonight! Back to studying for Monday’s assessment. Wish me luck! And I’ll talk to you guys Tuesday morning.