Reading Update: Short Reviews

I’ve been delinquent in posting about what I’ve been reading. Rather than continue with the charade that I’ll eventually write full reviews for each book, I present a set of short reviews that should get me more or less caught up.

Tweak: Growing Up on Methamphetaminesimage0 by Nic Sheff

As part of the memoir writing class I took last fall, we read David Sheff’s book, Beautiful Boy, which tells the story of watching his promising young son struggle with drug and alcohol addiction. His son’s book, Tweak, tells his own wrenching story. When I read American Psycho a few years ago there were times I was so disturbed I sort of held the book at arm’s length and read through squinted eyes. I had the same experience with Tweak, amplified by knowing what I read was true. Tweak is not a perfect memoir — Sheff acknowledges some mistakes and missteps in the afterword — but it manages to convey the roller coaster of insanity Sheff went through as an addict, a recovering addict, and a relapsing addict. Unlike his father’s book (also very good) which mingles person narrative with facts in a journalistic memoir, Tweak is all raw emotion and craving.

The Liars’ Club: A Memoirimage1 by Mary Karr

You think your mom was crazy? No. Not at all. Mary Karr’s mom? Crazy. As in “let me set your shit on fire and come at you with a knife” crazy. And yet Karr somehow still renders her with empathy and tenderness, describing her childhood in East Texas in this, her first, memoir.

Lit: A Memoir (P.S.)image2 by Mary Karr

If The Liar’s Club let me peer into Mary Karr’s east Texas childhood, Lit, her third memoir, dropped me into her development as an adult and a poet. And consequently into her development as an alcoholic, a recovery alcoholic, and a Catholic (albeit one she describes as “not the Pope’s favorite”). I checked out Lit from the library, read it in a couple days, and then ordered my own copy. So much of the story resonated for me, and Karr’s phrasing and ear for dialogue make it a joy to read.

The Death of American Virtue: Clinton vs. Starrimage3 by Ken Gormley

A massive tome at 800 pages, Gormley’s account of Clinton’s legal troubles, beginning with Paula Jones and morphing into the Office of the Independent Council investigation, reads like a novel. Contrary to what I believed in high school, when it was all going on (and I was a Young Republican), as well as what I hear today from some more left-ist friends (that Starr was a rapid attack dog out for blood), Gormley tells a very human story. That is, a story where everyone is flawed, imperfect, and probably underestimating their own flaws. Was Clinton an incorrigible womanizer who caused massive wreckage to his life and the lives of those around him by lying? Yes. Did Starr and his office operate at the edge of their charter, with little oversight or control? Yes. Should you read this? Yes.

date:2010-06-06 18:14:22

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

Packt Publishing sent me a copy of `Django 1.1 Testing and Debugging <>`_ for review. I was particularly interested in reading this title, as testing is something I know makes my code better, but don’t feel like I do enough of, and because I work on a couple of Django-based projects in my spare time, with varying degrees of test coverage. While I consider myself comfortable with Python’s stock `unittest <>`_ and `doctest <>`_ modules, I was curious to learn about how you can integrate Django with other Python testing tools.

Django 1.1. Testing and Debugging is split, as the title implies, into two halves: Testing, followed by Debugging. It uses a narrative approach, following the development of a survey application throughout. The book starts with an overview of the stock unittest and doctest facilities in Python. Most of chapters 1 through 3 are devoted to the basics of unit testing, specifically for Model classes. Tracey provides information about Django-specific nuances along with way. For example, I didn’t realize Django ships with a customized doctest module to enabled ELLIPSES support in Python 2.3. Chapter 3 also provides information about how to use fixtures for providing test data, and how to specify those apart from the initial data fixtures developers may already be aware of. Chapter 4 mirrors some of the information found in Django’s testing documentation: the Django TestCase, and how you use it to do basic view testing.

Chapter 5 describes integrating Django with other tools, primarily by example. Tracey discusses how to replace the default Django test runner, and what interface the replacement needs to implement. She also provides a stub example of more “invasive” integration, crafting a new management command that could (possibly) handle code coverage reporting while running the tests. This stub was interesting, but didn’t feel particularly testing related to me. Chapter 5 closes with examples of using the excellent coverage package with django-coverage, and integrating twill into Django tests.

Chapter 6 begins the section on debugging with an overview of the Django settings that impact debugging, and how the development server supports debugging of applications. Chapter 7 follows with a thorough analysis of the development server’s error page, as well as examples of debugging based on the information given. The examples continue to develop the survey application, and introduces what Tracey describes as “typical mistakes”, then describes how to fix them.

Chapter 8 begins to dig a little deeper, and I was happy to see mention of Rob Hudson’s Django Debug Toolbar, an indispensable tool. Chapter 8 also includes details on using the logging module, and how to develop a decorator that marks function entry and exit. I know that I’m all too guilty of using print instead of logging, and it was nice to be reminded of how easy this is.

Chapter 9 was my favorite part of the book. It gives a good overview of using pdb, and then goes on to demonstrate how to use pdb and a shell session to test a race condition and deal with it.

Overall `Django 1.1 Testing and Debugging <>`_ seems like a good introductory book for Django developers who are new to testing (or Django). While many of the debugging examples seemed obvious to me, I suspect that someone new to Django could use this book as an introduction to development and debugging.

date:2010-06-06 17:42:47
tags:2010, nonfiction, read, review

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

Read: “Invisible”, by Paul Auster

There are a few authors who I’ll follow just about anywhere; Paul Auster is one of them. Over the past couple years as I’ve read his catalog, I’ve enjoyed his description of even the darkest and bleakest situations. Leah described his work as “primarily meta-fiction” when she first introduced me to Auster — and he definitely excels at that — but that’s only part of the appeal. In works like `Invisible <>`_, Auster uses creates a fictional world that he then uses to explore how we think about identity, shared experience, and stories.

[Warning, the following may contain spoilers, although I don’t think they would degrade the actual reading experience.]

Invisible begins in 1967, when the protagonist, Adam Walker, meets a visiting college professor, Born, and his girlfriend, Margot, at a party. This chance meeting gives rise to a business deal, the celebration of which is marred by a mugging that turns violent. It isn’t until the second section of the book that we realize the narrator is not Adam, but a college friend, James, now a successful author. James has received the preceding section from Adam much later in their lives, as the first part of a book Adam hopes to write. This book, like Invisible, will have four sections — spring, summer, fall, winter. The sending of pages, the recipients admiration for the original author (James believed Adam would go on to greatness), and the eventual responsibility for publication all echo the story of Fanshawe in The Locked Room, part of The New York Trilogy, one of Auster’s earlier works.

Invisible depicts a progression, both mechanically and for its characters. The characters deal with a push-pull of good (intellect) and evil. The book describes an interesting tension between sex and justice, how they interlock and how we distance ourselves from our actions seeking both. Auster uses different voices to emphasize the distance, telling each part of the story in a different voice. The first section is told in the first person, second in the second person, etc. The fourth and final section is told from the perspective of another person through a diary, with Adam, the protagonist, absent except in reference. As the story progresses, the details fall away in another reflection of this distancing.

Invisible works for me on many levels: as a story, as moralistic exposition, as a demonstration of using the mechanics of writing to further a story. Most importantly, it was enjoyable to read and drew me into a world where the line of what I know and what I think I know is never quite clear.

date:2010-03-28 20:04:26
tags:2009, fiction, read