On debugging

Dear new developer,

Debugging systems is a key skill to have. Here are a few thoughts about it.

  • Try to get the problem to be as simple as possible. Start with the problem and keep isolating and removing pieces and see if the problem persists. Modern systems are complex and the less you have to think about, the better.
  • Keep notes about what you’ve tried. These can go into a chat system if the debugging is high priority (on a production system during an outage) or in a private text document if the debugging is not (a bug you’re trying to understand).
  • Think about recent changes to the system if the bug is new. This isn’t always the cause, but it’s often part of it. Rarely does a system just degrade spontaneously.
  • Write an automated test to illustrate the bug (if possible). This will
    • speed up your fix because it gives you a tight loop of run test, make change, run test, make change.
    • ensure that your change actually fixes the bug as opposed to something else.
    • provide a regression suite that will prevent this bug from popping up again.
  • Start at one end of the system or the other when you are trying to isolate the issue and see where it appears. For example, for a user facing web application, start with either the browser or the data store.
  • Minimize impact to users. If you are working on a production bug, ideally you can test on staging (right?) because this gives you the most latitude. However, if you do that, make sure that staging and production are exactly the same, otherwise you will chase your tail. Even if you have to test on production you can print debugging statements only for certain users (you or admin users) or to comments.
  • Start with a hypothesis and work to continuously disprove or prove it, refining it as you know more information.

Sincerely,

Dan

Use a Conversational Hook When Networking With Strangers

Dear new developer,

Work on your network. It will help you in numerous ways as you progress in your career. Whatever you are looking for: a new job, to hire someone, to get a mentor, to learn about a new technology, having a list of people that you know and/or have worked with that you can reach out to will help you accomplish your goals.

But it can be tough, especially if you are awkward around people. I am awkward around people and learned how to be less awkward. My main technique is to both give and ask for a “hook” in any conversation I start.

Here’s a typical “networking” conversation of which I’ve had many:

Dan: Hi, I’m Dan.

Jan: Hi, I’m Jan.

Dan: Where do you work?

Jan: I work at Company X. Where do you work?

Dan: Company Y.

<crickets>

Compare that with this conversation:

Dan: Hi, I’m Dan.

Jan: Hi, I’m Jan.

Dan: Where do you work?

Jan: I work at Company X. Where do you work?

Dan: Company Y. We recently launched website Z and are evaluating technology ABC. What has your company recently rolled out?

See the difference? Dan has provided Jan with two avenues for conversation–one is asking further about technology ABC or website Z, and the other is talking about Company X. Jan can decide where to take the conversation, but Dan has provided the start of it.

Learning this trick, which comes naturally to many many people, changed the way I network. Another thing that mattered was my realization that everyone, every single person, has an interesting story or anecdote to tell, and that I can learn something. That understanding has made conversation much more fun.

Sincerely,

Dan