How to write good functions?
This is just for my personal reference. The original video by ArjanCodes on Youtube: https://www.youtube.com/watch?v=yatgY4NpZXE
- Do one thing and do it well
- Separate commands from queries
- Only request information that you actually need
- Keep the number of parameters minimal
- Do not create and use an object in the same place
- Do not use flag arguments
- Remember that functions are objects