This is the kind of morning I like to wake up to. A very interesting one. The first thing I noticed was email saying my blog was down. (That’s due to a problem with my MySQL start up script… I guess the server rebooted but MySQL didn’t come back.)
Then I saw the mention that TurboGears has been slashdottted! Thanks to Guillem Cantallops Ramis for getting us on the front page!
And, I was really excited to see a message from Ned Batchelder letting me know that the first TurboGears job posting is now up at Python.org.
Wow. All of this on what is a weekend day for me.
I watched the twenty-minute wiki movie with interest and am going to dedicate some time to playing with TurboGears; it’ll be nice to do get re-aquainted with Python after spending a lot of time with Scheme and Ruby. I did notice a couple problems with the design of the Wiki that you may want to address in the next revision.
First, the regular expression for matching wiki words does not match CamelCase words with a single capital letter e.g. “Kid”. Assuming you want to only allow non-accented upper and lowercase Latin letters, the regular expression should look more like something like this:
(([A-Z][a-z]*)+)
Second, the code to save a Page should not take a “new” parameter, at least not one that works the way it does in the demo. What happens if two people click the TurboGears link, decide to write some content for it, and click “Save”? The first call of save will succeed; what about the second one? A more defensive approach would be to check for a page’s existence and then create a new page or update an existing page as necessary. That said, dealing with multiple concurrent users doesn’t always have an obvious solution, and addressing the problem fully could easily send you down a rabbit hole.
These are minor issues, but one of my pet peeves about introductory tutorials is that they often paper-over a lot of the complexities that real applications inevitably need to deal with. One might counter that the point of a tutorial is to give neophytes a taste of the flavor of a technology, and I agree, but they should give a taste of what it’s like to build a real application.