how to write bad code