Koki Technology Co-founder (Oct 2017 - Feb 2018)

February 23, 2018

I built a CI system (inspired by Drone) that runs user-defined pipelines of containerized (Docker) tasks. It installs with a single kubectl command and integrates with both GitHub and Bitbucket repositories. I also developed an embedded DSL for defining more complex container pipelines in Haskell.

I built the first automated installer for Hyperledger Fabric (blockchain platform) on Kubernetes. Pre-existing techniques required that users manually reconfigure each worker node in their Kubernetes cluster (a workaround for kube-dns), but I found that Docker-in-Docker obviates this need.

We also created koki/short, a compact file format for Kubernetes manifests. One major feature is the modules system that I added.

28 technical blog posts on Medium. Some examples:

Waze Carpool iOS Team (Aug 2016 - Oct 2017)

October 11, 2017

I worked on the Waze Rider iOS app for Waze Carpool at Google. I used mostly Objective-C and some Swift.

In addition to feature work, I also worked on our build, release, and monitoring automation and refactoring our codebase for better maintenance, testing, and sharing of code.

Web App Development with GHCJS and reflex-dom

May 11, 2016

I’m working on finding client-side best practices for developing modern web apps in Haskell, specifically using reflex-dom, a new functional reactive programming (FRP) library for browser-side apps.

Here’s a post about client-side app architecture from the perspective of client-side routing.

Server-side I’m using servant, persistent, esqueleto, cookie, and clientsession.

Source code: webapp-reflex

2D Physics in Haskell

April 4, 2016

shapes is a constraint-based physics engine that currently features convex polygons, non-penetration with baumgarte stabilization, friction, solution caching, static and non-rotating objects, and AABB broadphase elimination. It’s based on GDC slide decks I found online.

I’ve had great success optimizing the engine. The current demo comfortably handles 225 objects (1000-2000 constraints) at 100fps. I accomplished this primarily by:

There are still more optimizations I can implement. For example, there are some ideas from Bullet that I’d like to try. And I haven’t even started parallelizing things yet.

This project has been a fun experience in incrementally growing a codebase from a simple core. In addition to pursuing better performance, I also plan to add support for new shapes, new constraints, and new developer interfaces (game physics EDSL?).

Source code: shapes

Works in Progress

January 31, 2016

CS:GO Nade Guides (ghcjs, reflex-dom, servant)

The first version is here. (Type “cache”. Click the thumbnails to zoom in.)

It’s a client-only single-page app that fetches a simple text format via XHR, parses it, and provides a UI for the result. I designed it this way so I could write guides in a normal text editor and host everything on GitHub.

I’m still working on a second version, which will be a complete web app. In its current state:

Source code: csgo-guides

Tile Rider Web App

I’m working on a web (servant, ghcjs + reflex-dom) version of my Tile Rider game. I want users to be able to create, play, and share puzzles. So far, I’ve written some client-side code for game and editor UI.

Haskell Project for LeapYear.io

December 23, 2015

I worked a consulting job for LeapYear where I implemented streaming versions of some of their differentially private machine learning algorithms. Previously, these algorithms were limited to datasets that fit in memory. My implementations made it possible to process datasets of any size.

In addition to the streaming machine-learning algorithms, I also implemented streaming (and randomized) database interfaces and a streaming blocked join. I used pipes and pipes-group for streaming, HDBC for database access, and criterion and HUnit for benchmarking and testing.

Attending Oregon Programming Languages Summer School (OPLSS 2015)

June 28, 2015

OPLSS has left me with a lot to think about. I have a new interest now in programming languages (vs programming in a language) as an approach to solving programming problems.

I came across OPLSS via purelytheoretical after I decided to learn some type theory:

I was talking to my dad about functional programming in Haskell, and I realized I wasn’t sure what to do with something like a heterogeneous list. After I went home, I found this wikibooks article about existential types.

Tile Rider - A Puzzle Game in Haskell

May 12, 2015

Tile Rider is my first Haskell project. It’s a barebones puzzle game implemented using SDL.

I like the mechanic, so I might revisit this as a web (+ mobile?) project. Learning to write some Clojure would be fun.

Source code: tile-rider

Yahoo Magazines Frontend Team (Feb 2014 - Mar 2015)

March 10, 2015

I worked at Yahoo for just over a year on the digital magazines (platform) team. I wrote JavaScript (with React) for the nodejs server and the web client.

Yahoo Style, Yahoo Food, Yahoo Tech, Yahoo Beauty, etc

In addition to my feature work, I applied principles from functional programming to create design patterns that eliminate avenues for complexity and bugs. I wrote this blog post1 explaining one important pattern after my team used it for a few months.

The most important application of my design patterns was my integration of a particularly awkward ad service. The original implementation was fragile and made it difficult to add new ad configurations to our magazines.

My encapsulation of the ad service made it possible to implement multiple new ad configurations without increasing code complexity. Furthermore, engineers on my team could now quickly add or modify ad configurations without deep knowledge of the underlying service. Ad integration issues also became much simpler to debug.

Another team actually picked up my ad integration code and maintained it as a library for other Yahoo properties to use.

1My blog post: A Reactive Perspective on Flux

functipede - Flow Graphs in JavaScript

May 26, 2014

functipede is a set of tools for composing flow graphs in JavaScript. I model all flow graphs (even single nodes) each as a set of input callbacks and a set of output callbacks. This makes it simple to compose a flow graph from smaller pieces. In addition to graph composition, I’ve implemented tools for creating both stateful and stateless nodes/graphs from functions.

Source code: functipede

I’ve been working with Robert Timpe on implementing a C++ game engine as a flow graph. I think it might be possible to use C++ template metaprogramming to make Intel TBB’s flow graph library easier to use by making graph composition look like function composition. I wrote functipede as a quick prototype to see if I actually wanted to write flow graphs that way.

I used functipede for a few days, but I found it very difficult to keep track of the edges in and out of a graph. The abstraction seems usable, but the tooling is definitely not. I think something like Unreal Engine 4’s Blueprint graphical scripting might be what’s needed to make graph-building code fun.

UPDATE: Later on, I came across arrows and an associated syntax implemented for Haskell. I haven’t tried it yet, but I would like to use Yampa (arrowized functional reactive programming) for a game one day.

Microsoft Mediaroom (Jun 2012 - Aug 2013), Ericsson Mediaroom (Sep 2013 - Jan 2014)

February 1, 2014

I developed an automated system for user-configured reports on our big data platform (Azure, C#, Hadoop). It allowed non-technical users, including Mediaroom clients, to safely configure, generate, and view reports using a variety of data sources, metrics, and drill-downs. The system also allowed us to support new data formats without code changes or redeployment.

I wrote and owned a large portion of the system, including the code for managing our SQL and Hive databases, compiling report configurations to Hive, and everything else between reading a report configuration, parsing and processing logs, and uploading the result.

I also wrote a metadata-comparing recommendations feature called “More Like This” that we used in the TV product. I experimented with a more complex algorithm using feature vectors obtained from user ratings, but I left the company before I could investigate recommendations further.

Microsoft Summer Internship (Jun 2011 - Aug 2011)

September 1, 2011

I co-created the Tile Puzzle app with Michael Montazeri using HTML5 and JavaScript for Windows 8. I was invited to //build/ as a panelist for a discussion about the Windows 8 app development experience but was unable to attend.

The app itself was based on the 15-puzzle, but we made it special by supporting video, slideshows, and webcam as the puzzle visuals. It’s quite a different game when the pictures on the tiles are constantly changing.