Tuesday, June 01, 2010

Move to new home

My blog is moved to http://blog.agilehobo.com. See you there :-)

Monday, April 26, 2010

How to change registered owner and registered organization for Visual Studio 2008 and 2010

Here are steps to change registered owner and registered organization for Visual Studio 2008 and 2010

  • Open registry editor (type 'regedit' at Run command, clicks OK button, and select 'Yes' if you have UAC confirmation).
  • Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion (or HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Note\Microsoft\WindowsNT\CurrentVersion on Widows x64).
  • Change 2 string values RegisteredOwner and RegisteredOrganization as you expected (create them if they don't exist).
  • Restart Windows and open Visual Studio, you will see new registration info.

After doing above steps, if you still see old registration info, please add these steps:

For Visual Studio 2010:
  • Delete vs000223.dat from C:\ProgramData\Microsoft\VisualStudio\10.0\. It's splash screen for Visual Studio 2010.
  • Run Visual Studio 2010, now you should see a blank splash, there is no registration info, don't be worry.
  • Close Visual Studio 2010, then open it again. Now you should see new registration info.

For Visual Studio 2008:
  • Delete vs000223.dat from C:\ProgramData\Microsoft\VisualStudio\9.0. It's splash image for Visual Studio 2008. Now if you run Visual Studio 2008, you will see a strange splash 'Visual Studio code name 'Orcas'.
  • Run 'devenv /setup' from C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ (or C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\ on Windows x64).
  • Open Visual Studio 2008, now you should see new registration info.

Enjoy your Visual Studio with your own registration info.

Note: The directory paths here are on Windows 7, so if you use XP or Vista, they're maybe different.

Tuesday, April 13, 2010

Free Notepad alternatives

I'm a long-time user of Notepad++ until the day I start to work on MSBuild scripts. The extension of MSBuild scripts usually is PROJ (but you can name it yourself) and actually it's a XML file which describes about build process. The reason why I need to find another Notepad alternative to replace Notepad++ is it cannot detect the format of the file, so when I open a MSBuild script, I need to select XML from Language menu to activate highlight syntax feature manually.

Took a look around, I found 2 free tools to try: Notepad2 and Programmer's Notepad.

I tried Notepad2 first. At first, I like it. The GUI looks nice, it runs fast and didn't consume much memory. It can detect the format of my MSBuild script and use highlight syntax feature to display it. But it lacks one important thing, it doesn't have tabbed multiple document interface. So I moved to Programmer's Notepad.

IMO, "Programmer's Notepad" isn't a good name, I don't like it very much. Maybe "RockStar's Notepad" is much better, just kidding :-D Programmer's Notepad is a bit slower than Notepad++ and Notepad2 when it loads my MSBuild script, it blinks before showing the content. The good things are it can automatically detect the format of MSBuild script to highlight it and it also has a tabbed multiple document interface. The bad thing is GUI it's not look nice, but it's not too important.

I stick with Programmer's Notepad this time and enjoy editing my MSBuild script. But once Notepad++ is fixed to detect the syntax, I will come back with Notepad++.

Update: One feature, I forgot, Programmer's Notepad automatically generates closed tag for XML when you type '>', even sometimes it doesn't work properly.

Thursday, March 25, 2010

Generating class, activity and use case diagrams on the fly

Sometimes you need to create UML diagrams quickly to show your ideas on your web page. To do it, you need to use a tool to create the diagram, then capture or export it, save as an image then upload somewhere before add it to the page. It's waste of time.

Now with yUML, you only need to write some text, YES - ONLY SOME TEXT, to generate UML diagrams on the fly without any special tools.


This text

[Order]++1-items >*[LineItem]

will generate this class diagram

Currently, yUML supports class, activity and use case diagrams.

Activity diagram

Use case diagram

Saturday, March 20, 2010

Setting up a personal wiki

At office, we used wiki to share knowledge about projects and technical things. It's a good way to keep, organize and share the information. So I decided to install a wiki on my PC for personal usage.

Take a look around on open source wikis, I decided to install ScrewTurn Wiki on my PC (Windows 7). The reason I try it because it's included in Microsoft Web Platform Installer, so maybe it's good enough.

There are two ways to set up ScrewTurn Wiki: via Microsoft Web Platform Installer, and manually. I tried with Microsoft Web Platform Installer first because it's simpler way to install, just select and click a few options and buttons, and you should have something works. So I did it but had 500.19 error. Then I tried to set it up manually, but had the same problem.

Look into the error message and I finally found out that removing the whole 'configSections' section in web.config help to resolve the problem. Damn it, when there is an installer, I expect that after I click Finish, the software should be on and running.

Anyway, the wiki is running now and I will dig into it.

Thursday, March 18, 2010

Change data format in Ext JS's Template and XTemplate

Sometimes you want to change format of the data before showing it to your users, example: Change it to upper case, add '$' for USD,... Ext JS provides a few formatters and the good thing is you can use them in Template and XTemplate easily.


new Ext.XTemplate(
'Full name: {firstName} {lastName}',
'Account identifier: {accountIdentifier:capitalize}',
'Balance: {balance:usMoney}'

As you see, 'capitalize' will change your data to upper case, and 'usMoney' will format your data as USD. Look nice and much simple.

Now maybe you will ask yourself 'But how can I add my own formatters?'. To answer this question, all you need to know that Template and XTemplate use Ext.util.Format internally to format your data.

So now, when you know it, it's very easy to add yourself formatters. I will add stripping zero formatter and so how to use it.

+ Add stripping zero formatter

Ext.util.Format.stripZero = function(v) {
while (v.startsWith('0')) {
v = v.substr(1, v.length - 1);

return v;

+ Use it

new Ext.XTemplate(
'Number: {number:stripZero}',

Monday, March 08, 2010

How do you organize your build configurations?

I'm using TeamCity for the first project I tried to apply CI and I created build configurations as below:
  • Trunk
    Development build configuration, it will run if files are checked into trunk. No code coverage, no artifact, it should run as fast as it can
  • Nightly
    It will run nightly and produce code coverage and artifact
  • Release
    As its name, just for releasing. It also supports to deploy the release to remote server

How do you organize your build configurations?