Notes from John Papa's Readable code

Notes from John Papa's Readable code

  • Start with a style guide, not with how but with you. So, the developers are convinced to follow that.
  • Meaningful names for functions
5 Second rule
  • If you make your code readable in 5 seconds, then its easily maintainable.
  • Make the intentions clear.
  • Organize for readability. Properties followed by methods
  • Smaller functions

Less then 20 lines of code

Choose a convention
    function getCustomers()
    function fetchAdmins()
    function pullOwners()


     function getCustomers()
     function getAdmins()
     function getOwners()
  • Consistent naming and spellings matter

Provide Clarity through code not comments

Less comments - Comments can mislead - Code might change underlying comment might not

Use Prettier

Write dirty code and clean it up - Iterate

Vetrichelvan Jeyapalpandy

12 years of experience in web development. Javascript enthusiast. Performance is an important trait of any website, so trying to improve that wherever possible.

View Comments
Next Post

Virtual DOM

Previous Post

Quark Particles - Canvas Experiment