A nice little refactor


I was in some code I haven't visited in a while. And I came upon something I coded months ago. It used a list comprehension to test every element of a list. If the result was empty, it signaled an error. Otherwise, it used result[0]. Gah! That's so retarded! Was I asleep when I wrote … Continue reading A nice little refactor

Replacing Redis with a Python Mock


tl;dr When writing tests, mock out a subsystem if and only if it's prohibitive to test against the real thing. !tl;dr Our product uses Redis. It's an awesome technology. We've avoided needing Redis in our unit tests. But when I added a product feature that made deep use of Redis, I wrote its unit tests … Continue reading Replacing Redis with a Python Mock

An awesome engineer makes me scratch my head


I know an awesome software engineer. He's very smart and a joy to work with. He's platinum-grade material, and I'd work with him again in a femtosecond. On rare occasions, this Pythonista among Pythonistas and Djangonaut among Djangonauts writes code that makes me scratch my head. He'll do this: The one-line function that only does … Continue reading An awesome engineer makes me scratch my head

IP Street’s Senior Developer opening now more about Search, less about Python/Django


After some job market feedback and chin-scratching, I've changed our Senior Developer opening's job description. Now it's less about Python or Django, and more about search technologies, specifically full-text and LSI search. We hope candidates will have some experience with Python or Django, but search technology experience (e.g., tuning, tokenizers, parsers, relevancy rank tweaking, aggregates and pivots) in … Continue reading IP Street’s Senior Developer opening now more about Search, less about Python/Django

IP Street is looking for a Senior Developer


We're looking to hire two lucky people who desire fame and fortune. Here's the Senior Developer opening: Founded in 2009, IP Street develops and markets software to help corporations, law firms, financial research firms, and government agencies better analyze patent-related information.  Our goal is to make IP data easy to get, use, and understand, so … Continue reading IP Street is looking for a Senior Developer

Bad dependencies


Pro tip: When you rely on Fabric to provision your servers, and your fabfile installs packages from the Cheeseshop, and package D (which you specify) depends on package C, and the Cheeseshop's dependency rule is wrong, and it causes the wrong version of package C to be downloaded and installed, and the version number it should … Continue reading Bad dependencies

OS X Lion: My Top Nine Annoyances


Apple's OS X Lion is a great product. I'm glad I upgraded. But it's got some annoyances. My first Mac was a version 1, back in 1985. After that, I used DEC operating systems for a few years, and then used Microsoft Windows exclusively throughout the 1990s and most of the 2000s. I switched back … Continue reading OS X Lion: My Top Nine Annoyances

Python Testing Cookbook: A review


I bought "Python Testing Cookbook" by Greg L. Turnquist, published by Packt. The good. I liked the cookbook recipe approach. Each recipe has the same headers: Its name, "How to do it," "How it works," and "There's more." This may not sound fancy, and it isn't, but it works. The writing's good (albeit sometimes elementary — … Continue reading Python Testing Cookbook: A review

Python interpreter tricks


John Anderson has documented some nice Python interpreter tricks on his blog. Including a .pythonrc.py file hack for Djangonauts: For Django developers when you load up the ./manage.py shell it is nice to have access to all your models and settings for testing: See his post for more interesting Python tips. Me, I'm enabling autocomplete … Continue reading Python interpreter tricks

Python awesomeness that sneaks up on you


I recently discovered two useful modules in Python's library. At work, a process needed to input and parse .csv files. Csv files are challenging because no specification exists, although there are de facto rules — which .csv-generating applications sometimes violate. I proceeded to write a specialized parser. It handled only our .csv files (which are used … Continue reading Python awesomeness that sneaks up on you