To be a good programmer means you have to be a good problem solver. We are faced with problems that we must find solutions to. The solution must not only be efficient, but also clean (I said to be a good programmer). I was faced with a challenge today (as I am just about every other day) and struggled with how to solve my problem. Really it was very simple, I needed to perform a function on a list of objects. Under a certain condition, only some of those objects needed the operation performed on them. It seems so simple now, but at the time I tried creating this elaborate class structure, with beautiful inheritance and custom list classes. I really didn't need any of it. I like using new structures and methods, but there is a time and a place. Sometimes, the simplest solutions aren't always the funnest, or prettiest, but they get the job done fast and efficiently. I ended up replacing three classes with one function.
I have to admit, I felt pretty silly once I had found my working solution. I suppose that is how you learn and become a better programmer. I wanted to share my mistake with you, in hopes, you will learn from it too. Remember, keep in mind what you know, and your ultimate goal. Losing site of those will result in a pointless program!
V
p.s. Wish for snow!
Friday, December 5, 2008
Subscribe to:
Post Comments (Atom)

0 comments:
Post a Comment