sharing about .NET and technology RSS 2.0
 Sunday, January 15, 2006

For a long time I was thinking about purchasing a portable GPS device and I also wanted to replace my old GSM. One of the most popular devices is TomTom Go, but I felt it would be better to integrate both into a smartphone. TomTom also has a product called TomTom Mobile 5 that allows GPS navigation on your smartphone.

Therefore I bought the Qtek 8310 and TomTom Mobile 5 at PDAshop.be, I picked up the Navigation pack. The installation was easy, the only thing I had to do was to upgrade the TomTom software to TomTom Mobile 5.2 which can be found here, so that the software supports the Qtek 8310 which is the same as the i-mate sp5 (this must be chosen in the product upgrade). The TomTom package includes a mini-SD card which contains the TomTom software and maps that can be inserted into the smartphone.

I have to admit that everything works perfectly, the software is identically to the TomTom Go devices, there are no speed issues and the screen resolution is more than sufficient. Until now I didn't encounter any problems.

The smartphone itself has many many features, one of them is:

  • OS: Microsoft Windows Mobile
  • Quad-band GSM/GPRS / EDGE module
  • GPRS functionality
  • 1.3 Mega Pixels CMOS
  • Mini-USB plug (Slave USB, Power In)
  • Infrared IrDA SIR
  • miniSD Card slot
  • Bluetooth
  • WiFi
  • ActiveSync
  • MSN Messenger, IE, etc.
  • ...

And most importantly you can write .NET applications for your smartphone. If you download the Windows Mobile 5.0 SDK for Smartphone you get extra templates inside Visual Studio 2005 for writing smartphone applications.

Update:

Sunday, January 15, 2006 3:28:05 PM (Romance Standard Time, UTC+01:00)  #    Comments [2] -

 Monday, January 09, 2006

Some years ago on a project I needed a usercontrol for code coloring SQL statements. At that time I reused a dll library that is used inside the query analyzer of SQL server. I wrote a little article about that topic, I think it gives some useful information about COM interop in .NET.

Monday, January 09, 2006 8:34:44 PM (Romance Standard Time, UTC+01:00)  #    Comments [0] -

 Tuesday, November 29, 2005

Today I released an add-in for Visual Studio .NET 2005 that allows you to drag components onto the designer surface. It's called ComponentDropper and you can even watch a movie to know what it does and how to use it.

A very good tool for screen capturing is Windows Media Encoder. It's from Microsoft and you can download it, if you have a legal version of Windows XP.

Windows Media Encoder 9 Series is a powerful tool for content producers who want to capture audio and video content using the many innovations in Windows Media 9 Series including high-quality multichannel sound, high-definition video quality, support for mixed-mode voice and music content, and more.

Tuesday, November 29, 2005 1:46:08 AM (Romance Standard Time, UTC+01:00)  #    Comments [1] -
 | 
 Tuesday, November 15, 2005

On my current project we are developing a windows forms application in Visual Studio 2005.
We are still using CruiseControl.NET for continuous integration and unit testing, because
setting up a team foundation server would give an overhead right now.

For unit testing we like to have the nice debug and built-in features of MSUnit and the unit tests
automatically tested by CruiseControl.NET through NUnit. The good thing about the two libraries, is that
they work through attributes and the common Assert methods are the same.

The template we use for our unit tests, looks like:

#if NUnit
   using NUnit.Framework;
#else
   using Microsoft.VisualStudio.QualityTools.UnitTesting.Framework;
#endif

namespace MyUnitTests
{
   [NUnit.Framework.TestFixture]
   [Microsoft.VisualStudio.QualityTools.UnitTesting.Framework.TestClass]
   public class MyTestClass
   {
      [NUnit.Framework.Test]
      [Microsoft.VisualStudio.QualityTools.UnitTesting.Framework.TestMethod]
      public void MyTestMethod()
      {
      }
   }
}

We migrated our project to the new Composite UI. Yes, today a new release of the cab has been released. In the unit tests of CAB I noticed they did the same trick, but with aliases:

#if !NUNIT
   using Microsoft.VisualStudio.TestTools.UnitTesting;
#else
   using NUnit.Framework;
   using TestClass = NUnit.Framework.TestFixtureAttribute;
   using TestMethod = NUnit.Framework.TestAttribute;
   using TestInitialize = NUnit.Framework.SetUpAttribute;
   using TestCleanup = NUnit.Framework.TearDownAttribute;
#endif

namespace MyUnitTests
{
    [TestClass]
    public class MyTestClass
    {        
        [TestMethod]
        public void MyTestMethod()
        {        
        }
    }
}
Tuesday, November 15, 2005 2:13:47 PM (Romance Standard Time, UTC+01:00)  #    Comments [0] -

 Sunday, November 13, 2005

Today I published the new IStaySharp.NET. It's rewritten in ASP.NET 2.0 and hosted by WebHost4Life. I also added a new FAQ entry about coverting FILETIME and DateTime, you will encounter FILETIME when you are using COM interop.

There is a lot of coming during the next months. So stay tuned!

Sunday, November 13, 2005 11:06:13 PM (Romance Standard Time, UTC+01:00)  #    Comments [0] -

 Wednesday, October 26, 2005

LAME is a very popular LGPL MP3 encoder. For a long time LAME version 3.90.X was recommended, now version 3.97b has been released. This version uses the -V setting, with a value from 0 (highest) till 9 (lowest) quality in VBR. More details about these settings can be found here.

Instead of lossy compressions like MP3, there are also losless codecs like FLAC (Free Losless Audio Coded). No quality is lost, but the file size is much bigger. Here are some results in applying the above settings on a regular audio cd:

Setting File size Remark
WAV 721 MB losless, uncompressed
FLAC 405 MB losless, level 9 (highest)
LAME -b 320 163 MB lossy, CBR 320, highest possible quality
LAME -V 0 105 MB lossy, VBR
LAME -V 0 --vbr-new 102 MB lossy, VBR but another algorithm (better quality and smaller)


You can assume that with the settings used here you cannot distinguish the mp3 from the original cd. A very good resource about audio, codecs and tests is Hydrogenaudio . This graph gives a nice relationship between the file size and audio quality for the LAME encoder.  Between V0 and CBR320 setting, you see the file size increases by 50%, whereas the quality does not increase as much as that.

Wednesday, October 26, 2005 12:30:15 AM (Romance Standard Time, UTC+01:00)  #    Comments [0] -
 | 
 Wednesday, October 19, 2005

This year I purchased a server for persisting my data and for running applications that require intensive processing. For me it was very important to have a robust & performant way for archiving my data. Therefore I purchased a RAID card from Areca, the ARC-1120 . The raid card is connected through 8 HD's of 200GB from Western Digital in RAID 5. Areca is currently one of the best RAID cards available. This page contains an extended review with benchmarks .

My initial idea was to use my current ASUS A8N-SLI Deluxe motherboard, which has 2x PCI-E Express ports, and to use one port for the RAID controller. At that time it was still not possible, but now ASUS has provided a new BIOS driver which fixes the issue. After a lot of research and certainly the many chats I had with Bruno, I decided to go for a server motherboard. This is simply the most recommended way and is more robust, uses registered memory, has PCI-X ports, dual CPU, more memory slots, etc.

I wanted a server motherboard that contains dual CPU core support and featuring one or two PCI-E ports. This way I can easily upgrade in the future if it is necessary. Therefore I purchased the Tyan K8WE, which is an NForce Pro based server motherboard with 2x PCI Express x16 slots @full speed x16 lanes and has even a firewire connection.

A lot of hardware components means a large case. Therefore I decided to buy the U2-UFO case from Mountainmods. It's really a case with a lot of space and most important it can contain up to 9 HD's and it's compatible with an Extended ATX motherboard.

I am still configuring the server, but I will certainly post some benchmarks and experiences. In the mean time you can find the specs and some pictures of my server.

   

Wednesday, October 19, 2005 10:34:48 PM (Romance Standard Time, UTC+01:00)  #    Comments [4] -

 Thursday, September 22, 2005

I updated the IStaySharp.WebBrowser control with some bug fixes.

  • DocumentText fix in IEBrowser
  • Fix of member TranslateAccelerator in IDocHostUIHandler
  • ScrollBarsEnabled fix in IEBrowserSiteBase

    More information can be found on IStaySharp.

  • Thursday, September 22, 2005 11:29:29 PM (Romance Standard Time, UTC+01:00)  #    Comments [5] -
     | 
     Sunday, September 11, 2005

    In .NET 2.0 you will notice that every data has among others an extra method called TryParse. TryParse and Parse are semantically the same but differ in the way they handle errors. Parse method will throw an exception if it cannot convert the string, whereas the TryParse method returns a boolean to denote whether the conversion has been successfull or not, and returns the converted value through an out parameter.

    int result = 0;
    bool success = true;

    string badValue = "12a45";
    string goodValue = "1245";

    try {
    result = int.Parse(badValue);
    }
    catch {
    success = false;
    }

    Debug.Assert(success == false);
    Debug.Assert(result == 0);

    success = true;

    try {
    result = int.Parse(goodValue);
    }
    catch {
    success = false;
    }

    Debug.Assert(success == true);
    Debug.Assert(result == 1245);

    // int.TryParse

    success = int.TryParse(badValue, out result);

    Debug.Assert(success == false);
    Debug.Assert(result == 0);

    success = int.TryParse(goodValue, out result);

    Debug.Assert(success == true);
    Debug.Assert(result == 1245);
     

    The reason why the TryMethod is introduced, is because exceptions are expensive. On http://www.codinghorror.com/blog/archives/000358.html you find a benchmark tool and you notice that the (default) Parse method is a lot slower.

    One tip: For extensive use of string concatenation you use the StringBuilder class, for converting data types you apply the TryParse method.

    Sunday, September 11, 2005 9:06:38 PM (Romance Standard Time, UTC+01:00)  #    Comments [0] -

     Thursday, September 08, 2005

    The RealDN site, a blog site where employees of Real Software share their knowledge about technology, has been updated.

     

    Thursday, September 08, 2005 12:59:39 AM (Romance Standard Time, UTC+01:00)  #    Comments [0] -
     | 
     Wednesday, August 24, 2005

    In .NET 1.1 you cannot assign the NULL value to a value type (e.g. int, float, etc.). There are some situations where this is needed, typically in database scenarios. In .NET 2.0 there is a new type called nullable. The nullable type implements the INullableValue interface and looks like:

    public interface INullableValue
    {
       bool HasValue { get; }
       object Value { get; }
    }

    The idea is that a nullable type combines a value (Value) of the underlying type with a boolean (HasValue) null indicator. The underlying type of a nullable type must be a value type.

    Nullable<int> x = 9;

    Debug.Assert(x.HasValue);
    Debug.Assert(x == 9);
    Debug.Assert(x.Value == 9);
    Debug.Assert(x.GetValueOrDefault(5) == 9);

    x = null;
    Debug.Assert(x.HasValue == false);
    Debug.Assert(x.GetValueOrDefault(5) == 5);

    You can also use the ? type modifier to denote a nullable type.

    int? y = 9;
    Debug.Assert(y.HasValue);
    Debug.Assert(typeof(int?) == typeof(Nullable<int>));

    In .NET 2.0 there is a new operator, called the null coalescing operator, ??. For example the statement x ?? y is x if x is not null, otherwise the result is y. Note that this operator also works with reference types.

    int? a = null;
    int? b = 6;
    Debug.Assert((a ?? b) == b);
    a = 9;
    Debug.Assert((a ?? b) == a);
    b = null;
    Debug.Assert((a ?? b) == a);

    Wednesday, August 24, 2005 12:48:05 AM (Romance Standard Time, UTC+01:00)  #    Comments [0] -

     Sunday, August 21, 2005

    RemotingHelper is a little helper class by Ingo Rammer that enables you to use interfaces to access remote objects instead of the implementation. In .NET 2.0 there are a lot of new features, and one of them are generics. Especially with the RemotingHelper we deal with types and with the GetObject method we can use generics to parameterize the method by type.

    In .NET 1.1 we need to write something like

    ICustomerService customerService = RemotingHelper.GetObject(typeof(ICustomerService)) as ICustomerService;

    when using generics in .NET 2.0 we can simply write

    ICustomerService customerService = RemotingHelper.GetObject<ICustomerService>();

    No need to to cast and no typeof operator!

    Below you find a version of the RemotingHelper using generics, or you can download the RemotingHelper.zip

    using System;
    using System.Collections.Generic;
    using System.Runtime.Remoting;

    public class RemotingHelper
    {
       private static bool isInit;
       private static IDictionary<Type, WellKnownClientTypeEntry> wellKnownTypes;

       public static T GetObject<T>()
       {
          if (!isInit)
             InitTypeCache();

          WellKnownClientTypeEntry entry = wellKnownTypes[typeof(T)];

          if (entry == null)
          {
             throw new RemotingException("Type not found!");
          }

          return (T)Activator.GetObject(entry.ObjectType, entry.ObjectUrl);
       }

       public static void InitTypeCache()
       {
          isInit = true;
          wellKnownTypes = new Dictionary<Type, WellKnownClientTypeEntry>();

          foreach (WellKnownClientTypeEntry entry in RemotingConfiguration.GetRegisteredWellKnownClientTypes())
          {
             if (entry.ObjectType == null)
             {
                throw new RemotingException("A configured type could not be found. Please check spelling");
             }

             wellKnownTypes.Add(entry.ObjectType, entry);
          }
       }
    }

    Sunday, August 21, 2005 9:57:40 PM (Romance Standard Time, UTC+01:00)  #    Comments [2] -

     Saturday, August 20, 2005

    I updated my blog site to version 1.8 of DasBlog and created a new theme called 'Business'. I will release soon a version of the theme so that you can use it for your own blog site.

    Any feedback and suggestions are welcome!

    Saturday, August 20, 2005 1:34:33 AM (Romance Standard Time, UTC+01:00)  #    Comments [1] -

     Monday, August 15, 2005

    I have missed that one, but Dasblog has released a new version. The new Dasblog 1.8 can be downloaded here. I think that I am going to upgrade now, i'm still running 1.5.

    Update: The upgrade went without any problems and the content can be converted with the DasBlogUpgrader.exe tool. As you can see there is a cool theme included named Portal from Johnny Hughes.

     

    Monday, August 15, 2005 11:57:12 AM (Romance Standard Time, UTC+01:00)  #    Comments [0] -

     Tuesday, August 09, 2005

    With the DSL tools of VS.NET 2005 you can create your own designer integrated into VS.NET 2005 for a visual domain specific language. Clipcode has released a DSL for the Gang of Four patterns with the source code.

    Currently it provides the following patterns

    • Abstract Factory
    • Builder
    • Factory Method
    • Prototype
    • Singleton
    Tuesday, August 09, 2005 11:32:15 PM (Romance Standard Time, UTC+01:00)  #    Comments [0] -

     Wednesday, July 13, 2005

    If you are targeting Windows XP SP2 or Windows 2003 and your .NET application relies on COM components, then it is not needed anymore to register your COM components. This can be done by using manifest files. Registration-Free Activation of .NET-Based Components: A Walkthrough is an excellent article about this topic.

    Wednesday, July 13, 2005 11:01:37 PM (Romance Standard Time, UTC+01:00)  #    Comments [0] -

     Monday, July 11, 2005

    I've updated the webbrowser control with a set of new features and fixes. More info on IStaySharp.Net

    Monday, July 11, 2005 10:27:35 PM (Romance Standard Time, UTC+01:00)  #    Comments [0] -
     | 
     Wednesday, July 06, 2005

    The session 'Turn Left or Right? How to Best Design Your Web Services Interface' at TechEd was very interesting and pointed issues like versioning, contracts, interfaces, etc.

    Christian Weyer from ThinkTecture is currently building a tool called WSContractFirst (WSCF) that can generate code from a contract. Dealing with the "Melted Cheese Effect" is an article on MSDN about this subject and more parts will be published.

    Wednesday, July 06, 2005 5:01:00 PM (Romance Standard Time, UTC+01:00)  #    Comments [0] -
     | 
     Saturday, July 02, 2005

    A new version of the Enterprise Library has been released. More information about the changes since the January release can be found here.

    Saturday, July 02, 2005 10:54:17 PM (Romance Standard Time, UTC+01:00)  #    Comments [0] -

     Friday, July 01, 2005

    One way of setting up CC.NET and VSS is that CC.NET is responsible for getting the latest version (setting the attribute autoGetSource to true of the sourcecontrol node in the ccnet.config file) or NAnt by using the vssget task of NAntContrib for compiling the sources by NAnt. I always use the csc task instead of the solution task, therefore it is necessary to have a clean version of VSS, because VSS does not automatically delete files locally that have been deleted in the VSS database.

    An alternative and better way is to set a shadow folder in VSS. A shadow folder contains a copy of the most recently checked-in version of each file in the project. This is exactly what we need for compiling the sources.

    That way is CC.NET only using VSS for monitoring changes in the VSS database and/or labeling.

    Friday, July 01, 2005 3:51:20 PM (Romance Standard Time, UTC+01:00)  #    Comments [0] -

    Navigation
    Archive
    <January 2006>
    SunMonTueWedThuFriSat
    25262728293031
    1234567
    891011121314
    15161718192021
    22232425262728
    2930311234
    About the author/Disclaimer

    Disclaimer
    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2008
    Christoph De Baene
    Sign In
    Statistics
    Total Posts: 151
    This Year: 22
    This Month: 1
    This Week: 0
    Comments: 147
    All Content © 2008, Christoph De Baene
    DasBlog theme 'Business' created by Christoph De Baene (delarou)