Articles by Eric

Solipsistic Backups

By Eric

I noticed this banner ad the other day from Mozy:

Slow Down!

Um... I actually do prefer to have background processes (such as backup) defer to the real work I'm trying to do on my computer.

Read more...

Run/Debug as root in PyCharm

By Eric — 4 minute read

I'm working on a Python project that needs to run as root in order to work properly. Previously I've just run the whole PyCharm IDE as root, but this has some down-sides, and I think I have a better approach now.

The biggest hassle with running the IDE as root …

Read more...

Password Management

By Eric — 3 minute read

It's been two years since Wired's Mat Honan declared the age of passwords over, but somehow the successor hasn't yet found its way to the throne. That being the case, this is how I currently manage my passwords.

The challenge with security is that it tends to be in direct …

Read more...

git-flow with Cmder

By Eric

"Git Flow" is a branching model using the Git version control system. There is also a set of extensions for Git that make using Git Flow easier, but there aren't installation instructions specifically for use with the excellent cmder Windows shell replacement. Here's how to do it...

These instructions are …

Read more...

Public Key Cryptography Made Easy

By Eric — 2 minute read

Learning about cryptography can be discouraging. You get so bombarded by "don't invent your own", "you're doing it wrong", and "even really smart people screw this up" that you wonder why you even bother to try. For me, the answer is because if you don't learn it, someone who knows …

Read more...

Your right margin is telling you something

By Eric — 1 minute read

The recommendation to keep lines widths less than 80 characters is a surprising part of the Python style guide (PEP 8). Really, 79 characters? Is it still the 1980's in Python-land? Maybe it's time to upgrade that monochrome CRT and get some screen real-estate.

Acting a bit on faith, and …

Read more...

The First Rule of Test Code

By Eric

Software is kind of cool in that you can write programs that verify that your other programs work correctly. These testing "meta programs" tend to get short-shrift though, because it's not like the code is actually part of the shipping product. So who cares about cleanliness or good style or …

Read more...

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...