Preread: “Django 1.1 Testing and Debugging”, by Karen M. Tracey

Another Packt Publishing title is on the way for review, `Django 1.1 Testing and Debugging <>`_, by Karen M. Tracey. Django 1.2 ships tomorrow, and I’m looking forward to the book: testing is one of the things that helps software evolve, but it’s also one of the things that’s easiest to ignore on a project. I say this to myself as much as anyone: even though I know tests will make my life better in the long run, when I start hacking, sometimes they’re the furthest thing from my mind. Books about how to test, and how to do it effectively, are definitely a good thing for me.

The PDF preview of chapter 3 (basic unit testing) looks good, and the table of contents looks like a good overview of basic tools and techniques. I’m particularly looking forward to reading about integrating Django with other testing tools (chapter 5), and using Django with pdb (chapter 9). I’m looking forward to learning more about testing my Django applications — and hopefully how I can form better habits around testing.

date:2010-05-16 21:39:04
tags:django, pre-read, python


People put a lot of time and effort into reading the Apple (and Steve J.) tea leaves: what will be announced, when, and will there be “one more thing”? I’ve put next to no time into this, but wanted to document my WAG — wild ass guess — for WWDC this year. I should note: I use a Macbook, but these days Mac OS X is basically a run-time for Firefox for me (my primary machine these days is a Thinkpad running Ubuntu). I use an iPod Color 60GB, and haven’t seen the need to upgrade yet. I haven’t seen an iPad in person. In short, I’m hardly qualified to make predictions about Apple corporate strategy. But that doesn’t seem to stop anyone else.

I believe Apple will announce that you’ll be able to run iPhone OS applications on Mac OS X. Why? Well, it just seems like it fits.

  • Apple is obviously investing heavily in iPhone OS. One indication of its importance is that the Apple Design Awards are limited to iPhone OS applications this year.
  • As the iPad has launched, and developers have been crafting applications to watch video, read news, and listen to public radio, the question has been raised: why weren’t people creating applications that looked this good for laptops? I’m sure people using Macbooks would love to have some of those apps. (I really don’t believe iPhone OS has any secret ingredient that suddenly enables ABC to create a video player.)
  • Apple’s restrictions to the iPhone SDK agreement, prohibiting the use of third party development tools, will allow Apple to easily switch hardware platforms, ala PPC to x86 — or support an additional architecture if needed. You know, an additional architecture like x86.
  • Apple has experience with compatibility virtual machines (see: Rosetta), as well as LLVM. You can imagine these experiences informing support for running iPhone OS applications in a sandbox on Mac OS X, or re-targeting the application at compilation time.
  • Finally, and perhaps most importantly, it inserts Apple into the middle of additional software purchases, enables them to leverage the App Store further, and exert additional control.

So that’s my WAG for WWDC. I think it’ll be sold to developers as a way to reach new users, and provide an end-to-end, mobile to desktop experience (I won’t be surprised if they launch improved, wireless sync between your iPad and Mac at the same time — syncing documents between iWork for iPad and your Mac sounds like hell). I think it’ll be sold to users on security and stability: iPhone OS applications would almost certainly have limited privileges on the desktop, and if you replace your laptop, logging into your iTunes account would sync your apps back to the machine.

If I’m right, users will undoubtedly begin to see [beautiful] software stream onto their desktops from a single, tightly controlled pool, and developers will devote hours crafting tools with the hope they’ll pass muster, and make it into that pool. If I’m wrong, well, I’ve been wrong before. And this is just a wild ass guess.

date:2010-05-08 23:33:20
tags:apple, iphone, wag, wwdc

Read: “Grok 1.0 Web Development”, by Carlos de la Guardia

A month and a half ago I posted a pre-review of `Grok 1.0 Web Development <>`_, a new title from Packt Publishing (disclosure: I received a complimentary copy of the book for review). I recently completed a spate of travel that took me across the Atlantic and across North America (with another trip across the Atlantic aborted due to the volcanic ash cloud), and have turned my attention back to the book. My initial impression remains: this is exactly the sort of documentation I wish I’d had when I ported the Creative Commons license chooser from “pure” Zope 3 to Grok. Grok 1.0 Web Development is a great introduction to Grok, Python web development, and the Zope Component Architecture.

|image0|`Grok 1.0 Web Development <>`_ takes what as I think of as a customary approach to framework introductions, instructing the user on the basic features of the framework by building an application (in this case a to do list manager) and adding features and refining the code as it goes. This works well for Grok — the amount of boilerplate code is kept to a minimum, by design, so the text can focus on first implementing the feature, then delving deeper to discuss the “best practice” around that tool if needed. For example, Chapter 6 covers ZODB Catalogs (index). It starts by defining the search view and user interface so that the reader has a functioning search tool to work with, then takes a diversion to discuss how one best structures their application to support search. These detailed drill downs are one of the most valuable parts of Grok 1.0 Web Development: they help the reader expand their understand beyond just implementing a feature, to implementing in a way that will be flexible and easy to support in the future. The [somewhat brief] advice on when to use the ZODB versus a relational database is another example of practical advice that I appreciated in the book.

Grok 1.0 Web Development is not perfect. In particular I wish the chapter on testing were earlier (the author’s admonition that it “should not be treated as an afterthought” doesn’t seem to jibe with its placement among the advanced topics towards the end of the book. I suppose I’m also a little sensitive to slogging on Zope 3 and it’s “lack” of agility. I can probably be described as a Zope 3 / Zope component architecture apologist, but it seems the type of agility described is a rather narrow, specific definition. The sprints I did on Zope 3 at PyCon several years contributed more to my understanding and appreciation of test driven development and agile planning than just about anything. Yes, Grok gets it done without the ZCML; I think it’s an exercise for the reader as to whether that’s better or worse for your application.

I think that the Zope derived frameworks such as Grok and repoze.bfg are some of the most interesting in development today. Grok 1.0 Web Development does a great job of introducing Grok to developers who are new to web programming, or who already have some familiarity with another framework. I recommend it to anyone interested in building extensible web applications with a minimum of boilerplate.

date:2010-05-02 15:36:19
tags:2010, nonfiction, read, review