Worst VS feature: Copy & Paste

Wednesday, March 21, 2012

Time and time again, when I'm reviewing code of pretty experienced programmers, I'm still shocked how they're using Copy & Paste programming extensively instead of extracting common code to shared methods and classes. Visual Studio and many 3rd party add-ons tools make it very easy to make these refactoring that allows to avoid any duplication. But still – Copy & Paste is easier and that's what many programmers use by default. Frankly, I chose the title for this post just to tease. Clearly there's nothing wrong with the Copy & Paste feature of Visual Studio. The problem is...

TDD and the SOLID principles (Part 1 – introduction)

Friday, August 26, 2011

Table of contents: Part1 – Indrocution (this post) Part 2 – SRP Part 3 – OCP Part 4 – LSP Part 5 – ISP Part 6 – DIP Part 7 – Conclusion   Mastering TDD is a process that takes time. There are many pitfalls that “newbie’s” fall into. IMHO the following 2 reasons are the main ones: Thinking about the implementation before writing a test. That is, writing tests that are coupled with the implementation instead of with the problem...