Author Archives: paulvick

Wifi and meetings

There’s been a lot of buzzing around on the web about the whole question of using Wifi and IM to have backchannel discussions during lectures and presentations (especially after the New York Times wrote an article about it), but I see Wifi more day to day in meetings and it drives me nuts. Because the reality is that most of the time it’s not people having backchannel discussions in meetings, it’s just people tuning out of the meeting and reading email/surfing the web. Which raises the question: if you came to the meeting to just surf and read email, why did you come at all?

I don’t know whether we’re at the leading edge here or not here at Microsoft. We’ve had Wifi for long enough now that most people who can obtain a laptop do so so they can bring it to meetings and be connected. Indeed, I got one two years ago for exactly that reason, and then traded it in a year or so ago for a TabletPC so I could be even more inconspicuous when reading email during a meeting (i.e. so I could put it in my lap rather than sticking it on the table). However, what I eventually came to was exactly what I was saying above: if I’m going to this meeting so I can sit here and read email, why am I bothering to be here in the first place? Ultimately, I think it’s either rude to the rest of the meeting attendants or a waste of my time or both, take your pick. But the phenomenon is now that each meeting literally consists of two groups of people: those who came to go to the meeting and those who came to surf and read for an hour. (Maybe people purposefully go to meetings they have nothing to say in so they can read email in peace, whereas in their offices people would bug them…)

There’s really nothing to be done about it, anymore than there is anything to be done about people having loud personal conversations on cell phones in public spaces. There might be some side benefit for meeting organizers, too. At any meeting you set up, look around and see who’s checked out and make a mental note of it. Those are the people you don’t need to bother to invite to future meetings.

(And, as a side note, I’ve stopped taking my tablet to meetings to make it harder for me to check out. Which is not to say that my mind still doesn’t wander…)

MustOverride and line orientation

One of the side projects that I’m working on in addition to this weblog is a managed scanner and parser for the Visual Basic .NET language. I started on the project because I’d really like to write some project analysis tools that I could use to determine things about how people use the language, but as it’s gone on I’m hoping to also release it into the community as a sample. (One of the wrinkles is that I’m “writing” the managed parser by looking at the existing unmanaged parser, so it’s not like the code I’m writing is completely of my own invention, although it is largely so.) I think that the more that people can work with a language in an automated way, and the more tools people can write for a language, the better it is for people who use that language. Anyway, we’ll just have to see. I still have to finish it first…

After I finished the scanner (scanners are easy), I started parsing expressions and have been working my way up the parse tree hierarchy. I’ve recently reached type members and, in particular, methods. An interesting thing is the way that VB’s line orientation interacts with MustOverride methods when parsing. In C#, parsing methods is pretty simple because after a method header you can see either a semicolon or an open curly brace. If it’s the former, then you’ve got an abstract method declaration; if it’s the latter, then you’ve got a concrete method declaration. Whether or not you specified abstract as a modifier on the declaration is really something for declaration semantics to sort out later on. In VB, though, the following fragment is ambiguous if you don’t look at the modifiers:

<modifiers> Sub Foo()
Dim Bar As Integer

In other words, once you’ve gotten through the method header, the next line starts with Dim, which could either mean that Foo was a MustOverride method and Bar is a field, or that Foo was a concrete method and Bar is a local. To figure out which is which, you absolutely have to look at the modifiers to see if MustOverride is there. This is the kind of thing that drives formal grammar writers nuts because it means you have to hork up your grammar productions to make it all come out right. It doesn’t make such a big deal, though, if you hand-code your parser, which is what we do for VB. (Hand-coded parsers vs table-driven parsers seems to be one of those religious arguments that language people get into. Let me just say I don’t take a formal position on the question.)

Interestingly, there are at least a few other places in the language (esp. in terms of object creation expressions versus array creation expressions) where things get complicated like this. But overall, it’s been pretty smooth sailing. I’ll let everyone know as the project progresses.

Yup, I did know that

Duncan points out a little something extra that VB.NET’s Try...Catch syntax supports. It’s something the underlying IL supports and it seems useful, so we figured, why not? A use that comes to mind is when dealing with COMExceptions:

Try
' Do some COM interop
Catch ex As COMException When ex.ErrorCode = &H80043919
' Handle this specific error
End Try

Nothing fancy, just a little something extra. An interesting thing to note is that the CLR doesn’t actually support specifying both a type filter (i.e. ex As COMException) and a filter expression (i.e. Where ex.ErrorCode = &H800043919), so the above Catch clause is a filter expression that checks both the type and the value together. It doesn’t use a type filter. I was never really clear why the CLR did it that way, but it’s not a big deal either way.

Best laid plans…

Before going to bed, I thought I’d check the logs really quickly to see if anything looked amiss, and, sure enough, I’d screwed something up moving to the new software. I’d been testing the new software at a different URL and forgot to tweak one of the settings when I moved it up to the root. As a result, the links for all the RSS items was messed up, which caused automated aggregators to start trying to fetch from the wrong location. It should be fixed now, I hope this hasn’t screwed anything up permanently.

New software

OK, as I previously threatened, Panopticon Central is now running on custom software adapted from the original BlogX codebase. I ended up rewriting a lot of the data caching behavior as well as adding a number of new features and making a few cosmetic changes. I hope everything will continue to work. Please leave comments if there are problems or things I screwed up.

The major changes that readers will notice:

  • The RSS feed has moved locations. The old location returns a permanent redirection and it seemed to work with SharpReader, so I hope it does with everyone else…
  • I added a comments RSS feed. Now you can thread comments using your aggregator, if you so wish.
  • The RSS feeds now return ETag and Last-Modified headers. I’m serious hoping this is going to cut down on the bandwidth.

Most everything else was internal. The major thing still on the “to do” list for external readers is Trackback support (and all related flavors of APIs). And I’m sure I’ll continue to fiddle with the internals. It’s a lot of fun.

Upcoming MSDN chat

Cameron’s blog also reminded me that we’ll both be participating in a chat (along with other team members) on Tuesday, July 29th, 2003. Do feel free to join us. Here’s the blurb, copied from Cameron:

http://msdn.microsoft.com/chats/

Date: Tuesday, July 29
Time: 1 PM to 2 PM
Title: Chat with the Visual Basic .NET Team: Language Design
Summary: Do you have questions about why Visual Basic .NET is the way that it is? Join Paul Vick, the architect of the Visual Basic .NET Language Specification, and other members of the Visual Basic .NET team for a wide-ranging discussion on the Visual Basic language. Learn the reasoning being the design choices and discover how to write more powerful applications.

I do have to say I find the summary a little frightening, though…. I hope I can live up to it!

Another VB.NET blogger

Another member of the VB.NET team has started a weblog, this one hosted on GotDotNet. His name is Cameron Beccario and he knows a whole lot about the language and the compiler as well. He was kind of bummed to find out that I’d already written about DirectCast, so I think what this means is that we’re going to be competing with each other to get the good tidbits about the language out before the other guy. And who wins, gentle reader? You do, of course!

What’s in a name?

What’s in a name? That which we call a rose
By any other word would smell as sweet.
– Romeo and Juliet, (II, ii, 1-2)

The name of this weblog is “Panopticon Central,” which is probably no stranger a name than some others, I suppose, but I still think bears some explanation. Like any good name, there are multiple levels of meaning, so to peel the onion from the inside out:

  • A “panopticon” was a kind of prison proposed by the philosopher Jeremy Bentham in 1791. (I don’t know if he actually coined the term or not.) The idea was to design the prison such that the guards would be able to observe the prisoners at all times without being seen. Thus, prisoners would never know whether they were being observed or not, and would be forced to moderate their own behavior. (At least, that was the theory. I don’t know that our modern technological panopticons work all that well in practice.) The name “panopticon” meant an “all seeing place.”

An odd choice, don’t you think, for a weblog name? A prison? Well, a step deeper:

  • For those of you who were not uber-geeks as teenagers, a little background about “Doctor Who.” It was a BBC sci-fi television show about a rogue Time Lord from the planet Gallifrey named “The Doctor.” Time Lords have the ability to travel through time and space in a machine known as a TARDIS (Time And Relative Dimensions In Space). On Gallifrey, the central complex that houses the Time Lords’ government is called the Panopticon.

Well, OK. In an earlier entry, I copped to be a Doctor Who fanatic when I was in my early teens. But why choose a Doctor Who reference several decades later? Another step deeper:

  • On my 13th birthday, two significant things happened: I went to see “Return of the Jedi,” which had just come out, and I got a 300 baud modem from my parents. At the time, of course, the Internet didn’t exist and dial-up bulletin board systems (BBSes) were the only game in town. Soon I was totally hooked and within a year decided that I wanted to run one. My parents procured me some BBS software a year later when they visited the Democratic presidential convention in San Francisco. A year after that, I managed to get them to give me a 10 megabyte hard drive for my Apple ][+ for Christmas (it had it’s own power source and everything!). Six months or so after that, my BBS went online. And because I was just coming out of my Doctor Who phase, it was called Panopticon Central.

My BBS lasted for two years until I went away from college and it was an absolutely wonderful experience. Besides being a lot of fun, it was a great way to meet a wide variety of people, some of whom remain good friends to this day. About six months ago, I was setting up my server and thought “Hey, it’d be cool to host my own domain.” But, of course, I needed a name and all the simple names were taken during the Internet Gold Rush. I toyed around with a number of other names, but kept coming back to Panopticon Central because it had good juju (at least, for me). When I decided to set up the weblog, it seemed a natural.

Ironically, the name appears to be particularly apt because weblogging has much of the same feel to it that BBSes did fifteen years ago. Same sense of community, same sense of individual investment, same pointless flame wars over obscure subjects… A bit like coming home after a long time away.

[An interesting sidenote about Doctor Who: in the show the Time Lords also maintain a large computer called The Matrix that contains all of the knowledge of Time Lords who have died. It also functions as a virtual reality machine which you can plug into, just like that other Matrix. During at least one adventure, the Doctor and his arch nemisis the Master are each plugged into the Matrix and the Doctor must fight his way out. And this was in 1975. The Wachowski brothers must have been fans too…]

Pulling on the loose thread…

Anand asks me in a comment whether I’m going to support TrackBack. It’s a very relevant question, as I’m currently neck-deep in a rewrite of the BlogX code to add a whole bunch of features that it currently lacks. In fact, I’m very lucky that my wife is also currently neck-deep in grading for the summer class she teaches, or else my disappearing into my study for long stretches of time during a weekend of beautiful weather would cause some marital friction…

This all started, of course, by pulling on a single loose thread on the sweater: in the immortal words of our current president, I “misunderestimated” how much interest my blog might pull in, so each day I’ve been watching a bit alarmedly as the amount of my bandwidth being eaten up by the blog has grown and grown. I finally turned on gzip compression in IIS (I believe), which should help, but what I really wanted to do was implement ETags and Last-Modified on my RSS feed so I can cut down on the huge amount of bandwidth that SharpReader is sucking up. (They’re, like, 50% of the hits. Good for Luke… I use it too!) So I figured, “Hey, it’s .NET and I work on .NET. How hard could it be?” Classic last words for a developer.

The first problem was that, as much as I like C#, I just think a whole lot better in VB because I don’t have to translate as I work (and I like the VB IDE experience better, but I may be sliiighly biased). So first I translated most of BlogX (everything except the HTML control for WinBlogX) into VB using an automated translator. And then I spent a bunch of time cleaning up all the problems and stylistic disagreements that that caused. And then I spent a bunch of time cleaning up the code base so that it worked “the way I like it.” (This is no knock on Chris, I’m just one of those anal developers who just aren’t happy if they haven’t rewritten most of any codebase they take on.) And then I finally got around to trying to add new features. Which of course made me realize I didn’t understand how the whole thing worked, which entailed more research and rewriting, blah, blah, blah, blah.

Suffice it to say, I’ve devoted way more time to this than I had ever planned and still haven’t gotten a fully functional blog working. But I’m getting close! And soon this blog will have all kinds of whizzy-bang features. And I’ll have learned a whole lot of things about web programming that I never knew, which was really kind of the original point anyway.

And then Dare will release a new version of BlogX with all the features I added and many more to boot, and I’ll wonder, “Was it really worth it?”

Language divergence

Eric points to an editorial from Visual Studio Magazine that I think is really spot-on, although I think the title is a bit of a misnomer.

Patrick is, I think, accurate about some of the whys and wherefores of VB.NET’s history, and about the need to recapture some of what has been lost in the transition to .NET. There’s no question, for example, that not having edit and continue has been a huge loss, something that has been keenly felt within the company as well as without. It’s going to be a major feature in Whidbey and one I’m very excited about getting back. (I’d better be, since one of the things I’m supposed to do is make sure we do edit and continue right. If it’s wrong, my head is going to be one of those on the block…) And there’s even more stuff that we’re working on in addition to that, but we’ll get to that later, I hope…

The only issue I have with the editorial is the use of the phrase “language divergence.” The phrase is problematic because it’s so general that it can mean a lot of things that are not what we’re working towards. For example, it doesn’t mean that VB.NET is going to stop providing excellent support for the platform. It also doesn’t mean that we’re going to try and “dumb down” the language or compromise on the power and flexibility that we afford developers today. What it does mean, to us at least, is that VB is not just “C# without braces.” Our goal is not to just ape whatever another language does, our goal is to server our customers as best as we possibly can. If that means that we do some things differently than C# does, then we’ll do them differently. If that means we do some things the same way as C#, then we’ll do them the same way. Some people (not Patrick) have used “language divergence” as a shorthand for a mindless “not C#” philosophy, which would be incredibly short sighted and is not what we’re doing. Just as C# borrowed a ton of concepts that VB made popular, we feel free to borrow their best ideas right back. Why not, if it helps our customers?

So, in the end, I think the whole “C# vs VB” argument is a non-starter. The real question is: are we doing a good job making your life easier? Are we the best tool for developers out there? That’s the important thing and what we focus on every day.