Migrating to two point oh
K. Scott Allen : The Great Migration: “The problem is, you don’t get all the new features for free. 1.x programmers need to unlearn a few concepts, and migrate their existing code. “
We’re starting to try to migrate our project, Caisis, to ASP.NET 2.0. The biz, DAL, and Controller projects migrating with no problems. A few warnings about deprecated XML transform methods. No problem. The UI, the actual ASP part of ASP.NET, can not easily be migrated. At least, not by the built in wizard. The wizard left artifacts all over the place. Moved some code to the app_code directory, then the compiler complains that it can’t find the code. Lots of problems with the .ascx files finding their respective code-behind classes. Most of those were fixed by adding a page tag, I forget which one. Oh, the reference tag.
The biggest problem with migrating from 1.0/1.1 to 2.0 is that you don’t get the benefits for free. The migration wizard doesn’t really make it any easier for you to add master pages to your project.
I think instead of migrating the project, we’d be better off re-writing the UI under 2.0. Why go through all that pain just to gut the application and start from scratch? Might as well start from plain HTML pages in the first place.
Unit tests are the new documentation
Refactoring Handles Unanticipated Changes: “”
(Via haacked.com/ .)
I mildly disagree with Sam and Phil.
“But as Sam points out, what use is better code if it does the wrong thing?”
Yes, but what happens to your unit tests when you refactor your code to meet the new requirements? Now, you not only have to refactor your code, but you also have to refactor your unit tests. Also, writing unit tests, first, last, or during, doesn’t guarentee that your code will meet the requirements after the first, second, or N refactor.
My feeling is that unit tests are the new “documentation”. Unless you spend as much time babysitting your unit tests as you do your code, they become hopelessly outdated and are instead written after the fact. Which really just means you’ve increased the amount of code you have to write by two-fold. That doesn’t include all the build scripts, and setup of the automated testing software.
Plus, I’ve always wondered, what unit tests the unit tests? How can you ensure that your unit test is testing your code correctly?


