Skip to content

Instantly share code, notes, and snippets.

@mrajashree
Last active August 2, 2017 21:45
Show Gist options
  • Save mrajashree/dfc1da1911c591ab2a178fbffd823b8e to your computer and use it in GitHub Desktop.
Save mrajashree/dfc1da1911c591ab2a178fbffd823b8e to your computer and use it in GitHub Desktop.
1. In case of errors, log the error only if you handle it, if it's going to bubble up, then only return the error
2. If the error might expose too many details to the user, log the error, and return a human readable message
3. Follow import patterns specific to the programming language you use
4. It is a bad practice to use data structure names in your variable names.
5. The code should be self-documenting or self-explanatory. If that means adding comments, add comments.
But you should also strive to name and structure things so that the code is self-evident without comments.
6. Better commit messages
7. Close response, http, connections
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment