Author Archives: Paul Butler

Data Structures for Range-Sum Queries (slides)

This week I attended the Canadian Undergraduate Mathematics Conference. I enjoyed talks from a number of branches of mathematics, and gave a talk of my own on range-sum queries. Essentially, range-aggregate queries are a class of database queries which involve … Continue reading

Posted in Computer Science, Math | Leave a comment

An experiment in A/B Testing my Résumé

Objective I’ll admit it: my résumé doesn’t stand out. I’ve had some great internships, but also a tendency to work for companies that aren’t (yet!) household names. And though I’m doing fine academically, it’s not well enough to stand out … Continue reading

Posted in Data Mining, Math, R, Statistics | 4 Comments

Why R doesn't suck

I first encountered the R programming language a few years ago when I needed to make some plots. Although I’ve used it occasionally since, I always considered it a sort of “Perl for statisticians” — a useful swiss-army knife with … Continue reading

Posted in Data Mining, Haskell, Math, Programming, Python, R, Ruby | 1 Comment

Groupon Math: Data Scraping to Estimate Revenue

There’s been a lot of talk recently about the Chicago startup Groupon. Groupon brands itself as a group-buying site, but it’s really more of a localized version of what woot.com does. They post a new deal (which they call a … Continue reading

Posted in Data Mining, Math | 11 Comments

Do we really need another programming language?

Yesterday, a group inside Google released a new programming language called go. Among the many comments on the new language, I noticed a number of people rhetorically asking if there is really room for more programming languages. I’ve seen the … Continue reading

Posted in Programming | 19 Comments

N-Queens in a Tweet

Most people who like puzzles or study computer science have probably encountered the famous N-Queens problem. If you haven’t, before reading any further, try this online version of the most popular form, the 8-Queens problem. The 8-Queens problem is to … Continue reading

Posted in Haskell | 8 Comments

Start-ups from UWaterloo Class of 2009

I was curious to know how many companies were founded by UWaterloo’s class of 2009, so I put together a list. It’s probably incomplete (let me know in the comments), but it may be of interest to anyone who follows … Continue reading

Posted in Waterloo | 4 Comments

Python Debugging with Decorators

I’ve written a little python function which I have found to be very helpful for debugging. It takes a function, and returns a function which is identical to the original except that it prints a message to the console with … Continue reading

Posted in Python | Leave a comment

SimpleDiff in Python

A while ago I posted a PHP implementation of a diff algorithm I came up with1. Since it was well received, and it’s a useful little algorithm to have, I created a Python version as well. There are a few … Continue reading

Posted in Python | Leave a comment

Tail recursion in Python

After spending a lot of time in Scheme, it’s hard not to think in recursion from time to time. When I recently started to improve my Python skills, I missed having Scheme optimize my tail recursive calls. For example, consider … Continue reading

Posted in Python | 16 Comments