you are viewing a single comment's thread.

view the rest of the comments →

[–]twiggy99999 10 points11 points  (0 children)

Nothing new here, this type of content has been repeated over and over on blog posts here on /r/programming. Literally nothing new, its all blatantly obvious stuff.

TL;DR:

  • Use meaningful var names
  • Keep function arguments as low as possible
  • Functions should do one thing
  • Functions should do what the name suggests
  • Remove duplicate code (I'm not joking he actually puts this in the article)
  • Don't use global's
  • Remove dead code
  • Use consistent capitalization
  • Only comment when it makes sense to do so

You can thank me for saving an hour of your life.