Dumb Mistakes When Programming
- Proof read your changes before staging and committing them
- Check every single change has the desired effect (instead of assuming)
a. You will tempt faith by not running code when
i. You tested if before and are now adding "one little change"
ii. The code path is "hard to reach" so you just "trust" it works.
iii. You tested in its original context, now you transport it to a new context and assume it also works there.
- Are you absolutely certain you are in the right file?
- Are the docs/StackOverflow answer you are referring to DEFINITELY for the right version?
- Do your opening Entities have matching closing entities?
- Are all referred to variable, constnats and functions available in THIS particular context?
a. This file?
b. this environment?
c. this namespace?
d. this platform?
- Use heightened caution at language barriers (data transfer/naming convention translation)
- Enumerate logical possibilities with a truth table
- When you find a bug, proactively look for parallel/similar issues
- Run your linters and tests consitently
Source