Quick way to create UML Sequence diagrams

I stumble upon this post the other day.
This led me to wonderful online tool http://www.websequencediagrams.com/ .
The SD/MSC Generator is an easy alternative to using mouse-centric tools like Microsoft Visio.
It has nice Domain Specific Language and API for creating quick sequence diagrams.

I would prefer this approach for creating any UML diagram anytime over any mouse-centric diagramming tool. Any UML diagram drawn will be rarely revisited later and adjusted/updated to the reality of the live code base. Usually when some process is better can be presented visually you want to have it done as quickly as possible while the idea is still fresh in you head. With traditional tools you would probably spend 70-85% of your time resizing horizontal and vertical lines, boxes, searching for the right shape and stencils, trying to remember to save the document in the correct format and with all this “noise” you loose concentration and spend 3-4 hours on simple diagram that would take 30 minutes to one hours with the tool like SD/MSC Generator. It is so much easier to learn Domain Specific Language for this tool than count pixels on the Visio grid.

And here is the best part of tool like this: you can store text/instruction for your diagram as regular text file in your favorite version control system rather then binary file.

Disclaimer: I am in no way affiliated with this product.

I just found another tool or technique that makes more sense, to me, and makes software project more Agile and less bureaucratic.

Generic Singelton pattern in C# and VB.NET

//SINGLETON - C#

using NUnit.Framework;

[TestFixture()]
public class SingletonTest
{
    [Test()]
    public void ObjectsAreTheSameTest()
    {
        DeploymentInfo firstDeployment = Singleton<DeploymentInfo>.UniqueInstance;
        DeploymentInfo secondDeployment = Singleton<DeploymentInfo>.UniqueInstance;
        Assert.AreSame(firstDeployment, secondDeployment);
    }
}

//Singleton Pattern 
//Generic Version

public class Singleton<T> where T : class, new()
{
    private Singleton()
    {
    }

    private class SingletonCreator
    {
        static SingletonCreator()
        {
        }
        // Private object instantiated with private constructor
        static internal readonly T instance = new T();
    }

    public static T UniqueInstance {
        get { return SingletonCreator.instance; }
    }
}


'SINGLETON - VB.NET

Imports NUnit.Framework

<TestFixture()> _
Public Class SingletonTest
    <Test()> _
    Public Sub ObjectsAreTheSameTest()
        Dim firstDeployment As DeploymentInfo = Singleton(Of DeploymentInfo).UniqueInstance
        Dim secondDeployment As DeploymentInfo = Singleton(Of DeploymentInfo).UniqueInstance
        Assert.AreSame(firstDeployment, secondDeployment)
    End Sub
End Class

'Singleton Pattern 
'Generic Version

Public Class Singleton(Of T As {Class, New})
    Private Sub New()
    End Sub

    Private Class SingletonCreator
        Shared Sub New()
        End Sub
        ' Private object instantiated with private constructor
        Friend Shared ReadOnly instance As New T()
    End Class

    Public Shared ReadOnly Property UniqueInstance() As T
        Get
            Return SingletonCreator.instance
        End Get
    End Property
End Class

CSS rounded corners

CSS Round Corners
http://www.spiffybox.com/
http://www.spiffycorners.com/
http://blog.yosle.com/2007/09/20/css-round-corners/
http://www.smileycat.com/miaow/archives/000044.php

Playing with Regex

Example - URL Extractor
http://www.dotnetcoders.com/web/Learning/Regex/exHrefExtractor.aspx

http://regexlib.com

http://sexyregex.com/regex/test/replace/3863#testdata

ASP.NET page lifecycle and master pages

ASP.NET Page Life Cycle Overview
http://msdn.microsoft.com/en-us/library/ms178472.aspx

A comprehensive look at the Master Page
http://www.vikramlakhotia.com/Working_With_Master_Page.aspx