Blue Cog Blog Rotating Header Image

PyOhio Attendee Wannabe

PyOhio badge

Yeah, the badge says “attendee” but it turns out I have a conflict this year and won’t be attending. It’s a family matter that could not be rescheduled, and it’s important to me, so I will have to miss out on a terrific event around the Python programming language. I made it to one day of the two day event last year and was really hoping to make it for both in 2010.

So if for some reason you are reading this blog, and you have even the slightest interest in Python, and you will be in the Columbus area on July 31st and/or August 1st, you really should check out PyOhio. I would. Alas, maybe next year.

Tweaking the Bash Prompt

A little Saturday morning tweaking.

Based on this post at, I decided to adjust my Bash prompt by appending the following to my ~/.bashrc file:


function parse_git_branch {
  ref=$(git symbolic-ref HEAD 2> /dev/null) || return
  echo "("${ref#refs/heads/}")"


PS1="\n[$CYAN\u@\h:$BLUE\w$VIOLET \$(parse_git_branch)$BLACK]\n\$ "

The prompt will now show the name of the branch I am working in when the current directory is part of a Git repository. The original code used yellow, red, and green to highlight parts of the prompt. That messed with my mind when I ran RSpec and saw yellow and red when I was expecting all green. Rather than get used to it, I changed the colors. I also added some newlines to perhaps keep the command line neater when deep in a directory tree.

Terminal screen shot


[Update 2010-07-23]

After running with the above settings for a while I decided I don’t care for the colors in the prompt. Don’t need the square brackets either. I do like seeing the current git branch. That simplifies things a bit.


function parse_git_branch {
  ref=$(git symbolic-ref HEAD 2> /dev/null) || return
  echo "("${ref#refs/heads/}")"

PS1="\n\u@\h:\w  \$(parse_git_branch)\n\$ "


[Update 2010-09-25]

Okay, maybe a little color…


function parse_git_branch {
  ref=$(git symbolic-ref HEAD 2> /dev/null) || return
  echo "("${ref#refs/heads/}")"


PS1="\n$VIOLET\u@\h:\w  \$(parse_git_branch)$NO_COLOR\n\$ "

See. I told you it was "tweaking."

Columbus Ruby Brigade – June 2010

The Columbus Ruby Brigade met at Quick Solutions on 21 June, 2010.

Mike Doel who works at VacationView gave a talk on Capybara (a giant rodent that occasionally eats its own poop) and Capybara ("Son of Webrat"). One virtue of Capybara is that it facilitates testing the JavaScript bits on your site which Webrat cannot do.

Alex Moore presented IronRuby. Some IronRuby performance and RubySpec stats are at

Alex recommended the book IronRuby Unleashed by Shay Friedman and mentioned the not yet released IronRuby in Action by Ivan Porto Carrero and Adam Burmister.

After the meeting we stopped at the nearby Busty Rucket for a pint. I tried Lake Erie Monster from Great Lakes Brewing Co. and I have to say it was indeed a monster. Starts with a malty sweetness and finishes by biting your head off with some powerful hops. Not exactly my cup of tea, which is not surprising since it was a beer.

Columbus Ruby Brigade

Here is my linkdump from the May 2010 meeting of the Columbus Ruby Brigade:

The erubycon conference will be held Oct 1-3, 2010.

Ben Wagaman presented Core of the CoreReflection.

Greg Malcolm showed us ruby-debug (cheat sheet).

Kevin Munc presented Method of the Month (methods actually) empty?, nil?, blank?, and present?

Matt Forsythe gave a nice walkthrough on using regular expressions. was also mentioned.

Elizabeth Naramore gave an enthusiastic presentation on Technical Writing featuring Giant Inflatable Poop.

Joe O’Brien recommended a book by Jerry Weinberg – Weinberg on Writing: The Fieldstone Method

Crowdsourced Internationalization

I listened recently to a couple (not so recent) episodes of the Startup Success Podcast where the topic was “crowdsourced” testing. In episode 20 Bob Walsh and Patrick Foley interviewed Dave Garr and Darrell Benatar, founders of In episode 22 they interviewed Matt Johnston from uTest. These are both interesting services that facilitate a kind of hands on testing that would otherwise be too expensive for smaller (not so well funded) companies, whether they’re startups or not.

This also got me thinking about translation and internationalization. Since these services enlist testers from around the globe they could provide testing of translated versions of an application. There are crowdsourced translation services as well. It seems to me that combining such a service with a separate user testing service that puts the translation in front of many more eyes of native speakers could result in higher quality translated versions of an application. In the case where an application is built on a (non-web) platform that these services do not support, it might be worth mocking up menus and forms as web pages simply to make use of crowsourced translation and testing services.

At this point I’m just thinking out loud. This is not something I have a use for today but I wanted to make a note here for future reference. If anyone reading this (not that I think anyone actually reads the Blue Cog Blog) has experience in this area I’d like to hear about it.

Git Resources

I have been learning to use Git. The following is a list of resources I found to be useful, interesting, or that I want to explore further as I get into Git:

Website: Git – Fast Version Control System – The home of Git. When you think source code management it’s only natural to picture a monster eating trees.

Book: Book – Pro Git – by Scott Chacon – Concise coverage of using Git. You can purchase the book or read the whole book online.

Book: Safari Books Online: Version Control with Git, 1st Edition

Tool: msysgit – Run Git on Windows from a specialized BASH prompt.

[Update 2010-07-03: Changed the order of the list so the resources I have used the most are above this note.]

Website: GitHub – Secure Git hosting and collaborative development

Video: Webcast: Git in One Hour – Scott Chacon shows a lot of what he covers in his book in this screencast.

Video: James Gregory on GitJames Gregory does a screencast on Git as well.

Website: git ready – learn git one commit at a time

Article: An introduction to git-svn for Subversion/SVK users and deserters

Article: – Hosting Git repositories, The Easy (and Secure) Way – Gitosis.

Article: Deploying A Web Application with Git and FTP – Rob Conery shows one way he uses Git.

Article: Git For Windows Developers – Git Series – Part 1 – Jason Meridth – Los Techies – Describes using msysgit.

Article: Branch-Per-Feature – How I Manage Subversion With Git Branches – Los Techies

Article: Git's guts: Branches, HEAD, and fast-forwards – James Gregory's Blog – Los Techies

Article: Martin Fowler – Version Control Tools – Not about Git specifically.

Article: ReinH – A Git Workflow for Agile Teams

Article: Jer on Rails – My Git Workflow

Article: – Git Aliases Rock

Article: GitHub – Guides – Put your git branch name in your shell prompt

Article: A Note About Git Commit Messages |

Article/Tool: Michael Bien's Weblog – NetBeans GIT support – I have not tried the NBGit plugin yet but I have been playing with NetBeans a bit.

Podcast: Hanselminutes Podcast 108 – Exploring Distributed Source Control with Git

Tool: git_remote_branch

Tool: tortoisegit – Maybe like TortoiseSVN. I have not tried it.

Tool: EGit – Git plugin for Eclipse. I have not tried it.

Keith Hill’s Effective PowerShell Series

I’ve been aware of PowerShell for some time now but I haven’t had the need to use it much. As one who has written many batch files over the years I want to be ready to take that sort of automation to the much higher level PowerShell makes possible.

Windows PowerShell MVP Keith Hill's Blog is a great resource for learning PowerShell. He has written a series of posts titled "Effective PowerShell" and combined them into Effective Windows PowerShell: The Free eBook as well.

I just ran across these today and I look forward to exploring each in the series.

Google Docs Backup with GDocBackup

I was searching for a simple way to make local backups of my Google Docs and found gdocbackup on Google Code. According to the project docs it runs on Windows and Linux (with Mono) so I tried it on both Windows 7 and Ubuntu 9.10 Desktop.

On the Windows 7 PC, I downloaded the installer from the Google Code project page, installed the application, and ran it. After configuring the backup directory and export formats for the documents I executed the backup and it worked fine.

Running it on Ubuntu took a bit more setup since I did not have Mono installed. First I installed the required Mono packages.

sudo apt-get install mono-runtime libmono-winforms2.0-cil mono-devel

The mono-devel package installs the mozroots utility needed to install a certificate required to access Google Docs (see

Next I imported the Mozilla root certificates into Mono (see

mozroots --import --sync

I downloaded from the gdocbackup project’s Downloads page and extracted it to a GDocBak directory I created in my home directory. I also created a Data directory under GDocBak to hold the backup files. I opened a terminal in the GDocBak directory and ran GDocBackup.exe in Mono.

mono ./GDocBackup.exe

At this point the GDocBackup application worked the same as in Windows 7. It looks a little different but it downloaded the documents without errors. Now I just need to automate the backups.

COhPy Meeting – December 2009

Here is my link dump from last night’s meeting of the Central Ohio Python Users Group:

The scheduled presenter, Brian Costlow, didn’t make it. Something about work being more important than a Python meeting. Priorities?

To fill the void, Eric Floehr showed a weather-related web application he has been working on that is built with Django. The app uses HTMLCalendar (Django, calendar – Stack Overflow).

Mark Erbaugh showed the web application he built using He also uses to generate PDF files.

I had not run across this before: 29.2. zipimport – Import modules from Zip archives.

Catherine Devlin presented reStructuredText, S5, and Sphinx.

A few related links:
reStructuredText on Wikipedia
Quick reStructuredText
Easy Slide Shows With reST & S5
reStructuredText Primer — Sphinx v0.6.3 documentation

Catherine also mentioned:
PyCon 2010 Atlanta – A Conference for the Python Community
Python Package Index : PyPI, AKA the Cheese Shop

Also discussed was the construction of the COhPy web site:
Code at cohpy —
Using Google App Engine.

Finally, I haven’t used decorators in Python (nor in my house) but I’d like to read up on that:
PEP 318 — Decorators for Functions and Methods
Dr. Dobb's – Python 2.4 Decorators

CbusPASS – November 2009

Last night I attended the CbusPASS (that’s the Columbus chapter of the Professional Association for SQL Server, aka the Columbus SQL Server Users Group) meeting. I’m not using SQL Server much these days so the take home value isn’t immediate for me. I’m interested in databases in general, I have used SQL Server in the past, and I expect I will use it even more in the future so I do enjoy these meetings. The remote presentation almost failed due to audio problems but fortunately a member of the group had a notebook PC that worked for both audio and video. Tim Ford presented on SQL Server Dynamic Management Views and Dynamic Management Functions. What follows is basically a link dump from my notes:

Group leader: Jeremiah Peschka, SQL Server Developer
Jeremiah Peschka (peschkaj) on Twitter

Tim Ford’s web site SQLAgentMan
Tim Ford (sqlagentman) on Twitter

Tim writes for, among other things.

Tim said he will post the slides and examples from the presentation at SpeakerRate.

MSDN: Dynamic Management Views and Functions

SQLTeam: Dynamic Management Views

SQLTeam: SQL Server – Find missing and unused indexes

MSDN: Reorganizing and Rebuilding Indexes

Backup your Resource Database.

There was discussion after the meeting about PowerPivot, previously code named Project Gemini, and the PowerPivotPro site.