Bad APIs: Deceiving Your Readers

By Eric — 1 minute read

APIs are user interfaces for programmers. I came across a function recently that had a couple of user interface issues that serves as a great example of this principle.

The function is internal to an HTTP client class, taking care of the common logic independent of the HTTP method, and …

Read more...

SQLAlchemy with Python 64-bit on Windows

By Eric — 2 minute read

While hooking up SQLAlchemy for a web project, I kept running into attribute errors for 'session_registry'. I figured I was doing something wrong, so I thought I'd just walk through the tutorial as a sanity check.

I was, apparently, insane.

>>> u = session.query(User).filter_by(name='ed').first()
Traceback (most …

Read more...

Python Packaging (2013 Edition)

By Eric

About a year ago, I set out to get a solid working understanding of Python packaging, resulting in a lengthy blog post of what I learned. There have been some significant course changes over that year such that my original post is wrong in several regards.

Here's a summary of …

Read more...

Getting pip into your Python 3 venv

By Eric — 1 minute read

Python 3.3 includes a built-in equivalent to the popular virtualenv tool for creating isolated Python environments. One difference with the built-in venv is that it doesn't automatically install pip as virtualenv does. While I can understand the decision (given Python's volatile packaging situation), it isn't very convenient.

Here's a …

Read more...

UI Gem: Android Calendar Time Picker

By Eric — 1 minute read

It's been available for a while now, but every time I use the new Android calendar app's time controls, I'm so impressed by their elegance.

Previously, setting the time for a calendar event involved some simple numeric up/down spinners. Setting the hour worked reasonably well, but if your event …

Read more...

Security Camera Stills As Art

By Eric

Sure, you can schlep a camera around looking for beautiful things to photograph, or you can just let your security camera do the work and get some serendipitous art.

Color Variance Triptisch

Color Variance Triptisch

Bleak Winter

Bleak Winter

Darn Suction Cups

Darn Suction Cups

Watcher

Watcher

Flight

Flight

Read more...

Eric's Toolset

By Eric — 2 minute read

These are some of my favorite software utilities for development and life in general. Everything listed here is free.

IDEs

PyCharm Community Edition (JetBrains) - A feature-rich IDE and debugger for Python built on the IntelliJ platform, with the free community edition having arrived in 2013.

Windows

Notepad2 (Florian Balmer) - This …

Read more...

Dressing the Database in Big-Boy Pants, Part 2

By Eric — 8 minute read

Last time I wrote about using dbdeploy to easily create local databases and to automatically apply changes to the development, staging and production databases. The other change I made recently was to add stored procedure unit tests.

I looked briefly at frameworks specifically for testing databases, but didn't see a …

Read more...

Dressing the Database in Big-Boy Pants, Part 1

By Eric — 5 minute read

I've mentioned previously that I'm in no danger of being mistaken for a DBA, but I've recently made a few changes in how we work with our database that have upped the maturity level a bit.

Previously we had a single development database shared by all. This is an inflexible …

Read more...

A word is worth a thousand pictures

By Eric

I found this sticker inside one of a pair of new shoes:

First Picture

I didn't have any idea what this was saying. My wife suggested it meant that I ought to watch out for diamonds... and maybe nets.

I found this sticker in the other shoe. I think it means the …

Read more...