The Moderator Problem

Date Tags #python

As the #3 ranked contributor on http://programmers.stackexchange.com, I've provided my share of advice. 554 Answers to be factual about it. The moderators, however, have decided that I'm no longer welcome. It was simply shocking to be firmly (but politely) shown the door.

The issue was Python. Specifically …

more ...

Interesting...

Check this out: http://hyperpolyglot.org/scripting.

It's a side-by-side comparison of PHP, Perl, Python, Ruby. I'm not sure why, but it seems sort of cool.

Things like "offside rule" to describe indentation in Python are confusing at first. The "regions which define local scope" section on Python makes precious …

more ...

Is Django Suitable?

I got a long list of requirements from a firm that's looking to build a related family of web sites. They were down to a Django vs. Ruby-on-Rails decision.

As you can see, they've done their homework in thinking through their needs.

I grouped their "high-level requirements" into several categories …

more ...






Apache Log Parsing

How much do I love Python? Consider this little snippet that parses Apache logs.

import re
from collections import defaultdict, named tuple

format_pat= re.compile(
   r"(?P<host>[\d\.]+)\s"
   r"(?P<identity>\S*)\s"
   r"(?P<user>\S*)\s"
   r"\[(?P<time>.*?)\]\s"
   r'"(?P<request>.*?)"\s'
   r"(?P …
more ...