Have a Calling Card - Putting your personal stamp on things left undone
Adrian P. Dunston
Posted on July 27, 2020
When I'm writing/changing software, and I write something that I know I don't want to go out to production, I put a comment with the string !!ADRIAN
in it. Before I commit/push/deploy (depending on the situation), I do a full-text-search for that string. Wherever I find it, I fix it.
This has improved my life in ways beyond measure. It's easy to understand and easy to do, so it's one of the first pieces of advice I give to newer programmers:
- Invent a personal calling card
- Leave it as a comment wherever you are leaving something unfinished
- Search for it before you turn in your work
Why?
So you finish what you intend to. The ability to make your intentions real in the world is the definition of power. Software is complicated. Your mind (while very impressive) is limited. We use tools to leverage the power of our mind. This simple tool gives you more power over software.
How?
Pick something unique to you. TODO
doesn't cut it. You'll probably be working in a team soon (if not already). TODO
is everyone's responsibility, so it's no one's responsibility. !!ADRIAN
claims something as my responsibility. I'm generally the only Adrian on a team. Pick something that no one else will use. When I suggested this to a colleague, he immediately started using 🚨. Brilliant. I would never have thought of that. (I'm still not used to the fact that my editor understand emoji.) If someone else starts using it, my colleague may want to put his initials on it, but let's not go solving tomorrow's problems.
Pick something agreeable. Agreeability is not always the right choice, but here it is. Sometimes you'll forget to search. Seeing your calling-card in production code will be mildly embarrassing, and that's fine. We develop with our feelings. You don't want to exacerbate that by having a calling card that is additionally embarrassing. In general, don't write swears, and try to keep it positive.
Pick something that indicates a problem. Seeing !!
, it's easy for other developers to infer that the comment indicates something is wrong or unfinished. 🚨 accomplishes the same thing.
Pick something easy to write. My fingers type #!!ADRIAN
automatically now. It's also in certain debug lines I'm always pasting in. My colleague knows how to make an 🚨 appear with a few keystrokes. You may want to use a clipboard manager.
Do the search at the end. I encourage you to have an actual checklist you run through before turning in any work. I have a checklist for fit and finish. It includes searching for #!!ADRIAN
and @tag :wip
, two artifacts I often leave behind in Elixir development. Your checklist is up to you, but I recommend having one, and I recommend "search for calling card" be on it.
What about the rest of the team?
You use this tool. See if it works for you. If so, suggest it to your closest teammates and then to the rest of the team. Socializing tools helps those around you, and teaching helps you learn. But ultimately, this is an individual tool. It will help you regardless of who else adopts it.
What about you?
Thanks for reading. If you start using this or have been, I'd love to hear it. Feel free to reach out and let me know your calling card or any fun stories from leaving one behind.
Posted on July 27, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
November 29, 2024