The Sweet Spot
On software, engineering leadership, and anything shiny.

All Articles

2016
June
Rails, meet Phoenix: Migrating to Phoenix with Rails session sharing

You’ve resolved to build your company’s Next Big Thing in Phoenix and Elixir. That’s great! You’re facing a problem though - all user authentication and access concerns are performed on …

Evented Rails: Decoupling domains in Rails with Wisper pub/sub events

One common pattern in Domain-Driven Design is the use of publish/subscribe messaging to communicate between domains. When Domain Events are created from within a domain, other domains are able to …

April
Domain-Driven Design & The Joy of Naming

I want to discuss a topic near and dear to my heart, and what I believe is at the crux of effective software design. It’s not a new functional language, …

Knex.js and PostGIS cheat sheet

As follows are some code snippets for using Knex.js for executing Postgres and PostGIS queries. Execute raw SQL in migration I often find this useful for fancy SQL, like creating …

March
Lossless rate limiting with RxJS

Much of RxJS involves working with backpressure - how to reconcile streams that emit/process data at different rates, without overloading the system. Much of that model is built with lossy …

February
Partitioning RxJS streams: adventures in nested Observables with groupBy() and flatMap()

One of the confusing aspects about working with streams is diving into Rx operators that take a stream and fan out into multiple streams. Is your head exploding yet? The …

2015
September
Strange Loop 2015: Notes & Reflections

Going to Strange Loop was a huge check off my conference bucket list (lanyard?). I’d always heard about this slightly-weird, highly academic collision between academia and industry, skewing toward programming …

June
Notes on performance tuning a Puma server

A couple of months ago, I was tuning a Rails app for one of our clients. This client wanted to know how performant their app would be under load. To …

Toolbox: learning Swift and VIPER

The following are some notes I’m compiling as I’m beginning a journey down the rabbit hole, writing an app in Swift utilizing the VIPER app development methodology I had trouble …

April
Building GPX stats through FRP principles with Bacon.js

With my current fascination with tracking workouts and location-based-activities, I have been interested in how I might be able to rewrite some of my stats logic with FRP principles. What …

March
Docker, Rails, and Docker Compose in your development workflow

(This post originally appeared on the Carbon Five blog.) We’ve been trialing the usage of Docker and Docker Compose (previously known as fig) on a Rails project here at Carbon …

2014
November
Explorations in logic programming

Out of Storybook, a side project I’ve been doing for a friend, I had the opportunity to model the problem domain as a constraint satisfaction problem (CSP). It goes: A …

My own robot training buddy.

As an ultra runner, I am really into the mountains. As a software engineer, I’m really into data. So naturally, I’m interested in the intersection of both. I’ve particularly been …

Recap: QCon SF 2014

Blurb sent me off to QCon SF 2014 for three days. Notes I took a series of notes each day in attendance: Day One: Architectures, Functional Day Two: Rx Systems, …

Conway's Law for humans

If you’re familiar with Conway’s Law, it states: Any organization that designs a system (defined broadly) will produce a design whose structure is a copy of the organization’s communication structure. …

June
Mocks aren't stubs: mockist & classic testing

With the famed “TDD is dead” debate around the Rails community largely coming to an end, I found myself referencing Martin Fowler’s article, Mocks Aren’t Stubs a good deal, trying …

Running Mocha tests with ES6/AMD modules

In one of my personal projects (Chordmeister), I’ve been trying to upgrade the code to be written in ES6 modules and transpile down to AMD modules with Square’s very excellent …

April
Implementing DDD: Domains, Subdomains and Bounded Contexts

Chapter 2: Domains, Subdomains, and Bounded Contexts A Domain is what a business does and the surrounding context of how it does business. It is important to model out its …

March
Six months as a manager

It’s been approximately six months since I’ve entered engineering management. Here are some thoughts reflecting back on that season now. I didn’t like it at first. Let’s face it: I …

February
Blogging through: Implementing Domain-Driven Design

In recent conversations with coworkers, the topic of Domain-Driven Design has arisen on more than a few occasions in design and architecture meetings. “Have you read it?” a coworker asked, …

January
Moving to Ember App Kit

I’ve noticed a bit of the buzz around Ember App Kit recently and decided to move Hendrix, my music management app, over from a Yeoman-generated Ember app to EAK with …

2013
December
Ember Data, Rails, CORS, and you!

I’m starting up a new personal project involving Ember-Data and Rails (more to come). The gist of it is that it’s a pure frontend app engine built in Yeoman and …

2012
Decomposing Fat Models

Heard an awesome Ruby Rogues podcast recently: “Decomposing Fat Models”. Essentially, they’re talking through Bryan Helmkamp’s Code Climate blog entry “7 ways to decompose fat ActiveRecord models”, which sums up …

October
Deploying Janky on Ubuntu

Janky is a Github-developed Hubot + Jenkins control interface. It’s developed to be deployed on Heroku. However, what if you need it to live on an internal VM? Here’s how …

June
Updating max file limit on OSX Lion

I’ve been hitting a lot of “Maximum file limit exceeded” dialogs after a long day at work – at any point in time I’ve got a kajillion Chrome tabs open, …

April
Speeding up Rspec/Cucumber feedback times without sacrificing coverage

Rocket Fuelled Cucumbers View more presentations from Joseph Wilk One thing the Blurb devs have been discussing is how we can speed up our test feedback cycles without sacrificing coverage. …

Backup, backup, backup

Well, the inevitable happened: I finally experienced a hard drive failure. It’s pretty incredible that in the twenty-odd years I’ve been around computers I’ve never had the horror of losing …

HAML object references

Did you guys know that you can use the ‘[ ]’ brackets in HAML to automatically set the id and class on a tag, kind of like Rails’ tag helper? # file: …

March
RSpec order-agnostic array matching

What’s that? You want to write an expectation for an array but your method returns the Array in a nondeterministic ordering? Simple. Write: my_method.should =~ <my_expectation> See the source.

January
Ohm gotchas

Here’s a list of things that have been annoying, or at least a bit frustrating using Ohm, the Redis ORM, in a Rails app. Beware to those who assume Ohm is …

2011
November
Now at Blurb

I should have mentioned this long ago, but I started work at Blurb in early August. It’s been a quick ramp-up and I’m loving it there, surrounded by smart engineers …

October
mmtss, a collaborative loop station

mmtss is a loop station built for live performances. Let’s make music together! This project simplifies a traditional loop tracking station and is designed for interactive collaborative music performances. The …

August
Introducing Boink, a photobooth for the rest of us.

My friends were complaining that wedding photobooths were too expensive to rent. Could we make one for them? Glen and I from the Porkbuns Initiative stepped up in full armor, …

July
Chat App - Frontend Prototype

Some UI work I did for a stealth startup in early ‘11. Responsible for look & feel and frontend chat interactions. jQuery/UI communicating to a CakePHP/nodejs backend. We developed this …

June
BRUTE LABS UX project: StudentsConnect

I’m on a team with BRUTE LABS, a volunteer-led design agency working on StudentsConnect, a prototype project making chatroulette-style interactions connecting students from the global North and South. Here’s a …

Code For Oakland Barcamp

[caption id=”” align=”alignnone” width=”500” caption=”Is that Jon Chan I see? Yes it is. Photo credit Oakland Local.”][/caption] A few notes from this one-day barcamp/hackfest. The goal was to create mobile …

March
UN Declaration of Human Rights (Visualization)

This design was created from a Processing sketch that breaks up the preamble to the UN Declaration of Human Rights and connects adjacent words together with lines. More frequent word …

Slavery Today (Infographic)

An infographic for Freedom Sunday at Regeneration. Download as PDF.

February
Save our souls - a Twitter art installation

Here’s how the installation looked on the day of the art show. [caption id=”” align=”alignnone” width=”333” caption=”We mounted the installation on the inside of the Regeneration cafe. The Arduino lies …

Arduino and python-firmata

I just spent five hours trying to figure out why  none of the Firmata libraries for Python were working over my serial connection. I was wondering why the previous program …

Currently: frustrated

So I got the poster printed, and the LEDs currently show through the board pretty well. This is good: But last night I spent a good chunk of my evening …

Update

A quick update on the art project: I switched from my normal LEDs to “straw hat” wide-angle LEDs. The viewing angle is much better, meaning also that I can get …

The making of SOS: Intro

I’m starting a project for my church’s art show that integrates Twitter, print design and light. I’m titling it “Save Our Souls”. The theme of the art show is “Instead …

January
Using 37signals shorthand for UX flows

http://37signals.com/svn/posts/1926-a-shorthand-for-designing-ui-flows I’ve found this technique useful for illustrating workflows quickly, particularly when brainstorming in teams.

AppStoreConnect UX

A series of UX workflow designs I did for AppStoreConnect, an overseas Android multi-market submission application. Completed November 2010.

2010
December
Aristo, the shiniest jQuery UI theme of them all.

Let’s face it: jQuery UI skins suck. They’re flat, they’re boring, they don’t pop. Enter Aristo, a jQuery UI port of the Cappuccino Javascript framework theme. Much better. Clone the …

August
On selling my soul and switching to Mac

A month ago I bought an ‘07 MacBook on Craigslist. No, it’s not one of those sexy aluminum hot rods, but it sure is pretty. I was full of mixed …

June
post-review, git-svn and Review Board

Here’s how to set up the excellent VMware-developed open-source Review Board and its [post-review](http://www.reviewboard.org/docs/releasenotes/dev/rbtools/0.2/) command line review creation utility to work with git and git-svn on your computer. My assumption …

April
YUI 3 Widget lazy instantiation

At work, we make good use of YUI 3. It’s a really well-thought-out framework, from sandboxing and deep namespaces to CSS3 selector support and lazy-loading modules through the Yahoo! CDN. …

It's official: "Web site" becomes "website"

File this under “Nobody is going to care”, but I’ve always been instructed to write “Web site” in my technical communications class. I found it grating. Hooray for change!

I Love/Hate Marmite

I had my first taste of Marmite last year while in Botswana. My South African roommate loved it, and encouraged me to try it and spread it on my toast. …

March
Upgrading Wejoinin to unicorn

(Reposted from the Wejoinin Blog) When you run a Web app like Wejoinin on minimal VPS resources (read: we’re too poor to get a beefy server), it forces you to …

Shiny font overhaul!

A couple of months ago I switched over to TypeKit, a cloud-hosted font service (buzzword! “cloud” gets me all warm and fuzzy). They basically take your font stack and enhance …

2009
February
Thoughts on rural computing in Botswana

I’m currently in Botswana, doing volunteer work at a nonprofit Christian agency called Love Botswana Outreach Mission. Among my responsibilities are helping out with the organization’s IT needs. I was …

2008
November
Setting up a multi-AP wireless network

A few weeks ago, I couldn’t seem to connect my laptop to the wireless AP in my apartment. Additionally, I’d be getting weak signals from all these weird corners in …

October
First look at SproutCore and Cappuccino

One trend on the Web these days is to move away from traditional full-stack frameworks (like Rails) toward client-side, full-stack Javascript frameworks (among them Dojo, GWT, SproutCore, and Cappuccino). There’s …

GWT vs. SproutCore vs. Cappuccino

I’m looking to develop a Web application with a full-stack Javascript framework like GWT, SproutCore or Cappuccino. I’m making the decision to go with a Javascript framework over a traditional …

September
Updated portfolio... sort of.

Since I’m in the process of doing some housekeeping around the blog, I’ve begun moving my old design portfolio over to Flickr. This is sort of an intermediary step to …

A layman's guide to the OAI-ORE data aggregation protocol

In Spring 2008, I took an information architecture course in the UC Berkeley School of Information, taught by Erik Wilde (disclaimer: I dropped the course after a month because of …

I Like Google Chrome

I have to admit, I am an unabashed fan of Google Chrome, the new Web browser on the block. Why? UI design that shows attention to detail and a really …

August
Work Series Graphics - Good Shepherd Christian Church

Part 2 of a summer series:

July
Wisdom Series Graphic - Good Shepherd Christian Church

I was commissioned to create graphics for a sermon series titled “Wisdom” at my home church, Good Shepherd. Some of the artists and leaders decided to go with a lantern …

April
Sensations - Negotiating Noise

I’m showing this and a few more design pieces at Exposed, Cal Christian Fellowship’s art and performance extravaganza tonight. You can visit it today, April 26–the gallery will be open …

Designing the ThinkAnywhere Logo

In my IEOR190A class (entrepreneurship), we’re developing a business plan of a company making a device that tracks gestures on any surface. Install it on a whiteboard or a chalkboard …

March
Tales from the crypt

Now I remember why I love and hate assembling computers. You’ve got to love the rush of building something cool. The anticipation of the new BIOS screen–blue letters on black …

After site duplication, an .htaccess redirect for old Wordpress posts

I think I must preface this post with a bit of context: A month ago I added a new blog (blog.andrewhao.com). I wanted that blog to become my personal blog …

February
Quad Core and the Nerd

My apartmentmate Mike just upgraded his computer to an Intel Core 2 Quad-core processor. Once he got it up and running, he opened up Task Manager and summoned me over …

Today's Geek Hijinks

Morning: Woke up and attempted to mount a Samba file share under Ubuntu. My Gutsy server in the living room is getting a second life as a backup file server. …

Noam Chomsky is The Man

Why? The man is a respected thinker, theorist and activist. I’ve had several Mass Communications classes devote a couple of sections to his thoughts about mass media and its effect …

A new blog is coming!

I’m forking this blog in two: a design/development blog and a personal blog. I’ll be keeping blog.g9labs.com as my technical blog: if you stay with me here, you’ll find me …

January
Wordpress Bughunt

I spent a good four hours today digging through Wordpress code, trying to get our Cal Christian Fellowship Web site back up. The problem: the page seemed to freeze when …

2007
December
I'm ready for the winter.

Okay, I confess. I’ve been daydreaming about winter break: Sleeping in. The laughter of friends. Taking a day trip with a camera to Monterey/Carmel (or anywhere awesome). Working (uninterrupted) on …

Feeling awesome today

So for our CS188 (Artificial Intelligence) project, Capture-the-Flag Pac-Man, I’m responsible for writing a script that does some processing and analysis on a game board, simulating a Pac-Man agent (my …

Meeting Joe Hewitt

I shook Joe Hewitt’s hand today (psst, he’s the guy who did tons of Mozilla stuff but most notably built Firebug). I stammered a lot. But that’s okay, because I …

November
More scenes

Disclaimer: about 95% of you won’t get this. The other 5% should consider getting a life. So we’re in CS lecture (this is with Prof. Papadmitrou), and one student in …

October
Sensations

Sensations

Yahoo! University Hack Day

So Hsiu-fan and I had floated the idea of doing a hack for Yahoo! University Hack Day. We had even polled some of our friends about it, and the consensus …

Crusher website

What gives you more geek fuzzies than seeing an Evite competitor with an ASCII logo? Crusher website ~ Send invites for free Fun, simple, bare-bones, everything you need and nothing …

Oh well! Lessons learned the hard way

I restored a database by hand from the Rails production log and the console. We had forgotten to run a backup cronjob (and good thing we’re stealth! Otherwise folks would …

September
Hello, awesome

Only a geek could take a picture of his computer… and be proud of it.

August
Sensations

Thinking about writing a Rhapsody Scrobbler

Filed under “Fun Ideas That Could Take Three Hours or Three Months” I want to write a Rhapsody scrobbler. It’s already been done as a desktop application, but I don’t …

A Web Site for Word Geeks

Have you ever compiled long lists of words you thought were awesome (don’t lie, I’ve met two or three of you)? Do you love words such as “phthisis” and “tantamount” …

April
Taiwan Roundup II

After weeks of being stuck in a really deep rut, I’ve finally stumbled upon something that’s decently interesting with regards to the state of the Taiwanese blogsophere (this is an …

Blog habits & evolution

Way back when I started blogging soph year of high school (it’s been five+ years!), I pointed out that the public act of blogging helped me “get my thoughts straight” …

Sensations

Mixtaped

Found over at “Tiny Mix Tapes” – a mixtape suggestion/request service. Surprisingly poetic (well, most). Gives you a good glimpse into music uses & gratifications. after you left i had …

March
Sensations

Do you remember? We were freckle-faced high schoolers tumbling over China, our obnoxious American mannerisms betraying our origins despite our butter skin. We had agreed to stay in shape during …

Verilogical

Oftentimes in Verilog code, we build testbenches (test fixtures). A common thing to do is to instantiate a module and plug in wires of the same names. Now a common …

Sensations

February
Liveblogging from: the Stacks

I have friends who run a cost-benefit analysis on every decision. And they’re always measuring things up against Time. Freakin, Endless, Time. I think I’m one of them, too. May …

Taiwan Roundup

So I’m writing the first part of my International Media paper on the structures of the media systems in Taiwan. Just wanted to share with you what I’ve been coming …

eXtreme Editing

I realized today (with a grin) that I wasn’t editing my essay as much as I was refactoring it.

Sensations I

2006
September
GTD-izing my Thunderbird client, and other productivity things

Do any fellow geeks out there follow any GettingThingsDone (GTD) practices? (I’m trying to get my life organized�a futile attempt before the sledgehammer of school and responsibilities drops. Organized as …

July
The FAQQLY Tour

Many of you have wondered what it’s like daily indulging in the opulence that are the FAQQLY offices. Allow me to take you on a tour. These are known as …