5 Dead-Simple Programming Rules For Junior Developers To Write Senior Level Code Even If They Think They Can’t

#1. Use pure functions

  1. the function returns the same result for the same arguments
  2. Calling it has no side effects (no mutation of local/global state or of other components).

#2. Make it work, then make it pretty

#3. Be clear, not clever

  • Don’t use regex unless you comment on what it does.
  • Use the easiest syntax to understand
  • Comment algorithm sections that are hard to understand

#4. Keep application levels separate

#5. Keep mutations on the outskirts of your application

  • POST/PUT requests
  • DB insertions
  • Writing to files
  • Modifying application state

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store