Using Custom Types in Project Settings
Problem
using Application Settings in a .Net project, you find that there are so many entries that some organization is needed.
Solution
create custom, serializable data types for logical groups of settings.
using Application Settings in a .Net project, you find that there are so many entries that some organization is needed.
create custom, serializable data types for logical groups of settings.
Need to move rows up and down, and from one table to another, in an HTML page.
careful use of jQuery. There are probably many different solutions already out there, but I wanted to learn how to write one for myself. Key functions: closest, detach, append, prev, next, before, and after.
Wherein I record a few tips on the use of System.ComponentModel.DataAnnotations, which I am likely to forget if I do not need to think about them again for some months…
Growing Object-Oriented Software, Guided by Tests by Steve Freeman and Nat Pryce
I did not realize how much I still have to learn about writing good object-oriented (OO) code, and about hewing to a tight test driven development (TDD) methodology, before I read Growing Object-Oriented Software, Guided By Tests. My education in OO and unit testing has been largely theoretical, with no time spent directly learning from experienced OO programmers; my best mentor was a COBOL coder. Books like Design Patterns: Elements of Reusable Object-Oriented Software ("Gang of Four"), Patterns of Enterprise Application Architecture, Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and Iterative Development, Xunit Test Patterns: Refactoring Test Code, and others are wonderful but have few detailed real-world business-case examples.

Moles is a powerful and useful framework for unit testing. Or was. But even then, it was overused (at least by me). But no more!
The first clue that I might need to walk away from Moles was the recent difficulty another developer was having in trying to get a unit test project up-and-running on his computer. I had installed what was current in early 2011, and he had installed the current version from last 2011. Turns out there was a significant change – the config file no longer worked. We had to update the assemblies correctly on my machine, rebuild many times, and fool around with manually removing some assemblies. It got confusing and messy. I suppose that's why MS still labeled this version as < 1.0.
Here’s an interesting scenario: I have a Linq-to-Entities query that is giving me no results when performing a system test, but when I look in the database, logically there should be results. Better yet, the unit test passes. How can that be?
Historically I've advocated naming test methods after the method under test, in order to help find the tests when you need to modify them. Growing Object-Oriented Software, Guided by Tests has shown me that this is a relic of a code-first mentality rather than good application of test driven development, primarily in the section "Test Names Describe Features" (ch 21). "Test driven" development implies that we do not know the name of the method we're going to test. But we do know the functionality (feature) that we are going after, and that knowledge should be used when writing out a test name. For example:
"The best way to attack the essence of building software," Dr. Brooks writes, "is not to build it at all." (p222). With this he introduces a brief discussion of the importance of code reuse, and of its challenges.
Recently I began carving out some time for using CruiseControl.Net in earnest. The book Continuous Integration in .Net was, and I'm sure will continue to be, of great help. Nevertheless, I think it will behoove my own memory, and perhaps help a few others, to record some notes on a few practical details.
I've started a new project on CodePlex, called Reggie, and posted the initial working source code. Reggie's goal is to be a simple developer tool for writing and testing Regular Expressions. It is inspired by the venerable Regulator tool and will be created in WPF using the MVVM pattern.
