- Street Retreat RecapMay 22, 2013A couple weeks ago I went on my third Zen street retreat, led by Roshi Grover Genro Gauntt. Here's my notes on what happened. Thursday We met in Washington Square Park in the afternoon to start the retreat. We had no wallets, cellphones, [...]
- Wasp's Nest: The Read-Copy-Update Pattern In PythonMay 8, 2013In recent work on PyMongo, I used a concurrency-control pattern that solves a variety of reader-writer problem without mutexes. It's similar to the read-copy-update technique used extensively in the Linux kernel. I'm dubbing it the [...]
- Heading OutMay 1, 2013I'm heading out for a Zen street retreat tomorrow afternoon. I'll be back Sunday. So if you contact me I'll get back to you next week. And if you meet me on the street, can you spare a dollar?
- Another Thing About Python's ThreadlocalsApr 25, 2013As the maintainer of the connection pool for PyMongo, the official MongoDB driver for Python, I've gotten far more intimate knowledge of Python threads than I'd ever wanted. One of the challenges I face is: if the connect pool assigns a [...]
- April Street PortraitsApr 20, 2013I plan to continue my portrait project at transitional housing facilities. But scheduling those shoots is slow. Meanwhile, I need new pictures for the classes I'm taking, so I photographed some strangers in the East Village. I notice [...]
- Moraff's WorldApr 20, 2013A long-quiescent memory got knocked loose. I recalled that I'd played Moraff's World obsessively as a kid, sneaking out of bed at night to play it on my mother's Tandy 3000. So I downloaded the game and played it for a few hours this week in a [...]
- The Green MatrixApr 18, 2013For a year and a half I've been part of the team maintaining PyMongo, the Python MongoDB driver. It's one of the most widely used Python packages with 1.5 million lifetime downloads. The code itself is only moderately complex; about 8300 [...]
- I Will Pick Up What Others DiscardApr 17, 2013My friend Jim Roberts emailed me this quote from Master Hua, a founder of Chan Buddhism in the West: Those in search of the Way should bear this in mind: "I will pick up what others discard." What others do not want, I want; what others will not [...]
- DZone Interviews MeApr 17, 2013The developer site DZone interviewed me for their "Dev of the Week" feature. I talked about Python, photography, and being teased by my girlfriend. Read the whole thing on DZone.com.
- Slides From My Talk On Python CoroutinesApr 16, 2013Here's the slides from tonight's NYC Python Meetup talk on coroutines in Tornado and Tulip. The slides are a bit inscrutable on their own—it's my style to just show code, then talk a lot to explain the code. Still, if you were there [...]
- Toro Rewritten for Tornado 3.0Apr 12, 2013Speaking of my package Toro, I've just released version 0.5. Toro provides semaphores, queues, and so on, for advanced control flows with Tornado coroutines. Version 0.5 is a rewrite, motivated by two recent events. First, the release [...]
- My PyCon Lightning Talk About ToroApr 11, 2013The lightning talk I gave at PyCon is now online. I talked for 4½ minutes on Toro, the package I wrote to provide locks, events, conditions, semaphores, and queues for Tornado. Watch for a quick intro on advanced control flow with [...]
- reStructuredText in PyCharm, Firefox, and AngerApr 10, 2013I spend a lot of time writing Python package documentation in reST. Nevertheless, I find reST's markup permanently unlearnable, so I format docs by trial and error: I type a few backticks and colons and angle-brackets and random crap, [...]
- BeggingApr 3, 2013I periodically spend four days homeless, with a Zen teacher named Genro and a small group of fellow Buddhists. We live, sleep, and meditate on the streets together and eat at soup kitchens. I think the retreat has a triple purpose: First, [...]
- Shuso Hossen, Spring 2013Apr 2, 2013Two weeks ago the Village Zendo completed a week-long urban sesshin focused on our awareness of disabilities. We were blindfolded for part of one day, and wore earplugs for part of another. The retreat ended with the Shuso Hossen [...]
- Review of "MongoDB Applied Design Patterns" by Rick CopelandMar 26, 2013There's a lot of bad advice out there regarding MongoDB. As I wrote in my last review, even smart sources can encourage risky methods. Soon, I hope, there will be as much good MongoDB instruction from experts outside 10gen as there is good [...]
- Review of "Building Node Applications with MongoDB and Backbone"Mar 23, 2013Mike Wilson's O'Reilly book from December 2012 introduces some hip web development techniques by building a book-long example of a social networking app. Besides introducing MongoDB, Backbone, and Node, he shows the beauty and [...]
- Slides from my PyCon lightning talk on ToroMar 16, 2013Here's the 8 slides for my 4½-minute talk on Toro this morning. Toro is a package I wrote last year that provides objects something like locks, events, conditions, semaphores, and queues for Tornado coroutines. PyCon lightning [...]
- Plop: Python Profiler With Call GraphsMar 11, 2013Tornado's maintainer Ben Darnell released a Python Low-Overhead Profiler or "Plop" last year, and I'm just now playing with it. Unlike cProfile, which records every function call at great cost to the running process, Plop promises that [...]
- Review of Roman Vishniac RediscoveredMar 10, 2013Today I saw the International Center of Photography's big retrospective, "Roman Vishniac Rediscovered". The show opens with Vishniac's Berlin street photography from the 1920s and 30s, in which he concentrates on form: shafts of [...]
- Motor 0.1 Migration InstructionsMar 7, 2013Motor (which is indeed my non-blocking driver for MongoDB and Tornado) had a 0.1 release to PyPI yesterday. It had an odd history prior, so there are various versions of the code that you, dear reader, may have installed on your system. All [...]
- Motor Officially ReleasedMar 6, 2013It's happened. Motor 0.1 is in PyPI. You can now install it with a simple: $ pip install motor This is the first official, production release of Motor. That said, there will be bugs: please file them and I'll respond as quickly as I can. Links: [...]
- Miami PhotosMar 5, 2013I'm starting to use color; here's some shots from 10gen's annual meeting, which was in Miami this year. This is on Kodak Portra 400, with a Norita 66. Mistakes were made: Photographing from my hotel balcony, I didn't notice that the [...]
- Photography Is Burning!Mar 3, 2013I'm in a group photo show at the Village Zendo in lower Manhattan, Saturday March 9. The show is open 11am to 6pm and I plan to hang out there all day, except lunch time, so you're welcome to stop by and say hello. There's a panel discussion [...]
- A Curious Concurrency CaseMar 3, 2013Last month, the team in charge of 10gen's Ruby driver for MongoDB ran into a few concurrency bugs, reported by a customer running the driver in JRuby with a large number of threads and connections. I've barely written a line of Ruby in my [...]
- What It's Like To Work For 10genFeb 28, 2013My colleague Kristina Chodorow wrote a post on working at 10gen with which I was a bit obsessed when I applied for a gig here in late 2011. Recently I've had an eventful couple weeks: I went to Miami, won a robot battle, and helped the Ruby [...]
- An Event synchronization primitive for RubyFeb 9, 2013I helped some Ruby friends implement a rendezvous (aka a barrier). I'm accustomed to using an Event to implement a rendezvous in Python but Ruby doesn't have Events, only Mutexes and ConditionVariables. That's fine, Python's Event is [ ... ]
- Author PhotosFeb 1, 2013I did another round of headshots this weekend: Jennifer Keishin Armstrong, author of the upcoming books Sexy Feminism and Mary and Lou and Rhoda and Ted. Also my girlfriend. This one's probably not going to make the New York Times Book [ ... ]
- Knowing When A Python Thread Has DiedJan 26, 2013A few months ago I had to solve a problem in PyMongo that is harder than it seems: how do you register for notifications when the current thread has died? The circumstances are these: when you call start_request in PyMongo, it gets a socket [...]
- Motor Is Growing UpJan 24, 2013For a long time I've thought that Motor, my non-blocking Python driver for MongoDB and Tornado, ought to be included as a module within the standard PyMongo package. Everyone both inside and outside 10gen has told me they'd prefer Motor be [ ... ]
- PyMongo 2.4.2 Is OutJan 24, 2013Yesterday we released PyMongo 2.4.2, the latest version of 10gen's Python driver for MongoDB. You can see the whole list of nine bugs fixed. Here are some highlights: I made PyMongo's MongoReplicaSetClient smarter about reading from [ ... ]
- Invitation to a Zen Street RetreatJan 22, 2013Roshi Genro Gauntt of The Zen Peacemakers and Hudson River Zen Center invites you to join a street retreat in New York City, May 2-5, 2013. We will sleep, meditate, and live on the streets together. It’s a chance to practice with a Zen [ ... ]
- Ordinary ZenJan 21, 2013Here's a series I did in the fall of 2011 called "Ordinary Zen." I photographed my friends from the Zendo meditating at home, and interviewed them about their practice. Bill Seizan Ewing I used to occasionally spend a weekend not talking. [ ... ]
- "Collapse" by Jared DiamondJan 20, 2013If you worry at night about the end of human civilization, 550 pages of small type by Jared Diamond should be enough soporific to knock you out for a month of bedtimes. If, on the other hand, you enjoyed "Guns, Germs, & Steel" and you're [ ... ]
- Chicago ChristmasJan 19, 2013I spent Christmas Eve with my girlfriend's family in Chicago this winter.
- Amaryllis IIJan 18, 2013A few weeks ago I photographed the amaryllis my mom gave me. It's been wilting ever since, and last night it abruptly ceded the battle to stay upright. The shape it's in now is even more dynamic than when it was in blossom.
- A Village Zendo ScrapbookJan 17, 2013Since, as I have mentioned recently, Zen is very much an accredited situation, my temple sends annual reports to The Soto School of North America, which itself answers to Soto Zen HQ in Kyoto. It's been pointed out to us that no one wants to [ ... ]
- HeadshotsJan 13, 2013I did a couple headshots for friends last week—this is not my usual mode of photography but it's great practice, and I love how they turned out.
- The Dude, The Zen Master, And Jon StewartJan 12, 2013On Wednesday Jeff Bridges talked with Jon Stewart on The Daily Show about his book, The Dude and the Zen Master, which he wrote with Bernie Glassman. I had several reasons to be excited about this event: Bernie Glassman is a prominent Zen [ ... ]
- MongoDB Full Text SearchJan 12, 2013Wikimedia commons Yesterday we released the latest unstable version of MongoDB; the headline feature is basic full-text search. You can read all about MongoDB's full text search in the release notes. This blog had been using a really [ ... ]
- "The Middlesteins" by Jami AttenbergJan 4, 2013I can't objectively review Jami Attenberg's latest novel, The Middlesteins, because I've known Jami for a couple years and I'm rooting for this book. It is, it turns out, gratifying to root for, because it's a best-seller and was the cover [ ... ]
- Python's += Is Weird, Part IIJan 2, 2013I wrote the other day about two things I think are weird about Python's += operator. In the comments, famed Twisted hacker Jean-Paul Calderone showed me something far, far weirder. This post is a record of me playing around and trying to [ ... ]
- MushroomsJan 1, 2013
- Python's += Is WeirdJan 1, 2013Image: William Warby on Flickr Here's a Python gotcha I've hit often enough to merit a blog post: x += 1 is weird in Python. It's compiled roughly like x = x + 1, with two surprising consequences. One is this familiar pitfall: >>> x = 0 [ ... ]
- AmaryllisDec 31, 2012
- ChodoDec 19, 2012Last weekend I photographed my friend Chodo, a priest at the Village Zendo, caring for a friend in hospice.
- MotorConnection Has Been Renamed MotorClientDec 18, 2012As it was foretold, so has it come to pass. The omens all are satisfied, the prophecy fulfilled. Last month I wrote about PyMongo renaming its main classes from Connection to MongoClient and from ReplicaSetConnection to [...]
- Yes, Every MongoDB Driver Supports Every CommandDec 17, 2012This post is in response to a persistent form of question I receive about MongoDB drivers: "Does driver X support feature Y?" The answer is nearly always "yes," but you can't know that unless you understand MongoDB commands. There are only [...]
- Scatter SitesDec 13, 2012This week I met three people who receive some assistance from a transitional-housing organization but don't live in a facility; they live independently in "scatter sites."
- Boxing in the BasementDec 8, 2012In late 2010 I was photographing for The Lo-Down, the Lower East Side news site founded by my friends Traven Rice and Ed Litvak. Traven and I heard about a basement boxing gym run in the Vladeck Houses by a guy named Lou, so we went to meet him and [ ... ]
- Hungry GhostsDec 8, 2012Each summer during our meditation retreat, the Village Zendo holds a ceremony to feed the hungry ghosts: all those suffering and unsatisfied. Here's my teacher Enkyo Roshi leading the ceremony. Every mistake I can make in the darkroom I [ ... ]
- YieldPoints: simple extensions to tornado.genDec 7, 2012I affectionately introduce YieldPoints, my littlest project yet. It's just some simple extensions to Tornado's gen module. The cutest example of what you can do with YieldPoints is the WaitAny class, which lets you begin multiple [ ... ]
- Reading from MongoDB Replica Sets with PyMongoDec 6, 2012Read preferences are a new feature in MongoDB 2.2 that lets you finely control how queries are routed to replica set members. With fine control comes complexity, but fear not: I'll explain how to use read preferences to route your queries [...]
- The Chuang TzuDec 5, 2012I had a Zen and the Art of Motorcycle Maintenance moment today at the bike shop, watching the guy fix my tire. He hadn't worked on a Brompton before so he took apart the shifting assembly thoughtfully, then he pulled off the rear wheel and the [ ... ]
- JukaiDec 2, 2012August 12, 2012. The Village Zendo's lay-ordination ceremony, Jukai, in which eight students received the Zen Buddhist precepts.
- Shuso HossenDec 1, 2012August 26, 2012. The Village Zendo's ceremony in which Seizan, our practice leader, gave his first talk.
- Floating LanternsDec 1, 2012August 10, 2012. The Village Zendo's annual floating-lantern ceremony to commemorate Obon. Near Cornwall-on-Hudson, New York.
- Breaking Change In PyMongoDec 1, 2012In my excitement about the big changes in PyMongo 2.4, I forgot to mention a smaller one you should watch out for: from now on, if the initial connection to MongoDB fails, PyMongo raises ConnectionFailure instead of AutoReconnect. This is [ ... ]
- Soldier FieldDec 1, 2012November 10, 2012. Soldier Field in the rain.
- PyMongo's New Default: Safe Writes!Nov 27, 2012I joyfully announce that we are changing all of 10gen's MongoDB drivers to do "safe writes" by default. In the process we're renaming all the connection classes to MongoClient, so all the drivers now use the same term for the central class. [ ... ]
- The Fifth Patriarch and the Three TurningsNov 25, 2012This winter, the Village Zendo is reading The Platform Sutra of the Sixth Patriarch, a foundational text of Chinese Zen. It was composed a generation or two after the lifetime of Huineng, and attributed to him. In it, Huineng tells the [ ... ]
- Street Portraits 2Nov 25, 2012Some street portraits taken while I walked home from the Zendo Wednesday morning.
- Toro: synchronization primitives for Tornado coroutinesNov 18, 2012I took a break from Motor to make a new package "Toro": queues, semaphores, locks, and so on for Tornado coroutines. (The name "Toro" is from "Tornado" and "Coro".) Why would you need something like this, especially since Tornado apps are [ ... ]
- Motor: Iterating Over Results, The Grand ConclusionNov 17, 2012This is another post about Motor, my non-blocking driver for MongoDB and Tornado. Last week I asked for your help improving Motor's iteration API, and I got invaluable responses here and on the Tornado mailing list. Today I'm pushing to [ ... ]
- Street PortraitsNov 16, 2012I'm taking Richard Rothman's "Photographing People" class at ICP this fall. Yesterday he sent us out into the street to find a spot with nice light and photograph strangers there. I haven't done that since I made the Strangers project last [ ... ]
- Faceless KillersNov 14, 2012The fall games are out and New York City is plastered with promos, like for Halo 4: For Black Ops 2: Assassin's Creed 3: And this arresting poster for Borderlands 2: You surely see the same pattern I do: they're all faceless. (They're all men [ ... ]
- Motor: Iterating Over ResultsNov 11, 2012Motor (yes, that's my non-blocking MongoDB driver for Tornado) has three methods for iterating a cursor: to_list, each, and next_object. I chose these three methods to match the Node.js driver's methods, but in Python they all have [ ... ]
- Gloria and RhodaNov 8, 2012I took some more photos of my dwarf hamsters tonight. This is Gloria, as far as I can tell: ... and this must be Rhoda: Rhoda seems to be scratching herself up lately, particularly her nose. But she's tough enough to survive Sandy and I'm sure [ ... ]
- The WhisperersNov 3, 2012The New York Times's photo blog has posted a spooky, beautiful project, "The Whisperers" by Kuba Kaminski: In remote northeastern Poland there lives a group of elderly Orthodox devotees who are said to possess special powers. They can [ ... ]
- Motor Installation InstructionsOct 31, 2012Update: Motor is in PyPI now, this is all moot I've done a bad job with installation instructions for Motor, my non-blocking driver for MongoDB and Tornado. I've gotten a bunch of emails from people complaining about this: Traceback (most [...]
- HurricaneOct 30, 2012CREDIT: NOAA/NASA/GSFC/SuomiNPP My girlfriend Jennifer and I survived. We live in Stuyvesant Town at 14th Street and Avenue B, a few blocks from the famous exploding Con Ed power station. Like most of Manhattan south of 40th Street, we [ ... ]
- UpayaOct 30, 2012This is my homework for Path of Practice at the Village Zendo. Last time I wrote about meditation; this month it's about upaya, or "skillful means." ••• A question that bugs me lately is, "What should I say when someone [ ... ]
- In TransitionOct 17, 2012I'm resuming a project I started almost three years ago, taking portraits at transitional housing buildings in NYC. The people in the photos I took last time lived in the facilities when I took their pictures; yesterday I went back to one of [ ... ]
- Optimizing MongoDB Compound IndexesOct 8, 2012Courtesy The Beinecke Library How do you create the best index for a complex MongoDB query? I'll present a method specifically for queries that combine equality tests, sorts, and range filters, and demonstrate the best order for fields [ ... ]
- Eating Your Own Hamster FoodOct 1, 2012If you aren't using your own libraries as you build them, you're skipping an essential test: not mainly for correctness or performance but for usability. (Using your software as you develop it is normally called "eating your own [ ... ]
- Motor Progress Report: GridFS, LogoSep 27, 2012Two big updates to Motor, my non-blocking driver for MongoDB and Tornado. First, my friend Musho Rodney Alan Greenblat made a logo. Motor may or may not be ready for prime time, but it looks ready. Second, I implemented GridFS. GridFS is a [ ... ]
- Regarding WarholSep 23, 2012I saw "Regarding Warhol: Sixy Artists, Fifty Years" at the Met today. I've always enjoyed Warhol: his every work makes a clear, prescient statement, and there are days I just want to go to a museum, understand what the art is saying to me, and [ ... ]
- Video Of Me Explaining MotorSep 15, 2012Film student Jack Finlay generously took the time to record me reprising my talk on Motor from PyGotham this spring. The result is a good 35-minute intro to the motivations behind Motor and how I implemented it, in a fireside-chat style: [ ... ]
- Review of "Let Us Now Praise Famous Men" by James Agee and Walker EvansSep 9, 2012"Let Us Now Praise Famous Men" by James Agee and Walker Evans, 1941. I give up. I can't finish this nor ever will. Walker Evans begins the book with a few dozen photos, most of which are mediocre at best, a handful of which are among the best [ ... ]
- DhyanaSep 7, 2012This is my homework for Path of Practice at the Village Zendo. Last time I wrote about patience; this month it's about dhyāna, or meditation. ••• Zen is the Japanese pronunciation of dhyāna. In other words, [ ... ]
- Review of "Opening the Hand of Thought" by Kosho UchiyamaSep 5, 2012Highly recommended, but don't feel bad for skimming the second half. The book's early chapters offer the most specific and practical guide to zazen that I have read—the method, its goals, and what the meditator can reasonably [ ... ]
- Ordination Ceremony at the Village ZendoSep 5, 2012This April I photographed a tokudo, an ordination ceremony at the Village Zendo for my friends Kaku (pictured above), Tokuyu, and Oshin. It began in the early morning with elder priests shaving the novices' heads. Then we held a ceremony [ ... ]
- Review of "The Social Organization of Zen Practice" by David L. PrestonSep 4, 2012"The Social Organization of Zen Practice" by David L. Preston, 1988. I read this in 2003, while I lived at a Zen monastery. I recall the book focused on the social pressures exerted on lay Zen practitioners during meditation retreats. Zen [ ... ]
- Adorable!Sep 1, 2012I had to post this adorable photo of Oshin and Seizan, two students at the Village Zendo.
- Spring 2012 Shuso HossenAug 31, 2012Some photos from this spring's Shuso Hossen, a ceremony in which our practice leader Soshin gave her first dharma talk.
- This Blog is PyPy-poweredAug 30, 2012My async MongoDB driver Motor now passes its test suite running in PyPy 1.9. To celebrate, I've switched my blog from CPython to PyPy! Update: I moved back to CPython 2.7. Although Motor and the rest of my blog's software appears to run [ ... ]
- "Digital Dharma"Aug 30, 2012I saw Digital Dharma last night at the Rubin Museum: Digital Dharma is E. Gene Smith's epic 50-year journey to find, preserve and digitize more than 20,000 volumes of ancient Tibetan text; a story of one man’s mission that became the [ ... ]
- Motor Progress ReportAug 29, 2012Motor, my async driver for MongoDB and Tornado, is now compatible with all the same Python versions as Tornado: CPython 2.5, 2.6, 2.7, and 3.2, and PyPy 1.9. To get Motor working with Python 3 I had to make a backwards breaking change: [ ... ]
- The Pacific Crest TrailAug 28, 2012Last year my girlfriend Jennifer and I road-tripped to my old monastery, Yokoji Zen Mountain Center. When I lived there in 2003 I used to hike up from ZMC to the Pacific Crest Trail every weekend, so for nostalgia's sake I conscripted [ ... ]
- Review of "The Snow Leopard" by Peter MatthiessenAug 28, 2012Peter Matthiessen, following his wife's death, leaves his young son behind for a long and dangerous trek through the Himalaya with a zoologist to study the mating habits of an obscure goat. The reader can infer that he is insane with grief. [ ... ]
- This Blog is MongoDB 2.2-poweredAug 27, 2012This blog has been running on my experimental MongoDB driver, Motor, since June. But in case that wasn't cutting-edge enough, I'm now running it on MongoDB 2.2 release candidate 2. This is what I do for excitement.
- San FranciscoAug 27, 2012A couple photos I took in San Francisco last year. The first from Point Lobos, the site of the Sutro Baths, one of the few North American ruins. The second of my friend Snoo in The Mission.
- AlcatrazAug 26, 2012Last June I visited Alcatraz, in the bay off San Francisco, with my friend Snoo. I can't recommend it enough. On the downside, the tour guide's spiel romanticizes the violence and death that marked Alcatraz until it was shut down in 1963. My [ ... ]
- Zen And The Body PoliticAug 21, 2012I'm re-posting this article I wrote for the Village Zendo Journal in October 2008, about canvassing for Obama with my friends Kim and Myoshin. It was an ideal moment in the Obama / McCain race: the nominees were selected and the parties were [ ... ]
- Review of "The Evolution of God" by Robert WrightAug 19, 2012The Evolution of God, 2009 by Robert Wright, has two big ideas. Convincing: Our ideas of gods or God evolve in a social and political context. When we see gain in warfare, we imagine a vengeful God, but when our interests lie in [ ... ]
- Back From Zen CampAug 16, 2012I got back Sunday from two weeks at the Village Zendo's summer retreat; we did an 8-day sesshin and a weeklong precepts study. I practice shikantaza, and although the word means "just sitting," there is some method to it. Indeed, our study [ ... ]
- Zen CampJul 26, 2012I'll be on retreat with the The Village Zendo through August 13. Hello Muddah, hello Fadduh, Here I am at Camp Bodhisattva All this zazen gives me contusions but I think I'm really tackling my delusions
- Motor: Four Strategies For MaintainabilityJul 13, 2012When I started writing Motor, my async driver for Tornado and MongoDB, my main concern was maintainability. I want 100% feature-parity with the official driver, PyMongo. And I don't just want it now: I want to easily maintain that [ ... ]
- Refactoring Tornado Code With gen.engineJul 11, 2012Sometimes writing callback-style asynchronous code with Tornado is a pain. But the real hurt comes when you want to refactor your async code into reusable subroutines. Tornado's gen module makes refactoring easy, but you need to learn a [ ... ]
- Motor Internals: How I Asynchronized a Synchronous LibraryJul 9, 2012I'm going to explain why and how I wrote Motor, my alpha-stage asynchronous driver for MongoDB and Tornado. I hope I can justify my ways to you. The Problem Here's how you query one document from MongoDB with PyMongo, 10gen's official [ ... ]