Your code is a novel

What is the story told by your code?

The story in your code gives someone looking at it for the first time a sense of where they are in the codebase. The tests invite them in and give them a sense of who the code was written for and what they can expect from it. The overall structure of the code has a coherence with each piece needing to be where it is. Each line of code serves a purpose. Names have meaning in the context of what the app is doing and each line of code continues the journey of the line before it much like the sentences in a novel.

Tests tell the story

Tests are the entry point into thinking about the intersection of coding and writing. Have you looked at what your test titles look like when you execute them? If you have, do they tell a coherent story? It is easy to smash a phrase or two into a test title, but these are the first, tiny glimpse of your code to the outside world. These tests are also an expression of questions you’ve asked about what you are building. If there weren’t too many questions asked or there aren’t any tests, it is highly likely that there was never a shared understanding about the story the code is supposed to tell.

Test-driven development helps with this because, with your tests, you are creating the outline of what you are about to build. Picture writing a draft novel of 300 pages and then realizing that your main character is flat because they are not conflicted about anything. That’s a lot of writing to toss out because you didn’t do the outlining steps in the beginning.

Plot and structure

Great writing hangs together because there is a polished structure in place. Writers agonize over how conflict is exacerbated by a character’s fatal flaw or how well they have set up their character for the ultimate fall. This same attunement to structure turns into an eye for low coupling and good cohesiveness in code.

An application is not just about one method but about the patterns that emerge through classes and/or components. This shows in the way that each line of your code reads and each piece of code is in place because it needs to be where it is.

Editing as Refactoring

A friend told me that great engineers are not afraid to throw something away even if they have spent a significant amount of time working on it. I’ve frequently heard the same thing whenever I listen to novelists talk about how they edit their work. Experienced novelists won’t just throw away a scene, they will re-write everything from a different point of view or ditch a plot line completely.

Aside from larger edits, there is a joy in tightening down a piece of writing or a piece of code. Although it is important to do the simplest thing first to get something on the page or to get something working, that’s only part of the equation. It is also important to go back through a shitty first draft and excise anything that doesn’t belong, much like a sculptor winnows away until all that remains are the edges that truly tell the story.

Meaningful Brevity

There is a fine line between verbosity and names that are so short they have no meaning. In software engineering, there is a practical reason for brevity. That reason is performance. Extra loops, extra characters and extra method calls stretch out the time required for a browser to render a page just as too many words and writerly flourishes will take the reader out of a story. In a great piece of writing, every word is in place because it serves the purpose of the whole and because it must be there.

Semantics Matter

The semantic names of variables, methods, objects and classes can have a long life and are often repeated throughout a codebase. Not only do they have meaning in the context of where they are being defined but they are creating meaning every time they are reused elsewhere. What will those sentences look like to your reader and how will they live over time? Are the names you are choosing attached to some structure that is likely to be refactored away. If you are choosing names to reflect what a user will see in your app are you using the same language as your teammates who won’t be looking at your code?

It’s about the journey

While it is an accomplishment to hold the book you wrote in your hand or to point to the app you built, this is not the greatest joy of writing or coding. The joy is in the creation. The best days are the days when thought after thought and page after page comes tumbling out. As an engineer, you know what you are building and have broken the problem down into enough small pieces that challenge after challenge lasts a moment, or two moments and then you are writing the next test and building the next object. In pair programming, these are the moments when you’re deep in a two way communication and the code spills into your editor like swift waters rushing in a river and you are floating along.

Writing is a longing to experience this feeling of floating time after time. It’s about setting up your life to maximize the time that you spend in that space of words and thoughts coming together. Just as writers often figure out if they work best in the morning or at night, engineers learn about their own style and how to support it. It might be that your best work happens alone and at odd hours in your own home or it might be that you prefer an office filled with noise of collaboration because that is what comforts you.

Although software engineering has historically been pitched as an activity for people who think in logic symbols instead of words and human emotion, there is value in exploring the strong relationship between great writing and great software engineering. It is worth exploring your own relationship to writing and how that relationship expresses itself in your code. It is often the case that great engineers are also great writers which is proven out in their code. Your code is a novel.

Bringing back the Riot Grrrl

2009 was the year I rode zeitgeist like a motherfucker.

me in 2009
Portrait of a woman with her shit together

My blog became more widely read in software testing circles. I presented what still stands as one of my favorite talks on software quality and data visualization at the PNSQC Conference in Portland.  One week later, I presented that same talk, my first ever conference talk at Adobe Software in Seattle and again at Microsoft in Redmond. After graduating with an MS in Software Engineering I moved to Australia to work for a company making killer software development tools.

From the outside, my career was taking off and there were no limits.  My twitter exploded, I was in contact with a lot of conference organizers and I met so many people.  But, at work, I found my opinions being questioned and put down in ways I hadn’t expected.  In going from one job to the next, I found that, each time, what I had to say felt diminished.  I didn’t feel listened to or heard.  I was told I should be less abrasive, less aggressive, less defensive and take things less personally. When I did that, I was told that I shouldn’t bottle up my emotions.

I was #thatwoman.

Zeitgeist has a way of turning around and moving on without you.  I could feel its energy and power withdrawing as a particular stack of books grew taller on my bedside table: The No Asshole Rule, Crucial Conversations, The Sociopath Next Door, What Every Body is Saying, The Five Dysfunctions of a team, The Emotionally Abusive Relationship, Behind Closed Doors: Secrets of Great Management and Good Boss, Bad Boss.

If it made you tired reading all of those titles, think of reading each one cover to cover and making sure you apply what you learn from them every day at your job because you’re trying to survive and be the employee management seems to want.  That’s what I did over a period of 6 years.

What I found is that no matter how much I read and worked at not being an asshole or finding the “right way” to say things or get my opinions across, I could never be silent enough.  Quiet crept into my head and started to expand there like a cancer.

What? Quietness? Me?

The writing I do is smart, ambitious and full of backbone because that is who I am. These qualities, however, can lead to suffering at work…particularly for women. This is called tone policing.

Tone policing shows up in one-on-one meetings, performance reviews, chats with well-meaning co-workers, beers with friends, meet ups with strangers.  It even comes from the mouths of well meaning women and men who consider themselves feminist and/or interested in equal rights for women…that’s right. It is everywhere and it will chip away at you and chip away and chip away until it becomes something else entirely and you are being erased and even erasing yourself.

This is the equivalent of clear-cutting and terraforming your emotional acre and it can happen to anyone, even those who appear, on the outside, to be highly successful.

Here I am, on my birthday last year at the lowest point in the country, Death Valley. The low was also metaphorical. Yep, I was down. Way down. Further than ever and talking to no one.

I had erased myself. My writing no longer made sense because I couldn’t allow myself to say anything. My tweets were more polite than ever and slowed to a trickle.

What I didn’t anticipate at the bottom, was that zeitgeist, would once again, turn and present itself at a different angle, an angle I wasn’t expecting.

photo of Kathleen Hanna
Punk Singer

This is Kathleen Hanna.  She’s one of the firestarters of the Riot Grrrl movement.  I hadn’t heard of her before going to see the film about her titled “Punk Singer” on a get-to-know-you outing with San Francisco’s feminist hacker space, Double Union.  DU was, at the time, just getting started and looking for new members.

Riot Grrrl was a punk-rock, DIY focused movement born of Pacific Northwest, 90’s grunge zeitgeist.  Kathleen Hanna was the lead singer of punk band Bikini Kill and the person who spray painted the phrase “Smells Like Teen Spirit” on Kurt Cobain’s wall.  When taking the stage, she would call for all women to go to the front so that they could dance because, at the time, men had turned the front of the stage into unruly and unsafe mosh pits.

As I watched “Punk Singer,” I couldn’t stop looking at Hanna’s hair.  I couldn’t stop thinking about how I had worn that same shade of hair back in my heyday.  I fingered strands of my own long, brown hair and had a cry as the movie neared its conclusion.  After the film, I went home, cued up Bikini Kill’s Rebel Girl on YouTube and made an appointment with my hair stylist.

Sometimes finding your voice starts with a hair color.

For me, it was changing my hair color back to black and finding my place among those bringing the RiotGrrrl zeitgeist back around and into San Francisco’s tech scene where it is so sorely needed.

I got accepted as a member at Double Union and I began learning.  I’ve learned that the more smart and ambitious you are as a woman, the larger a target you become for other people’s projected insecurities and assumptions i.e. the more I follow Sheryl Sandberg’s advice to be bold, the harder and more damaging the knockbacks are likely to be.  I learned that it doesn’t matter how much I work at erasing myself, it will never be enough.  I learned that not all women are feminists and even women who think they are feminists are capable of tone policing other women.  I learned that anger is a beautiful, inspiring emotion that I’ve earned the right to feel in every cell of my body, and above all, I learned that it’s ok for me to have a voice and to use it.

I’ve been using that voice lately and sometimes it’s harsh.  Sometimes my voice shows the anger, grief and frustration of a woman who has been cut down time after time but who is still, somehow, a fighter.  Sometimes this takes people by surprise and they don’t know where the anger comes from, they only see me letting it go.  There was a time when I would have said, “don’t mind me,” or “so sorry, I don’t mean to offend,” but, I’m done with that.  To some extent, this means that I might lose some followers and that some people will shake their head and say, “she used to be so accommodating.”  So be it.  I’d rather be myself.

 

zineOver the holidays, I went to see the art exhibit Alien She: Examining the lasting impact of Riot Grrrl exhibit at Yerba Buena Arts Center.  Looking at the huge wall of Zines (pronounced zeens) assembled for the exhibit, it reminded me of the amazing zine community we have at Double Union. In looking at the hot pink, barbed wire fence made of yarn, I thought of the large number of members at Double Union who have brightly colored hair. The sound of the punk music strewn throughout the exhibit on iPods tracks not only with our collective frustration that tech is so fucked up and we’re just trying to survive it, but also with the happy chaotic noise of gatherings at DU.  The exhibit is open for another week until January 25, by the way.

In the meantime, another legendary Riot Grrrl band, Sleater Kinney has reunited and is releasing a new album today.

Between Double Union, Punk Singer, Alien She, Sleater-Kinney, Model View Culture, AdaCamp in Portland last Summer and the upcoming Alter Conf, it’s as if there is a badass, feminist zeitgeist that has ridden into San Francisco on the back of Karl the Fog.  It has, for now, decided to settle on the 4th floor of the The Fog Building in the Mission.  I show up there and breathe it in.  It, along with some great friends and a wonderful partner have helped take me back to the powerful, unafraid woman I was in 2009.  It’s help me slough off the dead weight of jobs past and prepare me to advocate for myself more, to give myself more credit and to sing and sometimes shout like a motherfucker.

The Riot Grrrls are back and so am I.

selfieThanks to all of my friends at Double Union and to my non-DU friends who have shoved the microphone back in hands. I am shouty-singing.

 

Freedom Writing

Martin Luther King leaning on a lectern. Deuts...
Martin Luther King (Photo credit: Wikipedia)

Growing up in The South, or, more specifically, in the city of Atlanta, Georgia, I was exposed to plenty of civil rights history.  As someone who considers herself a southern expat, much of that history burned a deep hole inside my chest.  In 2nd grade, I was taken to the birthplace of Martin Luther King, Jr. and taught about segregation.  It came as quite a shock since all of my friends were black and I previously had no concept of race.

 

Racial inequality is a deep thought for a six year old and it really shook me.  I continued my pondering as I grew older and visited the American Holocaust Museum in Washington, D.C.  Walking through the forever tainted air of a cattle car used to shuttle Jewish people to their deaths in Nazi, Germany, the ultimate consequence of racism chilled me to the bone.  Picture it: your relatives are dying horrible, tortuous deaths all around you and you are likely next because of what you all believe or the color of your skin.  It happened in The South too.  It just wasn’t government sanctioned.

 

Even today, what I know about the history of my family’s small town in south Georgia is a white history.   The monochrome shade of it makes me wonder what has been boarded up in so many of the tumble-down, tin-roofed shacks you will pass if you journey there.

 

As a writer, I work at making everything I write a work of honesty, and what I’ve found is that the best writing always comes from the deepest feelings.  Great writing is not about the good times in life.  Great writing happens when you feel wronged or hurt or marginalized.  Writing is not a pedestrian activity.  It is the emotional equivalent of fire-breathing, flames dancing and the residual smoke that permeates for a long, long time.

 

Thus, I’m celebrating the 50th anniversary of the “I have a dream speech,” written by Dr. Martin Luther King, Jr., a writer who swallowed more than his fair share of flames. Here is a sentence of his that has been on my mind lately:

 

“…when you have seen vicious mobs lynch your mothers and fathers at will and drown your sisters and brothers at whim; when you have seen hate filled policemen curse, kick and even kill your black brothers and sisters; when you see the vast majority of your twenty million Negro brothers smothering in an airtight cage of poverty in the midst of an affluent society; when you suddenly find your tongue twisted and your speech stammering as you seek to explain to your six year old daughter why she can’t go to the public amusement park that has just been advertised on television, and see tears welling up in her eyes when she is told that Funtown is closed to colored children, and see ominous clouds of inferiority beginning to form in her little mental sky, and see her beginning to distort her personality by developing an unconscious bitterness toward white people; when you have to concoct an answer for a five year old son who is asking: “Daddy, why do white people treat colored people so mean?”; when you take a cross county drive and find it necessary to sleep night after night in the uncomfortable corners of your automobile because no motel will accept you; when you are humiliated day in and day out by nagging signs reading “white” and “colored”; when your first name becomes “nigger,” your middle name becomes “boy” (however old you are) and your last name becomes “John,” and your wife and mother are never given the respected title “Mrs.”; when you are harried by day and haunted by night by the fact that you are a Negro, living constantly at tiptoe stance, never quite knowing what to expect next, and are plagued with inner fears and outer resentments; when you are forever fighting a degenerating sense of “nobodiness”–then you will understand why we find it difficult to wait.”

 

I first read this sentence in the book that currently tops my Goodreads shelf, “How to Write a Sentence and How to Read One” by Stanley Fish. It’s an example of a sentence built up with dependent clauses.  Whatever.

 

Even without an analysis of its grammatical brilliance, this sentence is a wildfire, and you might think that Dr. King agonized over this sentence at a desk in a nice office as he planned out his next protest, but that is WRONG.

 

Dr. King wrote this sentence on toilet paper while he was sitting in a jail cell after protesting to end segregation.  This is what happens when a brilliant writer and thinker has something to say and manages to get it down on paper in the moment.

 

While today we are celebrating the 50th anniversary of Dr. King’s “I have a dream” speech,  the letter Dr. King wrote in a Birmingham jail certainly fanned the flames which led to his march on Washington.  Godspeed, sir.

Enhanced by Zemanta

Getting through the first draft

 

See the Australian Vampire?
The first draft: A visual

 

First a character shows up.  You see them in the shower or as you are getting yourself to work.  Some details are fuzzy, but some are plain as day.  They become someone you greet in the morning, before you rise from your bed or someone you turn to on a really bad day when it seems the whole world is against you.  Eventually, you realize that they aren’t going anywhere until you make them real on a page.

 

 

 

Thus I began my journey with just a few pages.  I typed them up, then put them away thinking, “so that’s done.”  Little did I know that my protagonist had other ideas.  I kept looking at my pages, re-reading them, adding to them and even having a couple of people read them.  The point at which they turned from pages into a “novel” is lost to me.  Perhaps it happened on the day I completed the first scene and asked myself, “now what?” or perhaps it was when I looked at it and realized I needed a writing class.

 

 

 

At this point, I was back in the U.S. from Australia, living in Mountain View, California.  As luck would have it, I had a job which allowed for easily sneaking off early once a week to drive up to San Francisco.  I found some classes at San Francisco’s Writing Salon and signed up, eventually landing in a 6 month Novel Continuation Class.  Aside from teaching me some basic elements of fiction writing, the classes taught me how to build my own writing practice and week by week over a year I managed to keep going.  I finished up on July 4th, Independence day in the U.S.

 

 

Here are some of the lessons I learned as I worked my way through:

 
You MUST lower your standards
Ira Glass, host of This American Life, hints at the conundrum of working on a first novel when he talks about beginning creative work:  You have more taste than skill.  In my case, I told myself that this first draft was supposed to be the “Twilight” version of my novel and no better.  If my pages wanted to be cheesy and awful, I let them.  If a character had an urge to do something completely “out of character,” I let them.  There are run-on sentences, phrases which are repeated too many times and I can’t even tell you what’s going on with the point of view.  For your imagination to work, it has to go where it wants to go and there’s very little steering involved when writing a first draft.  In fact, I found it useful to acknowledge that the craft side of writing exists, and to then ignore the bulk of it.

 

 
Once you get through the pages that set up your novel, you will need help with mapping the plot
Eventually you will have some vague sense of your characters and the world that they live in.  At this point, it is likely you will have to map out some of the plot.  There are different ways to do this.  I chose to read John Truby’s The Anatomy of Story which was written for film but can also help for novel planning.  Another suggestion that I might try as I work on my second draft is to read the second half of The Art of Story Engineering.  When mapping a plot, expect your page count to go down.

 

 
There are people who can write a whole novel in 6 weeks.  Screw them.
If you have a job and/or children, this will not be you.  If you manage to consistently write 5 pages a week, you’re doing great, and some weeks your page count will be as low as one or two.  If you’re sick, just give it up and get better.  The pages will be there.

 

 
Other areas of your life will suffer
This past year has seen me withdraw somewhat from blogging, and very much from attending conferences or even working on tech projects at home.  It’s been painful letting all of that go, but it needed to happen.  I don’t even promise that I’ll be picking those things back up because there’s more work for me to do on the novel.

 

 
Don’t write about tech unless you have no other choice
We’ve got 3-d printers, robots helping the elderly and cars that drive themselves.  Good luck staying ahead of that curve.  Since I began writing, the name I chose for a fictitious company has turned into a real company and meanwhile, “mobile first” is here.  After reading this interview with Warren Ellis, I made a conscious choice to stop writing in technical details because they change too quickly.  The bottom of all conflict is always inherently based on people and their relationships so I tried to focus on that as much as possible and leave the technical details for later.  It is no accident that my other ideas for novels are as far away from tech as I could make them.

 

 
You will be a different writer when you finish than you were when you started
This was something Karen pointed out in one of our classes.  As I progressed through the pages, I found myself digging into my characters more and finding that some of them were different than I had initially imagined.  In fact, some of the main plot points in the novel changed in front of me in ways I had not expected at all, yet if I go back and read the first pages, the bones were there.  My mental archaeological digging uprooted ideas buried so far down there is no way I would have seen them in the beginning.

 

 
The end of the first draft is just the beginning
So, here I am with my bag full of bones.  The next step is to assemble this Pterodactyl.