Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Does your code tell a story?

Does your code tell a story?

Software developers are writers. Our medium is text. What can we learn about how to write better code by studying the practices of prose authors? Frequently in software development, we solve a problem, check in the code and release it. Unfortunately, this means that we release the first draft of our solution. One of the main lessons of writing workshops and classes is to write in small chunks .and revise ruthlessly. By releasing our first drafts, we increase the maintenance cost of our application by making it harder for the next developer to understand the initial intent of the our solution. In this session, we will explore concepts from the craft of writing such as small assignments, shitty first drafts, where ideas come from and the three types of drafts as they apply to the practice of software development.

Alan Stevens

April 24, 2012
Tweet

More Decks by Alan Stevens

Other Decks in Programming

Transcript

  1. David Gelernter Machine Beauty: Elegance and the Heart of Technology

    Beauty is more important in computing than anywhere else in technology because software is so complicated. Beauty is the ultimate defense against complexity.
  2. When I write, I feel like an armless, legless man

    with a pen in his mouth. Kurt Vonnegut
  3. E. L. Doctorow Writing a novel is like driving a

    car at night. You can only see as far as your headlights, but you can make the whole trip that way.
  4. You won't see how to do it until you see

    yourself doing it. David Allen
  5. Begin to write in the dumb, awkward way that an

    animal cries out in pain. Natalie Goldberg
  6. You must feel that you have permission to write the

    worst junk in the world and it would be okay. Natalie Goldberg
  7. 1. breaking your complex overwhelming tasks into small manageable tasks

    2. then starting on the first one Mark Twain The secret of getting started is
  8. Perfectionism is the voice of the oppressor, the enemy of

    the people. It is the main obstacle to your shitty first draft. Annie Lamont
  9. Three Kinds Of Drafts • The first draft is the

    “down draft” just get it down. • The second draft is the “up draft” clean it up. • The third draft is the “dental draft” where you carefully inspect each tooth.
  10. When you write a story, you're telling yourself the story.

    When you rewrite, your main job is taking out all the things that are not the story. Stephen King
  11. Once you know what the story is and get it

    right, as right as you can anyway, it belongs to anyone who wants to read it. Stephen King !
  12. When you finally realize what your program is doing, you

    have to go back and make it look like you knew that all along. Make it look like it was easy to write this program, even if it wasn’t. Ward Cunningham “Mastering the Craft of Programming” http://railslab.newrelic.com/2009/09/15/ward-cunningham-aboutus-org