Day 91, Hack Reactor reflection

This would be an ongoing reflection of my Hack Reactor experience.

Overall score: 4/5

High level summary: first half is structured learning, and the second half is project-based learning. There are 18 sprints in the first half, each lasting 2 days. There are 2 projects in the second half, each lasting 3 weeks. Sprints are focused learning on one technical area, i.e. data structure, database, networking. Projects are simulated working, in which you worked with a team, under a deadline, and release regularly.

Marcus is definitely one of the best JavaScript instructors. The mere fact that he teaches for the first five weeks delivers enough value to cover the high tuition.

Classmates are smart and highly-motivated. That is the beauty of setting the tuition at a very high pricing point. The high pricing selects the best, and the most motivated people.

to be continued…


Day 90, this is the end

Everything has a beginning and an end. For Hack Reactor, this is the end…

Some last emails from Hack Reactor staffs reminding us to fill up one last survey, Tony making sure everyone is getting a t-shirt, emails reminding removing all your personal belongs from the cubby…

We had a bar this time. I guess our hiring went so well that the school decided to spend a little bit more money on the party. We had battle deck again. But it was not as exciting as last time. Marcus did a fantastic job mimicking Felix. What can’t he do?….

A indicator of how awesome the party is how many people will go to the after party. From that standing point, the party was definitely above average. Tons of people showed up for the after party in a nearby bar. That is when things got really interesting…The party was so good that I missed my bart and went to Barry’s place for couch surfing.

Oh, well, tomorrow will be another day.


Day 89, the second to last day

Interviews. Can’t say anything due to NDA.

It is strange that this is already the second to last day of the Hack Reactor class.

Quick math: $18000 / 90 days = $200 per day. Or in the preferred currency between me and my girlfriend, it would be buying one xbox per day. Wow, that is a lot of xboxes that we could have bought.

We were kidding that for every offer the student got, he should buy a six-pack of beer and bring it to the school. Then, by the end of the two week job hunting period, we will have enough beer for the graduation party. Too late for us, maybe next cohort.


Day 88, Python 101s

More interviews.

Some basic Python

# list comprehension
[x for x in range(9) if x%3 == 0]

# sum an array of numbers
# lazy version
arr = range(9)

# naive version
sum = 0
for x in arr:
  sum += x

# reduce version
reduce( (lambda x,y : x+y ), range(9) )


Day 87, closure in Python

Brush up Python for an interview.

Closure in Python. Yeah!

def outF(outArg):
  def innerF(innerArg):
    return outArg + innerArg
  return innerF

plusOne = outF(1)
plusTwo = outF(2)
print plusOne(10)
print plusTwo(10)

More things:
– more interviews
– get a parking ticket. Ouch!


Day 86, how to mimic closure

Question: how to mimic closure without using closure?

Answer: use bind.

The following code will work, inspired by the “Functional JavaScript”.

/* closure */
var multiply = function (byN) {
  return function(arg) {
    console.log('always multiply by ' + byN + ' because of closure. Result is: ', arg * byN);


var finalFunc = multiply(5);

In the code above, byN belongs to the scope of multiply(). In other words, byN is used by the anonymous function, and byN is outside the scope of that anonymous function. Hence, it is using closure.

/* mimicking using bind */
var _ = require('underscore');

var multiply = function (byN) {
  return function(arg) {
    var captures = {'byN': byN};

    var bindFn = _.bind(function(){
      console.log('always multiply by ' + this['byN'] + ' because of closure. Result is: ', arg * this['byN']);
    }, captures);


var finalFunc = multiply(5);

In the code above, byN belongs to the anonymous function. Hence, we are not using anything outside of the scope of the anonymous function.