I code compulsively and with great delight. Writing software is like weaving a magical spell, something out of nothing.

I’ve worked on a mix of consumer, web, scientific and open source software projects. Here are a few.


I’m gregdetre on GitHub (currently all hidden in private repositories).

My most recent open source work was produced while CTO, under Memrise’s GitHub.

Some of my older projects below live under gdetre on Google Code.

Memrise (consumer web)

Memrise is a B2C language learning startup, loved by hundreds of thousands of users around the world, and featured in The Guardian, Independent, Wired … more >>

We put together a really talented technical team, and built some great infrastructure for ourselves that I’d love to one day see open sourced. High-level details:

  • Rich Python/Django/MySQL/Javascript app that scales to 100+ requests/second.
  • Hosted on Amazon EC2/S3/RDS/Cloudfront.
  • A lot of complex javascript (mostly jQuery) to make our learning environment snappy once loaded, and highly interactive.
  • Original adaptive learning algorithms to decide how and when to test learners, in order to maximize the effectiveness of their learning.
  • Fairly comprehensive set of Python and Selenium unit tests.
  • Continuous deployment to the live site many times a day (one command to deploy to multiple web servers, migrate the database, run the whole suite of unit tests, and alert the rest of the team on Campfire).
  • Powerful internal AB testing and analytics framework that made it very easy to run multiple simultaneous AB tests, and track their effects across multiple key metrics.

I love to share what I’ve learned and get new ideas – if you run an event or conference and would like me to speak about any of this, drop me a line.

The Multi-voxel pattern analysis (MVPA) toolbox (scientific, open source)

I lead the development and maintenance of the popular Multi-Voxel Pattern Analysis Toolbox (Matlab) for analyzing fMRI neuroimaging data multivariately. [If you don’t understand this, but would like to, see Brain orchestras and fMRI analyses.]

The MVPA toolbox was co-authored with a number of other people (see the AUTHORS list), and has been released under the GPL.

It has been downloaded by hundreds of labs around the world, and featured in multiple publications.

Emacs freex mode (open source)

Emacs Freex mode is a minor mode for organizing and editing a massively-hyperlinked database of your notes and ideas. It’s a personal wiki on steroids.

Freex was co-authored with Per Sederberg, and has been released under the GPL.

I’m incredibly proud of it, and I use it hundreds of times a day myself, but it would need a lot of work and polish to increase its market share beyond one 🙂

You can see a screencast of Emacs Freex in action.


A very simple command-line Python library for down/uploading WordPress posts, and some Emacs wrapper functions, so I can type M-x wordpress-publish-this-file.


[Development led by Joseph Perla and Spencer Davis.]

See Pebbles on GitHub.

Writing lots of custom AJAX interactivity is bug-prone, has no compile-time checking, breaks whenver you change the structure of your html, and requires you to separate basic interactivity from markup.

With Pebbles, you just annotate your html objects (e.g. a button) with the ‘.actionable’ class, then provide a set of arguments in the html alongside, e.g.

<div class="kwargs">
 <!-- replace #money with the output from /user/3/money/create -->
 <input name="type" value="replace" />
 <input name="target" value="#money" />
 <input name="url" value="/user/3/money/create" />

The library then parses the html of .actionable objects, and automatically creates the relevant jQuery bindings for you. In other words, you define the behavior in html, without having to write any custom javascript. (see Hacker News).

We made heavy use of this at Memrise (Spencer Davis gets most of the credit here). Devolving certain kinds of basic, repetitive ajax functionality to html felt natural and simple. And, by adding new handler types to the library, it was sometimes much easier to create reusable widgets that we can sprinkle throughout the site.

That said, it produced heavier html pages, and wasn’t as easy to extend as we’d hoped. So the jury is still out on this for me. Maybe jQuery plugins are the best compromise.

PyEPL blog (open source, Python)

PyEPL (the Python Experiment-Programming Library) was written by the Kahana lab, and was my favorite way to code up psychological experiments.

Like the Matlab Cookbook (below), I created the PyEPL blog to help new users by providing useful snippets.

Matlab Cookbook (open source, Matlab)

After years and years of writing in Matlab, I collated some of the  utility functions I’d built for myself in a Matlab Cookbook. There are also a good number of handy scripts in the MVPA toolbox (see above).

Free Rhycall (scientific, Python)

This was just a mini-project, but it was pretty neat.

Free Rhycall helps you parse the free recall audio of someone talking in a noisy fMRI scanner.

In this case, you have a wordlist of may a few tens or hundreds of words, and your job is to tell which one the subject is saying each time. They could come in any order. This program is not trying to do speech recognition or anything fancy like that. It’s simply intended as a handy tool for the human doing the parsing. Put simply, you feed it a wordlist and what you think you hear, and it will return words (from the wordlist) that might be matches. It’s then up to the human to decide which works best.

This uses the Levenshtein edit distance as applied to the phonetic distances in the CMU Pronouncing Dictionary.

Available upon request.

Emacs indentation library (open source, Emacs Lisp)

Available as part of Emacs Freex as freex-hiert.el, this library makes it much easier to indent and outdent multiple, entire paragraphs at a time. Very useful for taking hierarchical notes.