Ever since I learned regular expressions, they have been one of my most beloved features of any language, especially Python. I know lots of people just cringe at the thought of having to sit down for 30 minutes to hash out a 40 character pattern, but it's too powerful to pass up. Up until recently, my process was just to think the problem through and slowly work up the pattern until I got something that worked. Debugging consisted of merely pulling pieces out and trying them individually. That was until I discovered the hidden Python regex debugging feature a couple weeks ago on Stack Overflow, thanks to BatchyX.

Posted by Sean Stoops on October 28, 2008 | 0 comments

For the past couple years, I've switched back and forth between TextMate and VIM as my primary editor. Lately, I've been on a huge TextMate kick and decided to see what all I could do to customize it. Python, being my primary language, is what I wanted to write my scripts in. However, most of the TextMate bundles are written in Ruby (a language I don't at all understand -- it looks crazy to me). After much digging around in the source of some of these bundles and pecking through Ruby to see how it's interacting with TextMate, I was able come up with a little script.

Posted by Sean Stoops on March 20, 2008 | 0 comments

On several occasions, I (and the templaters on my team) have needed a way to do datetime comparisons from within a template. The first example is testing if the pub_date on an object is today. Usually, I just end up writing a helper method on the model to do this; something like is_today. However, we've run into several instances where this wasn't possible or it would have just been too much of a mess to write these helper methods on every model. I then decided to create a little templatetag to take care of this for me.

Posted by Sean Stoops on March 8, 2008 | 0 comments

A few days ago, I was generating some XML to feed a video player. I would grab a list of the last 20 uploaded videos, then grab the categories associated with each video to create a set of "tabs" for the player. For instance, five of the videos may belong to the "high_school_football" category, so we would have a "High School Football" tab containing five videos. I then needed the categories to be ranked by the number of videos in each.

Posted by Sean Stoops on October 6, 2007 | 2 comments

A couple weeks ago, I had the pleasure of querying a MSSQL 2000 database from Solaris using python. It was a bit of a hassle to get it all setup so it finally worked like I needed. I spent a couple days researching before I was finally successful. I thought I would try to remember my experience and share it here.

Posted by Sean Stoops on October 5, 2007 | 0 comments

The SigB Links:

External Links:

Archives

RSS feeds

A Django project.
Made with vim