Monthly Archives: September 2005

And the winners are…

The session was just wonderful, a total blast, but more info on that later… But please do fill out the online evaluations! It’s something you can do to help me be a better speaker and let us know how much you liked the content!

During my talk, I raffled off 6 signed copies of my book:

Without further ado, the following were chosen at random as winners:

  • Chris Bradley
  • Brion Burghard
  • Anthony Parkinson
  • Rupesh Sanghavi
  • Roger Andrews
  • Derek Sipe

(Apologies for any typos.) If you’re one of the lucky winners, please stop by the VB team table at Ask the Experts tonight and claim your signed copy!

Tag:

I love it when a plan comes together…

…as Hannibal (A-Team Hannibal, not Lecter) would say.

See, I’m kind of a last-minute kind of guy. Not the absolutely last minute, but I tend to work stuff out in my head for a while before I actually start doing anything concrete, and that can be a little disconcerting. Amanda has been bugging me for the past month about my presentation, asking me if I needed help with the demos or wanted her to review the slides. I’m sure that her help would have been great, given the number of presentations she’s done, but I wasn’t able to take advantage of it too much because most of the stuff was in my mind for most of the time. It’s only been in the past week or two that things have really solidified. A little nerve wracking for her, but we’ll see whether it pays off today…

The turning point with the presentation, as always, was in the final dress rehearsal. Yesterday I had a bit of onsite speaker training with Richard Klees, who does a lot of this stuff for Microsoft conferences. The focus was on presentaiton style, not substance, and we covered a few things that were really killing my flow. The biggest thing I needed to work on was something I remember well from my acting days in high school: no matter what happens, no matter how badly you’re messing up, no matter how many lines you just missed, don’t break character. The truth is that if you just keep going like everything is normal, most people will never notice. And even if it’s so bad that people do notice, if you carry on and get back into the groove, most people will forgive and forget. The audience, by and large, wants you to succeed. As long as you’re not boring them, they’re on your side.

We’ll put that to the test this morning.

This does remind me of a funny story. My senior year of high school, I was in a production of “the Scottish play” being done by a local theater troupe (the Young People’s Performing Company, or YPPC). I was playing MacDuff, and early on in the play, I was in a scene where I was supposed to chat for a little while with MacBeth and then a servant comes on stage and announces the king is coming. After the servant’s speech, MacBeth turns, looks off stage, and says something to the effect of “Why, yes, here is your master now,” as the king comes on stage.

Well, during the second or third performance, everything is going great until the point at which MacBeth turns, looks off stage and says “Why, yes, here is your master now.” Instead of the king standing there, ready to enter, there was just some random cast member who gets a sudden deer-in-the-headlights look and then scurries off as he realizes that the king is supposed to be standing there and isn’t. MacBeth, myself and the servant stand there for an awkward moment until, finally, MacBeth says to the servant, “Hmmmm. Perhaps not. Perhaps you should go get thy master,” to which the servant replies, “Good idea.” Exeunt servant to go find the king. After a moment, the errant king shows up on stage, starts his speech, and on with the play.

Hopefully, nothing like that is going to happen today, but if I could make it through that, I’m sure I can make it through any flubs I might make in my presentation today…

Tag:

Introducing LINQ!

Throughout this week and beyond, we’re going to be doing a lot of talking about Project LINQ, so I wanted to start with a relatively brief overview of what the project is, what its goals are, and how they apply to VB.

To start with, LINQ stands for “Language Integrated QUery.” LINQ fundamentally is about integrating query operations into the .NET platform in a comprehensive and open manner. It’s also about providing a unified way for you to query across any kind of data that you have in your program, whether it’s relational, objects or XML. This, we believe, will represent a tectonic shift in the way that VB programmers will work with data. The possibilities that having query capabilities always available right at your fingertips, regardless of the type of data you’re working with, are immense and will fundamentally alter the way people program.

The core of LINQ is a set of API patterns. I say “patterns” instead of “interfaces” or “classes” because we want to maintain maximum flexibility in our ability to provide querying for any kind of data, regardless of whether it has a particular object model or interface implemented. These API patterns specify how an object model can become “queryable,” and they cover all the basic query operations that we know and love: projection (select), filter (where), grouping (group by), ordering (order by), joining (join), etc. By implementing this API pattern, any data provider on .NET can become queryable. There is also a lot of flexibility as to how a data provider can become flexible — i.e., whether it wants to delegate most of the work on querying or whether it wants to do all the work itself.

(It’s also important to note that these patterns are fully compatible with .NET 2.0 and require no additional platform features. They’re totally implementable in VS 2005, so you won’t need a new CLR to use them.)

We will also be providing three implementations of the LINQ API patterns that cover 95% of the types of data that people need to query: relational, object and XML. First, we will provide a set of “standard query operators” that will make the interface IEnumerable(Of T), the fundamental collection interface on the .NET platforms, queryable. Second, we will provide a component called “DLinq” that implements a query-enabled object/relational mapping service which allows querying over remote relational data. And third, we will provide a component called “XLinq” that implements a very lightweight, query-enabled XML DOM. By hitting each element of the ROX equation, we believe we will provide a query solution for most situations right out of the box.

Now we get to the languages, which is where the fun really starts. Any .NET-enabled language is free to build extra language support on top of the LINQ API patterns, and VB and C# have already begun to do so. Although you are welcome to call the lower-level APIs directly if you like, VB will provide a set of “query comprehensions” that provide a very natural, SQL-like syntax on top of the LINQ APIs. For example, if you have an array of Customer objects, you can write a query that looks like this:

Dim custs() As Customer = ...
Dim waCusts = Select c.Name, c.City From c In custs Where c.State = “WA”

This high-level syntax then compiles down to calls to the standard LINQ APIs. This means that you can learn a very simple, natural query language that then applies across any component that is query-enabled, including the standard query operators, DLinq, and XLinq. (C# will also be providing a high level syntax that is similar, but not the same. We’ll be talking about some of the differences as we dig more into the syntax.)

So far we’ve been discussing things that are general to the platform or apply to both VB and C# (modulo the differences in approaches). However, there are a several things that are specific to VB that play a role in the LINQ project.

The first is that we’ve been working on several features that we believe will make working with dynamic data easier. By “dynamic data,” I mean data whose schema is flexible, malleable or likely to change. The best example of this is XML data — although there is plenty of highly schematized XML out there, there is a vast sea of XML data for which no schema information exists or for which there is no 100% solid schema (RSS is a perfect example). For languages that understand only static type information, this means that when you deal with dynamic data, you frequently have to do a lot of extra work to access information, for example you end up writing:

XElement ord = ...;
int amount = (int)ord.Element(“amount”);

instead of something much more natural like:

Dim ord As Order
Dim amount As Integer = ord.amount

So, what we’ve been doing is taking VB’s historical embrace of dynamic binding (aka “late binding”) and extending it further to make working with dynamic data such as XML and relational much easier.

The other major thing we’ve been working on is making it much more natural to read and produce XML data. XML has become the lingua franca of the Internet and XML should be as easy as possible to work with. We’ve been exploring ways to take the XLinq API and add syntax that looks and feels very natural, but still compiles down to regular API calls:

Dim orderAmount As Integer = 10
Dim order As XElement = _

<% orderAmount %>

Dim orderDate As Date = CDate(order.@date)

As you can see, the LINQ project is extremely ambitious and this blog entry has just scratched the surface. In conjunction with the PDC, we are releasing a bunch of preliminary information about LINQ and about VB LINQ support specifically. There are documents describing in more detail a lot of what I discussed here today, as well as pointers to preliminary bits. (I would emphasize that word “preliminary” as in “lots of things don’t work yet.” We expect to roll out new bits regularly as functionality comes online.) I encourage everyone who’s interested to check them out and then check back here regularly. I’ll be talking in more detail about a lot of this stuff as time goes on and we’re looking forward to your feedback!

Tag:

Coming soon to a VB near you… LINQ!

Today at the PDC, we’re launching “Project LINQ,” and it’s big. Really big. I mean, really, I wish I had the money to hire those guys who do the movie trailer voiceovers (and you know who I’m talking about):

In a world torn apart by incompatible conflicting and incompatible data domains, one company dared to stand up to the status quo. (Shots of scowling programmers looking at computer screens. One desperate programmer exclaims “We just can’t make it work!”) Doing what they said couldn’t be done, that company cut through the artificial barriers separating the world’s data, making querying relational data, object data and XML data as easy as a stroll in the park. (Voice over of programmer gasps, “Oh my god!”, fade out to black.) Now, a project that was millions of years in the making (well, two actually, but this is a trailer, after all) arrives to change all the rules: Project LINQ!

(This project not yet rated. No one under 17 admitted with out parent or guardian. See website for more details.)

But enough foolishness. Let’s talk real turkey…

Tag:

Talking about VNext…

Today marks the beginning of one of the bigger experiments that I’ve been a part of during my 13 years at Microsoft. No, I don’t mean any of the new technologies that we’re going to start talking about today and through the week. The grand experiment that we’re beginning at this PDC is radically opening up the development process within the Visual Basic group (and the rest of our division) in ways that we’ve never attempted before. I’ve been through a bunch of product cycles up until this point, and it’s never been the case that we’ve been so prepared to talk about so much so early. To be honest, I’m pretty nervous about the whole thing, but very excited as well. We’ve got a lot of great ideas and it’s wonderful to be able to really engage with people about them.

Before we start getting into this stuff over the course of this week and beyond, though, there were some basic questions that I wanted to address up front.

What version of VB are we going to be talking about? When is it going to ship?

We’re talking about the next major version of Visual Basic. It’s way too early to put any kind of timeframe on the release, especially given the fact that VB2005 still isn’t out the door.

Why are you talking about it, then, if the current version still hasn’t shipped?

As you’ll see throughout the week, we’re contemplating some major features for VB and the platform. These features are big enough that customer feedback is going to be essential to help guide us through the design phase to ensure that we produce a version that is both complete and addresses people’s needs. Waiting until the design is finished and we’re in beta would preclude the possibility of certain types of design changes that may be highly desirable. Early exposure is key.

I should add that none of this should detract from the awesomness of the current release. VB2005 is a kick-ass product that is the best version of VB yet. All of the work that we’re doing now is purely additive — making an awesome product even more awesome — so you can start using VB2005 as soon as its released and know that it’s going to get even better in the future.

Are you going to ship everything you talk about at the PDC exactly as you presented it?

The main purpose of talking about this stuff so early is so that we can get a lot of feedback on our plans. If everyone loves everything we’ve done exactly as it is now, great! We’ll go home happy. However, living here in the real world, as I do, I expect that plans will change one people start engaging with the features. Not too much, I hope, but I’m not a psychic…

Is what you’re presenting at the PDC the feature list for the next major version of VB?

Hardly. The next version contains some “big bets” that we’re getting out there early for extra feedback, but the stuff we’re talking about this week is not going to be the end-all, be-all of the next major version. There are still plenty of other things that we’re considering, just not on the scale of some of the stuff we’re discussing now.

I’m not going to be at the PDC. Am I screwed?

Not at all… We’ll be talking about everything here (in the VNext category) and elsewhere. Stay tuned for more information!

Tag:

The real reason we have conferences…

I’ve made it to the PDC and managed to dodge, so far, the power outages. Hooked up with a bunch of other VB’ers for dinner and now I’m trying to figure out when I’m going to get everything I’ve got to get done done in the next four days… Dinner, though, was good – good food, good conversation. It occurs to me that one of the real reasons we have conferences is to get everyone out of the office so we can mix outside of the little groups that we tend to move within at work. Lots of good cross-talk from different people in different areas…

Tag:

The Cylons do *not* have a plan!

(We now interrupt the PDC drumbeat for this random message.)

Since we’re just biding our time ‘til Serenity comes out in theaters, Andrea and I have continued to watch Battlestar Galactica even though we still think it’s only so-so. (Something that I’m sure YAG is going to bug me about when I get to the PDC.) Some episodes are pretty decent, but I still find myself annoyed by many of the characters (never a good sign) and bored in long stretches of some of the episodes. The core problem, to my mind, is that the writers are not particularly good at parcelling out the ongoing mystery very effectively. The X-Files did a superb job of this, in my mind, until about the sixth season when it became clear that Chris Carter was making up the mythology as he went along and had no clear idea where it was all going. I’m beginning to suspect this about BG as well — do the writers really know what the Cylon’s plans are, or are they throwing elements in as they go along? (Contrast this also with Harry Potter, where J.K. Rowling seems to have a very strong idea of how the whole story is going to play out. Much better.)

Why being a developer presenter at the PDC sucks…

See, normally, someone who’s not a developer and is presenting at the PDC takes the technology they’re going to demo, works with it, figures out what works and what doesn’t work, and then writes their demo around that. But since I’ve been actually building a bunch of the technology that I’m going to show, as I work through my demo I keep getting ideas along the lines of “hey, it’s be really cool if this worked.” So here I am, Sunday morning, still adding tweak-level features in the vain hope that I can demo them during my talk. Instead of working on the talk as I really should be doing. No worries, it’s actually all pretty solid and I’ve still got plenty of time for the last bit of polish, but still. Geez…

Tag:

PDC Schedule

Update: I’ll also be at the Tools and Languages track lounge on Tuesday and Wednesday @ 6:30pm for the “Meet the VB team” events. Hope to see you there!

Well, folks, we’re getting close… Did my second session dry run yesterday and we’re headed in to the home stretch! Looking forward to seeing everyone at the PDC. For those of you who’d like to chat about VB, I’m definitely going to be in the Tools and Languages lounge Thursday afternoon after my talk, and I’ll also be at the Ask the Experts that night. I’m also listing the sessions I’m participating in below. Hope to see you all there! 

TLN308  Visual Basic: Future Directions in Language Innovation

Day/Time: Thursday, September 15 10:00 AM- 11:15 AM Room: 411
Session Level(s): 300
Session Type(s): Breakout
Track(s): Tools & Languages

Visual Basic 9.0 will offer radical improvements in its ability to work with data in all its forms: as objects, as XML, as relational data. Join the language architects for a detailed discussion of features such as query comprehensions, object initializers and anonymous types that enable querying data in a more flexible, natural way than ever before. Also, get a glimpse into the future of dynamic programming in VB with coverage of new features intended to radically simplify working with dynamically typed data on the .NET platform.

PNL03  Scripting and Dynamic Languages on the CLR

Day/Time: Friday, September 16 8:30 AM- 10:00 AM Room: 515 AB
Speaker(s): Jim Hugunin, Erik Meijer, Jim Miller, Bruce Payette, Dave Thomas, Paul Vick
Session Level(s): 300
Session Type(s): Panel
Track(s): Tools & Languages

With the recent rise in popularity of dynamic languages as a first class tool for software development, there are new questions around how to effectively use these tools, and how well they play in the .NET ecosystem. Join members of the CLR team, Microsoft languages teams, and external language implementers in a panel to answer questions around when and where dynamic languages should be used, the futures of these languages, and open discussion on the challenges and opportunities of implementing dynamic languages on the CLR.

PNL11  .NET Language Integrated Query End-to-End

Day/Time: Friday, September 16 1:00 PM- 2:30 PM Room: 152/153 (Hall F)
Speaker(s): Luca Bolognese, Don Box, Anders Hejlsberg, Erik Meijer, Dave Remy, Paul Vick
Session Type(s): Panel
Track(s): Tools & Languages

.NET Language Integrated Query promises to extend the .NET platform in new an exciting ways. Join Anders Hejlsberg and other key Architects and designers responsible for creating this new advance in data access on the .NET platform. The panelist will be able to comment on the history leading up to the advent of NET Language Integrated Query, its immediate usages in C#, VB and the .NET Platform generally as well as some thoughts on future directions.

Tag:

On the evilness of parameterless default properties…

Apropos of the previous entry, I should add that I agree wholeheartedly with Eric’s contention that parameterless default properties were almost entirely evil. They did make working with some objects much easier, but they came at such a cost of understandability that I don’t believe that, in the end, they were worth it. When I started working on the VB compiler as we were porting to .NET, I tried to get a coherent explanation of exactly how parameterless default properties worked, especially in situations like functions that returned objects that had parameterless default properties that returned objects that had parameterless default properties, etc. Although there was a document that purported to show how it was all supposed to work, I believe the document was demonstrably wrong. In fact, I think the only real “documentation” for the behavior was the code itself. (I’m not even sure the developer working on the code could explain how it really worked in practice.) I wasn’t sad to see them go.

I part ways with Eric, though, on default properties with parameters. I think they’re incredibly useful and don’t agree with the C# philosophy of only allowing a single “indexer.” Maybe the C# brainwashing has already begun… <g>