Things I’ve written. Older (pre-2017) posts are primarily technical; newer posts are primarily non-technical. See this meta-post for an explanation.

Categories: all (25), meta (2), encryption (2), python (4), octave (14), django (13), web-design (2), security (1), javascript (1), git (1), postgresql (1), art (1), politics (1), inequality (1), my-life (1)

A personal statement

June 2, 2017 :: Categories: ,

Presented without comment other than to say that yes, I am a little bit embarrassed by how melodramatic and facile it is, but I got in, so whatever. Hopefully this will help someone in the process of writing their own personal statement, or maybe even nudge someone into making the same sort of choice that I made. One of the most striking illustrations of inequality today is found in Silicon ... Read more »

A change of pace

February 3, 2017 :: Categories:

When I first created this blog – almost six years ago, somehow – I planned to fill it with technical posts about projects I was working on and tips I’d discovered. It only recently occurred to me that I, despite being a programmer by occupation, could use my blog to write about things other than programming. Which is silly, because it’s not as if I had been born with a fully-formed .vimrc file ... Read more »

Predicting the U.S. election without polls

November 18, 2016 :: Categories:

A few days after the United States presidential election, Data Driven Journalism featured a great piece about the pitfalls of relying on opinion polls to predict elections: “Will data driven election reporting ever be the same?” I myself had fallen into the trap of trusting the polls that predicted a landslide Clinton win, so in the aftermath of the unexpected election results, I started thinki... Read more »

Time-slicing photos with Python and ImageMagick

May 15, 2016 :: Categories: ,

I recently came across a neat example of time-slice photography, which featured the Manhattan skyline over a period of 30 minutes around dusk. It’s a really cool technique that I’ve always wanted to try reproducing through paint, since the nature of the medium means you could make the slices blend together more seamlessly than would be possible in a photograph. So that became my next art proje... Read more »

psycopg2 OFFSET performance with large tables

April 23, 2015 :: Categories: ,

This post is about solving a minor performance issue that can be encountered when using psycopg2, a commonly-used Python driver for PostgreSQL. It will likely be of zero interest to you unless you have come across this problem before. Even then, it is doubtful that it is worth reading all the way through unless you have this problem *right now* and don’t mind wading through excessively flowery ... Read more »

Showing only additions and deletions in git

April 18, 2014 :: Categories:

If you’ve ever been in a situation where you wanted to see only the additions, or only the deletions, in a git diff, then you probably know that it’s not as simple as running git diff --diff-filter=A or git diff --diff-filter=D. At least, not if you’re looking for added or deleted lines, as opposed to files. From the man page for git diff: --diff-filter=[ACDMRTUXB*] Select only files that ... Read more »

Sudoku code: another encryption scheme

October 6, 2013 :: Categories: ,

Another useless encryption scheme devised by yours truly. While my last one (pi code) was primarily a substitution cipher, this one transcends all standard classifications; it’s almost like a transposition cipher, but not really. The main idea here is the use of certain numbers in a particular Sudoku grid. The strength (if any) in this method lies in its unexpected nature; it certainly takes qu... Read more »

How not to check the validity of an email address

September 2, 2013 :: Categories: ,

Another update, after this post somehow hit #1 on Hacker News and garnered my website more visitors in one hour than it usually gets in a year: I got a lot of feedback on this post. While a lot of it was positive, there was also some valid criticism about the amount of flaming in this post. While at first my response was along the lines of “h8rs gunna h8 lol”, after some thought I realised that... Read more »

Simulating the night sky with CSS

January 4, 2013 :: Categories:

Have you ever looked up at the sky on a clear, moonless night? When all you can see is an endless field of stars, glittering like an array of celestial diamonds speckled across a cosmic fabric? Did it make you think, “I wonder if I could simulate this in the browser using transparent images and CSS”? That has never happened to me either, actually. But it was the best segue into this subject th... Read more »

Agora Octave: Update #11

October 27, 2012 :: Categories: ,

This past week has been full of midterms and assignments so this update will be shorter than usual. I made a few small changes (feature additions and bug fixes) to the bundle feature, mostly based on feedback from the mailing list. This week The full commit log is available here: http://inversethought.com/hg/hgwebdir.cgi/agora-dellsystem/ If an uploaded bundle contains a file named DESCRI... Read more »

Agora Octave: Update #10

October 20, 2012 :: Categories: ,

I worked primarily on the bundle feature this week. I added a rudimentary versioning system and made some other smaller changes, including fixing the bundle explore page, making bundle descriptions optional and fixing the 404 and 500 error page templates. This week The full commit log is available here: http://inversethought.com/hg/hgwebdir.cgi/agora-dellsystem/ Bundle versioning and editing... Read more »

Agora Octave: Update #9

October 15, 2012 :: Categories: ,

Lots of progress on the bundle feature this week. I also significantly revised my plans for the feature, based on some very helpful feedback from the mailing list. Some other smaller changes - bug fixes, minor feature additions, cosmetic changes - were committed as well. This week Bundles, continued I’ve committed all the progress I’ve made over the past couple of weeks on bundles. See commi... Read more »

Agora Octave: Update #8

October 8, 2012 :: Categories: ,

I made quite a bit of progress on bundle/module uploading this week. A lot of it is behind-the-scenes work, and there are still a few things that need to be done before it’s production-ready, so unfortunately I don’t have a working demo yet. For a sneak preview of what’s coming, check out the screenshots below. This week Bundles My main focus was working on the bundle uploading feature. The ... Read more »

Line numbering is actually surprisingly hard

September 29, 2012 :: Categories: ,

Let me share with you a little tale involving line numbers. One of the required features for Agora Octave (which I’ve been working on for the past couple of months, as part of the European Space Agency’s Summer of Code 2012) is the ability to display syntax-highlighted code. Ideally, the code would come adorned with correctly-aligned line numbers as well (which can be linked to directly), and ... Read more »

Agora Octave: Update #7

September 22, 2012 :: Categories: ,

This week, I added the ability to edit your account settings, and the ability to upload a file to create a snippet. I’ve been overloaded with assignments lately (hence the late update) and wasn’t able to spend much time on the module upload feature, so I’ll have to push that back again. It will be my top priority for next week, though, so stay tuned. Also, I regenerated my private key and the ... Read more »

Agora Octave: Update #6

September 14, 2012 :: Categories: ,

This will be a short update, partly because of the follow-up update I posted three days ago (which covers most of what I accomplished this week) and partly because school is now in full swing and so I’ve been spending a lot of time trying to type up my notes. Only minor changes this week. I’ll definitely do something cool by next week, though, so stay tuned. This week Summary of changes: ... Read more »

Agora Octave: Update #5.1

September 11, 2012 :: Categories: ,

This is the follow-up to update #5 (a little bit later than planned). Summary of changes this week: updating the code page to make it slightly more useful (at least in terms of listing the snippets), fixing vertical alignment of lines and their corresponding numbers on the snippet view page (more on that below), and adding a pop-up window for a more streamlined login and registration process. ... Read more »

Agora Octave: Update #5

September 7, 2012 :: Categories: ,

I’ve been pretty busy this week, with classes resuming for fall semester and a major project that I’m wrapping up. This week, I made some improvements to the code explore page and started on the file upload functionality for singles and bundles (tentatively known collectively as “modules”, although this is subject to change), but haven’t had a chance to commit the changes yet. I will work on fi... Read more »

Agora Octave: Update #4

August 31, 2012 :: Categories: ,

Update #4 for Agora Octave. I worked on completing the integration of the snippet functionality with the new design, added the ability to change the syntax highlighting colour scheme, and made some minor housekeeping changes. See below for the exciting details This week Integrating snippets and the new design I added back the “view snippet” view, with all of its functionality: “view raw”, de... Read more »

Agora Octave: Update #3

August 24, 2012 :: Categories: ,

I’ve been pretty sick this week and, as a result, haven’t managed to get as much done as I would have liked. I did manage to get the new design mostly integrated with Django, and made some changes to it based on feedback from the mailing list. I’ve pushed the commits, but it’s still very much a work in progress. There is a demo running at agora.dellsystem.me. This week Changes to the design ... Read more »

Agora Octave: Update #2

August 17, 2012 :: Categories: ,

This week, I mainly worked on a mockup for a redesign (available below). I also made some small changes to the readme and pip-requirements, which have been committed. This week Design mockup Here’s a sneak preview of what I have in mind for the front page (click for higher-resolution): Things I’m still working on: The location of login/logout buttons and other navigation items (for ea... Read more »

Agora Octave: Update #1

August 10, 2012 :: Categories: ,

This week, I read more about the specifications and code for Agora Octave and started investigating some of the solutions. I also made my first few commits to the Mercurial repository (most were minor changes involving settings.py). This week Reading specifications and code To get a better understanding of the project, I spent some time reading and re-reading the current README file, the som... Read more »

SOCIS 2012 with Agora Octave

August 3, 2012 :: Categories: ,

This summer, I’ll be working with Octave as part of the European Space Agency’s Summer of Code in Space 2012. My focus will be on completing Agora Octave, which is a code submission and collaboration website for Octave-related projects built using the Django web framework. I’m very excited about the opportunity to work on Agora Octave. I love building websites, especially with Django, and this... Read more »

Pi code: an encryption scheme

June 1, 2011 :: Categories: ,

When I was in high school and still harbouring goals of one day becoming a spy, I made up this code revolving around the first twenty-six digits of pi (which I conveniently had memorised) and the Fibonacci sequence. I figured, the more esoteric and nonsensical, the better, so that if I ever needed to send a message to my future self I could rest assured knowing that no one except me would ever ... Read more »

First post

April 22, 2011 :: Categories:

In this exciting and highly competitive race to create the first post on my site, it seems that I have triumphed … over myself. Take that, self. Read more »