Alex Rivera | Logout

How do you deal with your past programming atrocities?

Asked 2009-07-07T02:52:16.850
11

None of us started off as experts (and most of us still aren't). Sure, we all knew how to write programs in our preferred languages, but writing quality applications and writing syntactically correct programs are two very different things. We work, we learn, we struggle, we keep learning, and eventually we reach that threshold where others can learn from us.

If your learning process was anything like mine, you probably wrote a few perfectly functional, reliable applications that are still used daily, yet can't help but drop your head in shame whenever you think about them. Procedural code? Mixing business and presentation logic? SQL injection vulnerabilities? Wastelands of code barren of any comments? The list goes on.

Unfortunately, none of us can expect our employers to allow us to go back and rewrite our old applications just because they give us nightmares whenever we think about them. Worse, some of us have to actually work with our old applications, but know that it would be way too risky and/or time consuming to do a whole lot of good as far as refactoring goes.

How do you deal with the past programming atrocities you've committed and with the people who discover the dirty secret that you didn't always know what you were doing?

Edit
Report

2 Answers

1

Given that the job is still there and you still have chance to commit new stuff, fix the crap and check in! It's never too late for a bug fix. And it's nothing to be embarrased about. Everyone makes mistakes.

I also believe in honesty and that a good offense is the best defense. Just say loud, "this is my code and it's crap" and people will laugh with you :) There's no need to try and hide your code. It's there in your VCS, with your name on it anyway.

answered 2009-07-07T07:28:17.550
0

The best way to deal with these bad memories is to learn from them, as I am sure you have. It is also important as you ask for forgiveness from your team members that you extend them the same. Most importantly, when you should remember these 'bad examples' when you are mentoring junior members of the team.

answered 2009-07-07T03:05:42.147

Your Answer