TCLP 2014-12-21 A Sense of Scale and Getting Back Up to Speed

Used under CC license, by Wikipedia user Sunil060902This is an episode of The Command Line Podcast.

In this episode, I share a couple more essays. Before the essays, I help spread the request for support from the GnuPG project. You can donate here. The first essay was already published on the web site, “A Sense of Scale.” The second essay is new, “Getting Back Up to Speed,” and I will publish it on the site in the next few days.

You can grab the flac encoded audio from the Internet Archive.

Creative Commons License

In Some Small Measure, Wisdom

Picture of the Interior of the Jefferson Memorial, taken by Thomas Gideon

Yesterday I took what ended up being an epic walk. I have already written about how I have been walking more lately. Walking more has been easier over the last two months. I had been taking days off or at least working from home while focused on my job search. The other week, I had a sudden run of days in DC but hadn’t yet come up with attractive walking routes to help me keep up my new habit. In looking around an online map of what was nearby, I found Constitution Gardens. The Gardens truly are one of the hidden treasures of DC and I wish I had found them sooner. There is a huge water feature within which is a small island that has a ring of stone engraved with the signatures of all those who signed the Declaration of Independence. The Gardens are a decent half hour walk from where I work. Worked–today is my last day and my new gig is located much closer to home, in the suburbs.

During that first walk to the Gardens, I paused near the World War II memorial and happened to noticed the Jefferson Memorial was close by. On that day, I promised myself I would come back to see that site before my last day working in DC. I did just that yesterday, taking advantage of some cold but stunning weather.

The online maps make the memorial seem far closer to the Gardens then it is, at least by foot. I walked around the World War II memorial. I crossed several beating arteries of downtown traffic and started around the tidal basin. The view of the memorial as you walk under the cherry trees is breathtaking, especially on a clear, sunny day like yesterday. The view lingers as the walk around the basin is a good twenty minutes. When I finished my visit, I continued my around the other side of the basin which is even a little longer than the side I walked on the way down.

The time and distance (an hour and a half and more than four miles respectively) were only part of what made the walk epic, at least to me. Thomas Jefferson holds a special place in my regard. He attended my alma mater where we refer to him as either Young Thom or Our Thom. We used the latter especially around UVa students. Jefferson founded UVa but he was a student at William and Mary. The claim to him is part of the two schools’ long standing rivalry.

More importantly, when I was just getting involved in online activism, exploring topics around creativity and intellectual property in a post-digital, post-network world, a quote of his spoke to me deeply. In a letter to Isaac McPherson, he wrote this particular turn of phrase in talking about intellectual property, its nature and how we should think of its regulation, for instance by copyright:

Its peculiar character, too, is that no one possesses the less, because every other possesses the whole of it. He who receives an idea from me, receives instruction himself without lessening mine; as he who lights his taper at mine, receives light without darkening me. That ideas should freely spread from one to another over the globe, for the moral and mutual instruction of man, and improvement of his condition, seems to have been peculiarly and benevolently designed by nature, when she made them, like fire, expansible over all space, without lessening their density in any point, and like the air in which we breathe, move, and have our physical being, incapable of confinement or exclusive appropriation. Inventions then cannot, in nature, be a subject of property.

Visiting his memorial was a touchstone. At first I thought also it might be a farewell, a sort of personal resignation. I am leaving the world of working directly for the public interest to return to private industry. The memorial is filled with inspiring quotes, four of them in massive panels interspersed with openings out onto views of the tidal basin, the Potomac, and parts of DC. A more subtle quote is worked into the stone just beneath the dome.

I have sworn upon the altar of god eternal hostility against every form of tyranny over the mind of man.

Standing in a contemplative space dedicated to someone whose writings called to me across the generations, thinking about this transition in my life, that last part really struck me. Even though for reasons related to my own pursuit of happiness I was leaving the service of the public interest, in my own way I can certainly hold to fighting every form of tyranny over the mind of man. I can do so wherever I find myself, not in the least on this site and in my podcast as I am renewing and recommitting to my writing and thinking here.

That thought touched off what I hope is at least some small measure of wisdom I can take away from this job, more so than I have managed to realize when leaving jobs past.

Earlier in my career, I often gave into the urge to demonize the the people or experiences from a job I was leaving. I’ve read enough to understand I am not alone in feeling the urge to do so. Humans are story telling creatures. We continually weave a story of our own life. Our own individual narrative first and foremost supports who we think we are. When the world around us is at odds with who we believe ourselves to be, we feel pain in the form of cognitive dissonance. The easiest way to relieve that pain is to change our narrative, despite the facts, to restore the version of ourselves we believe is true.

I increasingly believe the secret of true wisdom is to resist rewriting our personal narratives. If we admit our own faults, the tale becomes the richer for it. We invite in opportunities to learn, to actually grow and honestly become more of whom we would like ourselves to be, in fact and deed. In holding more to the complicated, messy, objective facts of our lives, we can better embrace humility, honesty and courage, rather than simply rewriting the narrative. If we revise our story, we miss that chance to harness our faults and mistakes to urge us on to do and be better in the future.

Sense of Scale

Seahorse Tail fractal by Wikipedia user, Wolfgangbeyer CC-BY-SA

What is high quality code?

I have been asked this question now a couple of times in my current job search. I usually go back to my thoughts on functional decomposition. I like the concept but that phrase is clunky. It doesn’t help explain the concept very well.

As readers of the site know, recently I have been walking more in an effort to improve my health. For a longer time, walking has been a large part of my experience of travel. My favorite places to visit are those that are highly walkable. I suppose that is why I fell so hard for the few great European cities I have managed to visit so far. Most recently I spent a fair amount of time walking around Cleveland with a close friend, seeing that city through his eyes.

Like a lot of American cities, I noticed how distance in and around Cleveland works a bit differently than in the old world. To get from one part of a sprawling America metro area to another, often you have to take a car or some other form of transport like light rail or bus. The best America cities, as in Europe, are very walkable once you get to a specific part.

During this most recent trip I really dwelt on the different experiences of the same place when walking versus riding. Driving around, the scale of the place collapsed. Place names were much more shorthand labels than something I got any direct visceral sense of. I might see a storefront but it was there and gone too quickly for me to see into the interior, see the people inside, or any other specifics. I could form a very rough map of the overall city but could not yet identify with its districts and neighborhoods.

Once we got out of the car and started walking, my perspective shifted. The character of each district emerged in the how the various business, buildings and open spaces were arranged in close relation to each other. Architectural themes became more clear, revealing more detail and texture. Individual people, groups and crowds made more of an impression. Everything opened up, feeling a lot bigger. The other place names on my mental map receded further away in favor of the scenes right in front of me. Conversation with shop owners, restauranteurs and citizens became possible, filling in more of the narrative sense of place than the useful but necessarily brief sketches my guide gave me on the way in.

Even more recently, I took a walk through a well known area park that happens to extend right up to within a block or two of my home. The park is named for a creek that meanders through it and the foot paths closely follow the aimless curves the running water takes. I love walking with the sound of running water nearby. I took my ear buds out and left them out for most of my walk. Like the sense of expanding scale I felt during my week in Cleveland, my sense of the neighborhood opened up, through sound, sight and sense of distance.

I walked about to the nearest shopping plaza and back. By mileage covered, I actually walked at least twice as far as the straightest distance between there and my house. Walking through this stretch of green space right through in the midst of an active DC suburb, it felt like ten times as far. I realized how much I had been taking that distance for granted. I usually cover it in my car, in trips measured in tens of minutes rather than the hour my walk took. That walk covering the same area and a comparable distance felt like an entirely different scale.

I think there is a closer parallel revealed in the best written source code. High quality source code is like a fractal. The more you zoom, the more detail is reveal. That detail doesn’t have to be self similar, it usually isn’t. What emerges the closer you look is more like Mandelbroit’s more complex fractals, like the one pictured above.

When reading to get the general sense of a program, it should feel like driving through a city scape, taking in more of a gestalt than any specific surface detail. A reader should be able to grasp the general orientation of the code. This module does this, that subsystem does that. More specific details should be easy to ignore, behind API boundaries or at least in different but well laid out source files. The placeholders and map should cover just the broad functions, responsibilities and relationships of the code.

When troubleshooting, especially in an interactive debugger, it should be possible to walk down into the code to focus on a specific neighborhood to the exclusion of the rest of the code. That overall map may still be in mind, but it should feel comfortable and natural to just take in the local concerns without needing to know anything more specific about more distant code. If distance code intrudes, odds are your bug is going to be much, much more difficult to isolate and to fix.

When writing high quality code, think about the experiences you have that reveal different senses of scale for the same thing. For me, walking is one activity that helps me grasp this idea on an intuitive level. No matter how fast I walk, or even if I decide to run, the zoomed in sense of scale remains. I have to express a concrete intention to trigger a shift in scale, by getting in a car or a bus.

If you can use the tools your language and technology of choice provide to cultivate that same possibility of overlapping, simultaneous but different scales, then I think you are on to something. In my experience, code that works at various scales is easier to test, to read, and to troubleshoot.