# Blog Archive

Viewing page 1 from archive of June 2013

# The UX of Coupon Codes

## How to (try to) avoid confusion and apprehension.

Lately, I have been entering a number of coupon codes on the web, and have found them to be infuriatingly lacking in one respect: the character set used for the codes is not easy to type.

I'm sure we have all questioned at one point if a character in the code was supposed to be a 0 (zero) or O (upper-case letter O), or a 1 (one), I (upper-case letter I), or l (lower-case letter L). Usually you just pick one, and usually you get it wrong the first time.

I find it particularly strange, that Starbucks would go so far as to recognize this problem, but not actually fix it:

As a developer, there are a few increasingly dramatic ways to deal with this.

Posted . Categories: .

# Nginx May Cut You Off Early

## How the default configuration bit me.

I very recently launched shadowsinthegrass.com, a crowd-funding website for a short film I am working on. As a donator, you are able to upload an avatar to be presented with your credit. I had limited the file size to 2MB... or so I had thought.

Underneath, the site is built with Flask, served with Gunicorn, and behind an Nginx reverse proxy.

Unfortunately, I received reports that some uploads were failing and reported as "Error: undefined" to the user. Strangely, it didn't seem to be an error in the Python app, as I was not receiving any tracebacks when this error occurred.

It turns out that Nginx has some default configuration that I wasn't expecting.

Posted . Categories: .

# My Report Card

The second GitHub Data Challenge recently finished, and GitHub just announced the winners.

The first place went to The Open Source Report Card, which generates an English prose summary of your GitHub activity (from January to March 2013), and provides some charts to back it up.

My report card for that period is somewhat eerie (to me):

Mike is a serious Pythonista (one of the top 13% most active Python users) who loves pushing code. Mike is a nine-to-fiver who seems to work best in the mid-afternoon.

[...]

It seems—from their activity streams—that Mike and westernx are probably friends or at least virtual friends. With this in mind, it's worth noting that westernx is less foul mouthed

I would love to see a chart about my tendency to swear in commit messages.

Posted . Categories: .

# RenderMan Textures from Python

In order to better understand the guts of Python and RenderMan, in the past I have implemented a number of proof of concept projects extending or embedding each. Previously, I combined my efforts by embedding Python into RenderMan as an RSL shadeop so that shaders could be written in Python!

Unfortunately, that code is lost to the ages, so I decided to revisit my efforts and produce something that could actually have applications: using Python as a source of texture data for RenderMan.

Posted . Categories: .

Thanks @github for publishing DMCA notices! This comment on the Flat UI takedown is particularly good -> https://github.com/github/dmca/commit/735e17614cca63102b8414ed2846c3effbfe9535#commitcomment-2757178

@mikeboers on . Visit on Twitter.

#TIL that the @Heroku filesystem is unsorted, which can cause puzzling errors if, like me, you had assumed files always came back sorted.

@mikeboers on . Visit on Twitter.

Added http://google.com/search?q=%s&btnI (i.e. I'm Feeling Lucky) as a search engine, since it's right most of the time; this is magical.

@mikeboers on . Visit on Twitter.

# Anatomy of a Maya Binary Cache

## DAGs all the way down.

On a limited number of occasions I have had need to reach directly into some of the raw files produced by Autodesk's Maya. There isn't much documentation I could find on the web, so I will try to lay out what I have learned here.

The generic structure is based on the IFF format, but with enough small changes to warrant this exploration (with lots of kudos to cgkit's implementation, which helped with some of the gritty details).

Posted . Categories: .

# Resources for Learning Python

## We can do this the hard way, or the easy way...

I am often asked my opinion on how to get starting with programming, and usually with Python in particular. I usually outline three different routes that must be taken: learning how to work with Python, learning best practises for Python, and reading lots of good code from others.