Python’s namedtuple class provides a simple, lightweight way to make simple immutable classes. If you’re using dictionaries to pass objects around, consider using namedtuples instead: they’re easier to read and provide the benefits of classes such as methods and properties. With namedtuples, you’ll have cleaner code with essentially no additional work. The Python namedtuple docs include [...]

Bolloxed sharing in Google docs

Google’s implementation of document sharing is completely fouled up. The following is a slighted redacted version of a (formerly) internal email to colleagues to tell them what I learned about document sharing based on interactions with their customer support and folks on the net. Bookmark on DeliciousDigg this postRecommend on Facebookshare via RedditShare with StumblersTweet [...]

Monitor your router with (r)syslogd

I’m having lots of dropped connections at home. Unfortunately, consumer-grade routers typically have poor monitoring facilities out of the box. Unix/Linux environments have long been able to aggregate logging messages across multiple hosts through a service called syslog. Many routers use embedded Linux and support sending messages to remote systems via syslog. (Emailing logs is supported, but [...]

My hosting provider, HostMonster, uses cPanel to enable account administrators to configure their domains and services. By default, Hostmonster and cPanel place web data for the primary domain in ~/public_html/, with subdomains and “add-on” domains as subdirectories therein. That means that files for the primary domain are comingled with the document roots of other domains. The incongruency [...]