Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
  • Avoid long chains of if statements (switch cases are ok)

  • Avoid nested ternary operations - if a nested ternary only has 2 outcomes it can be written as one ternary

  • Avoid writing extensive logic into useEffects write as functions that can be called in the useEffect when possible

  • Don't use redux or the database to hold information only being used within one component

  • All state hooks should be right after the constructor, then stack useEffects, followed by component functions, and finally the JSX return statement when possible.

  • Break up code into reusable functions

  • Comment your code

  • Have meaningful names for variables, classes, components, functions, methods, etc

  • Avoid massive functions/components

  • Create a virtual environment whenever possible (especially for python)

  • Use object oriented programming whenever possible

  • Create documentation for your projects in confluence

  • Handle exceptions

  • https://www.browserstack.com/guide/coding-standards-best-practices

  • https://data-flair.training/blogs/python-best-practices/