The CID Pattern: a strategy to keep your web service code clean

Date Tags design

The Problem

Long term maintenance of a web application, will, at some point, require changes. Code grows with the functionality it serves, and an increase in functionality is inevitable.

It is impossible to foresee what sort of changes are required, but there are changes that are common and are commonly ...

more ...

KeyError in self._handlers: a journey deep into Tornado's internals

Date Tags python

If you've worked with tornado, you may have encountered a traceback of a somewhat bewildering error:

Traceback (most recent call last):
    File "/usr/local/lib/python2.7/site-packages/tornado/ioloop.py", line 832, in start
fd_obj, handler_func = self._handlers[fd]
KeyError: 16

A few other people have been confused ...

more ...


Global logging with flask

As of December 2016, Flask has a built-in logger that it instantiates for you. Unfortunately, this misses the errors and other log messages in other libraries that may also be valuable.

It would be nice to have a single logger, one that captures BOTH library AND app logs. For those ...

more ...

Hierarchal Naming

Date Tags design

One of the most interesting artifacts of most programming languages using English conventions is variable naming. Today I contend that:

English Grammar is a Terrible Programming Default

Consider how you would specify that a room is for guests in English, or a car is designed to be sporty. In both ...

more ...

Test Classes Don't Work

Date Tags testing

Test Classes don't work as a test structure.

It's worth clarifying what I mean by the test class. I'm speaking specifically about the following structure of an test:

  • having a test class, that contains the setup and teardown method for test fixtures
  • putting multiple tests in that ...
more ...

How I Design Test Suites

Date Tags testing

At Zillow, I've done a lot of work on the design and development of the test infrastructure we use for full-stack tests. It's always fun to watch your tool become popular, but even more interesting is the discussions around test suite design that come with it.

Many discussions ...

more ...

Book Report: Refactoring by Martin Fowler

Refactoring is a book covering the basics tenants of refactoring as dictated by Martin Fowler: a very smart person with some very good ideas about code in general.

First, the interesting thing about the definition of refactoring (as defined by this book) is that it doesn't encompass all code ...

more ...

The Dangers of Patching

If you've ever used Mock (or the built-in mock in python 3), you'll know how powerful of a tool it can be toward making unit testing on functions modifying state sane. Mocks in Python are effectively a probe that you can send into a deep, dark function:

import ...
more ...

Tips on getting a programming internship interview

Someone asked me about how to get a programming internship from a career fair. I've had a bit of experience at career fairs on the interviewer side, and I thought I'd outline some of the points for me personally.

If your interested in how to do well on ...

more ...

About Yusuke Tsutsumi
Software Engineer at Zillow. I focus on tools and services for developer productivity, including build and testing.

My other interests include programming language design, game development, and learning languages (the non-programming ones).