Archive • Categories • Subscribe

## Scaling a real-time pricing engine

This winter, I interned at Bloomberg in New York City. During my time there, I was on an engineering team called Foreign Exchange Idea Generation. I had the chance to work on several interesting projects, and I also learned a bit about the foreign exchange market. In this post, I’m going to discuss one particular problem I worked on: horizontally scaling a real-time pricing engine.

## Building a file expiration service

This summer, I interned on the Data Warehouse Storage team at Facebook’s Seattle office. It was a great experience overall, and I’m thankful for it. In those sixteen weeks, I learned a lot about infrastructure engineering, distributed systems, and data storage technology. In this article, I’m going to focus on the main project I worked on: building a file expiration service for a distributed file system.

## Semigroups and friends

What does it take for a semigroup to become a monoid? Why are all groups isomorphic to a group of permutations, and what does that even mean? When do I need to use a field rather than a plain old ring? But more importantly—what do all these questions have in common?

## Fractal dimensions

Most of us are comfortable with the usual notion of *dimension*. We live in three-dimensional space, and we can easily picture one-dimensional lines and two-dimensional planes. Higher-dimensional spaces are much harder to visualize, but the generalization at least makes sense. Now what could it possibly mean to say that a space has 1.26186 dimensions?

## Raskolnikov’s silence

This past summer, I read Crime and Punishment by Fyodor Dostoyevsky (specifically, the translation by Jessie Couson). My recommendation is hardly necessary for a classic, but I give it anyway. This “psychological account of a crime,” as Dostoyevsky once described it, is one of the most thought-provoking novels I’ve ever read. In this article, I’m going to focus on one recurring device that stood out to me: awkward silence.

## Lindenmayer systems

I’ve recently become interested in a type of mathematical structure called an L-system. Invented by Aristid Lindenmayer in 1968, an L-system is a grammar that applies recursive rules to produce strings. Lindenmayer originally used them to model biological processes, such as the behaviour of plant cells. They can also be used to draw beautiful fractal curves.

## Assertions and beyond

Writing code that works is hard. It doesn’t matter how many times you’ve gone over it, or how many coworkers have reviewed it. A developer with any experience never expects it to work the first time. If you’ve just written a thousand lines and they seem to work as expected, your initial reaction should be suspicion—it will lead to less embarrassment in the long run.

## Chasing the infinite

What is infinity? Perhaps, like me, you were told that it’s just a *concept* to remind us that there is no largest number. It’s true that if you treat it like a regular number, subject to the usual rules of arithmetic, you run into all kinds of confusing nonsense. But this needn’t prevent us from studying the properties of infinity—it just means we need to be careful. The infinite is far more interesting and surprising than I could have imagined.

## How to write a ray tracer

In the summer of 2012, I wrote a ray tracer called Luminosity as my first Haskell project. I’ve worked on other things since, but Luminosity remains my favourite project. If you’re itching to write some code but, after googling “coding project ideas,” digging up that Asteroids clone you never finished, combing through lists of open source projects—still find yourself in a painful discombobulation—then I suggest writing a ray tracer.

## The prisoner’s dilemma

You’ve just been thrown in prison. You and another gang member were arrested, and now you are in separate cells with no way of communicating. You both deserve a three-year sentence. However, the police don’t have enough evidence to convict you on that charge, so you’ll probably end up in jail for one year on a lesser charge instead.

## An over-shuffled deck

How hard can it be to shuffle a deck of cards? You may have been accused of under-shuffling a deck, but have you ever been caught *over*-shuffling? This doesn’t make any sense intuitively. You would think that the situation improves the longer we shuffle—the more randomness, the better. But what do we even mean by “better”? How do we measure shuffled-ness?

## Introduction to the λ-calculus

Most people think of Newton and Leibniz’s infinitesimal calculus when they hear the word calculus, but the term is actually more general than that. A calculus is a formal system of calculation or reasoning, usually involving the symbolic manipulation of expressions. The λ-calculus (lambda calculus) is one such system, and it is very important in computer science.

## First year reflection

It’s hard to believe that my first year of university is almost over. I would say that I survived first-year engineering, except that it’s never been about surviving—I loved every minute of it. It’s been an incredible experience, and from what I can see it’s only going to get better. In this article I’m going to compress the past decade of my life in a few paragraphs as well as talk about misconceptions, strategies, discoveries, and other experiences.

## The tortoise and the hare

The tortoise and the hare is my favourite algorithm. It’s such a neat solution, based on a principle that, while simple, would require a profound insight to discover on your own. You could just memorize the steps in case it comes up in an interview, but I’d like to focus on proving its correctness, which requires a deeper understanding.

## Cracking the Caesar cipher

Whenever I play around with a new language, I like to start by writing a program to crack a Caesar cipher. This problem is perfect for getting a sense of what it’s like to work in a given language. It’s significantly more interesting than “Hello, World!” but it only takes about a hundred lines to write—in fact, the line count by itself is a good indication of how expressive the language is.

## What is this?

I’m Mitchell Kember, a first-year Software Engineering student at Waterloo. I enjoy writing code, reading, running, playing the piano, obsessing over typography, listening to classical music, perfecting my Vim setup, contemplating the timeless elegance of Lisp (or Haskell, depending on the mood I’m in), waking up before the sun rises, making checklists, and drinking coffee.