Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    4
  • comments
    8
  • views
    5176

Colorful screwdrivers

Sign in to follow this  
cbenoi1

423 views

My wife and I have been in the same house the past 8 years now. Some of the rooms have not been repainted since we got in and the basement room is scheduled for a repaint before the new year. We repaint a room every 2 years on average and every time I forget something in the process. Last time, I forgot that little wooden stick to stir the paint. As I cursed myself, I noticed the screwdriver I used seconds ago to pry open the paint can. It was already in my good hand and looked suspiciously like a paint stirrer, and it was a convenient tool. Needless to say, I ended up with a colorful screwdriver. Ahhhh! The joy of painting...

That brings me to the topic of the day. I have been debugging someone else's code for the past week. I'm talking professional game development studio stuff here. I don't normally type code as part of my day job, but this time lack of available resources forced me back into my old shoes. As I analyze the sources, I noticed that good portions were cut & pasted from other games and some of the portions were either hacked or disabled. I found a bug in that C&P code. In fact, I found ALL the bugs in a single debug session. Well, you guessed it. That buggy code was copied all over the place, and you could see the desparate attempts here and there to try to fix them. And each bug was fixed differently, as if there were different programmers assigned to those bugs. AAARRRGGGHHHH!!! It's the colorful screwdriver paradigm all over again. The pressure to deliver on time forces you to make stupid decisions and modern IDEs only make it very easy. It's called {--drums--} Cut & Paste. It's very convenient, but it's by far the BEST bug propagation tool ever developped!!
Sign in to follow this  


4 Comments


Recommended Comments

Heh. It's a problem for us lowly hobbyists, too. My code is rife with C&P, and I shudder to think of the bugs... Good Lord, the BUGS! That have been sown like so many handfuls of thistle seed.

Share this comment


Link to comment
Heh heh. I've got a translation routine for tilebase games that studies a tile's neighbors and generates an index into a list of transition tiles, that I wrote over ten years years ago and still use. Luckily, it worked right from the start because I would hate to debug it now. [grin]

Share this comment


Link to comment
I think thats part of the problem, not the copy & paste method of programming but improper testing of the code in the first place. Code re-use is great but it requires more thought than "ahhh, we did that here."

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!