So we're about half way through the 2nd week of the precourse. This week we've started on Ruby. With all the work I'd done for the interview and the codewars practice I'd been doing before the precourse, I felt pretty confident about the basics of Ruby.
Last week I was fully focused on command line and git, so it's been a week since I looked at anything Ruby. The task this week is to work through the first 2 chapters of ruby-kickstart.
I started out pretty confident. The first few questions were relatively easy and used basic Ruby. I had a big smug grin on my face until I reached challenge 6. It just seemed such a step up from the previous challenges! After muddling about with it for a while it was getting late so I went to bed deciding to sleep on it.
I was working the next day but jotted down a few notes as to how I might attempt it when I got home.
Makers Academy utilises pair programming throughout the course. Up until now I'd been working on my own. One of my classmates on Slack seemed to be having similar issues with it so we decided to give remote pairing a go!
And what a great idea it was! Macey and I got set up on Screen Hero (Which I'd never used before) and started throwing ideas out. After piecing together bits of each others code and ideas we ended up with a working (and pretty clean!) solution.
With the "hard question" out of the way we then proceeded onto the next one. At first it looked pretty simple. We could probably even use a few of the techniques we'd used previously. How wrong we were! We went through so many different techniques. Looking at our code it made perfect sense to us but refused to work! After much google-fu and lines of commented out possible solutions we had some code that was most of the way there but was giving us a really odd answer! I think by this point our brains were pretty burnt out. We decided to take a break and post an issue on our precourse GitHub repo.
Not long later and we'd had a few comments from our fellow classmates. Including someone suggesting
each_with_index, something we'd tried at the very beginning. Out of ideas we gave it a go.. All tests passed. It turns out we had all the right puzzle pieces in our commented out code. We just hadn't used the right parts at the right time.
I was a bit nervous of pair programming. But now I'm totally sold on the idea. Solo I might have eventually solved the problem with a lot of frustration along the way. But as a pair we got through it in a much quicker time and with a lot less stress!
Tonight I'm going to meet with a few others from my cohort in person. I'm really looking forward to it!