Wednesday, November 30, 2011

Exec: I need this feature for the next release in 6 months.
Dev Team: It will take a year.
Exec: If you can't deliver it in 6 months I'll find someone who can.
Dev Team: OK, we'll do it.
Outcome A: The project is late.
Outcome B: The project is delivered on time, but the Dev Team spends
the next year fixing bugs in it, and can't deliver any new features.

You can easily read this tag is specifying two fonts, with a script subsets of Latin and Vietnamese and specifying 600italic and 600 style for the Open Sans font.

With this rather simple task, Google is doing all the magic (complicated work) working out the correct font files depending on user browser.

The Google Font API hides a lot of complexity behind the scenes. Google’s serving infrastructure takes care of converting the font into a format compatible with any modern browser (including Internet Explorer 6 and up), sends just the styles and weights you select, and the font files and CSS are tuned and optimized for web serving. For example, cache headers are set to maximize the likelihood that the fonts will be served from the browser’s cache with no need for a network roundtrip, even when the same font is linked from different websites. -- From Google Code Blog

Why is the text styled with web fonts so awesome?

It looks great!

Search engine friendly

Screen reader friendly

Fonts are faster to render and put less pressure on your network. With Google API, it puts no pressure on your network!

So make sure you use web-fonts for your next project instead of putting styled text into images.

At 36zeroes we produce amazing applications. If you need an experienced Rails team for your project, Contact us.

Thursday, August 11, 2011

Branching and merging is the fun part of Git repositories. But, because it is so quick and efficient at merging, you often forget about all the complicated operations, it is doing behind the scenes.

If you are rebasing your codebase while merging (which I do all the time to get a nice & clean timeline), you can often land your self at a 'detached head' , which means that your repository is referencing a commit (using its unique SHA1) and not a branch. At this point in time git will respond with '(no branch)' when asked for current branch name.

While on a no-branch, if you happen to checkout another branch, like I did this morning, you will discover (soon enough) that all your changes are lost! But are they really?

git reflog to your rescue. This command shows the log of your git repository operations. It will simply list out all the commits you have done in recent past with their SHA1 ids.

Signal handlers
Signal handlers are used to interact with Guard:
Ctrl-C - Calls each guard's :stop method in order then quits Guard itself
Ctrl-\ - Calls each guard's run_all method in order
Ctrl-Z - Calls each guard's :reload method in order

You can read more about configuring the signal keyboard shortcuts on the github wiki, and home page: https://github.com/guard/guard