Hack Reactor: Day 13 – Monday, the 13th…

It’s kind of amusing that our 13th day at Hack Reactor is on Monday, the 13th. After the way things were going recently, you wouldn’t have been surprised if this day was coincidentally on Friday, the 13th instead.
Anyway! I am happy to say that today was downright amazing. Especially compared to last week.
We started off with a self assessment and I think I did as well as I could have. Pretty much completed all the problems — though this time 3 of them involved writing about time complexity. Not coding, but actual writing. This is something we lightly glossed over in an earlier lecture, but they really want us to understand it. I’m gonna need to spend more time studying it.
The other two problems involved translating something from one style of code to another style (mostly easy though something was breaking for me) and finally writing a function that can return an array of duplicate letters given some input (eg., Mississippi return an array of [i, s, p]
).
I finished right as our hour long block of time expired. Then we started a new white boarding experiment (instead of the usual sprint reflection). This time, we had to whiteboard a problem that involved using recursion to traverse a tree and return every value in a flat array. I can’t even attempt to type that out, but you can see the results in the attached image for this journal.
We paired up based on who was sitting next to us, so my new partner was this fun Russian classmate who had hosted a meetup for a number of us prior to the start of the program.
One of the things that our instructors mentioned we should eventually do is to try to do this stuff in an interview style. One person sits and the other explains the problem. I don’t think anyone is quite ready for that yet so we both worked on this together.
Afterward, we went to lecture to learn about our new sprint: using jQuery and AJAX to interact with servers and navigate a RESTful API. We were going to build a chat app (and all the data was going to be shared and available amongst the entire cohort, which set up some epic trolling).
One of the things our instructor informed us about is that we’re going to be converting our web app later this week to a framework called “Backbone” and he said it’s generally one of the more difficult problems in the course. “Basically, this week is going to really suck for you guys.”
Whatever, I’m not scared!
(Oh shit oh shit)
We went back to our desks to work on the problem on our own before lunch. Most of the assignments we get involve a suite of tests that we need to complete and pass before we can move on. I was so excited to start playing with the API, I just dove in without looking at the tests. Oops!
What’s crazy is that I was getting things working pretty quickly. I think it’s because I have some familiarity with this sort of thing thanks to some previous projects. That said, it was pretty easy to figure out any potential problems that came up. It was a nice confidence boost.
Lunch came and went, and we had a brief lecture on cross site scripting vulnerabilities and how the browser security model copes with this sort of thing. It turned out to be especially relevant after everyone paired up and started coding.
My partner for this sprint was a fellow Oakland resident (like us, him and his wife also found out they were pregnant right before classes started). I met him the week before school as well, so we have a bit of history already.
Let’s just get this out of the way: he was awesome. He’s really sharp and I was able to learn a lot about debugging our web app from him. He has a pretty keen eye when it comes to spotting errors and deciphering what they mean.
We were able to pass all the tests relatively quickly. We did get hung up on the last test and asked for help. The HIR said, “eh, don’t worry about that test. It looks like your code works already, just implement the basic functionality of the app for now.”
And we did. It is soooooo refreshing to have a partner who is on board with that!
Anyway, since we were all building a chat app that wrote and sourced data from the same database, you can imagine the fun that people started to have. Building functions with 100 millisecond loops that would repeatedly post stuff like “8th floor rules!!!!!” And trading barbs with the cohort on the 6th floor (who were using the same database).
People also realized that they could inject JavaScript files into other students’ browsers that would change how the page was displayed, how certain actions behaved and even throwing up infinite pop up loops. It was mayhem. We basically invented another form of Reddit. (Didn’t I make that same joke on day 1?)
Anyway, it was getting obnoxious, so I found a function that sanitized user data and stripped out all these annoying XSS attacks. I posted it in our Slack chat channel (our official internal chat service as opposed to this thing that we were building). People seemed to be pretty happy that I found that.
Dinner was frantic because I was finishing up my PRESENTATION.
At 6:30, everyone gathered into the lecture hall and I gave a 5 minute presentation called “A brief (and animated) history of the GIF.” It went really well and people seemed to really enjoy it. It was fun!
After that, we spent the rest of the evening cleaning up the rest of our code. After hours, I started to watch a Lynda.com video on the Backbone library to try and get a head start on this week’s main topic. It’s going to be intense.
I left the building tonight at 9:30pm.