Tom Leo's Blog

Home    Ask me anything   

Hacker with a Computer Science Degree

October 16, 2014 at 10:54am
0 notes

Using Postgres Composite Types in Django →

Out of the box django’s ORM is database augnostic however there are enough hooks into the framework to create database specific database types.

Django already has django.contrib.postgres with a ArrayField option.

I would love to see other PostgreSQL specific options especially ones related to GIS. Django does have a django.contrib.gis extension however it only covers model fields for OGC geometries. I would love to see geography field support as well.

October 15, 2014 at 1:57pm
0 notes

JavaScript Best Practices

Really clear and solid guide of JavaScript best practices

October 13, 2014 at 4:29pm
0 notes

Django models, encapsulation and data integrity →

Never write to a model field or call save() directly. Always use model methods and manager methods for state changing operations.

Never perform bulk updates or bulk deletes, except in model manager classes.

When models have related models you should “define both sets of required arguments on a single manager method, and ensure that the child instance is always created at the same point as creating the parent instance.” In my own code I have always leveraged django’s post_save signal to ensure related objects get created, but this might make things easier to read in some cases. I’m not entirely sure weather I like this method more.

October 3, 2014 at 8:56am
0 notes

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 un-precedented feats that are far from what are “generally” expected… diversity is the very phenomenon which makes any system stronger.’

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.