Home avatar

Thoughts and code

Mercurial on IIS

Mercurial is a very appealing distributed source code versioning system. I used it with Google code and also for some local work when no server repository was available. Worked great. This time I wanted to go through the scenario of setting up Mercurial as a team repository with a centralized server. This would be still useful for an individual developer to have local commits (better than committing every single change just to ensure it’s captured) and would allow to push an entire change set to be versioned on the server and allow others to retrieve that change set with all the “intermediate bookmarks”.

Growing Object-Oriented Software Guided by Tests – Book

image
image
An interesting book about not just how to develop with TDD, but also how to grow a project that utilizes TDD process. When developing code using TDD, you are unavoidably face the difficulties of maintaining 2 “project”s – production code and tests/specs. This is a Java code book, but principles are the same and applicable to .NET as well. Good read, though I would not tie too many hopes to the book. After all, you cannot learn how to shave on someone’s else beard.

dotPeak

JetBrains has released the beta version of their tool that can replace Reflector. Just the navigation around with R# like shortcuts is worth trying it. I tried Telerik’s JustDecompile, though it wasn’t as good as dotPeek. ILSpy is another player on the field, that I have tried to use. So far the leader is dotPeek. Let’s see how the game will go. Once thing is obvious – Reflector is loosing.

Generic Repository–Cons

Generic Repository (something like Repository) is a good concept with intention of keeping code DRY, though problematic. Here are a few drawbacks of a generic repository:

  1. It is not always logical to call behaviours Save, Delete, etc on all repositories
  2. Support (logging as an example) requires to know what specific repository was invoked, and not just Repository

Just recently I ran into a log with an exception, where operation on …Repositories.Repository`1.Save(T obj…) failed and there was no way to figure out what repository out of 4 different one actually failed save operation.

Pro ASP.NET MVC 2 Framework

I have started this book long time ago, but never got to end of it. Finally, I had a

image
image
chance to do so. What a great book. The cover says “The Expert’s Voice in .NET”, and I found Seven Sanderson a real expert in ASP.NET MVC.

In the past, I did a lot of WebForms work. These days I spend a lot working on ASP.NET MVC and like it way more. Primarily for the reasons of testability and being closer to the real web (stateless and mark-up).

Not Caving In on TDD

TDD causes different people react to it in a completely different way. Some just jump on it like on a glass of a cold sparkling drink in the heat of a summer day. Some run away from it like it’s a wild dog ready to take a bite. Some feel that there might be a value for them in it, but don’t really want to move away from the comfort zone. And the last group of people always have an interesting way making an attempt to justify why having no TDD is good.