Checkins
One thing that I have picked up as a good habbit is when to check source code in. I remember a day when I would check out in the morning and check it in when I went home.
The best habbit I have gotten into is doing a checkin when the code is in a working state. This could be when all of my tests pass or when a manual test is successfull (if you don't have tests or good coverage). I think this probably happens more due to the use of a continuous integration server that you can get...
Region Replacement RegEx
I recently took over a project that was quite region heavy (ok every property, function, and field was wrapped in a region). So to remove them I wrote a little find replace regular expression that I thought I would share:
^\#Region\ "[a-z0-9A-Z- ]*"$
Interface Chaining in VB.NET
One beef I have had with vb was that I thought you could not chain interfaces like you can in C#: Public Interface ICommand: IDisposable
{
void AddParameter(string name, object paramValue)
IDataReader ExecuteReader()
int ExecuteNonQuery()
Object ExecuteScalar()
} Finally a colleague of mine told me that instead of implementing an interface on an interface you inherit the interface like so:Public Interface ICommand
Inherits IDisposable
Sub AddParameter(ByValname As String, ByVal paramValue As Object)
Function ExecuteReader() As IDataReader
Function...
NDepend
I have been playing with NDepend for the past few months and am quite impressed. The sheer power of this tool has been quite intimidating and I have been putting off this post as I really wanted to learn NDepend before I wrote my opinions (I still don't know it very well but that will take more time) For those who have not hear of it, NDepend is a great analysis tool that quickly and easily allows you to spot issues in your code base. It ships with over 50 built-in metrics some of which are number of lines...