Tom Leo's Blog

Home    Ask me anything   

Hacker with a Computer Science Degree

September 15, 2014 at 9:00pm
1 note

The (Dangerous) Misnomer of "UX Generalist" →

One could accomplish a “general” understanding… but such a general understanding is not “expertise.”

leaders should ‘align the genius and the expertise of multiple individuals in order to accomplish unprecedented feats that are far from what are “generally” expected… diversity is the very phenomenon which makes any system stronger.’

September 4, 2014 at 10:09am
0 notes

JavaScript Memory Management Masterclass by Addy Osmani →

Really useful reference for debugging JavaScript and spotting memory leaks

August 22, 2014 at 1:25pm
3 notes

Simple Currying in Javascript →

Easy to follow intro to Currying in JavaScript. The comments are also worth a read.

August 11, 2014 at 9:40am
1 note

The Secrets of React’s Virtual DOM by Pete Hunt at FutureJS 2014

Really interesting talk.

July 16, 2014 at 8:15pm
0 notes

Learn SVG or face the wrath of Dmitry Baranovskiy

July 6, 2014 at 12:55pm
0 notes

Shout out to Alan Kay and the team at Xerox for creating the GUI which is almost unchanged since its inception in 1982.

July 3, 2014 at 10:54pm
0 notes

Webpage Rendering →

this piece of code will only trigger one reflow and repaint:


var $body = $('body');
$body.css('padding', '1px'); // reflow, repaint
$body.css('color', 'red'); // repaint
$body.css('margin', '2px'); // reflow, repaint
// only 1 reflow and repaint will actually happen
However, as mentioned above, accessing an element property triggers a forced reflow. This will happen if we add an extra line that reads an element property to the previous block:

var $body = $('body');
$body.css('padding', '1px');
$body.css('padding'); // reading a property, a forced reflow
$body.css('color', 'red');
$body.css('margin', '2px');
As a result, we get 2 reflows instead of one. Because of this, you should group reading element properties together to optimize performance.

June 25, 2014 at 6:13pm
0 notes

adding 'rebeccapurple' color to CSS Color Level 4 →

This is really cool.

June 12, 2014 at 6:20pm
0 notes

fengsp/plan →

This is a python utility that makes provides an API for generating cron jobs or outputting a crontab syntax to insert yourself.

I think the cron job syntax is very stupid and easy to mess up, I hope this utility will help with that.

June 4, 2014 at 5:06pm
0 notes

How to merge two git commits into one? →

$ git rebase --abort
$ git log --pretty=oneline
a931ac7c808e2471b22b5bd20f0cad046b1c5d0d c
b76d157d507e819d7511132bdb5a80dd421d854f b
df239176e1a2ffac927d8b496ea00d5488481db5 a
$ git rebase --interactive HEAD~2
Then in the editor
pick b76d157 b
s a931ac7 c