Monthly Archives: January 2010

Community-Based Social Marketing

I just finished reading this quick-reference guide to Community-Based Social Marketing by Doug McKenzie-Mohr. This is a condensed version of the concepts from the online book, which appears to be an updated version of the book Fostering Sustainable Behavior from 1999.

With an eye towards the dorm energy competition we are planning at UH, I found the concepts very useful and it seems like our initial requirements for the website are headed in the right direction. For example, we plan to have participants make public commitments online through the site, in particular commitments that should be visible to other residents on the participant’s floor. We also plan to make the commitments very public via large-screen displays in the lobbies of the dorm(s). This is in keeping with McKenzie-Mohr’s recommendations on the use of commitments.

One member of the design team (Shanah) suggested that we have a weekly individual winner for each floor, so that each floor would have someone to look for assistance and encouragement. This is a great example of using the concept of “norms” to encourage people to alter their behavior.

The current design calls for extensive incentives in the form of coupons, pizza parties, and maybe iPods. McKenzie-Mohr cautions that removing incentives (which will happen at the end of the competition) can actually reduce internal motivation that existed before the provision of incentives. It will be interesting to see what happens to electricity usage after the competition is over.

The other lesson we need to take heed of us the use of focus groups and possibly surveys while we are designing the competition. We need to know what our target audience thinks about the competition, and the design of the website.

The Community-Based Social Marketing website has more information and lots of links to articles and case studies.

Advertisements

Snow Leopard Server upgrade hoses Apache config

I recently upgraded an Xserve running Mac OS X Server from 10.5 (Leopard) to 10.6 (Snow Leopard). The upgrade was mostly uneventful, except for the web server configuration. We have a lot of manual changes (two instances of Plone using mod_rewrite, some local directories that are served up as is, and user directories). This is a rundown on the changes I had to make after the upgrade was complete to restore web service.

As part of the upgrade, Snow Leopard Server runs a script that reads the Apache config files and tries to bring them into compliance with the default configuration under Snow Leopard. The result of all the configuration munging (for all services) can be found in /Library/Logs/Setup.log. I found several problems with the changed Apache configuration. Kindly, the configuration munging script leaves unmodified copies of all the files it modifies with the suffix “.saved-Pre-SnowLeopard-unmodified”, so it is straightforward to diff the old configuration with the new one to see what changed.

First, mod_userdir was commented out in httpd.conf, preventing “~username” URL rewriting. Snow Leopard also adds an “mod_apple_userdir” (which supposedly improves security of this feature [PDF]), but also left that disabled. So by default, “~” URLs just stop working, with no notification beyond a bullet point in one of the supplemental PDFs. This is poor form, IMHO. I ended up re-enabling mod_userdir.

The next problem was the configuration file munger decided to remove all RewriteRule lines from each of the virtual host configurations. Obviously, this broke many things, but it was easy enough to copy each line back from the original configuration.

Even after fixing those issues, web service wasn’t working properly. I noticed that there was a “0000_any_80_.conf” configuration in the “sites” subdirectory (in addition to “0002_any_80_.conf”), which wasn’t being used in Leopard, but appeared active in Snow Leopard. I moved this config to the “sites_disabled” directory, and that made things much better. I’m not sure if this was some vestige of an upgrade from Tiger to Leopard, but it was causing problems.

Finally, the config munger added “ServerAlias *” to my first virtual host configuration (prefixed with “0000”). While this might be appropriate if this was the default host, as a virtual host it grabbed all URLs and prevented them from matching virtual hosts with later sequence numbers. Removing this line fixed the last issue (which was that all requests went to the first virtual host).

Admittedly, Apple faces a difficult proposition in performing automated server OS upgrades. Many of the OS services are based on industry standard open source packages that overwhelmingly use custom text configuration files. Advanced administrators will frequently want to edit those files by hand to installĀ  3rd party open source packages that build on those services. But Apple also provides GUI tools to make things easier, tools that must read and write the configuration files. This leads to the desire to keep the configuration files canonicallized for easier parsing. So at the end of the day, some poor engineer has to write an upgrade script to read all these (possibly arbitrarily modified) configuration files and bring them into line with the versions that ship with the new OS version.

That said, it seems like the upgrade scripts could do a better munging job. Turning off modules is uncool, as is dropping lines from the config on the ground.