Rebecca and I recently relocated to Denver - the sunsets are very colorful here.


Last November, I went to climb Pleasant Overhangs at Seneca with the perfect group of 3. The weather forecast for the afternoon didn't look too good. My excitement got the better of me, and we went for it anyways. At 2PM as I was about to start pitch 3, it started POURING - just as the forecasts had predicted. I had the wettest rappel of my life.

It's starting to rain, but we're still protected by the especially pleasant overhang.

I regret nothing.

Birdsboro Quarry

Baltimore is perhaps not the best place to be for sport climbing. For a 2 hour drive, you can get to Birdsboro Quarry. The area is actually fairly well developed with nice little benches you can sit on. Its blasted walls sometimes still shed rock - careful.

The area has tons of short & sweet sport routes, and some longer ones if you like to do 5.11+.

Jenga is a fun one to get on.


I started ExchangeEngine on GitHub in 2015 to experiment with setting up continuous integration and testing on some different services. Back in 2015 I didn't get far with the project after I had finished messing around with the continuous integration systems. I randomly picked it back up recently and got it to a minimal product.

At its most basic, ExchangeEngine is a Node.js library that allows you to create an exchange for any generic thing you wish. Currently, it is very minimal with no explicit architecture defined for users or authentication. In theory, you can use ExchangeEngine to back any type of exchange - be it stocks, Bitcoin, or Pokemon Cards.

The order types supported are Limit and Market orders with FIFO priority execution.


Given the two orders coming in:

var order1 = {
    quantity: 1,
    price: 3,
    side: Order.SIDE.ASK,
    type: OrderTypes.LIMIT,
    owner: "user1",
    status: Order.STATUS.ACTIVE,
    time: new Date()

var order2 = {
    quantity: 1,
    price: null,
    side: Order.SIDE.BID,
    type: OrderTypes.MARKET,
    owner: "user2",
    status: Order.STATUS.ACTIVE,
    time: new Date()

The Exchange Engine will find a match and produce a trade:

[ Trade {
    fillPrice: 3,
    fillQuantity: 1,
    newOrders: [],
    childOrders: [ [Object], [Object] ],
    rejectedOrders: [],
    executionTime: 2019-02-05T04:47:36.119Z } ]


Backing the order matching engine is a fibonacci heap. I picked it because it sounds cool (just kidding). This seems to produce satisfactory performance on my dying MacBook Pro retina. As expected with the heap, the performance depends on the book depth.

Book Depth - Transactions/Second
100 219,257
500 56,879
1,000 26,894
10,000 2,171

Given that the daily volume of SPY today was 60,673,524, if each trade was one share, that'd be around 2,592 trades per second in the 6.5 hour trading day. Not a bad start.

If your application is running on the cheapest MacBook, has books 10k orders deep, and transacting more volume than SPY, you can probably afford something better than this free GitHub project.

Although this performance is more than sufficient for most, I am thinking of implementing a more memory intensive but much faster matching engine. I also have some fun ideas for projects with this. More on this later...