“Tell me, what is it you plan to do with your one wild and precious life?” — said the Master of Quotes, quoting Mary Oliver. By the time he had finished waiting, no one who had heard the question was anywhere to be found.

Encyclopedia of Galatic Fables – D. E. Anonymous.

Book Review: Essentialism

They say books give you wings to fly way beyond your time and geography. They say books allow you to live more lives than your own. They also say that books either trap you within their pages or set you free from them.


In his book Essentialism, The Disciplined Pursuit of Less Greg Mckeown, produces a reading experience that can hardly take you from that time and place in which you are consuming it. But as the author articulates it, that is perhaps the single most important place to ever be in.

This book is also not about other people lives as much about your own. While it’s full of stories about contemporary figures, the author voice never stops triggering a constant observation of your own life mechanics.

This book however, can still trap you or don’t.  But chances are it will.

In times when you need to do everything. I really recommend to start reading this one.

The Canvas Has Two Sizes

Liet serves two masters.” —Stilgar (Frank Herbert’s Dune)

If you are about to start working with HTML5 canvas, there is something that you NEED to know. The canvas has two sizes. You are reading correctly. Two. Not one. But. Two sizes.

The first one is the element size (what you will set using CSS) and the second is the size of the actual drawing surface. Think of it as having a blank piece of paper where you can only draw in a certain rectangle.

If you are drawing in an smaller rectangle than the piece of paper its fine right. In the HTML5 canvas, however, the User Agent (your browser) will scale the rectangle to fill the  piece of paper one drawing is done. Trust me, I have been there. Isn’t going to look that good.

What to do? To avoid any unintended scaling you just need to sync the drawing surface to the element size when you are about to draw:

var canvas = document.getElementById('canvas');
canvas.width = container.offsetWidth;
canvas.height = container.offsetHeight;
var context = canvas.getContext('2d');

Happy drawing!

I knew that this solution would work because computers are great at doing exactly what they’re told. Unfortunately it turned out that many times we humans who program them are not so good at telling computers exactly the right thing to do, and that is a major source of bugs. When two computers are supposed to be doing the same thing, but disagree because of a bug, well, that’s a problem. – Patrick Wyatt