How I’d like to handle my future public fuck up

I’m still a relatively young guy, I speak my mind, and I have a lot to learn about the world. This means that I will almost certainly fuck up in a public context. Not because I’m inherently a dick, but because I’m inherently human and make mistakes. When you see me fuck up, here’s what I’d like you to do:

  • get up and leave if you find it that offensive
  • track me down and address me in private
  • have an earnest conversation with me and allow me to think things through

Should you decide to call me out publicly, which is totally your right, then please do it immediately. Raise your hand, grab a microphone, or just shout out. Whatever it takes. I will take it in stride as best I can. I will say:

Thank you for bringing this to my attention. I hadn’t considered that. I will be mindful of this for the remainder of my time here. Can we please meet up afterward to discuss this in detail so I can understand where you’re coming from?

After said conversation, I will make a public apology if I feel it is warranted.

That’s it. I don’t expect this to work for everyone, and I don’t expect it to play out like this. I do want to put this out there in the hopes that folks with whom I share time and space can give each other the benefit of the doubt once in a while and learn from one another.

Some Books for Software-oriented Humans

Here’s a list of (mostly) software-related books I love. None of them are a big secret – they’re all written by people that go to the same conferences you and I go to, published by the typical software book publishers, and sold in all popular bookstores (except for the Real Options comic book).

I’ve kept the descriptions short and sweet mostly for pragmatic reasons, but also because I’m not trying to convince you to read any of these. Rather I’m simply offering them up as a bookshelf that you might peruse to see what strikes your fancy. I consider all of these to be “the best” books or “my favorite” books. That is, if you were pull any of these books off of my bookshelf I would smile and say “nice choice.”

After forming the list I grouped them into categories that made sense given the selection of books. Inside each group I’ve listed them by the date they were published. When reading any book, technical texts in particular, it’s important to take note of when the book was written and published. Sometimes readers criticize a work for its ideas “being a bit out of date.” That might be an accurate criticism of a book published in the late 90’s, but certainly an unfair one! I’m also a big fan of reading several books about the same topic at once, and I like knowing where they each fit into the conversation.

I’ve included links to freely-available online versions if I know of them, otherwise the links will take you to Amazon. If you know of a freely-available legal copy of any of the books here, please email me with the information and I will update it on this page.


Non-software-specific books

I’m starting off the list with these two books because they’re the only two non-software-specific books on here. Pragmatic Thinking and Learning will help you digest this reading list (or any other), and Fearless Change will help spread new ideas you learn to your workpace.

Fearless Change: Patterns for Introducing New Ideas

Mary Lynn Manns

September 2004

What it’s about

Creating positive change within yourself, team, and workplace

Why I love it

You’d think that sharing awesome new ideas with people would be welcome and easy, but it turns out that a lot of people hate change. This book has helped me fight the good fight numerous times.

Pragmatic Thinking and Learning: Refactor Your Wetware

Andrew Hunt

November 2008

What it’s about

Strategies for learning, and maintaining a sharp mind

Why I love it

It gives some insight into cognitive theory, and is packed full of strategies on how to learn effectively by retaining information and creating learning curriculums. This continues the PragProg theme of being responsible for your career and personal growth. It serves as a great starting point for learning about learning.


Agile

Extreme Programming Pocket Guide

chromatic

June 2003

What it’s about

A small handbook of XP principles and practices

Why I love it

It’s a super handy reference for XP ideas and great for giving to people to give them a first exposure to XP

Extreme Programming Explained: Embrace Change (2nd Edition)

Kent Beck & Cynthia Andres

November 2004

What it’s about

Effective, sustainable, ethical software development

Why I love it

I spotted the first edition of this book when I was 15 and was immediately drawn to it because I though “Extreme Programming” sounded cool. It was way over my head at the time but it did introduce me to unit testing which I was able to apply right away to my little IRC client that I was building. Through the years I continue to go back to it and am always impressed with the focus on human interaction and behavior. It’s an important work on ethical software development.

Agile Principles, Patterns, and Practices in C#

Robert C. Martin

July 2006

What it’s about

Pragmatic agile development

Why I love it

It gives a good rundown of the different practices you might use in an agile software project, and goes into great detail on important design patterns and principles for building high-quality software systems. As far as I know this is the first published reference to SOLID.

Agile Software Development: The Cooperative Game (2nd Edition)

Alistair Cockburn

October 2006

What it’s about

An analysis of what makes software development tick, and how to arrive at an effective development model for your team and organization

Why I love it

This book taught me how to think about software development methodologies instead of simply how to follow one. This is another book that is focused squarely on the human element of software development, which is by far the most important aspect.


Business / management / less-technical

The Secrets of Consulting: A Guide to Giving and Getting Advice Successfully

Gerald M. Weinberg

January 1986

What it’s about

Getting paid to give advice

Why I love it

Consulting can be like trying to navigate around Cape Fear. This book serves as lighthouse, map, and tidetables…but it can’t change the weather.

The Mythical Man-Month: Essays on Software Engineering, Anniversary Edition (2nd Edition)

Fred Brooks

August 1995

What it’s about

The realities of managing software projects

Why I love it

People screw up software projects in a lot of ways, and this book covers nearly every one of those in some form or another. “Adding manpower to a late software project makes it later,” “no silver bullet,” and the temptation and tragedy of software rewrites are all in this book. It’s a set of essays that you can read one at a time.

Peopleware: Productive Projects and Teams

Tom DeMarco

February 1999

What it’s about

How humans interact on software projects

Why I love it

It covers serious topics in a light-hearted manner, and challenges a lot of the “established wisdom” about managing software projects.

Beyond Software Architecture: Creating and Sustaining Winning Solutions

Luke Hohmann

February 2003

What it’s about

Bridging the gap between business and technology

Why I love it

It turns out that running a software business requires way more expertise than just writing good code. This is basically a handbook on running a software company.

The Inmates Are Running the Asylum: Why High Tech Products Drive Us Crazy and How to Restore the Sanity

Alan Cooper

March 2004

What it’s about

Creating technology that humans love to use

Why I love it

This got me thinking about software from the user’s perspective, which I had never really done before. I consider this another important work on ethical software development.

Chris Matts Presents Real Options at Agile 2009

Chris Matts

2009

What it’s about

An economic approach to software development

Why I love it

This book opened my eyes to the reality that software projects are economic problems. It’s a quickly-read comic book that will change the way you think about planning software development.


OOP & Design Patterns

Design Patterns: Elements of Reusable Object-Oriented Software

Richard Helm, Erich Gamma, John Vlissides and Ralph Johnson (“Gang of Four”)

November 1994

What it’s about

Designing object-oriented software

Why I love it

I never thought about design before this book, I just wrote code and tried to make it work. The GOF book introduced me to the idea of object-oriented design and gave me plenty of ideas for writing understandable, maintainable code.

What Every Programmer Should Know About Object-Oriented Design

Meilir Page-Jones

August 1996

What it’s about

How OOP is supposed to work

Why I love it

Wrapping your code in objects doesn’t necessarily mean you’re “doing OO” and certainly doesn’t mean you’re doing it effectively or deriving the benefits of a well-implemented OO approach. I think this is the most important book when it comes to conceptualizing OO programming.

Analysis Patterns: Reusable Object Models

Martin Fowler

October 1996

What it’s about

Domain-specific patterns that show up in all types of applications

Why I love it

The world doesn’t need any more accounting software, yet on nearly every project I’ve worked on I’ve been tasked to build at least a little bit of accounting functionality. This book contains an in-depth analysis of accounting patterns (how exciting!), as well as patterns for measurements, planning, and contracts. If it sounds a bit dry it’s because it is, but it is still a great reference for working on these sorts of problems. Also with a bit of imagination you’ll start to see how these patterns appear all of your code even if it’s not in the same domain language as this book, and you can draw on it for inspiration. This book introduced me to the layered architecture.

Smalltalk Best Practice Patterns

Kent Beck

October 1996

What it’s about

How to write good code

Why I love it

It manages to strike a fine balance between telling me how to write code and how to think about writing code. Every pattern in this book presents an example of good code and explores what makes it good.

A Little Java, A Few Patterns

Matthias Felleisen and Daniel P. Friedman

December 1997

What it’s about

An approachable introduction to object-oriented programming and design patterns

Why I love it

It’s written by the same folks and in the same style as “The Little Schemer.” It introduces some of Java’s basic features, and covers object-oriented theory and design patterns in a fun, approachable manner.

Refactoring: Improving the Design of Existing Code

Martin Fowler

July 1999

What it’s about

How to safely take any bit of code and rework it so it makes sense to you

Why I love it

It’s one of the best-written books that I’ve read and has stood the test of time. I still refer to it when I have a design problem and am not quite sure what to do.

Object-Oriented Software Construction

Bertrand Meyer

March 2000

What it’s about

The nuts and bolts of writing robust applications in an object-oriented style

Why I love it

It convinced me that object-oriented systems can be every bit as rigorous and provably correct as functional systems. Half of SOLID is from this book.

Smalltalk, Objects, and Design

Chamond Liu

April 2000

What it’s about

An introduction to smalltalk that quickly moves onto object-oriented design principles

Why I love it

This book made smalltalk accessible to me and improved my thinking about object-oriented design in general to apply to other programming languages.

Streamlined Object Modeling: Patterns, Rules, and Implementation

Jill Nicola, Mark Mayfield, Mike Abney

October 2001

What it’s about

Organizing logic in an object-oriented software system

Why I love it

It completely changed the way I think about object-oriented design. I’ve used the patterns in this book on several projects, and the parts of code that use these patterns are by far my favorite to work with. It’s the most worn out book on my shelf.

Object Design: Roles, Responsibilities, and Collaborations

Rebecca Wirfs-Brock

November 2002

What it’s about

The fundamentals of object design

Why I love it

I think this is the first book I read on object design, and it really helped me start to understand the difference between wrapping code in objects and object-oriented programming. It provides a straightforward methodology for analyzing problems and breaking them down into OO solutions.

Domain-Driven Design: Tackling Complexity in the Heart of Software

Eric Evans

August 2003

What it’s about

Focusing on the business logic in software

Why I love it

The second most important lesson I’ve learned about software development is that software is a knowledge acquisition process (the most important is that it’s always all about people). This book started me on my journey towards understanding how we learn in software projects and what we do with that knowledge. It argues that understanding the business logic of software projects is so important that you should make every effort to keep those concerns separate from all other concerns. It covers how to have conversations with domain experts, analyze problems, and ultimately implement them in code. I’ve also given away several copies of this book, and it served as the basis of my Domain-Driven Rails talk at Aloha on Rails (video) and Domain-Driven Rails Redux at RailsConf 2010 (slides).

Object Thinking

David West

February 2004

What it’s about

Understanding a software system’s behavior and organizing responsibilities

Why I love it

At this point in life I’m better served by books that give me a new way of thinking about things rather than just telling me how to do something. This is that book, for OOP.

Refactoring to Patterns

Joshua Kerievsky

August 2004

What it’s about

Moving code towards and away from design patterns

Why I love it

I definitely became “patterns happy” when I read the gang of four book. This book helped me identify the patterns hidden in my code and make them explicit, rather than try to force design patterns on my code. It was a critical book in my understanding of evolutionary design.

Design Patterns Explained: A New Perspective on Object-Oriented Design (2nd Edition)

Alan Shalloway & James R. Trott

October 2004

What it’s about

Object-oriented design with a focus on design patterns

Why I love it

It taught me how to think about object-oriented design and design patterns, not just tell me what they are.

Implementation Patterns

Kent Beck

November 2007

What it’s about

How to think about and write good code

Why I love it

It’s the same idea as his Smalltalk Best Practice Patterns, only in Java and with an extra decade of experience

Design Patterns in Ruby

Russ Olsen

December 2007

What it’s about

Structuring Ruby code

Why I love it

It’s the first book I read that really focused on beauty as a desirable end goal when writing code.


Automated Testing / TDD

Test Driven Development: By Example

Kent Beck

November 2002

What it’s about

An introduction to TDD

Why I love it

This is the book that started it all. Whenever I learn a new language or test framework I go through the examples in this book.

Test-Driven Development: A Practical Guide

Dave Astels

July 2003

What it’s about

Using TDD to write real software

Why I love it

After I read TDD by example I wondered, “where do I go from here?” This book was the answer for me. It builds on Kent’s work and builds a working, useful application start to finish using TDD, with a focus on refactoring. It also introduced me to the idea of “programming by intention” which has served me well.

JUnit Recipes: Practical Methods for Programmer Testing

J B Rainsberger

July 2004

What it’s about

Practical considerations when writing automated programmer tests

Why I love it

The recipes in this book have one underlying theme: how to think about automated testing. Even if you skip over the huge section on J2EE, you’ll get your money’s worth from the chapter on testing design patterns and appendix of essays.

Every recipe is presented in a “Problem, Background, Recipe, Discussion” format, making it a very pragmatic, approchable book and another one of those books you can digest in chunks.

Working Effectively with Legacy Code

Michael Feathers

October 2004

What it’s about

How to confidently make changes to gnarly, untested codebases

Why I love it

Life sucks when you don’t have automated tests to back you up. Follow the strategies in this book and you’ll eventually turn a codebase you hate into something enjoyable to work on. Note: It’s hard work.

I’ve given away more copies of this book than any other. It inspired my Working Effectively with Legacy Rails Code talk at Scotland on Rails 2009 (video) that I expanded with BJ Clark at RailsConf 2009 (slides)

xUnit Test Patterns: Refactoring Test Code

Gerard Meszaros

May 2007

What it’s about

How to write and refactor your way to a clean test suite

Why I love it

I’ve worked on many software projects where the team was dedicated to refactoring and keeping their codebase clean, and the test suite was a horrific mess. I never understood why. Then this book came out and I realized that it filled a hole: there simply was no literature on what makes for clean test suites prior to this book. There are different forces at play in your test suite than your production code, so the way you keep it clean necessarily differs from time to time. If you’ve wondered how to write a particular test, you’ll find some good hints in this book.

Growing Object-Oriented Software, Guided by Tests

Steve Freeman & Nat Pryce

October 2009

What it’s about

How to use TDD to build a software system from the ground up and continually refine its design to incorporate new understanding and keep things simple

Why I love it

Earlier books showed you how to do TDD. This is the book that shows you how effective TDD helps you write good software.


General Programming

The Pragmatic Programmer: From Journeyman to Master

Andrew Hunt & Dave Thomas

October 1999

What it’s about

Crafting a career as a software developer

Why I love it

It introduced me to several important programming practices and served as a starting point for deeper research and explanation. It gave me practical ideas on how to be responsible for my growth as a programmer. To this day I think it is the most beautifully constructed, organized software-related book that I’ve read.

Code Complete: A Practical Handbook of Software Construction

Steve McConnell

July 2004

What it’s about

Constructing robust software applications

Why I love it

I call it “Object-Oriented Software Construction, Millenium Edition.” It’s not an OO book, but it’s in the same vein as OOSC in that it provides a detailed approach for constructing software that can withstand users and technology.

Programming Ruby: The Pragmatic Programmers’ Guide, Second Edition

Dave Thomas, Chad Fowler, Andy Hunt

October 2004

What it’s about

Our most favoritest programming language ever

Why I love it

This might be the best language-specific book I’ve ever read. I remember it being so approachable, and it got me excited about programming again. Nearly every page led me to yell “no way!” and go experiment. Had I not encountered this book, I may not have pursued a career as a programmer.

There’s a 1.9 edition that I’ve not read yet.

Ruby for Rails: Ruby Techniques for Rails Developers

David A. Black

May 2006

What it’s about

An in-depth look at Ruby’s powerful features, with a focus on how they’re used to implement Rails

Why I love it

This book really opened my eyes to what you can do with Ruby. I had dug into the Rails source code but found a lot of what looked to me like magic. Ruby for Rails explained the magic and inspired me to do some crazy stuff with Ruby.

Clean Code: A Handbook of Agile Software Craftsmanship

Robert C. Martin

August 2008

What it’s about

Developing the habit of writing the best code you’re capable of, and constantly raising the bar

Why I love it

This is a great “15 minutes a day” book. It’s basically a list of of tricks and rules of thumb that old people like Bob wish young people like me knew. You can literally open the book to any page, read for 15 minutes, and come away with something to use in your work that same day.

The Clean Coder: A Code of Conduct for Professional Programmers

Robert C. Martin

May 2011

What it’s about

Bob’s treatise on what it means to be a professional programmer

Why I love it

Whereas Clean Code is all about the nitty gritty details of writing and thinking about code, The Clean Coder takes you up 10,000 feet and advises you on how to approach your career and growth as a programmer.


Software Architecture

Patterns of Enterprise Application Architecture

Martin Fowler

November 2002

What it’s about

Architectural design patterns

Why I love it

Design patterns in day-to-day code is nice, but what about application architecture? The way you divide your app into business logic, infrastructure, and error-handling code has a huge impact on how robust and maintainable your software is. My favorite part of reading this book was noticing how many ideas in Rails’ architecture came from this book (and how other parts of Rails could be improved!)

Enterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions

Gregor Hohpe & Bobby Woolf

October 2003

What it’s about

How to connect large software systems in a loosely-coupled manner

Why I love it

If I’m looking to split an application into services, expose an API, or consume an API, I consult this book for ideas, and it delivers.

The Architecture Of Open Source Applications

Amy Brown & Greg Wilson

June 2011

What it’s about

This is an anthology of essays written by open source software authors about software packages that you know and love (or hate)

Why I love it

It provides a pretty in-depth look at a wide variety of open source projects, in which the authors of those projects tell you funny stories, discuss the historical context of the software, and present some of their major challenges and how they solved them. If you want to understand how productive programmers make pragmatic decisions to ship useful software, this is a great starting point.


Functional Programming

The Little Schemer – 4th Edition

Matthias Felleisen, Daniel P. Friedman and Duane Bibby

December 1995

What it’s about

Recursion

Why I love it

It’s written in an extremely pleasant socratic dialogue style and introduced me to scheme. It focuses on breaking down problems into recursive solutions which can yield extremely elegant results.

The Seasoned Schemer

Matthias Felleisen, Daniel P. Friedman and Duane Bibby

December 1995

What it’s about

Thinking about computation

Why I love it

It introduced me to important functional programming concepts as well as computation concepts in general that I’ve been able to apply in my work every day since I read it.

Structure and Interpretation of Computer Programs, Second Edition

Harold Abelson, Gerald Jay Sussman and Julie Sussman

August 1996

What it’s about

The theory and practice of computer science

Why I love it

This is one of the absolute classics, and working through it gave me a solid foundation for reasoning about computer programs. The chapter on implementing a scheme interpreter in scheme blew my mind and excited my imagination.

The Haskell School of Expression: Learning Functional Programming through Multimedia

Paul Hudak

February 2000

What it’s about

Solving programming problems using functional thinking

Why I love it

My favorite thing about this book is how the author takes multiple approaches when solving problems. That’s the way most good programmers I know work – they try out a few different things and pick the best one. It’s refreshing to see a book advocate that sort of work ethic.

Practical Common Lisp

Peter Seibel

April 2005

What it’s about

How to build useful programs using Common Lisp

Why I love it

It took me a while to wrap my head around some of the stuff in this book but after typing in every line of code and studying it I started to come to grips with Common Lisp and felt comfortable writing programs on my own with it. It also has a chapter on building a TDD framework, and you know I’m a sucker for that.

The Reasoned Schemer

Daniel P. Friedman

October 2005

What it’s about

Merging functional and logic programming

Why I love it

It introduced me to logic-based programming in the style that I loved about The Little Schemer and The Seasoned Schemer

Let Over Lambda

Doug Hoyte

April 2008

What it’s about

Hardcore Lisp programming

Why I love it

Section 1.1 is titled “Macros”

Land of Lisp: Learn to Program in Lisp, One Game at a Time!

Conrad Barski

November 2010

What it’s about

Having fun while learning Lisp

Why I love it

This is probably the most fun I’ve had reading a programming book, and it’s so deep. It starts you off with “so what are these parentheses anyway” and takes you all the way to writing web apps. Along the way you learn all about the features that make Lisp so powerful. Plus, cartoon aliens!

Learn You a Haskell for Great Good!: A Beginner’s Guide

Miran Lipovaca

April 2011

What it’s about

A crash course on functional programming using the purest functional programming language around

Why I love it

“A language that doesn’t affect the way you think about programming, is not worth knowing.” – Alan Perlis

I enjoyed learning about Haskell but it had always been sort of a tough nut for me to crack. This book made it dead easy to start writing simple programs in Haskell explore what makes it such a unique language.


Scaling

The Art of Capacity Planning: Scaling Web Resources

John Allspaw

September 2008

What it’s about

Scaling web software, by the guy who kept Flickr.com running while transferring everything over to Yahoo’s datacenters

Why I love it

It’s the nuts and bolts of figuring out how much scale you’ll need to handle and how to actually handle it. Even if you don’t work on something the size of Facebook (cause let’s be real here) there’s a lot of knowledge you can apply to the web app you’re working on. One of the most important points is how to make sure that you plan for the load you’ll actually have and not to waste time building added complexity to handle load you’ll never have.

The Art of Scalability: Scalable Web Architecture, Processes, and Organizations for the Modern Enterprise

Martin Abbott & Michael Fisher

December 2009

What it’s about

Scaling people, process, and technology

Why I love it

It’s a higher level book that points out that even the best technology in the world can’t save an organization from itself if they don’t figure out how to manage people properly. In that sense it’s 2/3 organizational scaling and 1/3 technical scaling.

Scalability Rules: 50 Principles for Scaling Web Sites

Martin Abbott & Michael Fisher

May 2011

What it’s about

Everything you need to consider when building web applications with scalability in mind

Why I love it

Every application has different forces acting on it that help or hinder the scalability. This set of “rules” teaches you how to uncover those forces and deal with them. It’s not just about implementing for scalability, but also covers how to plan your development process to account for discovering scaling requirements, and what to do once you’ve actually shipped the thing.

Some Resources for People Who Want to Learn Smalltalk

If you want to learn Smalltalk, you can get started easily. First head over to Learn Smalltalk with ProfStef where you can learn Smalltalk syntax in about five minutes using Amber Smalltalk, a Smalltalk that runs in your browser via Javascript.

I’ve had a lot of fun using Amber and find that it makes me super productive when writing Javascript applications. It’s young though, and has quirks, and the environment lacks some flexibility that more mature implementations have. If you want the full Smalltalk experience, you’ll want to check out Pharo Open Source Smalltalk. Click on the big “Download Pharo” button to get a one-click package that includes a Pharo image and a VM for your platform. The image contains everything you need to write and explore Smalltalk applications – code browsers, refactoring tools, a test runner, object inspectors, workspaces for running snippets of code, version control, and more.

When you start exploring the image you’ll find lots and lots and lots of Smalltalk. Unlike other programming languages and environments you might be used to, Pharo doesn’t make a strong distinction between your code and platform code. Everything lives and runs under the same image, and you have access to all of the source code. If you want to understand how the automated extract method refactoring tool works, you can pull up the RBExtractMethodRefactoring class to see the exact steps it takes to perform the refactoring. If you didn’t know that extract method functionality lives in the RBExtractMethodRefactoring class (as I didn’t), you can simply inspect the menu item and find out which smalltalk method gets triggered when you select that menu item. Pretty neat.

You can learn a ton from simply digging into Pharo’s guts. It has a lot of guts though, and you probably have never used a system like Pharo before. The following links should help you make sense of it:

  • Pharo by Example – free book that you can read online or download as PDF. This was my primary resource for learning Pharo
  • Pharo – the collaborActive book: Home – another great book, entirely online (I think), and probably more up to date than PBE
  • Dynamic Web Development with Seaside – an introductory book to Seaside, the continuations-based web framework in Pharo. Also probably a bit out of date, but great for learning Seaside
  • Pharocasts – a set of screencasts that goes into some of Pharo’s interesting nooks and crannies
  • Stéphane Ducasse :: Free Online Books – a list of free Smalltalk books for download. Many of them are old. I’ve only read a few of them. Definitely worth looking into.

You can find all of these links via the Pharo home page, but I figured people would find it useful to have everything on one page. I’ll update this post as I think about and discover new resources for learning Smalltalk.

Backbone.js Testing Pattern – Describe a View’s First Render

While testing my backbone.js views, I’ve come up with a few conventions to keep my tests neatly organized. The first is to have a single describe block to specify what the view looks like when it first renders. This tests the view’s rendering logic and establishes the foundation for the rest of my examples. Here’s a brief example. I have a view which renders a person’s name and adds a CSS class if the person is a minor. Pretty simple. There are three things I’m interested in when testing the first render:

  • show the name
  • no CSS class if person is over 18
  • special CSS class if person is under 18

Here’s the view spec:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
describe PersonView, ->
  describe "first render", ->
    beforeEach ->
      @model = new Person(name: 'Joe')
      @view = new PersonView(model: @model)

    it "shows the name in an h2", ->
      expect($(@view.render().el).find('h2').text()).toEqual('Joe')

    it "does not add the 'minor' class to the h2 if person is not a minor", ->
      @model.set age: 18
      expect($(@view.render().el).find('h2').hasClass('minor')).toBe(false)

    it "adds the 'minor' class to the h2 if person is a minor", ->
      @model.set age: 17
      expect($(@view.render().el).find('h2').hasClass('minor')).toBe(true)

And now the view that makes this work:

1
2
3
4
5
6
7
8
class window.PersonView extends Backbone.View
  initialize: ->
    @template = _.template($('person-view-template').html())

  render: ->
    $(@el).html(@template(model: @model))
    $(@el).find('h2').addClass('minor') if @model.isMinor()
    this

It uses this super simple template:

1
2
3
4
5
<script type="text/template" id="person-template">
  <div class="person">
    <h2> {{ model.name() }} </h2>
  </div>
</script>

If the view logic is complex I may separate the conditions into separate describe blocks, like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
describe PersonView, ->
  describe "first render", ->
    beforeEach ->
      @model = new Person(name: 'Joe')
      @view = new PersonView(model: @model)

    describe "person is not a minor", ->
      beforeEach ->
        @model.set age: 18

      it "shows the name in an h2", ->
        expect($(@view.render().el).find('h2').text()).toEqual('Joe')

      it "does not add the 'minor' class to the h2", ->
        expect($(@view.render().el).find('h2').hasClass('minor')).toBe(false)

    describe "person is a minor", ->
      beforeEach ->
        @model.set age: 17

      it "shows the name in an h2", ->
        expect($(@view.render().el).find('h2').text()).toEqual('Joe')

      it "adds the 'minor' class to the h2", ->
        expect($(@view.render().el).find('h2').hasClass('minor')).toBe(true)

With these tests in place, I can start testing the events. Details on that will be in a future post.

Join the discussion on Google+

The UX Problem That Sites Leave Unsolved

Most sites give you basic account management. GitHub’s organizations allow multiple people to administer an account and manage projects within it. When nobody pays the bills, GitHub lets you know. They put up this big banner alerting all project admins that the private repositories are frozen until you update the credit card.

Fair enough. I’m not going to solve this billing problem though. The account belongs to someone I worked with a while back who added me to the repository. If they want to address it, they will. In the mean time, I would like to get rid of that banner. After clicking around I found myself on the owners team page where I can add and remove owners.

The page gives me all the controls I could ask for…except one. I can’t remove myself from the owners team! I can kick out anyone else, or add anyone else, but I can’t walk away. I have to ask someone else to kick me out, whether that’s someone else on the team or GitHub support.

Fortunately GitHub’s design is nice and all it takes is one little tweak:

Too subtle?

I’m not really picking on GitHub here. I imagine they will address this or have a good reason not to. I’m simply using it as one real-world example of an important interaction that many UX designers skip over.

Here’s one from Google Analytics. Someone else created and added me to this mystery account three years ago, and as far as I know no longer checks his email for that account.

This case is a bit different. I can modify accounts that I’ve created, and I can view stats for an account that someone else shared with me, but I can’ t remove the account from my list.

Just something to keep in mind for those of you developing group functionality in your product. If someone can join or be added to a group, ensure that they have the power to leave, too.

Join the discussion on Google+

The Hidden Agile Value: Respect

Reading the agile manifesto, you won’t come across the word “respect,” but when I read it it’s clear to me that respect is an underlying theme. This dawned on me while having a conversation with my brother’s girlfriend, Cortni. Cornti is a dental hygienist who practices at a private dental office. Her office manages all of the patients’ dental records via old-school paper files. A few months ago, Cortni asked me what it would take to build software to replace the office’s existing paper system. She promised to bring me some example records to give me an idea of what she needed to enter into a patient’s file on a day-to-day basis. We spent about an hour talking about her interactions with her patients, the information she recorded, the frustrations she had with her existing system, and her vision of a software-based system that would solve her problems. At the end of it I must admit I was terrified for my own dental health, having learned of the whole slew of messy, painful dental problems a hygienist looks for and addresses. During that conversation, I learned a lot about how a dental office works, but I was also made painfully aware of just how much I don’t know about that profession.

We went to lunch and I briefly told her a bit about agile software development, although I never used the term agile. Our convo about agile went like this:

Me: So to overgeneralize, there are two basic approaches to building software. The first is where you and I sit down and talk about everything that I would possibly need to build, and then I go off and build it all, and show it to you when I’m done. In the second way, I’d build a tiny piece and show it to you, and then figure out what’s right or wrong about it, and keep building little pieces, getting feedback from you along the way.

Cortni: Hrm…I think we should do it the second way. I don’t think the first way would work very well.

Now to give you a bit more background on Cortni, she’s not what you would call an Agile champion. In fact, she’s never been involved in any sort of software project, or even in a company that builds software. She grew up on a horse farm in Colorado, roughly 15 minutes away from the nearest town of 1,000 people, and went to dental hygienist school because she “heard they get paid well and make their own hours.” That’s why I found it so amusing that she immediately and intuitively felt that an agile approach to software development might work, whereas a BDUF approach definitely wouldn’t. Yet that should come as no surprise. She spent three years in school just to get started in her profession. How gauche would it be of me to think that I can write software for her after one conversation, and get it right? How many conversations would we need to have before I could get it right? I don’t think it matters. There’s no way that I can do my job unless I get regular feedback from her on how I’m doing.

Whenever we try to build software, we have to be respectful of all people involved. The first point of the agile manifesto is that software creation is a human act – performed by imperfect beings in order to solve problems for other imperfect beings. We can respect this first at the team level. Software makers should be held in higher regard than a process you found in a book or learned in a workshop. Process can be instrumental in getting software out the door and enabling a team to continually improve itself and its product, but the moment you honor the process element over the human element, you’ve missed the point and will only cause your organization harm in the long run.

Respect should extend beyond the software team to the customers and users (which are sometimes a part of the software team, sometimes not, and are often ill-defined, mis-construed, or simply unknown). When developing software for a professional industry like dentistry, it should be obvious that practitioners are highly skilled and that your understanding of their work will always pale in comparison to theirs, even though you can develop sufficient enough understaning to build useful software for them. That’s why we call them “domain experts,” and their insight and feedback are critical to the success of a software project of this sort.

Another thing to consider is that not all software is built for skilled professionals. A lot of it is built for internal use by massive organizations whose employees have no choice but to use it. Without addressing the issue of how humane or inhumane it is to force software on a large group of people, it’s important that we as developers understand that we are partially responsible for the quality of worklife experience that these people have on a regular basis. It’s difficult for me to express this without sounding like I’m preaching, but basically we should just try to be aware that some of the software we build will be used by people who have no choice but to use it, other than giving up their jobs.

I have a lot more to say about this subject, but I think this is enough for now. If this resonated with you at all, I would like you to keep the principle of respect at the forefront of your mind today.

Join the discussion on Google+

How a Coding Obsession Killed My Startup

When I was 20 years old, I built a web site that earned over $2500/mo and required about three hours a week of support and maintenance. Damn good money for a kid whose rent was $300/mo. I made two huge mistakes that ended up costing me that creampuff income stream.

I only did what I knew, instead of learning something new

I didn’t even set out to build a business at first. All I did was write a little program to help me get better at poker. A friend of mine suggested that I turn it into a web site for other people to use, so I did. It took about three weeks of programming on my part, and I paid $200 for custom images to use.

At first it was great. I had a bit of a reputation on an internet poker forum, so when I launched the product I quickly received a lot of signups. After a few months, the signups started slowing down. So I did the only thing that I thought would bring in more signups – I lowered the price. All that did was cause most of my existing customers to cancel their plan, and not everyone signed up again at the lower rate.

If I could do it over again, I would have doubled the price for new customers. That way I would make just as much money with half of the signups! More importantly, it would create a sense of urgency for customers. I would have put out an announcement saying that the price would go up in a week, which I suspect would drive some new customers who want to get in at the low rate. And later on, customers would see that the price was increasing over time, so they’d know that they should sign up quick otherwise it might go up again. Lastly, my existing customers would be more likely to stick around, knowing that if they bailed they would never be able to get that low price again.

I sold it

This one’s easy. If you sell a recurring revenue generator for a pile of cash, you end up with a pile of cash and no recurring revenue. I could have bought another revenue generating product, or lived off the cash while I built something else, but instead I bought a fancy car. I was pretty smart for a 20 year-old, but obviously not *that* smart.

Why’d I sell it? Because I wanted a fancy car ;) But mostly because I didn’t know how to build a business, and I didn’t even really want to. I just wanted to code. So instead of learning how to build a business, I sold it off to someone else who would.

It pains me a bit to look back on this and think what it might have become had I stuck with it. But there’s no way to change it now. The good news is, today I’m just as interested in the business side of things as I am the coding, and I learned a lot from that first experience. Now I’ve got the motivation to stick with it and to learn how to grow a business. And next time I won’t be quite so willing to give up something that makes money while I sleep.

Agile 2011 Trip Report

I had the good fortune to attend Agile 2011 in Salt Lake City, where I got to help Liz Keogh run her deliberate discovery workshop. She is brilliant and had a few evil tricks up her sleeve for the workshop, and I think the attendees came away from it excited to dig deeper. I know I’m going to be experimenting more and more with deliberate discovery in the coming months.

The rest of the conference was pretty great. AgileConf is a weird one for me because it’s so damn big. It’s an industry conference, not a community conference. The exhibit hall is insane (largely due to the sheer amount of shitty-looking project management software on offer). But the catered lunches were delicious (the Grand America Hotel in SLC has amaaaaazing bread pudding), and people that woke up early enough told me that the breakfasts were too.

There were a lot of great sessions, but my favorite had to be Elizabeth Hendrickson’s tutorial workshop on Exploratory Testing. I walked in to find people hunched over electronic Scrabble games, and Elisabeth had written a test charter to guide people on how to explore them. I didn’t write it down but it was something like “Explore electronic scrabble with the stuff in the box to discover how it works.” In the next round we learned to be more systematic in what to look for, like how to identify variables in the system under test. We didn’t get to do the third round because we spent a good amount of time in conversation between rounds. Elisabeth is extremely knowledgeable and was able to handle any question that people threw at her, and I also love that she invites other people from the audience to answer. She’s great at imparting the information, but also amazing at turning it into a comfortable conversation rather than it feeling like a formal classroom setting.

I also enjoyed @hackerchick’s talk on Lean Startup and Agile. If you’ve read any of the books or articles on Lean Startup, you probably knew most of what she was talking about. But she covered the gamut for people who aren’t all that familiar, and brought stories and excitement to the table to boot.

As always, the best part of the conference was meeting people. I got to hang out with my ADDcasts partner-in-crime, Dave Brady, and we recorded an episode with Michael Feathers. We also kicked back in high-back chairs and pair programming Smalltalk on a 12-foot projector. Good times. I got to meet Tim Ottinger who told me about his experiences watching the internet unfold before his eyes. It was also great fun meeting ADDcasts listeners like Colin Jones and David Adsit. And of course there was that time when I sat down next to Gary Bernhardt for 10 seconds and got up to grab food and look for Gary Bernhardt.

AgileConf is huge, which brings a bunch of lame stuff but also draws a huge number of super awesome people in. I’m looking forward to next year, and I’ll definitely track down folks that I didn’t manage to meet this year.

Help Me Help You

I want to create an information product based on my programming expertise. I don’t know yet what the topic(s) will be, or if it’ll come via articles or video or some combination, but I know it will include lots and lots of code. I would appreciate it if you would take a few minutes to respond to this four-question survey I made up, to get a better feel for what people would find interesting and valuable.

A Little Bit of CoffeeScript

Alright so I wrote my first program in CoffeeScript. It’s my first pass at a blackjack simulator. My thoughts:

  • Syntax is quick and easy to learn, and fun to use.
  • I love the function definition syntax. Love love love.
  • Same goes for re-opening classes.
  • Scoping can be tricky when passing functions around, but it allows for a lot of power.
  • For loops are ugly
  • I need to learn how to do operator overloading
  • JavaScript is missing a lot of stuff. Need to figure out the ActiveSupport equivalent for JS.

All told it only took me a couple hours to skim through the PragProg CoffeeScript book and hack this up. It went fast and I was pleased with how easily I was able to refactor the code as I built it up. Next I’m going to mess around with adding browser-side features, as well as running it in Node. And I’m going to figure out how to test it.