December 21, 2010

Linux Journal Readers Choose Python Again

I've just noticed the latest Linux Journal, which contains details of their 2010 readers poll. In former years they attempted to distinguish between "programming languages" and "scripting languages" but last year and this they just allowed readers to vote for any languages they liked in either category.

The interesting outcome was that readers voted Python as both the best programming language and the best scripting language. Thanks, Linux Journal readers!

DjangoCon Retrospective

Tumultuous events seem to occur in clusters in my life, and the week of DjangoCon found me in the middle of one such cluster. This being more of a professional than a personal blog I concentrate here on the conference, where the tumult manifested itself first in the shape of a chance meeting with a congressman. The next day I helped the Conference Direct team prepare for evening registration and helped people sign in.

The three days of DjangoCon were a most stimulating time. The Django community has its share of characters, and being among so many was truly a joy. I ended up just up the corridor from James Bennett[1], who is also quite a social person, and so a certain amount of partying ensued (which I regret to say I was not really in the best mood to enjoy). James was happy to entertain the people I kicked out, and they were apparently happy to be entertained, so we achieved a pleasant win-win.

Conference time is usually fairly closely scheduled, and DjangoCon is no exception. I used my "keynote" to try to get people relaxed and in the mood to enjoy themselves a little during all the serious learning that was taking place [2]. Then it was into tracks and running. Lunch seemed to go down well and everyone appeared to enjoy the breaks. Due to the generosity of our sponsors it was possible to provide a continental breakfast this year as well as lunch and breaks. After James Bennett's keynote were the lightning talks, which I had to miss because I was running a Python programming competition (won by Justin Lilley, against some worthy competition). I finished the day with a quiet room-service dinner with Kirby Urner, who was acting as Snake Wrangler and my general factotum.

This reminds me to mention that the Django pony was again in evidence as was Naga, the PSF_Snake. Everyone who came to the conference received their own "My Little Pony" toy, and I believe I may have detected early signs that the Django community is moving towards being "ponied out". The pony was the subject of a question during my keynote that rather sandbagged me - I was unaware of strong feelings in certain elements of the community about the pony as a symbol. Having said which, honesty is the best policy and I said what I believe.

Day two moved on in strong style. I was much preoccupied with how best to try and accommodate a visiting speaker. In the end we just moved the whole afternoon forward by a quarter of an hour, leaving a 5:15 to 5:30 slot for Congressman David Wu. I don't really know what the audience made of being addressed by a congressman. The decision to invite him was a no-brainer for me. I would rather hear a bit of "why ever did you bring a congressman in to speak?" that any "why on earth didn't you ask the congressman to speak?" Congressmen aren't like buses, they don't come along on a regular schedule, and the particular congressman in question happens to have impeccable science and technology credentials. He certainly seemed reasonably well-briefed on open source, which is a big thing in Portland right now.

The early part of the evening was spent at a reception my company gave, which a couple of campaign staff also attended. I entertained them a little longer after the reception finished, and then went downstairs to grab a roomful of people to help me consume wine and food I had ordered for my room. This turned into a most stimulating party, but at midnight or so I realized I needed to get some sleep. Fortunately James sent a scouting party down, and a transfer to his rooms was affected with only one use of the verbal crowbar.

Later to bed than I had anticipated, I had to rise early to attend a breakfast meeting away from the conference. As I returned it was gratifying to learn that the bacon had been delivered for breakfast at DjangoCon. The hotel had to serve the savory pastries late and in insufficient quantity on day two because their bakery supplier let them down. They asked if we would like a per-delegate refund, but I suggested instead that they add bacon to the Thursday menu, which they duly did. Unfortunately the bacon was apparently set down in the middle of the general display, and although I made light of it at the time[3] it would have been nicer for the vegetarian population if it hadn't been thrust under their noses.

The day appeared to go well. At lunchtime I gave away books from APress and O'Reilly, our two media sponsors, and awarded prizes for various pieces of arcane knowledge ("What's the animal on the front of this book?"). The only slight logisitical glitch in the proceedings occurred right at the end, when the short length of the sprint preparations caught us on the hop. I got a call and immediately went down and "turned the bar on" so people could get a drink, and a couple of minutes later Nancy from Conference Direct arrived with the drinks tickets and it was business as usual.

I like to think that most people had a good time, and I have tried to deal with criticism as it was raised in so far as I could. Sometimes, though, people insist on waiting until they have left and then making negative remarks, and I have seen a few such:
What I learned at #djangocon: 1. Not enough core committers. That's it. Total bummer of a conference #circlejerk I hope this twitterer realises that the chairman and community volunteers are the right people to take this up with, and there has already been talk of an Exreme Django track.
Oh fast internet, how I missed you! Back from #djangocon.  I don't think the Internet service was that bad (considering that PyCon spends four times as much and still gets it wrong when they don't let Sean Reifschneider do it), and there weren't extensive complaints as far as I knew (except maybe one fairly short period). Or maybe the author is, like me, a happy consumer of fiber to the customer premises. You do get spoiled ...
What I disliked most about #Djangocon: I have a toy for a 3 year old kid as a shwag. The pony isn't funny anymore. And yet, such is the power of the six dollar pony that you kept it despite the fact that you hate it. Nobody was checking at the doors to make sure you took your pony home with you. You're just a schwag collector, aren't you?
@pydanny please be careful around those dirty Django men, @pythonchelle watch out too #djangocon. I don't remember who tweeted this, but I hope the dissatisfaction was momentary.  Dirty Django men? Not dirty (mostly), simply in way too large a majority. We need to work on that. And the dirt ...
http://isalexacoredeveloper.com/ is just cruel #djangocon I have to agree, it is, but I don't think that this is in any way DjangoCon's responsibility [4].
Overall I think most delegates enjoyed their conference. While running these events can be a little stressful it is rewarding to feel that the conference has helped in some way to advance the state of the Django art and allowed people some relaxation during the conference "white space".

My thanks to all DjangoCon US's sponsors, and to everyone from the Django community who helped to make the event such a success. I am already looking forward to 2011.

NOTE: DjangoCon US 2011 will be held at the Hilton Portland and Executive Tower on September 6-8.

[1]: OHWar quote: "Beer. My suite. Now."
[2]: As is perhaps indicated by the title: Matters of Little Consequence or The Care and Feeding of Ponies.
[3]: OHWar quote: "Screw the vegetarians."
[4]: OHWar quote: "Pinax is sort of a reusable application thing." As you will have seen if you followed the link, Alex's status has changed since the site was instigated, and the question is now answered in the affirmative.

December 12, 2010

PyCon Financial Assistance

PyCon US is again offering assistance to delegates who may not be able to cover their own travel and/or accommodation costs. Applications have now opened, and the announcement page contains a link to the application form (separately linked here in case that's all you need).

While there can be no guarantees of financial assistance I can think of many delegates who have enriched the conference by their presence only because they received assistance. And those from places where few people even travel abroad can attend and set minds on fire when they return home. So financial assistance is a real investment in broadening the Python community, and I hope it will continue to be so.

There's a deadline, though, so don't spend too long thinking about it!

December 5, 2010

Templating Systems

Recently Danny Greenfeld wrote a blog post called Stupid Template Languages in which he attempted to advocate the Django approach to templating. Basically this is to keep any logic in the templates as simple as possible (but no simpler). So it includes the ability to write for loops but not, for example, to define re-usable procedures with parameter passing.

Armin Ronacher reacted to this with a blog post of his own called Not So Stupid Template Languages, in which he attempts to defend Mako and similarly complex templating schemes. I don't see the Jinja2 examples he gives as countering the main thrust of the Django wish for simplicity in templating. He does, however, explicitly point out the weaknesses of the Django include mechanism, and highlights the "macro" feature of Jinja2, which is its equivalent of Django's include feature. Jinja2 macros require that data is provided to the call by argument passing rather than simply being extracted from an implied context. I agree that requiring the use of arguments is probably a good way to make the couplings explicit.

This doesn't however, negate the value of keeping complex logic out of the templates. This desire originally comes from Django's background in the newspaper industry, where the designers were definitely not programmers. So they didn't need a hugely complex templating languages, and were prepared to ask the programmers to generate in their views the values required by the templates. I have worked with tools like Mako, which includes the ability to write very complex logic which should really be part of the controller rather than the view. It doesn't help that Django's designers perhaps didn't understand MVC that well, otherwise they would have called views "controllers" and templates "views". Nowadays I believe they call it the "model view template" model, but that still doesn't avoid the ambiguity about views and whether they should include logic or not.

Even with a pure MVC architecture Jinja2's argument-passing enhancements would be an improvement - as Armin says, making the couplings explicit would be a Pythonic thing to do. The nice thing is that argument passing could be implemented as a backwards-compatible extension, where a call without arguments could fall back to using the context as a default global namespace.