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:
https://developer.mozilla.org/en-US/docs/Web/CSS/Visual_formatting_model
http://css-tricks.com/

Standard

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 “www.google.com” inside the address bar and hit enter
  • Differences between inner join and outer joins
Standard

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…”

Standard

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.

Standard

Day 78, working hard for the hiring day

Yes, today is labor day. Yes, most of students are working because of the upcoming hiring day. Team Speaker and Team Hatch were all here and practicing hard.

Also, TechCrunch finally published the video interview of our school. It was cool. Greg and Savannah looked really sharp in the interviews. It was a pity that our client didn’t want to be interviewed. Oh, well…

Standard

How to remove API keys from git history

The last step before making our repo public is to delete all the API secrete keys from the file and from the git history.

git rm backend/config/environments.js

git add .
git commit

git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch backend/config/environments.js' --prune-empty --tag-name-filter cat -- --all

git push origin master --force

Now, you have removed the old file and all the history associated with it. Now add the new file, and commit as regular.

Standard

How to deploy node app to heroku

I found Heroku’s document on how to deploy node.js app insufficient. I wrote down my steps of deployment for future references.

Step1, add Procfile to the project


//Note, filename has to be exactly "Procfile"

web: node app.js

Step2, install heroku toolbelt on local machine.

Step3, create a heroku account on their website.

Step4, login in the console


heroku login

heroku create

Step5, change app name. Because Heorku generated a random app name for you, you might want to change it to something more meaningful. In my case, I changed it to prelinked.

Step6, update the git remote of the local repo since the app name has been changed.


//add heroku as a git remote

git remote add heroku git@heroku.com:prelinked.git

Step7, add SSH key to heroku account. Go to Account page, and copy and paste your local machine’s SSH key into the settings.

Step8, push git to remote master

git push local_branch_name heroku:master

Step9, setup environment variables. This is important yet often over looked. You want to run the following command in terminal, such that “env_var_one” will be available in Node.js’s process.env.env_var_one


heroku config:add env_var_one='YOUR API SECRET KEY'

Step10, turn on the dyno.


heroku ps:scale web=1

Standard

Day 76, demo rehearsal

Today, we did a rehearsal for our group project. It went very well.

Hao did a great job of carrying the majority of the presentation. I talked briefly on the tech stack, Barry on the mobile site and Stephen on the search filter and testing. Most of the group projects are impressive, but our team is definitely one of the most prepared teams.

Oh well, let’s hope we can do better for the real presentation next Tuesday.

Standard

Day 75, CSS monster is Barry

I can’t believe my eyes. Barry did a complete redesign of the CSS in 12 hours. CSS monster or rather, master!

Now, some intermediate promises:

var p1 = p1Collection.fetch();
var p2 = p2Collection.fetch();
$.when(p1, p2)
  .done(function(){})
  .fail(function(){
    if (p1.state() === 'rejected') {
      //
    }
    if (p2.state() === 'rejected') {
      //
    }
  });
Standard