July 2003 - Posts

Last weekend (12th of July (thx Mike)), Nele and me had our mariage. It was an incredible day, with very good weather (not too hot), a lot of moments that I will never forget, and a lot of people that made our day so beautiful. I want to thank all of you who sent congratulations!

Now, we are leaving for our honeymoon to Thailand! For who is intrested, we are planning to post some messages on our wedding site (http://wijtrouwen.leadit.be in Dutch). I've got the books "Code Complete" and "Applied .NET Framework Programming" in my suitcase, so I won't get bored in the plane. ;-)

Happy holidays to all of you!

Roy has made a very nice list what is missing in his opinion in VB.NET and C#. I listed Roy's points below which I totally support, and I added my own wishes too:

VB.NET

  • No more underscores ('_') to break lines!
  • Multiple lined comments!
  • XML comments (this would be in the next version I read).
  • Edit and continue.
  • C# property style: no more Readonly statements, if there is no Set, than the property is Readonly!
  • C# casting style "(type)".

C#

  • Background compilation, underlining errors!!!!
  • Case insensitive, since there are case insensitive languages that can use C# assemblies.
  • VB.NET-like Intellisense for enums and namespace writing.
  • Automatic creation of "()" on method calls.
  • With statement!
  • Edit and continue.

A few days ago I installed VMWare Workstation 4 on my PC.

VMware Workstation is powerful virtual machine software for the desktop. Optimized for the power user, VMware Workstation runs multiple operating systems -- including Microsoft Windows, Linux, and Novell NetWare -- simultaneously on a single PC in fully networked, portable virtual machines. VMware Workstation provides more choice, greater flexibility, and more powerful functionality than any other virtual machine software in the marketplace today.

I have to admit, I'm quite amazed! VMWare lets you create one or more virtual pc's, hosted on your (single) machine. Each virtual pc has it's own isolated envirionment (harddisk, nic, cdrom, ...) that can be used to install a large number of operating systems (Windows XP/2K/2K3/..., Linux, DOS(!), ...). This is perfect for trying out software,testing, .... without messing up your Windows setup, since you can pretty easy revert back. In fact each virtual pc is a set files on the host pc, which can be copied. You can connect to your virtual pc's using a virtual network connection, each pc gets its own ip address (if you want so). A very nice feature is that you can use an ISO file as a virtual CDRom drive. So you can download Linux ISO images for example and install them without having to copy them to a cd! At this point I'm installing Mandrake Linux (don't worry, just for fun ;-). You can try VMWare out for free by downloading a trial version (fully functional) from their website.

Connectix is a product with the same features and is recently bought by Microsoft. I haven't tried it out, so any experiences/comparisations would be appriciated!

[UPDATE] Mandrake 9.1 linux is downloaded and installed. I hope my colleagues won't read this, it would be a good laugh monday morning! ;-) The installation procedure went quite nice, in my opinion not as slick as XP or 2003 Server, but better as I expected. There were some problems when installing the network:

  • It seems that Mandrake doesn't recognizes the correct network card, so I had to manually select the PC/Net 32 network driver. More info: VMWare support page
  • The second one was pretty hard to find: there is a problem getting an ip address for your network adapter using DHCP. But luckly I found a solution, again on the VMWare site. The solution is not so easy to apply, you have to manually edit the /etc/sysconfig/network-scripts/ifcfg-eth[n] file and add a line: "MII_NOT_SUPPORTED=yes". But be aware, you need to login as the root to be able to change this file!

Next things to try: Samba, Apache, maybe even Mono, but for sure: checking how my blog looks in linux! ;-) Have a nice weekend!

Roy posted a link to a hilarious article about how to write unmaintainable code. Since last year I converted a VB6 application to ASP, I really understand Roy. I think the author of the original application must have read this article, before he started coding! ;-)

My favourites:

  • Be Abstract: In naming functions and variables, make heavy use of abstract words like it, everything, data, handle, stuff, do, routine, perform and the digits e.g. routineX48, PerformDataFunction, DoIt, HandleStuff and do_args_method.
  • Document How Not Why: Document only the details of what a program does, not what it is attempting to accomplish. That way, if there is a bug, the fixer will have no clue what the code should be doing.
  • Let's start off with probably the most fiendish technique ever devised: Compile the code to an executable. If it works, then just make one or two small little changes in the source code...in each module. But don't bother recompiling these. You can do that later when you have more time, and when there's time for debugging. When the hapless maintenance programmer years later makes a change and the code no longer works, she will erroneously assume it must be something she recently changed. You will send her off on a wild goose chase that will keep her busy for weeks.
  • The more changes you can make between versions the better, you don't want users to become bored with the same old API or user interface year after year. Finally, if you can make this change without the users noticing, this is better still - it will keep them on their toes, and keep them from becoming complacent.
More Posts