Here are a few tidbits I have learned:
- Make variables names clear and specific. “listOfStates” is more understandable than “x”.
- Functions should describe their actions i.e. “getListOfStates” is better than just “states”.
- Get things to work then clean up and refactor.
- Brainstorm, think, and plan with pen and paper. Writing things down really helps me to get unstuck, so maybe if I were wiser I would start with pen and paper first and not get stuck so often 🙂
- Learn how to write better code by reading others‘ clean code.