Friday, June 29, 2007

Software Learning, College and Post-college

Scott Hanselman has a post on the three things he learned about software after college and has asked for others to chip in. Here are my thoughts...

College:
1. Boolean logic can help prove a statement.
2. Comments should be added to code for clarity.
3. Projects should be completed on your own.

Out of College:
1. A test, or set of tests, is much clearer at proving that code is correct.
2. Good code needs well-named, decoupled, highly cohesive parts, NOT comments.
3. Asking for help does not mean that you are weak, it means you have the strength to admit that you cannot accomplish something on your own.

Disclaimer: I have not actually completed college (YET) but have taken many college courses.

Saturday, June 02, 2007

Background Compilation and TDD

Jeff Atwood has been blogging about the lack of background compilation in C# within Visual Studio (here and here); a feature that is built into the VB.NET editor of Visual Studio. I'll have to agree, for the most part, that background compilation can be useful at preventing common mistakes, especially in an environment where case sensitivity is important. And one of his readers pointed out that ReSharper includes background compilation for those of us who are lucky enough to have this tool. But background compilation, and even intellisense in general, annoy me during TDD sessions.

It is often the case, when writing code test first, that a class you are using does not exist yet and the method you are testing does not either. In each of these scenarios, background compilation becomes a little distracting as I immediately switch gears to eliminate the squiggles and the types that are now colored red. I find myself being pulled away from the task at hand: thinking about my design. This is certainly a personal issue and has me thinking that I should look into creating (and I don't even know if this is possible) shortcuts for disabling and enabling intellisense and background compilation. This may even solve the issue for those of us that think background compilation is annoying because "I haven't finished typing yet."