My opinion is - it largely depends on the person writing the code. Everyone
will write bad code in the beginning, but one should re-read the code after the errors have been found, and think/meditate on how that should have been done better,
and why (very important!). That way the person will learn; otherwise, they probably will just continue to write bad code over and over without understanding the principles of good programming.
--------------------------------
An idea is not responsible for the people who believe in it...