One of the best ways for programmers to shoot themselves in the foot is to program in C. Of course, C and C++ dominate embedded programming, so reducing the potential for an injured limb tends to be helpful.
Read the Electronic Design article by William Wong