Keith

June 2, 2016, 1:13 p.m.

After a year, I wrote about what happened to Keith http://www.mathisonian.com/com.asmallgrin.www


Easy Responsive SVGs with viewBox

Jan. 26, 2016, 8:42 p.m.

The `viewBox` attribute of SVGs is underutilized. While it has been written about before, it seems useful enough to warrant another post.

There is a very simple technique that many interactive d3 creations can immediately benefit from. The `viewBox` attribute defines how an SVG scales up. To take advantage of it, use viewBox to define the aspect ratio for your graphic, and allow the browser to flexibly decide what size it should be displayed on a reader's screen.

Consider the following two examples using d3.js. In both I use the following code to render a checkerboard pattern after ...

Read More →

Postgres Full Text Search With Sequelize.js

Dec. 21, 2013, 4:14 p.m.

In order to use Postgres' built in full-text search functionality with the Sequelize.js ORM there are just a few things that need to be done:


  1. Add a TSVector as a column on the relevant model
  2. Add a text search index using the vector that was just created
  3. Update the vector whenever the model is changed
  4. Add a 'search' method to our model

This can be done with a fairly small amount of code. If you just want to skip to the end result, check out this gist.


Adding the Vector

Let's take a blog post as an example ...
Read More →

hacking breaking news

Dec. 8, 2013, 4:13 p.m.

Even though I'm no longer working for a news organization, I can't help but continue to spend time thinking about how technology can be used both to build better tools for journalists and communities, and to disseminate information more efficiently. 

While there seems to be some debate about whether or not technology is ruining journalism, something I've found is that there tends to be a sweet spot where tech is combined with human curation and oversight. This has the potential to result in something superior to either approach individually. (More modern uses of twitter, and the app ...

Read More →