yo backbone

There was a bug with yo backbone with require.js

The fix is: https://github.com/yeoman/yeoman/issues/1182

Fix : As soon as I go to start creating new app. I hit ctrl+c and stopped the process. Then I went to the package.json file which is created and updated it based on this stack overflow discussion asciidisco/grunt-requirejs#65

“grunt-requirejs”: “*”, to “grunt-contrib-requirejs”: “*”.


how to set up one testing system for both front-end and backend

Huge working in progress because I haven’t figured everything out yet.

Unit test is:
– fixed input
– expected a fixed output

Testing frameworks:
– Mocha
– Jasmine

Assertion libraries:
– Chai

//backend code
var expect = require('chai').expect;

var _ = {};
if(typeof module !== 'undefined'){
  module.exports = _;

How to set up mocha:

npm install -g mocha
npm install chai mocha
#put the following code in mocha.opts
#mocha --reporter spec

The directory structure:

???not sure???
In browser:

var expect = chai.expect;

To test async code in mocha, use done()

it('should test async function', function(done){
	}, 500)

Third party services:
– Travis-ci
– code-coverage, whether that particular line of code has been run in the test
– selenium
– browserling


Consolidating VPS

Have tons of VPSs laying around, running all kinds of side projects. Finally have a time to consolidate them.

It is clear that there are several tiers:

– production tier: linode.com, expensive but fast and reliable

– dev tier: any random cheap vps you can find on lowendbox.com

– the uprising star tier that might be good for production: digitialocean, I am amazed by how powerful their admin dashboard is. They really go out of their way to make my life much easier.

Also, I followed this article to download my linode image to the local machine. The key command is:

#reboot linode server to rescue mode
#set a new password for root
#start sshd
/etc/init.d/ssh start
#might have to del lines in ~/.ssh/.known_hosts 
ssh -C root@linode_ip "dd if=/dev/xvda " | dd of=linode.img


A new beginning

Finally concluded my job search and accepted an offer. This is the new beginning.

Reflection on my job search:

I was very nervous prior to the hiring day, worrying about not having enough interviews. With an average performance during my speed dating in hiring day, my interview pipeline was solid average, not fantastic. As some of my classmates got offers in their first interviews, I was once again nervous about myself. Only after getting my first two offers, I begun to feel everything is under control and started to enjoy interviewing. When you have at least one offer at hand, interviewing is fun. It is fun to meet so many different people, solving all kind of random problems on the whiteboard and collaborating with them. I think I can do that as my full time job … no, I am just kidding … Making a decision among job offers is always hard, and I think I would love to work for any one of them. They are all super cool ideas with very competent teams. In the end, I have to pick one based on, base on gut feelings….

Anyway, made my decision and looked forward to start the new journey. Yeah!!!

Oh, a good article to read on making decisions: http://brandonb.cc/advice-for-cs-students-considering-a-startup

Oh, the biggest mistakes I made:

– please please please focus on front-end JavaScript engineering role. That is where JavaScript really shines right now, and that is what the training is for, and that is what most companies are looking for anyway… Node.js is awesome but very few companies are using it… That was the mistake I made in my speed dating on the hiring day.


Personal growth vs team vs others

Once upon a time, I was asked, if you have to pick only one, “personal growth, team, something else I forgot”, which one would you pick? The correct answer is “it depends”. The next optimal answer is “it would be nice to have all of them”. In reality, after debating briefly, I picked team.

There is no right or wrong answer, but for me, I will probably pick team over anything else. In an ideal team, or in our Prelinked team, the team is:
– well balanced. Each team member has his own expertise.
– team members are willing to help each other. After he is done with his share of work, he will voluntarily help other team members.
– he works hard because of self-motivation. He should have a high bar in terms of quality of his own work, and he will drive himself to meet that bar.
– he is fun to work with. That is what will get the team through tough nights.