Day 12, layout and D3.js

This sprint was slightly ambiguous because we have four repos to work on. They are: layout, pay buddy, d3.js and regex.  I am fairly familiar with regex so that one is not a big deal. In layout, we are supposed to copy the layout of three websites.

The layout was a simple exercise yet was tremendously helpful. Throughout, I realized

– floated divs won’t give its parent any height info unless you say parent { overflow: hidden}

– If you want to keep things on the screen in sync with where they are in the HTML, try float:left

– One way to rearrange three divs in one row: div1, float left; position: absolute  / div2, float left; margin-left: 100px / div3 paddling-left: 600px

Other lessons:

– the safest way to hi-jack this binding

var bind = function(fn, context){

var args =,2);

var new_func = function(){

return fn.appy( context, args.concat( arguments) );



– Arguments are passed as references, but some are immutable