What can “Find and Replace” command do with your project files? Well, I must confess, a lot.
Yesterday I had to change a bit of HTML markup on a recent project. After discovering what to change I started a “Find and Replace” dialog in my favorite editor and… pressed Replace all. After that I’ve looked through several HTML templates and everything seemed OK’. I completely forgot about it and started with new tasks.
Later that day I had some problems with JavaScript. I couldn’t understand where the problem was and spent a few hours investigating it. Nothing! So I decided to sleep on it and work the next morning with a fresh mind.
The next morning surprisingly my colleagues and I found that while doing the batch replacement I accidentally replaced one line of code in the prototype.js framework! :)
The moral: use “Find and Replace” command with care!


1 Comments
Find and replace is a dangerous tool. I’ve encountered similar problems in the past and my recommendation is simply to “Find” first and see what files it’s found in, and then and only then replace.
andrew — November 21, 2006, 12:01 am
Write a comment