Archive

Archive for August, 2008

Convert a FAT32 partition to NTFS on XP Home

August 25th, 2008

If you are using XP Home on a slightly older machine, your primary partition might be very well FAT32. At least on the two machines that I had with XP Home, FAT32 was the default. FAT32 is a pretty old file system, and lacks many useful features that NTFS brings (transparent compression, sparse files, you name it).

Converting is quite simple, and works without any 3rd party tools. Just run convert C: /FS:NTFS from the cmd line, answer yes twice, and on the next boot, Windows should convert the partition to NTFS. In case it hangs during bootup (just had this problem recently), shutdown, reboot, and select “last working version” — which will skip calling convert and just boot up Windows normally.

WPF: Minimal WPF DataBinding example

August 18th, 2008

WPF (Windows Presentation Foundation) is slated for becoming the next GUI toolkit for Windows (superseding Win32, MFC and Windows Forms). Unlike the others, WPF does not base on Win32 at all, but works on DirectX, providing features like fully vector-based rendering.

WPF has a lot of features, however, in this example we’ll look at a particularly nice one: DataBinding. There is an interesting tutorial series from Microsoft about it, but we’ll take a real quick and simple look at it here. Read more…

Visual Studio 2008 SP 1 /.NET 3.5 SP 1 out

August 12th, 2008

Well, as expected, the Visual Studio 2008 SP1 has been released yesterday, together with an updated TR1 implementation.

It contains some important fixes. Quoted right from the VC++ blog:

The three most significant fixes are:
* A massive performance improvement in regex matching.
* An across-the-board performance improvement in STL containers of TR1 objects (e.g. vector >).
* A fix allowing tr1::function to store function objects with non-const function call operators.

#3 was reported by me (found it while working on a thread-pool and migrating some stuff from Boost over to TR1), and unlike most other bugs that I reported, it was not postponed until VC10 or 11, but really fixed :) Well done, Microsoft. (Side note: Those other bugs are mostly in their compiler, and as they are rewriting it, I do understand that it might take a bit longer)

What are you waiting for?

August 11th, 2008

If you are serious about programming, you know this feeling: You start working with something, and after some while, you hit some kind of road-block. Looking around for an easy fix, you find out that version N+1 is going to solve this problem. And now you postpone this nasty feature and start waiting for N+1 … like for example:

  • .NET 3.5 SP1: If you are doing WPF now, SP1 is the next big release of it. Vastly improved designer support in VS2008, better performance, easier usage, new GUI widgets.
  • VS2008 SP1: Finally TR1 support and more … (note: supposed to be released today!)
  • DX11: Built-in tesselation support, no need to implement it on your own! Shader linkage, etc.
  • Mono 2.0: Finally most of C# 3.0 on Linux, so you can eventually start working for Linux
  • Firefox 3.1: You want to use videos on your homepage? Just wait for 3.1, which will make everything simpler by supporting videos out-of-the-box
  • C++0x: Will make the world a better place to be (seriously ;) ), at least as long as you are a C++ developer.
    • A compiler for C++0x
  • OOo 3.0: Ahh, finally notes/comments, how can I live without them currently?
  • Larabee: A truly programmable GPU

And the list goes on. Looking at it, I wonder how it is possible to do something right now — surely, our tools must be extremely bad if each new revision brings lots of revolutionary improvements. I find myself quite often thinking “it’s not worth to spend time with this here, the next gen is around the corner”, but if you look back at the last 10 years or so you’ll notice a few things:

  1. Updates cause problems. While 10 things work, one will be broken, and fixed in the next release again. This is getting better actually, but it’ll come and get you anyway.
  2. The updates bring nothing really new to the table. Sure, some things might get slightly simpler or more comfortable with each new release, but they are not going to improve your productivity by 100%. For sure, in the time you wait for them, you’ll be able to implement that feature, even if it takes 10% longer with the current version.

It’s not like C++0x will allow us to rewrite whole applications to be vastly simpler. Same goes for example for C# 3.0: While it brings really nice additions on the table (lambda functions, LINQ), this is not going to help you writing your next game engine twice as fast. The increments are rather getting smaller.

Don’t get me wrong. I’m not advocating to never upgrade and always work with old stuff; I’m on the bleeding edge usually. Just don’t wait for the new stuff, but take a look at it when it comes out — it might indeed make your life simpler, but waiting for it is not worth it. If you really have to do something, you can do it right now — just shut up and do.