17,500 Anagrams

Did you know that there are 17,500 anagrams for “George Hotelling”? If you are doing the math right now, you’ll probably come up with a different number because we are working off different word lists. For example, my word list includes “Google”. Did you know “Googler Eel Thing” is an anagram for “George Hotelling”?

Now that I have a list of anagrams, I wanted to automate changing my Twitter username to an anagram periodically. I set up a script to do that, but had to choose the frequency. After messing around for a bit, I realized that 17,500 was almost exactly the number of hours in 2 years (17,520 or 17,544 hours, depending on which years). So, for the next 2 years (or until Twitter blocks my script) (or until my bot fails) (or until I give up) you can pop over to @revgeorge for your hourly anagram fix.

Code is also up on GitHub.

“Rhino Egg Lot Glee” signing off.

CitizenSpeak featured in new book

It turns out that CitizenSpeak is really making the rounds right now. The latest news is that it’s included in a new book: Momentum: Igniting Social Change in the Connected Age by Allison Fine.

The book includes a description of how a Philadelphia organization used CitizenSpeak and other online organizing tools to rally their community around their cause. You can read more on CitizenSpeak’s blog or by using Amazon’s Online Reader.

I won the Pizzigati Prize for my work on CitizenSpeak!

I’m completely stoked that I won the first annual Pizzigati Prize for non-profit open source software for my work on CitizenSpeak! The family of Antonio Pizzigati established the prize to reward open source developers in the non-profit sector.


First off, thank you Jenny for all your love and support that made all of this possible. I want to thank the Pizzigati family, the advisory panel and the Tides Foundation—especially Sarah Lohrius—for this tremendous honor. I also want to thank Jo Lee for guiding the project, Eric Gundersen at Development Seed for his design work and technical help with the site and Pablo Calamera for developing the original CitizenSpeak. It’s because of all of you and all the people I’m forgetting that CitizenSpeak is what it is.

I know it’s cliché to say it’s just an honor to be nominated, but come on, look at the other finalists! CivicSpace and CiviCRM are huge successes, and both are part of the ecosystem that CitizenSpeak swims in. Another developer for Martus won a MacArthur Genius award! How can you not be excited to be in such heady company?

Finally, note that this is the first annual award. Open source developers: I strongly recommend you look in to submitting your work for the 2007 award. Anyone interested in non-profit tech: The Tides Foundation is looking for ways to make next years award even better, and they need your help. They’re looking for donations (they are a non-profit, after all), people to spread the word about the award, and feedback from the community; so go to their forums and let them know what you think!

CitizenSpeak Colophon

CitizenSpeak: your campaign
There were two projects in getting CitizenSpeak up and running: Developing the CitizenSpeak module and creating the CitizenSpeak site. While they were intertwined, they also provided distinct educations.

I found that the I18n module can serve dual purposes; it provides the Spanish language interface to the site as well as allowing us to customize standard English language messages. This is handy if you want customized labels for things, or your site isn’t as averse to capital letters as the Drupal project.

As an aside, only recently did I learn that name “I18n” is an abbreviation for the “Internationalization,” since “nternationalizatio” is 18 letters. I guess I just never bothered to count.

I was also happy to learn how to customize the output of other modules. The PHPTemplate and Smarty engines allow designers to customize how specific node types are displayed, what information is available to templates, and override any theme() call.

There are some lessons learned from what I did wrong, too. The first was choosing Smarty as the theme engine. While I’ve had good luck with Smarty in my own projects, the majority of work being done with Drupal seems to use PHPTemplate.

There’s nothing wrong with Smarty, the PHP library. For Drupal, however, there is a lot more support available for PHPTemplate, and PHPTemplate more likely to be kept up to date. Drupal’s PHP functions are more than adequate for theming, which negates Smarty’s advantage of having view-centric functions available to it.

I also wish I had created a site-specific module. A module is a great place to create custom pages and blocks, to use callback hooks like hook_nodeapi() and hook_user(), and to collect helper functions. A lot of things I did by customizing the display interface and variables could have been more elegantly handled by simply creating a module for the CitizenSpeak site and stashing everything there.

That about wraps up my posts on building CitizenSpeak. Please visit the site (maybe even click that donate button on the right), and thanks for reading.

Developing the CitizenSpeak Module

CitizenSpeak: your campaign
Yes, another CitizenSpeak post. I’ll probably do one more after this about how the site is configured, and then updates as events warrant. This time I want to talk about developing the module.

I’ll admit that it’s been a while since I started working on the CitizenSpeak module. Part of it was that I was donating a lot of the development effort and only getting paid for implementing the site. That means that keep-George-off-the-streets programming took priority over this.

Another part was that I hit a mental wall with Drupal’s module format. Having a monolithic .module file was not working for me, but I found that when I split it into several topical files it got much easier to deal with. If you look at the source code you’ll see that I’ve split functions into files by topic.

I even went one step further. A lot of Drupal hooks send an operation as the first parameter, take a look at hook_user() for an example. If you look at the CitizenSpeak implementation of hook_user(), it’s just a stub that calls other functions:

function citizenspeak_user($op, &$edit, &$user, $category = false) {
$function = "citizenspeak_user_" . $op;
if (function_exists($function)) {
return call_user_func_array($function, array($edit, $user, $category));
}
}

I then moved all the functionality out of giant switch() statement suggested by the docs and into individual functions in citizenspeak.user.php. The function arguments are redundant, but the manageable code is worth the repetition.

By moving everything out of the core file, I found it a lot easier to deal with the development and get into the groove. If I had one thing to tell someone getting started with Drupal module development, it would be that.

Looking ahead at the development, there are two big tasks. The CitizenSpeak module needs an API that will allow other modules to interact with it. The goal is to allow other modules to hook into the forms, campaign sending and reporting. One of the big things that everyone wants is CiviCRM integration and the CitizenSpeak API hook will allow that to happen. The other big task is to update the module for 4.7, which features new email and form APIs.

More About the CitizenSpeak Update

CitizenSpeak: your campaign
In the announcement yesterday I wrote that I would be blogging more about CitizenSpeak, and with this post the prophesy has come to pass.

Organizations have had tools like Capitol Advantage to create advocacy campaigns for quite some time. Those tools aren’t necessarily accessible for small or ad-hoc efforts due to the cost involved. CitizenSpeak offers a subset of their features — email-only campaigns and reporting — for free.

Now, when a blogger gets a bug up their butt about something that needs public outcry to fix (i.e. a proposed porch-couch ban in Ann Arbor, MI) they have a tool that will let them create a campaign and send all their readers to join in.

Even better, since its a GPL licensed module, anyone with a Drupal or CivicSpace can create their own campaign center. It can also build on things we chose to leave out of the site; things like categories, comments or any of the add-on modules that Drupal supports.

I can’t wait to see what other sites do with the module.

CitizenSpeak Re-launches!

CitizenSpeak: your campaign
Remember when I begged for money months ago? Well it payed off, and now the new CitizenSpeak has re-launched.

Briefly, CitizenSpeak is a site that allows people to create and host email campaigns. It allows ad-hoc organizing around any issue that puts a bug up someone’s butt. I’ll probably blog more about it later this week. In the meantime, check out the site or the open source Drupal module that I built for the site.

Big thanks to Jo Lee for being CitizenSpeak, Eric Gundersen at Development Seed for his fantastic design work and Embolden Design for providing hosting!

Notes on mod_security vs. spam

I set up mod_security, a web firewall for Apache, to deal with comment and trackback spam on my server. This isn’t a complete guide to mod_security, just the information I wish I had when I started.

I’m using mod_security because my server has lots of different blogging tools installed, and there’s no way to centrally protect them all. This won’t take care of all comment or trackback spam, but I’m hoping it will greatly reduce the amount we get. Also, I’m expecting mod_security to be faster than other tools since it stays in memory and doesn’t hit the database.

Continue reading “Notes on mod_security vs. spam”

Give to CitizenSpeak (and me!)

CitizenSpeak is a site that allows people to create email campaigns targeted at change, like the ultra-successful EFF campaign to stop the Broadcast Flag (that the EFF runs, not CitizenSpeak). It’s a tool that anyone can use, and activists at any level can use it to focus their community’s voice. And it’s free.

If you went to the CitizenSpeak site you might notice it sucks a little. There are frames and popups and non-obvious permalinks. I say that because I’m actually working on changing that.

I’m rebuilding the CitizenSpeak site with the main functionality going into a CivicSpace module, which we’ll be releasing under an open source license. That means that sites running CivicSpace (and Drupal) will be able to host their own campaigns, customized to the needs of the site. And yeah, the CitizenSpeak/CivicSpace thing does get confusing sometimes.

But here’s the thing: I need to make (some) money on this. You see, I’m a contractor now and need to occasionally feed and clothe myself. CitizenSpeak is looking for people who want the module to help them fund me. You can make a tax deductible donation to help pay for the development work. You can also see the development plans at the CitizenSpeak development wiki, and when I’m ready for input from people I’ll post the link to my development there too.

PostedElsewhere

Another day, another Movable Type plugin. This one is kind of complex, so let’s start with the problem as outlined by Matt Haughey:

In spring of 2003, I started an experiment where I would trackback all the comments I left on other sites back to a special category here, so I could keep a public, running tally of offsite comments. It was a pain and as much as I tried to automate it with custom submit forms and javascript bookmarklets, it was a manual operation and I am busy/lazy enough where anything remotely manual gets dropped eventually.

He later suggests that RSD be used to collect these TrackBacks.

PostedElsewhere sends those TrackBacks automagically. It uses RSD to identify where to send a TrackBack when someone comments on your site. It’s up to you to set yourself up to receive the comment TrackBacks.

Download PostedElsewhere 0.1

Because it uses Movable Type 3’s callbacks, and because I haven’t upgraded yet, you can’t test it out here. However, I set up a blog with it installed at http://george.hotelling.net/postedelsewhere/. Leave a comment there if you want to test out your RSD file and TrackBack handler.

Continue reading “PostedElsewhere”