A Collection of The Stuffs I've Done:
A recent talk I gave:
Latest post from my blog:
How About We... review a technical interview question that completely stumped me
Hello Tumblandia. I come with more tales of awkwardly answered technical interview questions! (And an attempt to regain some of the lost dignity from wrong answers via figuring out the solution after-the-fact) So I went in to my first technical interview EVER with a company this weekend (I’ll leave it up to you to guess which one… hint: check the title of this post), and, well, I have mixed feelings about how it went. I thought everyone I met at the company were super friendly and really understanding when I needed a little bit of a nudge to understand the problems they gave me. Anyway, I wanted to write a brief post about the very first whiteboarding problem they gave me because, well, three days after I’m still kicking myself for not getting it right away. Here it is, with the examples used for class and module names changed a bit: Lets say you have a class Car, a module Engine and a class Vehicle from which Car inherits. In each one, you have a function ‘run’ which prints out different things. Check out the gist below. So what do you think myCar.run prints out? For some sad, sad reason, my knowledge on how to invoke module methods once they had been included in a class is fairly limited. I remembered from when I was learning Python that modules we’re used primarily as method of name-spacing and preventing namespace pollution. In Ruby, modules are often used to add additional functionality to classes or instances of a class that don’t semantically make a whole lot of sense being in the class–these often end up being things like utility methods. In any case, I started rambling about namespacing, which I could already read on my interviewers face was totally not the right direction to be going in, at which point I felt like making this face: Read more...