Today I want to write about the most powerful development tool of our days: the copy paste.
Copy paste helps you to develop faster, increases a lot your productivity, you can develop business components, forms, entire applications; you can develop code even before you understand what it does … all just in minutes!! Your boss is happy, your customer even more and that’s great … but what happens when the original code has a bug? Then all the copy pasted components, forms, applications we did in minutes’ trend to have the same bug and now you need to fix it everywhere, the amount of bugs grows at lightspeed. But, hey!! doesn’t matter, why don’t we use copy paste again to patch everywhere? … Sorry, you are done, once you have started with this development style, there is no return back, you are damned by the “the curse of the copy paste”. Hereinafter you are damned to find the same comments, bugs, even wrongly typed method and variable names … everywhere
Don’t you believe me? Do a review or try to download tools like Simian and use them inside one of the projects of your clients, of course you will not find anything in your own projects, won’t you? Better don’t try.
Maybe it can make you feel better knowing that software like … mmm I’m not going to say the name because I want to be politically correct (tip: it’s a widely used tool to rapidly build web sites with forums, blogs and photos). If you already know which software I’m talking about, try to search “blog” in the project supposed to contain code for photos: 30 matching lines. This deserves a bigger “wow” than the 3D Vista windows; “at least” most of them are comments.
Next time after copy and before paste, please just stop for a second and try to think if you can refactor your classes … lot of times copy paste development is synonym of a bad design.
Of course we can also sum our efforts and ask Microsoft to remove the copy paste functionality from all versions of Visual Studio.