Continuing lessons from my mistakes
“Hey Marcus, remember that time you deleted 42,000 lines of code before checking in? Oh, and it happened to be on the first real project your boss had assigned you after hiring you? Oh, oh! And, you hadn’t backed up!”
“Yeah, that sucked. Ha ha.”
True story, but I won’t bore you with the details about how I came to type that fateful command, rm -rf * .bak
Those details aren’t important for this story. What I want to share with you is how and what I keep learning from this situation.
The past is never dead. It’s not even past. — Faulkner
First, realize that every experience you can remember still provides opportunities for learning and growth. Your brain is full of untapped learnings. This isn’t wishy-washy, release-your-full-potential humanism. It’s a real, practical perspective on what learning is.
Often times may ask someone, What did you learn from that situation/mistake? as though the learning was a single occurrence. While it’s good to learn from a mistake, it seems limiting to imagine that the pattern is Mistake -> Learn -> Improve
Instead, I’m suggesting that the pattern is a cycle of:
Mistake -> Reflection -> Learn -> Remember -> Reflection -> Learn -> etc
(Mistakes aren’t the only thing that teach us, but they have played a big part in my own learnings.) I think the idea that an mistake has a single thing to teach us may be our pride at work, wanting to protect our fragile ego by allowing us to exclaim, “I have learned from my mistake, and moved on. Done and done.”
Maybe instead of “What did you learn?” a better question is “What are you learning?”
Two items of note:
- This is a simplified version of Piaget's Learning Cycle
- This applies to any experience, not just mistakes
As an example I’ll list some of my learnings through the years about a mistake I made twenty-one years ago. Notice how the learnings change as time passes.
Learning through the years
Background: I had just spent four months on my first project at my first real programming job. I had told my boss and the team I was done and ready for QA. I was preparing to package it and check it in.
I didn’t want to include the .bak files in the package or check-in, so I was trying to delete them all. I issued the command rm -rf * .bak to remove the bak files. (See the problem? It’s the space between the “*” and the “.bak”? Small difference, big effect.)
Lessons learned through time
One second later
- When rm takes longer than expected, it’s cause for concern
One minute later
- rm assumes you know what you are doing
- I just lost four months of work
- Unix doesn’t have a Recycle Bin
- rm does have a flag you can pass to be prompted with “Are you sure?”, but it’s off by default
- I’m afraid of telling my boss
- I don’t have the SysAdmin’s phone number
One hour later
- SysAdmin’s don’t backup everything on the system
- The fact that RCS (Revision Control System) takes minutes for a single check-in, and is a huge pain in the butt, is no excuse for not checking-in code.
- My boss is a very kind person.
- Deleting four months of work doesn’t automatically get you fired
- My boss has a sense of humor, responding to the news with “Did you enjoy writing it the first time? Good, now get to work! <grin>”
- It may be ironic to have deleted everything you wrote the day you declared to everyone you were “Done”, but it’s not funny. At least, not to me. Not yet.
- Desperation and fear make my stomach hurt
- I hope I don’t have to tell my wife I got fired
One day later
- It’s amazing how much you remember about a design after it’s gone
- The database schema alone reveals a great deal about the code
- My boss has my back with our VP and customer
- My team is awesome and supportive
- Reconstruction can move quickly
- RCS is not that slow
- My boss likes sports metaphors, telling me “It’s not the number of home runs, it’s the number of times at bat.”
One week later
- Old backups of a partial project are very helpful. Something is better than nothing
- I may have lost files, but I didn’t lose ideas or designs
- Re-writing involves re-thinking, which involves improving
- Improving the code feels natural, and doesn’t take much more time (if any)
- My boss is really, really great
- Deleting an entire project is not a CLM (career limiting move)
- Being teased by people who care about you isn’t hurtful, but can bring people closer together
- There are other version control systems, like CVS
- I make mistakes, and want a safety net.
One Month later
- My boss appreciates resilience
- I waffle between feeling stupid about what I did, and feeling good about what I’m doing
- I am not as careful a developer as I thought
- Even users understand that mistakes happen
- People tell stories about their own mistakes when they learn about yours. Everyone appears to have a story, many worse than mine.
- The world didn’t end
- It only takes ~20% of the time to rebuild a codebase
- It will be better the second time
- Users forget late projects, but remember good people
- Stories about mistakes live a long time
- I can learn to be more careful with my files
- I can make my own backups
- I can still get a raise after making a big mistake
- This is a good story to tell people who just made a mistake
- Telling people there is a problem ASAP builds trust
- It’s hard to be an awesome boss when someone makes a big mistake, and having a role model really helps
- Being an awesome boss is a worthy goal
- A mistake may seem HUGE to me, but not to others.
- Git is worth investigating
- Dictating check-in frequency to developers is irritating, no matter how important it seems
- Losing code teaches programmers the importance of checking-in
- I am not perfect, have never been, and will never be
- My programmers are not perfect, either
- Creating a safe environment is vital to productivity, innovation and happiness
- Sometimes losing all the code is the best thing that can happen to a project.
- Be gentle with people, as others beat themselves over for their mistakes more than you ever will
- Humor is important, especially in difficult situations
- Being a great boss is rewarding
- Check-in often
Looking back for more lessons
As I look back at this situation, more than twenty-years later, recalling it is a visceral experience. What I draw from it may have changed over time, but this one experience holds a wealth of lessons for me.
Imagine if I spent time reflecting, examining and learning from the big experiences in my life? Imagine how much more I have to learn from what I have already experienced?
I don’t know what future experiences I will have, but I know that my past is a gold-mine of lessons waiting to be learned.
How about you? Do you have a past experience that continues to provide lessons?