Day 85, closure

More interviews. I guess having interview shouldn’t be news. If there were one day without an interview, that should be news.

Closure, closure, closure

Closure is a function that captures the external bindings (i.e. not its own arguments) contained in the scope, in which it was defined for later use (even after that scope has completed).

var outFn = function(){
  var closureVar = 'test';
  var inFn = function(arg){
    console.log('this is ' + closureVar + ' with ' + arg);
  return inFn;

var closureFn = outFn();
closureFn(' more args');

This is super basic sample. An nice StackOverflow article to read:

An even better one:


Day 84, techcrunch disrupt

Even though I was supposed to prepare for job interviews, I spent a lot of time watching the techcrunch disrupt. It is amazing. There were so many cool ideas.

I especially liked apps using APIs from cars. Tesla++ was amazing – if Tesla is parked and undercharged and not plugged in, it will send you a text to remind you. Wakey Wakey is also cool – if you are sleepy and begin to drift away, it will alert you “wakey, wakey”, and find the next coffee shop or hotel for you. Amazing!!!

Other cool ones are:
AdFree – use a JS to do map/reduce in visitors’ browser when visitors are visiting your blog. So the blogger can make money from computing instead of ads.


Group project reflection

Finally has time to sit down and reflect on the group project – PreLinked.


  • Best team ever. Stephen, Barry, Hao and I were just almost the best team I ever worked in. Nobody was a free rider and everybody was willing to help once he was done with his part. The skills were complementary too. I think some startup should hire four of us to be their entire frontend department.
  • Tech stack was solid. Backbone.js / MongoDB / Express.js were all main stream enough that there were enough documents on most problems we encountered.
  • “Promise” was good. I tried my best to teach everyone promises in the beginning of the project and by the end of the project, everyone was very comfortable with promises. Because of that, the asyn code was very readable.


  • Not enough time to reach out and publicize the project.
  • Could have been more aggressive in terms of scope.
  • Not enough testing.


  • Nothing really.

Day 83, more CSS

Larry was kind enough to go over some basic CSS with us again.

CSS reminds me of all the bio / medical sciences. The rules are complex and exceptions are common. I guess a good starting point is memorization.

On the data structure front, did more coding on paper. It is a much harder thing than actually writing the code in editor, because you can’t reply on debugger for certain edge cases.

Oh, some people are actually getting offers now. That is crazy consider we are only a week into the job search.

More css resources to read:


Day 82, first on-site

Talked to another startup today. Enjoyed the conversation a lot.

Did some more toy problems today. Some interesting ones are:

  • Give a JSON representing a binary tree, build a html menu with JavaScript
  • A dangerous way to break out of the inner loop of two nested loops in JavaScript
  • What happens when user enters “” inside the address bar and hit enter
  • Differences between inner join and outer joins

Day 81, the real startup

Finally have an opportunity to visit a real startup. Very legit, tons of cash, impressive engineers, bleeding edge technology.

On our way back, Gary and I were saying, “I can’t believe we are actually in the game right now. We are actually in the start-up world in SF. Awesome…”


Day 79, hiring day

I guess Hack Reactor should say “make a JavaScript developer in 79 days”. It is a much better tagline.

Anyway, it was exciting.

We did our group presentation, good, but not exceptional. I think Team Hatch did the best job, kudos to Guy, Al and Savannah. You guys killed it.

Talked to a lot of companies. Really interested in some of them. Look forward to continuing the conversation.

And, our client project is finally in private beta. It is such an interesting experience to see something I built, that used to only run my local machine, now actually runs somewhere in the cloud and actually processing credit card information. Exciting times, indeed.