Coding Conventions – Use your inside voice

At work I have to do some COM interop stuff. I’m looking forward to it, since that’s part of the framework that I haven’t played with yet and it’s a complex topic, so I’m willing to sink my teeth into it.

I think one of the deterrents to looking into it sooner was the SCREAMING_CAPS_NOTATION that a lot of COM objects had; all that lpzstrVariableName stuff would make my eyes glaze over too. I would quickly close the book or browser window that contained that code, shrug my shoulders and move on to something else that has instant learnablity – like Solitaire.

I realize that the SCREAMING_CAPS_NOTATION and hungarian notation were developed as guidelines because of the weak typing of C. Those guidelines presumably made the code more readable, but having only touched C/C++ a bit in school, reading sample source wouldn’t put me in the mood to look at more. In C code this would be:

state_my_learning_state_of_mind = CRINGING_IN_FEAR && MOVING_ON;

No wonder the notion that computer programming is hard prevails. It takes five minutes to understand what’s happening in a five lines of code!

Even Java wouldn’t let it die. Hungarian Notation is gone, but SCREAMING_CAPS_NOTATION is still lurking there in Java’s constants. Maybe that practice will die in Java with the birth of enums in Java 1.5. Here’s hoping. Even camel case looks weird for method names, but this is just showing my bias for C# 🙂

I find C# code and most of Java code to be more readable than the previous conventions, and I’m sure I’m not the only one. Microsoft, for one, went out of their way in .NET to eliminate those conventions. They took most of Java’s guidelines and took them to the logical conclusion. And that’s a good thing! And if it’s more readable without all that type information, why was Hungarian notation put in there in the first place?

Does anybody miss it?

Finally! Some whidbey.

One of the sweet things about going to VSLive for Imagine Cup was getting the tech preview of Whidbey. I’ve been wanting a copy of that ever since I got to read about the features at the PDC. I’ll write more about what I like in VS 2005 and .NET 2.0, but my first impression is that there so much new stuff, I don’t know where to begin: it’s like learning .NET 1.0 all over again. So I’ll probably focus on the new Winform controls and features. There is lots of neat stuff in that namespace.

I’ve read of a few problems installing but it was a snap for me. Virtual PC is indispensable.

Also, there is a bit of a shock using a MS product that doesn’t have the polish of, well, an MS product. I know, I know. It’s alpha stuff, but it’s still pretty weird.

I have a March build, so hopefully they put back Ctrl-Shift-B back in for other builds. You know what the F stands for in F2? Far away.

I have a confession to make

The past season of Survivor? Watched it. I’m kind of ashamed to admit it. I had held out on the rest of them. I still think it is fake and staged, but I’ll be damned if it isn’t good TV anyway.

Survivor: All Stars was fun, but what about Survivor: Unstars. This is where all the contestants from the first seven seasons that got voted off in the first two tribal councils get to come back and try to survive. Let the rejects and nobodies have a shot at it. 🙂

That would be some good TV. What do you think?

Not Bad For an Inaugural Post

If only last Monday was a little longer, I would have got this blog set up in time to write about my experiences in Toronto at VSLive. Oh well, you’ll just have to settle for this (longwinded) summary.

I was in Toronto because my group (Elisa, Mike, Tyler and me) won Imagine Cup for Canada! Check out Mike’s blog for more on our entry, or check out this press release from UVic.

Microsoft Canada flew us out there to officially announce us as the winners at the keynote address for VSLive in Toronto. We arrived on Tuesday and did a rehearsal with the keynote speaker, Jay Roxe. After that we got treated to a big dinner at Tony Roma’s by the good folks at MS Canada. The next day, at the end of the keynote, we got up on stage to demo our app and accept the Imagine Cup trophy from Lasha Dekker of Microsoft Canada.

Then we spent some time answering questions for some of the tech press there at the conference. We found out the next day that we were the first press release from the conference! (That link will probably not work in the very near future.) It was all very cool. The rest of the day was spent in downtown TO where Mike and Elisa did a TV show for a local Toronto station. Then, back to the conference for Midnight Madness, where we heard Billy Hollis and Richard Hale Shaw talk about smart clients, things that suck about VS 2003 and other things. Billy Hollis was a very entertaining speaker; Shaw, not so much.

The next day, we got to attend some of the conference talks. I went to an intro of ASP.NET 2.0 by Rockford Lhotka, he only had an hour and barely touched the surface of the changes, but they look really cool; and then a great talk by Kate Gregory on tweaking what you get from VS for Web Services. We’ll have to see about applying that in the worlds. After some much needed sleep, we met up with the guys from ObjectSharp, an conference sponsor who laid on a pimped out bus to treat the speakers of the conference. They were extremely generous to invite us on the bus as well.

The bus was the high point of the conference by far. There were so many cool people on that bus: DataGrid Girl, IUnknown, Keith Pleas, David Totzke and Billy Hollis; and everybody from ObjectSharp: Barry, Dave, Julie, Bruce, Andre and Dan. Everybody was so welcoming and friendly. Let me take the opportunity to thank everybody, especially Barry and Dave for laying on the bus, and inviting us, and paying for everything. It was a wonderful experience.

Two other guys I’d like to thank were Jay Roxe and PaulYuk (sorry, no blog link) from Microsoft. They both spoke at the keynote and were on the bus with us. They were extremely smart and friendly guys. If everyone is that nice at MS, I definitely want to work there. They were also very patient with the questions and comments of an admitted MS fanboy. 🙂

Finally, I’d like to thank everybody at MS Canada for making the trip possible and treating us so well when we got there: Daniel, Sasha, Anthony, Jordana, Craig, and Lasha. If I forgot anybody, I apologize.

Alright, enough of my gushing. I had a lot of fun though, and I’m really looking forward to Brazil.