Monday, April 28, 2008

Short review Pro C# 2008 and the .NET 3.5 Platform 4th

After about 2 months, I finished reading Apress' Pro C# 2008 and the .NET 3.5 Platform 4th. Actually it's the first book about programming I read from the beginning to the end (even I ignore a small section about pointers in chapter 24).

In my opinion, Andrew did a good job. For the first large part, from chapter 1 to chapter 13, he described about syntax and feartures of C# 3. The pro side here is he didn't only describe about them, he did explain it in more details and sometimes in low level (by CIL code).

For the rest part, from chapter 14 to chapter 33, he introduced about LINQ, WCF, WF, Windows Forms, and more details about ADO.NET, WPF, ASP.NET. Why did he focus on ADO.NET, WPF and ASP.NET? I think because they're are the most important parts when we develop applications (web or desktop) on Windows. It's not mean other parts are not important, but it's the room for other books. And that's not all, he also described about processes, AppDomains, Object Contexts, how to build multithreaded applications and CIL.

A book covers most of things in C# 3 and .NET 3.5 (1400 pages), it's worth to read. In my opinion, I give it 4.5/5.

Now I'm continuing with the next book, Manning's C# in Depth.

Wednesday, April 16, 2008

IntelliJ IDEA 8.0 Technology Roadmap

You can find it here.

There are not too many technologies I will use in an early future.

Wednesday, April 09, 2008

Thursday, March 27, 2008

Sunday, March 23, 2008

First touch TeamCity

Yesterday I tried TeamCity the first time, and also it's the first time for CI (continuous integration). My first impression about TeamCity is it's very easy to use. But if you're new to TeamCity and CI (like me), you need to read the description for each fields carefully and consult TeamCity document when creating a build configuration.

After creating a build configuration, I fire up VS2008, write a test, run the build but it fail with an error message "Could not locate the assembly nunit.framework...". I don't understand why. I added reference to NUnit assembly to test project. I could compile and run the test on my PC. But why TeamCity cannot locate NUnit assembly?

After some tries, I found that I can fix the problem by adding nunit.framework.dll to test project manually (create a "lib" folder, copy nunit.framework.dll into it, add reference to the "local" nunit.framework.dll and commit to server). Seems TeamCity cannot resolve dependencies if the assemblies were not in GAC.

OK, now I'm happy with adding NUnit assembly to project manually. But it will better if TeamCity can resolve it for me.

And one thing maybe you will interested in, JetBrains is now developing their own issues tracker. I imagine that someday when I go to office I will fire up my favorite IDE (IntelliJ IDEA), receive my tasks, reports from my issues tracker (in my IDE), write code and run tests in conjunction with my CI server (Team City). I think that day will come soon ;-)

Let's continue with CI :-)

PS: You can read here to find out how TeamCity roooocks.

Friday, March 21, 2008

Next version of the most intelligent Java IDE

The first EAP build of IntelliJ IDEA 8, the most intelligent Java IDE, has just been released. In this version, JetBrains brought to you:
  • Seam support

  • FreeMaker support

  • JavaScript debugging

  • Flex debugging

  • SQL support

  • Struts 2 support
and many more. You can grab it here to have fun :-)

But where is the road map? I cannot find it now but hope that they will post it soon and we will have many big suprises.

How to fix NAntAddin to run with Visual Studio 2008

I can install NAntAddin v1.0.3 for Visual Studio 2005, and it's OK, at office, I only need to use Visual Studio 2005. But it's really annoying when I cannot install it for Visual Studio 2008 at home.

Play with NAntAddin.AddIn I found that I can fix it to install NAntAddin for Visual Studio 2008. And if you want, you can do it easily. Just open NAntAddin.AddIn in a text edtior, you will find this XML fragment:
    <HostApplication>
<Name>Microsoft Visual Studio</Name>
<Version>8.0</Version>
</HostApplication>
then just replace "8.0" by "9.0" and restart your Visual Stusio 2008, NAntAddin will start. (Of course, you need to configure NAntAddin in your Visual Stusio 2008 first via Tools|Options...|Environment|Add-in/Macro Security)

Another information relates with NAnt: If you want to get NAnt intellisense in Visual Studio, just copy nant.xsd from NAnt to [VS_HOME]\Xml\Schemas. VS_HOME is the path to Visual Studio folder, in case of Visual Studio 2008, it is "C:\Program Files\Microsoft Visual Studio 9.0" and add a custom namespace to your build file as below
    <?xml version="1.0" encoding="utf-8" ?>
<project name="NAnt Build Sample"
default="debug"
xmlns="http://nant.sf.net/release/0.86-beta1/nant.xsd">

</project>

Wednesday, March 19, 2008

Wi-Fi trolley? We did it, but...

I've just found an interesting information. You can read it here (in English) and here (in Vietnamese).

For this kind of Wi-Fi trolley, we did it about 2 years ago (even it doesn't have voice recognition function) but... it wasn't successful yet ;-)

Monday, March 10, 2008

Fixed VS 2008 ASP.NET MVC Templates

After trying VS 2008 MVC Templates, I found that the test project cannot resolve references to System.Web.Mvc, System.Web.Routing and System.Web.Abstractions (and Rhino.Mocks if you use the NUnit & Rhino Mocks template). The reason is, in project template, they used relative path while the absolute path should be used (or maybe it has another way but I don't know).

You can easily fix the templates by extract the ZIP file, open the CSPROJ file and replace relative path to MVC and Rhino assemblies by absolute path. But you can download fixed version of the templates here. (For installation these templates, you can follow the same steps as in "ASP.NET MVC Test Framework Integration Walkthrough")

Remember, if you install Rhino Mocks and ASP.NET MVC assemblies in different folders than "C:\Program Files\Rhino.Mocks-3.4" and "C:\Program Files\Microsoft ASP.NET MVC Preview 2", you need to fix them yourself.

Thursday, March 06, 2008

A powerful tool for Subversion

Are you tired with setting up Subversion (and integrate it with Apache) on Windows? If the answer is "Yes", you should check VisualSVN Server.

What does it provide?
  • An all-in-one installer with up-to-date components (Subversion 1.4.6, Apache 2.2.8 - for VisualSVN Server v1.0.3)
  • Supports SSL out of box
  • An UI for administration repositories and security - a superior feature, right?
  • It doesn't use port 80 so it cannot conflict with IIS
And it's completely FREE.

Check some screenshots.

Figure 1. Setup

Figure 2. Administration UI

Figure 3. Create repository

Figure 4. Browse repository

Wednesday, March 05, 2008

GS1 Check Digit Calculator

I wrote a check digit calculator, maybe somebody will need it.
public static class CheckDigitCalculator {

public static int CalculateCheckDigit(string input) {
int sum = CalculateSum(input);
int checkDigit = CalculateCheckDigit(sum);
return checkDigit;
}

private static int CalculateSum(string input) {
int factor = 3;
int sum = 0;
for (int i = input.Length; i > 0; i--) {
sum += Convert.ToInt32(input[i - 1].ToString())
* factor;
factor = 4 - factor;
}
return sum;
}

private static int CalculateCheckDigit(int sum) {
if (sum % 10 == 0) {
return 0;
} else {
int nearestEqualOrHigherMultipleOfTen =
(sum / 10) * 10 + 10;
return nearestEqualOrHigherMultipleOfTen - sum;
}
}

}
Note: The perfect one should check for the input string only contains numeric values.

Monday, February 25, 2008

The news from future


If you are care about my RSS Reader, it's FeedDemon.

Monday, February 18, 2008

Phoenix Park and snow boarding

Last weekend I went to Phoenix Park (in Gangwon, Korea) with my colleagues. There I played snow boarding, it's the first time and IT'S VERY EXCITING!

We played from about 5:30 PM to 11:30 PM and my whole body is hurt. IMO, I don't have any problems to keep the balance. But, for me, the hardest thing is how to control the knees. My knees seems are very rigid so I cannot control them as I want.

I tried to flow my colleagues' basic instruction to control the board to move forward then stop, then forward... but then I gave up. I couldn't do it. But later I tried the more advanced instruction, this time I could do it better. At that moment, the hardest thing for me is how to stop the board and can you guess how? Most of times I used my buttock to stop, ha ha.

The boarding road is >950m long and I board 6 or 7 times. Time after time, I did it better and I satisfied myself. Hope that I will have more opportunities to play boarding :-)

Some pictures of Phoenix Park





A picture of me

Tuesday, January 29, 2008

Delaying

I will not come back to Vietnam next month, but a few months later.

Thursday, January 17, 2008

SigmaK3


With me, SigmaK3, the first micro processor is made in Vietnam, is more interesting than acquiring MySQL AB by Sun.

And here are 2 application of SigmaK3: Led Matrix Display System and Robot.

Updated:
- Changed title
- Changed link to English. For Vietnamese, you can see here and here.
- Added links to applications.

Monday, January 14, 2008

Getting old & Time to come back home, or The Past & The Future

Just some brief information

- One week ago (8th of January 2008) was my 29th birthday.
- One month later (15th of February 2008), if there is no special change, I will come back to Vietnam

Thursday, December 06, 2007

TeamCity 3.0 is released with a FREE version

These days continuous integration (CI) becomes popular in software development 'cause it aims to support software developers to produce higher quality products. To apply CI in your project, usually, you need to use a CI server. There are many CI severs you can found: CruiseControl, Hudson, Luntbuild, Parabuild,... and most of them are free.

If you've ever heard about IntelliJ IDEA - the most intelligent Java IDE - is from JetBrains, you should know that they also have a CI server which has many innovative features, TeamCity. And today, JetBrains releases TeamCity 3.0, especially there is a free version.

For more information about TeamCity 3.0, you can find here: http://www.jetbrains.com/teamcity/

Try it out and have fun :-)