Monday, June 28, 2004

The VB community doth protest too much, methinks.

I was reading Bill McCarthy's attack on C# on the weekend, and agree with Mitch that it makes little sense. I sometimes find the VB community fairly strange. They are so defensive about their language, you sometime almost wonder if they know that the earth isn't really flat, and that their language is not superior to any other .NET language. I'm not here to stick up for C# - I think C++ (in its 2005 incarnation) is clearly the best .NET language, and STL programming is more like a form of art than coding, but I happily admit I'm in the minority, and the learning curve for C++ is too high for most programmers.


To take Bill to task of some specifics, he says "The C# style (of closing code blocks with curly braces) is very much like those who declare variables as a,b,c,d etc rather than having to type a descriptive, informative name. And we all know that is a bad practice, it’s a lazy practice." So Bill's tone is pretty clear off the bat - its not a preference thing, VB is clearly superior, and C# is inferior. So why does VB use "_" to continue a line. Why not "Statement Continued On Next Line". I've never seen a literature author use "_" to continue a statement on the next line, so clearly lazy worst practice is OK here. And why the lazy "End Sub"? "End Sub" is what happened to the Kursk. Oh, you meant "End Subroutine"? Lazy you. And its the same with "ByRef", "Dim", "Enum", "Xor", "Const", "CType" and others? My goodness. My grandmother, who is a human that can read, couldn't make sense of any of these. But its more readable to you as a VB developer? Surprise, surprise, everyone's language of choice is more readable to them.


The overall point that Bill is missing here is that terse syntax is perfectly fine and readable if it is common and has a well defined meaning. Everyone who can read English understands that the period character ends a sentence. Hieroglyphics isn't understandable by either C# or VB programmers, but it is still understandable if you could work out its syntax rules. All languages have a degree of terseness, including VB.


Sorry Bill, that cold Victorian weather is getting to you a little, though I still love ya and look forward to a cold glass of something together at Tech Ed.

Sunday, June 27, 2004

What I Actually Asked Bill

Firstly, thanks to everyone who emailed and left comments regarding the Bill G question. In the end, I liked the theme of Rodney's "how many hours a night do you sleep" question, and decided to ask a question more about Bill the man rather than Microsoft. After all, an entire industry has grown up around childish Bill Gates spoofs and take-offs, the real person is dwarfed at times by his own caricature. So, the question I asked was, "What is a typical day like in your life, and if there is no such thing as typical, what would be an ideal day in terms of time allocation". Here is the transcribed response:




Well, now that Steve Balmer has taken over as CEO, there is a lot of business-review type things that he is able to do and free up my time to work with products. I spend about a quarter of my time out of the office on weeks like this one when I'm out meeting with customers, hearing what they like, what they don't like, and that's valuable for me. I go back with lots of notes and lots of ideas.


I spend about 50% of my time meeting with product group people, and the really great thing for me is meeting more and more with them at the very beginning of the project - before they overlap something else, before they take an approach that isn't that great.
I used to do the reviews, when they where like half or two-thirds of the way through, and then its really tough to say "Nope, that was a waste of time what you've done up until then". So, with just a little bit extra dialog, particularly up front, makes a huge amount of difference.

I still have about 25% of my time that is business reviews, board meetings, various public-related activities that are important to do, but the thing I like the most, and that dominates my schedule, is sitting down with the product teams.




Not quite the hours of sleep per night, but interesting nevertheless. I'd like to think Frank and Chuck for getting me the invite, my iPAQ and memory card for recording the event without a single hitch, and my Canon A80 for doing a responsible job getting a snap of the event. Still, if Cannon got their act together with 1D Mk II shipments, the photos would be much better :).

And a big thanks for Bill for taking time out of his busy schedule for having breakfast with lowly folks like user group presidents and MVPs.


Monday, June 21, 2004

What would you ask Bill Gates?

I've scored an invite to the Bill Gates breakfast to be held in Sydney next Monday (thanks Chuck and Frank). I'm covering the event for Australian Developer, and understand that I'll probably get a chance to ask Bill a question. So, my question is, what would you ask Bill if you had the chance to ask him one question? I'll make my best attempt to deliver the best question at Monday's breakfast.

Winter Solstice Sunrise

Few quick pics ... Full gallery on my website.




Sunday, June 20, 2004

Perfect mid-winters day in Cronulla

Tomorrow being the winter solstice (in the Southern Hemisphere), I thought it appropriate to demonstrate the harshness of a Sydney winter to those enjoying summer.


The cute little person is my daughter and the cute big person is my wife.










Friday, June 18, 2004

Emails with large attachments and McAfee Virus Scan 8

I have been having a problem sending emails with large attachments for a couple of months, and thought it was some problem with my ISP. I was talking to the Illustrious Leader the other day, and he said the same problem started for him when he installed McAfee Virus Scan 8. For some reason, the option to turn off email scanning in my install of McAfee is checked and disabled, so I can't simply turn these feature off. The best I can do is kill the process that seems responsible for this mess (McVSEscn.exe), after which large emails go through fine.


The worst part of this bug is that the email does actually go through with McVSEscn around, but Outlook 2003 is told that the email hasn't gone through, and tries to resend it. I have been in the embarrassing situation where I sent an editor I was working with the same article, code and diagrams (~3 MB) nine times. Time to get this one fixed McAfee, and while your at, stop sponsoring those stinking Raiders.

PDC DVDs Arrived Today (and they were free)

Based on the advice of our faithful Australian Goup Manager of Developer Platform Evangelism (hell of a title) Frank Arrigo, I signed my company for the Longhorn Readiness Program on 30 May. The program includes the full DVD set from PDC 03 *for free*, and despite the advised 4 - 6 week delivery time, mine arrived today! Thanks Frank and thanks Longhorn Readiness Program.


I intend to use Windows Media Encoder to capture entire presentations onto the one file, and watch them on my Smartphone. Standing at a railway station (that was used as the station in Matrix Revolutiosn) waiting for a train watching the PDC on a Smartphone with a Bluetooth headset. Ultra-nerd or ultra-cool?

Friday, June 11, 2004

Smartphone App Week 2

I haven't had a lot of time for the Smartphone application this week, and have been doing an article for Australian Developer and MSDN on the winner of the Australian Leg of the Imagine Cup competition.


I've sorted out all the complexities related to getting the plug-in installed in the device, and have my own plug-in now working, Now all that's left to do in the business logic ....


The current anemic UI looks is:








I'd prefer to do the next trains feature as a tool-tip, but at the moment it's simply a message box activated by clicking on the plug-in.


The plug-in will ship with XML files that allow will allow the plug-in to be included in all four of the standard homescreen layouts (Windows Basic, Windows Default, Windows Simple and Large Font).

Wednesday, June 09, 2004

Another Anti-Extreme Programming Rant

Let me preface this rant by saying that I am more of a system-level programmer that a application developer or project manager (and hence don't spend a lot of time thinking about development methodologies), and I can't book meeting rooms or schedule meetings in Outlook, so clearly I am no Enterprise Architect. These are the simple observations of a bald-headed poorly-dressed C++ programmer from Cronulla.

Before laying into XP, it is important to recognize that it has introduced or formalized a number of great practices like continuous integration and unit testing. So, it is important not to throw the baby out with the bathwater.

I think XP is fundamentally floored in two key areas. The key weakness, and in my view a fatal floor, is the notion of a caring, interactive customer that helps guide a project. In most projects, this is a pure fairy tale. Most customers don't have the interest, energy or time to become intimately involved in a software project. They won't work with developer to tease out and flesh out the various stories that need to be implemented. And if a really eager customer does exist, it can be worse. These eager customers are a source of constant feature-creep, and even with all of XP's continuous integration efforts, there still needs to be a point where the code is frozen and functionality testing, help documentation, installation testing across target operating systems, and all those other mundane post-development activities takes place.

My second gripe, and this isn't a fatal floor, is that I find the dogmatic application of XP development with common desks, enforced work hours and compulsorary team programming to be a commune style situation, and like all commune style conditions, I think it is an attempt to work against human nature. I want to own a particular section of an application, and I want to take pride when it is done well, I don't want someone looking over my shoulder when I type, I want to customize the keystroke-combinations in my development environemnt, I want to take lunch when I want, I want to go out for a surf-ski on Wednesday morning and get to work at 8.45, not 8.30. The extreme XP style of coding looks similar to the Khmer Rouge ideal of happy peasants all working in an agrian paradise with the intellectuals (in this case, project managers and architects) designated superflous, and removed from the equation. I am not trying to link XP to Pol Pots extremes (that would be a strectch even for me), and are simply comparing it to the Khmer Rouge ideology here, not its horrendous implementation.

I find RUP, even though it isn't a prefect process (none are) to be the best way of getting quality software done in a timely manner.

Monday, June 07, 2004

Microsoft Security & Management Summit - Thanks Aus Dev Evangelism team

I attended a few sessions today at the Microsoft Security & Management Summit held at Darling Harbour. The event had some great sessions, and, as expected, ANOTHER session on understanding XP SP2 and its implication for developers (don't say you weren't warned). Mitch's comment last week about feeling like you know everyone at an event resonated strongly with me, and I bumped into a heap of people from the many companies I have worked with and for over the last decade or so doing software development in Sydney.


I was talking to a friend from a company where I worked on the vector graphics project, and he asked about getting more involved in the IT community. Apart from attending the user group I help to run, I mentioned that it was worthwhile getting to know the local MSDN staff. Thinking about what I had said, it made me realize the massive leaps that Microsoft has made in terms of interacting with the developer community at a meaningful level. While I can only speak authoritatively about Sydney, I get the sense that this is not an local phenomenon, and there is a real sense of community and collaboration that seems to have originated about the same time that .NET came on the scene.

A big congrats to Frank, Chuck, Andrew, Caroline, Tyson, Finula, Norbert, Nick and Matty (both gone OS but not forgotten) and all the crew from the Australian Developer Evangelism team.

Saturday, June 05, 2004

Maximizing .NET Performance v2

I'm beginning to play with the chapter list for v2 of Maximizing .NET Performance, which I'm planning to do some time in the Whidbey timeframe. The areas I've identified for improvement or addition are:


  • Garbage collection
  • Compact Framework
  • Generics
  • ADO.NET, XML and Yukon
  • Burton Tools related to performance



    Item 4 will be hard to cover in any type of depth, but all the other are definitely on the cards. I don't plan to cover Windows Forms or ASP.NET - they deserve a full book on their own.

    I'm open for suggestions of any other areas that need inclusion or improvement. Leave a comment, or email me directly at nickw at dotnetperformance dot com.

  • Friday, June 04, 2004

    Week One of my Smartphone Project

    I'm doing a ~2 month gig in Sydney's CBD at the moment, which means that I need to catch a train to work rather than the car commute I've been doing the last 12 months. One of the things I've found frustrating is working out the time that I need to get up to leave home to catch a train to get on site at a particular time (and the reverse process of an evening). Rather than digging through a tatty old paper timetable and doing some mental arithmetic, I've decided to do a home screen plug-in for the Smartphone that can do all this for me.


    My first week doing this plug-in has been pretty frustrating, and I've made little head-way. Compared to Windows Forms or ASP.NET development, embedded development is a lot fiddlier, even with the aid of emulators. I spent most of the week getting the Embedded VC++ 4.0 Homescreen plug-in sample working. The documentation for the sample nominated the use of a tool which doesn't actually ship with the SDK called cestart.exe, and this caused me a bit of drama. In the end, I finally installed the CAB file with the plug-in by "running" it in IE on the device (using a URL of "file://\storage\homescreen.cab").


    Anyway, the project is finally up and going, and the current feature list is:


    Multiple timetable support. (may slip to V2)


    "Get me up, out of the door, to work and home on time" feature. (with thanks to Dan Green for suggesting it.)
    -Alarm to wake me up.
    -Beep to get me out the door.
    Required device interaction: Configurable notification (beep, alarm, call), Alarm and sound API.
    I would nominate I want to be at work for an 8.45 meeting, and the phone would do the rest.


    Next trains tooltip. (i.e. if you are "hovering" over the next train time, the time for the next couple of train after that should show up in a tooltip.


    Missed train coloring (i.e. if it takes me 8 minutes to get to the station, and there is a train in 4 minutes, it should be visible but colored red to indicate I won't make it.




    The feature list isn't complete, and I'm still taking suggestions.... Feel free to leave a comment.

    Tuesday, June 01, 2004

    New articles and presentations posted at www.DotNetPerformance.com

    I've updated my web site to include some of the articles and presentations I've done over the last 6 months.

    New articles


    Authorization Manager and .NET
    Database Security in the Real World: Part One
    Database Security in the Real World: Part Two
    Microsoft Enterprise Instrumentation Framework
    Security Enhancements in the Whidbey Release of .NET Framework
    Managed Code in SQL Server Yukon: A Real Big Deal?
    SQL Server 2000 Reporting Services - An Overview

    New presentations


    Windows XP Service Pack 2