VB Beginners And Productivity

One topic that regularly gets discussed amongst the MVP community is the positioning of VB in the market.

I come from a C-based background. I used to do spend my days doing (and teaching) systems programming in C. Yet, I choose to build our business apps in VB rather than C#. My major reasons are:

1. I can write code faster in VB than in C#. Even though VB is “wordier”, the intellisense works well for me and I find I’m much faster than in C#.

2. The IDE works better for VB. I’m not sure why I feel that but I do. I think the background compilation that VB does is the key.

3. The IDE is lousy for WinForms in C#. Every time you flip between the design surface and the code, it takes forever. On my friend Phil Best’s application, on one of his forms, it takes over a minute to change focus on a super-fast system. In VB, you can barely see a delay.

Yet, no matter what good story the VB team have, the publicity machine at Microsoft seem to paint a different story. The latest is the new Express series of products, recently publicly mentioned on a Microsoft-watch site. They quote the company as describing the VB Express product as for “beginners learning to program” and describe the C# product along the lines of  for “computer science students”.

Microsoft need to stop describing VB with words like “easy” and “beginner”, etc. and start describing it with words like “productive”. I have no doubt it’s easier to get started with VB than C# but that’s mostly because the code is more humanly readable. This is best shown by the new Whidbey classes. I’m sorry but even though I can see an “elegance” in things like “int?”, I’ll take “Nullable(Of Integer)” every time. Operators like “??” are barely worth discussing. I don’t know what they’re going to do when they run out of the ability to reuse punctuation characters.

 I really don’t see any inherit advantage of “enum” vs “Enumeration” or “struct” vs “Structure” apart from if you can’t type. If you can’t, you need to learn. It’s not an excuse for less-readable code.

Just my 2c rant today.

Another ADO.NET Book

Finally finished reading another ADO.NET book. (I’ve been trying to read all the notable ones).

“ADO.NET Examples and Best Practices for C# Programmers” by Bill Vaughn (with Peter Blackburn). ISBN 1-59059-012-054995 on A-Press.

Bill always writes well. This book though is now showing its age. It was written for the framework 1.0 and so is at the stage before things like the ODBC managed provider had appeared. The coverage of ADO.NET isn’t bad. It’s largely based on a comparison with ADO, which Bill calls ADOc (for COM). We differ a bit on a few recommendations like typed dataset usage and aspects of DataReaders like the use of GetOrdinal but overall, it was ok.

Hopefully, Bill will have an updated version out soon. With the number of detailed questions I’ve seen him asking on ADO.NETv2 newsgroups, I presume that’s coming 🙂

Moved The Blog

Finally decided to move the blog out of TheSpoke to more salubrious surroundings.

Thanks to Susan Bradley for setting up this site.

Noticed Bill McCarthy was here so decided to join him.

Back In Town

Repost from 25th May 2004Well, I’m back in Brizzie this week. Back in town teaching a Transact SQL class. I finished the last of the current Smart Client seminar series in Canberra on Friday. Great group of developers there. Solid representation from the guys at Tower Software.

The seminars have been fun and I’ve met (or met again) a great group of developers from all over the country. It’s been interesting to see what many are planning in the way of smart client deployments.

The May community tech preview of Visual Studio is out today. Must download it tonight and get it installed so I can work on it over the next few weeks while I’m away (again).

INETA Conference

Repost from 17th May 2004I recently travelled to Bangkok to attend the Asia Pacific Leadership summit for INETA (the International .NET Association). We had an interesting (and fairly intense) couple of days.

I’m quite upbeat about the plans for INETA into the future and think our region really could become the most interesting region.

Most amazing details at the conference were provided by the Korean folk. They have two online communities of developers: one with 32000 and another with 18000. They have a single annual meeting/conference that runs for a full day from 8am to 6pm. They typically have 7-8000 attending. They hold it in the same stadium that held the olympic soccer. The photos of the crowd (and the queueing to get in from 4am) have to be seen to be comprehended.

More Books Finished

Repost from 17th May 2004While travelling around doing the latest series of Smart Client seminars around Australia, I’ve finished reading another couple of books.

“A First Look at ADO.NET and System.Xml v. 2.0” by Alex Homer, Dave Sussman and Mark Fussell. I really am liking this new series (ie the Microsoft  .NET Development Series) from Addison Wesley. This particular book is also pretty worthwhile. The treatment of ADO.NETv2 is ok although it’s a bit like a cut-down manual with lots of pages of property lists, etc. It’s also now a bit dated as I know of various things covered in it that probably will now not be in the final product.

In terms of the XML content, I think it’s handled better but it’s much less readable. I’m wondering if it had a different author to the ADO.NET part. Nonetheless, it’s an ok coverage of what’s expected to be in v2 in relation to XML, particularly XQuery.

I also just finished “Dynamics of Software Development” by Jim McCarthy. I found it hard to get in to at first. I did persist though and found the 2nd half of the book much more interesting than the first half. I didn’t find the book really covered situations that relevant to me because it really deals with the management of software projects that are revisions of an existing product every year or two (ie the release cycle of Visual C++). It did offer a number of interesting insights into the software development process though and an interesting glimpse into the dynamics of the Visual C++ group within Microsoft.

Datetime Data

Repost from 26th March 2004

Did the last of my current series of webcasts this morning. Think I’m finally getting the hang of it. Seemed to go smoothly 🙂

We also had our 2nd SQL Servers User Group meeting in Brizzie last night. Went great. We were up to 46 attendees (from 25 1st meeting). Rod Colledge gave a summary of securing sql server. Rob Risetto presented a session on using sql profiler to detect a wide variety of issues when managing a large number of server. (He and his group currently manage over 90 servers with around 4000 databases).

One topic that came up in the discussions on the dotnet mailing list yesterday though was how to send datetime data to sql server. The absolute best reference I’ve seen on this is my mad Swedish mate Tibor Karaszi’s article on it here:


Highly recommended reading! It dispels a number of myths about this.

Last night Rob also very clearly made the point about prefixing stored procedures with their owner (eg EXEC dbo.MyProc rather than EXEC MyProc) to avoid cache misses. Worth checking!

Webcasts On ADO.NET

Repost from 24th March 2004Did another webcast on ADO.NET v2 and Whidbey this morning for the US MSDN folk. Have part 2 of it coming up Friday morning (3am Brizzie time) – 9am PST Thursday (their time).

Didn’t have any performance problems with the equipment today. I’ve added more memory to my notebook to take it up to 1GB. Makes such a difference when running Virtual PC as I was able to give the pc image around 600M of memory to work with. That fits VS/Whidbey, Yukon, SQL Profiler, etc. in memory just fine.

One thing that’s changed with VB.NET that I’m not keen on is the removal of the variable name after the “Next” statement by default ie:

For intCntr = 1 To 10


I really prefer having “Next intCntr” because when you get lots of nested loops and big code blocks, it’s useful to be able to know which loop is which.

Basic Grids

Repost from 13th March 2004Was looking for a really basic (ie lightweight also) grid control. In VB6, we used to use the MS Flexgrid. It was ok but a bit too basic. For example, you needed to handle all keystrokes yourself.

It’s a pity a non-bound grid wasn’t part of the standard toolkit for Windows Forms in .NET.

However, the VB Resource Kit for .NET (free) includes a number of cool components. The one that provided the answer was the FlexGrid from Component One. Having now worked with it for a few days, I really like it. It’s simple and it seems to work. It’s well upgraded since the version in VB6. They also include a FlexGrid Classic which is closer to the old control but I like the enhancements they’ve made to the new one. Very easy to use and the help file for it gets installed into the standard help in VS.NET. The help file was also “helpful” which is always a good thing 🙂

A few things about using it weren’t too intuitive (like setting different colors for individual rows) but the help file had examples.

Recommended if you need a lightweight grid!