AI now writes a growing share of code, and it's inheriting every one of those bad habits, but there is an opportunity to ...