The Pug Automatic

The Golden Rule for programmers

Written July 5, 2014. Tagged Methodology.

The Golden Rule is the idea that one should treat others as one would like to be treated.

I try to follow this rule when it comes to solving problems in programming, and I wish all of us would do so.

We all search for solutions to issues we encounter. When we do, we're obviously expecting someone else to have provided the answer. So help the next person out in the same way. I would feel dirty and selfish if I didn't.

If you solve (or partially solve, or work around) a tricky issue that others may also run into, try to do one or more of these:

  • answer a Stack Overflow question you found
  • add a new Stack Overflow question and answer it yourself
  • comment on a blog post or GitHub issue you found
  • report a bug
  • contribute a code or documentation fix
  • create a code snippet (e.g. on Gist) or a public repository
  • write a blog post

In my experience Twitter isn't great as the only place to put a solution – search engine indexing can be iffy.

When you write it up, consider how you tried to find the answer. Where did you look? What terms did you search for? Make sure there's something to find.

You'll be surprised at the number of people you end up helping.