So, I had to take a break from doing the Code Katas just as I was getting to the really cool one about Bloom Filters. The reason for the unexpected break from kata-ing was that I had a project thrown into my lap. I say “project” not because it was some huge thing that needed…
Author: bkjones
2009 Python Meme
Heard about this from Tarek, and you can find more of them on Planet Python (where I found Tarek’s post). What’s the coolest Python application, framework or library you have discovered in 2009? Probably Tornado. Tornado is an interesting application, because it blurs the line a bit between a framework like Django and a traditional…
CodeKata 4: Data Munging
I’m continuing to take on the items in Dave Thomas’s Code Kata collection. It’s a nice way to spend a Sunday night, and it’s a good way to get my brain going again before work on Monday morning. It’s also fun and educational 🙂 CodeKata 4 is called “Data Munging”. It’s not very difficult data…
PyYaml with Aliases and Anchors
I didn’t know this little tidbit until yesterday and want to get it posted so I can refer to it later. I have this YAML config file that’s kinda long and has a lot of duplication in it. This isn’t what I’m working on, but let’s just say that you have a bunch of backup…
Python Code Kata 2: Karate Chop (Binary Search)
I’ve decided it’d be fun to go through the Code Kata put together by Dave Thomas, co-author of The Pragmatic Programmer, and co-founder of Pragmatic Programmers, LLC (publishers of the finest tech books on the market right now; they can’t expand their selection fast enough for me). Anyway, the first Code Kata, while being truly…
Python, PostgreSQL, and psycopg2’s Dusty Corners
Last time I wrote code with psycopg2 was around 2006, but I was reacquainted with it over the past couple of weeks, and I wanted to make some notes on a couple of features that are not well documented, imho. Portions of this post have been snipped from mailing list threads I was involved in….
A Couple of Python Tools for Tornado or AMQP Users
Hi all, Not lots of time to blog since starting my new gig as Senior Operations Developer at MyYearbook.com (which is pretty awesome, btw), but wanted to let anyone who’s interested know about a couple of tools I’ve released on github: bunny is a CLI tool for doing quick tests and simple operations on an…
Way Better Python Indentation In Vim
Just wanted to share this tip I just stumbled across: If you code in Python, and in your ~/.vimrc file you have ‘set smartindent’, change that to ‘set nosmartindent’ and add the following two lines (I’m told it can be combined into a one-liner, but I use two lines, so…) filetype plugin on filetype indent…
Python, Creating XML, Recursion, and Order
I love being challenged every day. Today I ran across a challenge that has several solutions. However, most of them are hacks, and I never feel like I really solved the problem when I implement a hack. There’s also that eerie feeling that this hack is going to bite me later. I have an API…
It’s so much easier now
The information superhighway’s construction has benefited me in ways I’ve only been made conscious of this weekend. I’ve had a lot of time to myself this weekend, and decided to spend a few solid 1-hour blocks playing guitar. Oh, I still play around the house here and there, but usually if I can get in…