@kiilas use a good coding discipline. Perhaps give TDD a try. If you change your process to where you are "thinking" in design instead of code, then you are merely transcribing design elements into coding patterns and paradigms, your code will be cleaner and clearer. Or try pair programming. You will have to do it more clearly from the beginning because you are showing it as it. Is happening rather than just puking it out there.