Monthly Archives: February 2006

The Developer Division Lame List

To join in the chain of reminiscences, I have to say that I fondly remember Almost Live! as an invaluable resource to me when I was a new transplant to Seattle back in 1992 knowing no one and virtually nothing about the city. How else was I to know that Ballard was full of old Norwegians who couldn’t drive? That Freemont was populated almost entirely by hippies? That Aurora Ave. was the place to go to get a hooker? This was all great stuff for someone fresh to the city and without a clue!

Like Raymond, I think that the sketch that has stuck with me the longest is the game show Pike or Pine?, only because, as residents of Capitol Hill, my wife and I still play it so often in real life. It was sad when the show went off the air. (Especially because I think the real reason it died off was that the increasing homogenization of Seattle made it harder and harder to find ripe subjets for parody. All part of growing up, I guess.)

So, in the “nobody cares, but this is my blog, dammit, and I’ll write vomit stories if I want to” department, here is an old parody of the Lame List sketch I wrote back in 1994 when I still worked in Access (and Access still was in the Developer Division and not part of Office):

(with apologies to Almost Live!)

And now it’s time for the Developer Division Lame List, or
“What’s weak this week in building 25!”
brought to you by the Microsoft Heavy Metal community

The Building 25 cafeteria!
[MS headbangers] LAME!

Parking a million miles away from your office!
[MS headbangers] LAME! LAME! LAME!

No coffee after 3pm!
[MS headbanger that looks amazingly like Cameron] Undeniably, undoubtedly, unspeakably lame.

No vending machines on our floor!
[MS headbangers] LAME!

Borland selling Quattro Pro to Novell, combined with the recent buyout of WordPefect, means that now the Microsoft Developer Division faces a stronger Novell and a smaller, more focused Borland!
[MS headbangers look lost]

That loud lady from the building 16 cafeteria now works in building 25!
[MS headbangers, throwing around their hair] LAME! LAME! LAME!

Well, that’s about all I could think of. Tune in next week for the Access Development Lame List, or “What’s weak this week in AccDev!”

 Boy, doesn’t some of that take you back? What? Not really? Oh well.

Just because it comes in your size, doesn’t mean you should wear it.

I found Guido van Rossum’s meditation on Language Design Is Not Just Solving Puzzles quite on target and relevant to what we’re going through right now as we consider how to design the myriad of language features that make up LINQ. (Thanks to Lambda the Ultimate for the pointer.) If you look at all the possible kinds of language features that you can stick into a programming language, it often seems like there’s an inexhaustible supply of them and many of them are quite interesting or compelling. But the problem is that, in the end, a programming language has to have some kind of semi-coherent style or design vision associated with it or else it starts to collapse into an unintelligible mess.

This fact often puts extremely annoying constraints on what you can do when designing new language features. The example we’re struggling with right now is lambda functions. The whole point of a lambda function is to create a really terse, inline function, but Visual Basic is, by nature, a wordy language. Which means that most of the “obvious” designs for a lambda expression involve something that looks worse than not using lambda expressions at all. Multi-statement lambdas are also a problem due to our line-oriented nature (and, ironically, this is what motivated Guido’s entry as well). What’s the answer? Right now, it’s not clear. But when you get boxed in like this, sometimes you have to sacrifice functionality you’d really like to have but just can’t find any particularly good way to express. Some things just can’t be done within the overall framework of past design choices. It’s just the way it is.

(The title of this entry is something my wife likes to say when confronted with someone wearing something clearly not designed for their body shape (e.g. someone with a pronounced gut wearing a belly shirt). Just because you can wear something doesn’t mean that you should.)

 

What should this code do?

OK, I’ve got a question for y’all. Take a look at the code sample at the end of this entry and leave me a comment on what you think the output of the program should be. Note that I’m looking for people’s opinions here and this isn’t one of those “how well do you know VB” trick questions. Once you’ve put in a comment on what you think the output should be, then feel free to run it and see what it does, but do hold off commenting on the actual behavior until people have had a chance to comment. Once we’ve got some comments, I’ll write a longer entry on why I’m asking this and why the answer matters at this particular moment in time.

Module Module1

    Sub Main()

        For i As Integer = 0 To 2

            Dim x As Integer

            Console.WriteLine(x)

            x += 1

        Next

        Console.ReadLine()

    End Sub

End Module

Updated VB 9.0 (LINQ + XML) preview out!

I know this is old news, but I’ll say it anyway: several weeks ago, we released an updated preview of our proposed 9.0 features. The preview is enhanced in four primary ways:

  • We now support some Intellisense for Select expressions. This is a step forward in our investigation of the Select/From vs. From/Select question, so we’re definitely interested in feedback here.
  • We now support a lot more LINQ, specifically DLinq and variable capture (so you can now access local variables in queries). A huge chunk of my November/December went towards implementing lambda expressions and expression trees in Visual Basic and that, combined with some excellent work by another team member on variable capture, means a lot of stuff works now that didn’t before.
  • The editing/display experience for XML literals has been greatly enhanced — just having colorization makes a huge difference.
  • A bunch of extensions were made to the XLinq support to make working with namespaces and elements easier.

Amanda covers this in more detail in her entry, but this should give you a flavor. Eagle eyed readers will note that I said that I did a lot of work on “implementing lambda expressions,” but it’s important to realize that at this point lambda expressions are only used as a part of query comprehensions — there is no explicit syntax for lambda expressions yet. The priority was on getting the DLinq support working, and now that we’ve got that, we’re moving on to flushing out some of the remaining questions like lambdas…

Hope you enjoy!

Update 02/08/2006: I also forgot to mention that Amanda and I did a MSDN TV episode talking a bit about the new CTP.

What I did on my winter vacation…

It’s been a little quiet around here because for the last two weeks of January I was on vacation in sunny Puerto Vallarta. Andrea and I calculated that it had been many, many years since we had taken a vacation that didn’t involve: a) family, and b) lots of sightseeing, so we decided to take a nice long vacation somewhere sunny where we had nothing to do. The trip itself went great and we had a wonderful time — lots of time to lounge about by the pool or on the beach, enjoying the wonderful Mexican sun. (As a side note, if anyone’s looking to buy/rent condos down in Puerto Vallarta, I highly recommend the company we used, Bayside Properties. They were fantastic.) However, once the vacation was over, things didn’t go so well…

It all started on the way to the airport for our flight home. Andrea’s stomach had been bothering her all morning and about 5 minutes from the airport, she suddenly says “We’ve got to stop the cab, now!” So we pull over and she jumps out of the cab and throws up on the side of the road. She feels a little better, so we continue on to the airport (and tip the cabbie really well). As we get to the front of the ticket line, Andrea says again, “I’m not feeling so good,” so they wheel over a wheelchair and she sits down while I check in. Just as I’m getting the tickets handed to me (and this turns out to be fortuitous in a minute), she starts violently retching again. Thankfully, a very nice old lady in line with us has handed her a plastic bag, so we avoid a nasty scene. The airport people call in their doctor, who wheels her over to their temporary clinic (since the airport is apparently remodeling), where she throws up some more. The doctor gives her an anti-emitic injection and suggests that she be taken to the hospital. Really wanting to be sick in her own house rather than in a Puerto Vallarta hospital, she insists on getting on the plane, so back we go. The Alaska folks are wary about letting her on the plane, but since we’ve already got tickets in hand and checked luggage, they let us on.

The anti-emitic starts wearing off about two hours in to the five hour flight and Andrea starts feeling sick again. She makes it to about three hours before starting retching violently again. By the time we land, she’s a real mess and so we have medics meet us at the gate and Andrea gets taken directly off the plane and to a waiting ambulance. (Let me say, it’s the fastest that I’ve ever made it through customs and immigration… the homeland security guy came directly on the plane and let us through on our way to the ambulance!) Off we go to the emergency room and arrive at about 8pm. At about 3am, they’ve determined that she’s still too sick to go home and admit her overnight. I go home, feed the cats, grab some clothes, cancel a few appointmenst and head back. By the next afternoon, she’s feeling much better and is able to go home.

And, of course, the kicker is that somewhere in dealing with all the bodily fluids (not to put too fine a point on it), Andrea managed to transfer the bug to me. So just as she starts to return to some semblence of health, I get knocked out of commission with some serious trouble with the other end of the digestive tract. Assuming nothing new happens, we’re hoping that maybe by next week things will get back to normal. But I’m not holding my breath…