On choosing Python for Hacking RSS and Atom
...I bought this rather interesting book: Hacking RSS and Atom by Leslie M. Orchard. It covers virtually everything I want to do with my feed blender. Except it does it in Python. Dang.
...Programmers seem to get used to the language they use a lot and then find others difficult or poorly designed. As for me, I'm not so excited about Python itself as I am about what I can do with it given a little help from modules like Mark Pilgrim's Universal Feed Parser and Reverend for Bayesian classification.
Source: Anne 2.0: Python Slithers In
I've gotten a handful of instances of this sort of feedback about the book and my choice of Python for all the code within. I had anticipated this concern a bit, and hoped it wouldn't be a hurdle for acceptance of the book, but I forged ahead with Python nonetheless.
Some reasons for choosing Python for the book, in no particular order, were:
The Universal Feed Parser exists.
Python is one of the cleanest languages I've ever used that still retains a degree of meta-magic. I'd hoped that this might even help in carrying the notions in the book to other languages, thanks to the clarity of the code. (Regardless of how clear it actually turned out! :))
Python is cross-platform enough to work on every machine I use on a regular basis—Windows, Mac, or Linux. While not omnipresent, it's at least fairly easy to get up and running.
Python is my current favorite go-to tool. I'm hoping that this doesn't mean that I've fallen mindlessly into it. I'd already forcibly abandoned Perl to get out of this sort of rut and maintain my flexibility. (ie. "Programmers seem to get used to the language they use a lot and then find others difficult or poorly designed.")
Although my next book will contain examples in a variety of programming languages, I wonder what language I should lean toward in the future for public-facing purposes? Lately, I've been warming up to PHP—how might it have worked for Hacking RSS and Atom?
PHP looks like a meta-impaired and jumbled mess to me, compared to Python. But, it's workable and maybe it's not healthy to be around all that meta all the time.
PHP is ubiquitous where Python's just starting to get legs on web servers.
PHP is a lot of others' current favorite go-to tool.
But, I've also been told that it'd be a mistake to run with PHP code listings and that the book would really suffer in clarity. More thinking to do, but I thought I'd get these thoughts out there at least.