.NET - the productivity sink
So I’m learning C# / .NET
Even though my day job is now C++, I’ve been forced into it by a growing need for small RAD projects. My lovingly acquired VB6 skills being obsolete, I’ve taken the plunge with C#.
I looked at VB.NET for about 5 minutes but I can’t see a single compelling reason to use it. A few syntax constructs remain but basically it’s a new language and one that does not appear to be as well supported as C#. Whichever language you use, you still have to learn the Winforms way and the .NET API. The extra learning involved in C# syntax is negligible.
The multi language aspect of .NET is such a crock, it’s untrue. Whoop de do, I can inherit a C# object from a VB one. Great, until I need to fix a bug in said object and the code looks totally (if superficially) alien.
Maybe I’m just bitter that they dropped the Wend keyword.
I have to say though that .NET sucks badly.
Gripe 1: ADO.NET is almost unrecognizable from COM ADO. Why? ADO was great as it was. Why force an extra learning curve on us? ADO could have ported to .NET without the slightest change.
Gripe 2: Winforms performance seems to blow relative to VB6. Resize that dialog? OK then, flicker flicker flicker.
Gripe 3: .NET is RSI heaven. Now I’ve done my fair share of Java so I know it’s not alone in this, but seriously the sheer verbosity of the API is driving me nuts. I code all day every day, but I swear, my fricking fingers hurt typing in all the keywords and static class names and whatnot. This is my favourite example taken from the code the upgrade wizard produced on an old VB6 project:
lblVer.Caption = App.Title & " Version " & App.Major & "." & App.Minor & "." & App.Revision
lblVer.Text = System.Reflection.Assembly.GetExecutingAssembly.GetName.Name & " Version " & System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly.Location).FileMajorPart & "." & System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly.Location).FileMinorPart & "." & System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly.Location).FileBuildPart
So there we are. Of course I am only 3 days in, maybe I’ll learn to love it.
By the time that happens I confidently expect my new skills to be obsolete again and starting the process all over again with Avalon and Longhorn.