General List of Common Programming Errors
- by javamonkey79
As one journey's from apprentice to journeyman to master I've noticed that one accumulates a list of best practices for things they've been bitten by.
Personally, I write most of my stuff in java & SQL so my list tends to be slated towards them. I've accumulated the following:
When doing list removal, always reverse iterate
Avoid adding items to a list you are currently iterating on
Watch out for NullPointerExceptions
Now, I know there are language specific "common errors" links out there like this one. And I'm also aware of the pragmatic programmer tips, Martin Fowler's "code smells".
Does anyone know of any good lists out there of things like I've listed above (re: list removal, adding items, etc). My guess is that there are some good QA folks out there that can probably throw me a bone here.
I'm not looking for things the compiler can catch - I'm looking for common things that cause bugs.
In the event that there isn't a list out there already then I welcome posting your own findings here.
Thanks in advance!