• Home
  • About Me
  • Musings
  • Programming
  • Computers
  • Open Source
  • Society
  • Books
  • Design
  • Movies
  • What type of programmer are you?

    While stumbling through web sites, I hit upon , Doolwind’s Game Coding Site, which presents a interesting test to find what type of programmer you are.
    My result was

    Your programmer personality type is:
    DHSB
    You’re a Doer.
    You are very quick at getting tasks done. You believe the outcome is the most important part of a task and the faster you can reach that outcome the better. After all, time is money.

    You like coding at a High level.
    The world is made up of objects and components, you should create your programs in the same way.

    You work best in a Solo situation.
    The best way to program is by yourself. There’s no communication problems, you know every part of the code allowing you to write the best programs possible.

    You are a liBeral programmer.
    Programming is a complex task and you should use white space and comments as freely as possible to help simplify the task. We’re not writing on paper anymore so we can take up as much room as we need.

    You can take the test here.

    Domain registered!

    Hey!

    Happy to write my 50th post. That too on my own online identity. I have hosted the wordpress blog on DreamHost on Sudar‘s advice. So officially my site is www.raasukutty.com.

    To quote Frost:

    The woods are lovely, dark and deep,
    But I have promises to keep,
    And miles to go before I sleep,
    And miles to go before I sleep.

    Continuous Integration with CruiseControl.Net

    I had challenges in understanding the documentation for installing and configuring CruiseControl.Net with StarTeam as the souce control in a Vista system running IIS 7. Finally I have successfully set up cruise control to work. I am listing the steps to get it working.

    Step 1:Grab a copy of CruiseControl.Net from here. Run the setup. As a part of the install, the setup installs the ccnet server and a webdashboard.

    Step 2:Once installed, to get the webdashboard up and running, fire your browser and type. http://localhost/ccnet (this is the default virtual directory on install. This points to the $InstallFolder/webdashboard folder in your build server. If the system is running IIS5 or 6, then you will see a CruiseControl.Net page, in IIS7, an 500 error is thrown. To resolve this issue, proceed to Step 3, if no issue was encountered, proceed to Step 4.

    Step 3:Run the followin command as an administrator. Note: Here ccnet is the virtual directory which points to the physical location of webdashboard in the system.

    %SystemRoot%\system32\inetsrv\appcmd migrate config "Default Web Site/ccnet"

    Once the command is run, then just restart iis and browse to http://localhost/ccnet. It should show the CruiseControl.Net dashboard.

    Step 4:Next step is to configure the ccnet server. Open the ccnet.config file located in the ‘server’ folder of the install directory to edit.

    Project Section:

    Define the project section. The project name can be any identifier not necessarily your project name. This will be used by CruiseControl.Net to recognize your project.

    Source Control Section

    In my case, the source control was StarTeam. Various properties like login credentials, project etc, are to be set.

    Executable:Path to the ‘stcmd.exe’ the Star Team command line utility.

    Project:The name of the Project as defined in Star Team, that has to be extracted.

    UserName, Password, Host, Port:Star Team Server connection setttings.

    Path:Path from which files have to extracted from StarTeam. Example: Consider the Project root folder in StarTeam is “Test”. Let the project and solution files lie in the hierarchy “Test\TestProject\MyProject”. To pull the project files and solution from this location, specify “Test” for project and “TestProject\MyProject” for path.

    Override Folder Working Directory:Path to which the files from Star Team are to be checked out for the build. If not specified, the original working folder specified in the StarTeam will be used to extract the files.

    Auto Get Source:Specifying this to ‘true’ will allow CruiseControl.Net to automatically check out files from StarTeam

    fileHistoryRegEx:I had to make a change to the Date regular expression, as my regional settings was configured to English(India), wherein DateTime is specified as DD-MM-YYYY HH:MI:SS (IST). I had to change this, since I got a Format invalid:System.DateTime exception during the run.

    TimeOut:Specify the timeout for StarTeam polling.

    Following is the complete listing of the starteam configuration block.

    StarTeam

    StarTeam

    MSBuild section

    I used MsBuild for the build task. Following section explains the properties involved to get the MsBuild setup for CruiseControl.Net.

    Executable:Path to the ‘MsBuild.exe’ file in the system.

    Working Directory:Location of the files to be built. i.e., Location to where the StarTeam extracted the files that need to be built.

    Project File:The .proj file or the .sln file that needs to be built.

    Build Args:Specifies additional arguments passed to the msbuild.exe.

    Targets:Actions to be done. Here I wanted Clean’ and then ‘Build’ done on the Solution.

    Timeout:Time after which error message will be displayed if there happens to be a failure to invoke the build.

    Logger:Location of the logger assembly that will be used to produce the build result.

    Following is the complete listing of the msbuild configuration block.

    MS Build

    MS Build

    Triggers Section

    Triggers section specifies the time and condition when the build of the project had to be invoked. During intital setup for testing, set the buildCondition to “ForceBuild” (forces a build), and once the testing is done, change it to “IfModificationExists”(does a build only when a modification is detected).

    Following is the complete listing of the Triggers configuration block.

    Triggers

    Triggers

    Step 5:Run the ccnet.exe application located in the ‘server’ folder of the CruiseControl.Net install location. The code will be pulled from the StarTeam to the location specified and the build should proceed. The results of the build are stored in the $InstallFolder\ProjectName\Artifacts\ms-build.xml file.

    Hope this helps.

    Design Time Support in Custom Server Controls

    Visual Studio and ASP.Net provide excellent design time support for all controls. By Design Time support, I am referring to the Values and Description provided in the Properties window when a developer places his focus on the control.

    When designing custom server controls, providing such design time support is simple.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    
    [Category("Custom")]
    [Description("Set the Corp Image URL.")]
    public string CorpImageURL
    {
       get
       {
           return CorpImage.ImageUrl;
       }
       set
       {
           EnsureChildControls();
           CorpImage.ImageUrl = value;
        }
    }

    Here a property CorpImageURL to set the URL for a Image control is exposed. If the ‘get’ part of the Property is not defined, then the design-time support for the property will not be enabled. So to get the design time support, it is necessary to set the ‘get’ accessor.

    The attribute ‘Category’ is used to set the category in which the property will be displayed in the properties window. So in this case, a ‘Custom’ category is defined. If the Properties window is configured to show in the ‘Categorized’ mode, this new Category, ‘Custom’ will be displayed.

    The attribute ‘Description’ is used to set the description for the property. The description of the property to instruct what the developer is supposed to provide to the property.

    The attribute ‘DefaultValue’ is used to set the default value for the property. Note: This value will be displayed only on the properties window. It will not be assigned to the property by default.

    Starting out on a Linux Kernel

    Hi,

    I have downloaded the linux source code for version 0.0.1 from http://lxr.linux.no/.

    I just wanted to get started on reading and trying to find out what each one of the files are doing. Where do I start off. I am not quiet comfortable in semaphores or operating system stuff like that.

    Any help will be welcome.

    Thanks.

    ASP.Net Validation controls

    ASP.Net validation controls can be used to perform both client side validations. If the page containing a asp.net validation control is rendered in a page with Javascript disabled, the asp.net runtime creates code to automatically perform the validations in the server side.

    Server side validations can be invoked using the Page.Validate() method. The status of the validation is set to the Page.IsValid property by the asp.net runtime.

    1
    2
    3
    4
    5
    6
    7
    
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Page.IsPostBack)
       {
          Page.Validate();
       }
    }
    1
    2
    3
    4
    5
    
     protected void button1_Click(object sender, EventArgs e)
    {
        if (!Page.IsValid) return;
          //Do something if validation passes.
    }

    This server side validation works on all major browsers. I have tested on IE, FireFox and Netscape.