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>

Early-bound <> late-bound

Eric Lippert recently talked about some of the fun and exciting things that go on when you use parameterless default properties in VBScript. He notes that the fact that VBScript is always late-bound means that the behavior of code in VBScript is often different than early-bound code in VB6. He goes on to say:

I hear you exclaiming “The fact that a difference in available type information leads to a difference in run-time behaviour violates a basic principle of programming language design!  Namely, the principle that late-bound calls have exactly the same semantics as early-bound calls!” […] Indeed, as I’ve mentioned before, VB6 and VBScript violate this principle in several places.

Actually, it’s not just VB6 and VBScript that violate this — it’s VB 2002, VB 2003, etc. too. Although we try to adhere to the principle that “early-bound behavior = late-bound behavior” in general, it’s really a question of tradeoffs. The simplest example is the way that overload resolution works. Let’s say you have two methods:

Sub Foo(o As Object)
Sub Foo(s As String)

Now, if I declare a local variable x that is typed as Object, the compiler will look at the two overloads and say “well, obviously the Object overload is the better match because the type of the variable is Object.” But let’s say instead you deferred the call until run-time and at runtime the value stored in x is of type String. Now, the run-time late binder doesn’t actually know what the declared type of the variable x is. All it knows is that the argument that got passed into the late binding helper is of type String. So, naturally, it’s going to choose the String overload as being the best match because it’s got a String to pass to it. So in this case, early-bound behavior <> late-bound behavior.

This isn’t to say that it wouldn’t be possible to make the two behaviors the same, it’s just a real question as to whether it would be desirable. Late binding is not exactly the fastest thing in the world compared to early bound calls. Deferring work until runtime comes with a cost, and we’d prefer to keep that cost to a minimum. To “fix” this situation would require creating type objects that represent the static type of the expressions we’re late binding over so that the late binder could exactly replicate the early-bound behavior. This adds even more overhead to a process that’s not super lightweight to begin with. And, really, does it matter? Yes, you’re getting a different overload called, but it’s hard to argue that the behavior is really wrong.

(Another example of the late-bound/early-bound split is interfaces. Because interfaces have no identity of their own, the late binder can’t see them unless, again, the compiler were to give it extra static type information. We chose instead to not allow late binding against interfaces.)

In the end, we view “early-bound = late-bound” as a goal rather than a rule. Probably 95% of cases work the same whether you choose to do them early-bound or late-bound, and the other 5% should work is a way that the user would consider “correct.” So, we hope, no one really ever had to notice that static typing and dynamic typing aren’t exactly the same thing…

How to be a PM at Microsoft (and how to deal with PMs)

Something random the other day make me think of an old email I’ve kept stuck in the archive folder, and I thought people might find it amusing. Many years ago, a coworker sent around an entirely tongue-in-cheek email on “How to be a PM” in which he covered the many underhanded ways that a Program Manager could get a developer to do their bidding (not surprisingly, the author was a PM). So I crafted a response on how, as a developer, to deal with the underhanded tricks that PMs can play. Here it is for your enjoyment…

(Obligitory caveat: Remember, this is just a humor piece. No one I’ve ever known at Microsoft has ever done anything like this. It’s all entirely theoretical. Caveat emptor. Your mileage may vary. No warranties express or implied.)

How to be a PM (and how to deal with PMs)

1. Always ask for more than you want, a ratio of one bogus request for every 4 or 5 real requests is usually a good ratio. Too many bogus requests and you’ll be laughed at (even more than usual), too few and something you really want might get cut. Act depressed when the bogus feature is cut.

Dev response: Always overestimate the time it will take you to do a task by at least a factor of two or three. No task takes less than half a day, even if it will take you five minutes. If there’s something you really don’t want to do because it’s hard or you don’t like the PM, start your estimate at a week. If the PM argues with you, keep saying “Oh, I forgot about case x.” and add a week to your estimate. Repeat until the PM stops arguing.

Alternate Dev passive-agressive response: Do as many of the bogus requests as possible and tell as many people about them as possible. When people ask “who told you to do such a stupid thing?” indicate the PM. Soon everyone will be laughing about the PM behind their back.

2. Divide the feature as many different ways as you can to get the lowest possible dev estimate. For example, if a, b, c, d, and e are the parts of the feature be prepared with options like “What if we do a, c, and part of d?” Initially developers will put up defenses like “doing c requires that we do b.” Pause thoughtfully and give them another combination. If you’re determined eventually you will win.

Dev response: First, make sure that no combination of parts adds up to anything less than a week and a half. Figure out the one part of the feature that is absolutely critial (usually a), but smarter PMs will make it c) or d)) and estimate it at a week. As above, keep upping estimate until PM leaves.

3. Ask another developer. While it’s good to get a second opinion, feel free to go for a 3rd or a 4th. The more times you ask the better chance for that bold “I can do that in half a day” estimate. Sometimes called the Fru method [Ed note: named after a PM on the team at the time].

Dev response: None really necessary. If the PM comes back and says “y says it should only take half a day,” then just reply “fine, then y can do it.” Problem solved.

4. Many different ways exist to get tasks to developers, use them all. If you stick to one it’s too easy for them to develop a good defense. Add things to the spec, push something through [the design change process], enter a bug that doesn’t actually state the problem but exposes it in such a way that the developer will find it, have someone else enter the bug, ask a 3rd party to pretend they had the idea for the new feature (most effective when it comes from outside the company through a manager type but that’s harder to orchestrate), get another product to do the same feature (good trick within [the org I was in at the time]). In short, be creative as you make work for other people.

Dev response: As much as possible, don’t play their silly games. Your single most potent weapon (if you haven’t figured it out by now) is your estimation as to how much time it would take to do something. Most PMs have no clue how much time it takes to do anything, so you can say the most outlandish things and they will believe you. For example, PM: “Dev, I need to you change the menu item “Exit” to “Quit”.” Dev: “I’m sorry, but there’s a lot of code that depends on that, so it’ll take me at least a week to change it and it will probably completely destabilize the product.” PM: “Oh, I see. But y said that he could do it in five minutes.” Dev: “Well, then, have y do it.” OR Dev: “Unfortunatly, y doesn’t completely understand the complexities of our menu system, so his estimate is wrong.”

5. Only spec 75% of the feature. All developers will finish the last 25% of the feature even if they don’t have the time in the schedule.

Dev response: First of all, since usually PMs really don’t understand what they’re asking for anyway, always do exactly what is in the spec because nothing you do is going to be right anyway — at least this way you can say “but it’s in the spec!” and make the PM look like an idiot. If the spec is unclear, don’t ask the PM about it, just interpret it in a way that is the easiest for you, even if it makes no sense. If you don’t like part of the spec, ignore it and later say “I must have been working off an earlier version of the spec that didn’t have that feature in it.” If the PM challenges you about something they say was in the spec, imply that if they’d written the spec properly you would have understood what they wanted.

6. Drug your developers on candy and other treats.

Dev response: If a PM really wants a feature, say “I’ll do it if you give me a six-pack of beer.” If the PM readily agrees, ask for a case instead.

7. When describing new features, write up their descriptions as if other new features already exist. If the developer gets half way into feature A and realizes that they need feature B to complete it chances of accepting feature B go up.

Dev response: If you fall for this, you get what you deserve. 

Punching up the abstract…

Despite my name making an appearance in the session title (it appears to be gone now), several people have observed that our current session abstract for our PDC05 talk is a bit, uh, bland, especially when compared to some of the other sessions. Here’s what we originally submitted:

Visual Basic is designed to be the most productive language for writing data-centric, solution-focused applications. Meet with the designers of VB and learn about upcoming language features that will improve developer productivity, including new features that enable optimized queries over objects, XML, and databases in a consistent way.

I proposed punching up the abstract in the hopes of making it a little more enticing, and it looks like that’s now live. Here’s the new abstract, which you can find in the session list:

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.

Hmmm… What are some of those things?

Tag:

Happy blog-day to me…

As with last year, my recognition of my second anniversary of blogging is a bit belated. And, as with last year, it’s hard to believe where all the time has gone. The whole blogging phenomenon seems to have transitioned from adolescence to early adulthood and is rapidly growing up (as much as it ever can). Wonder what year three will bring?

Microsoft Cept

Larry Osterman blogged yesterday about the funky name assigned to some new expansion pack that we’re shipping, which jogged my memory about a funny naming story that’s probably old enough to be repeatable. In fact, it’s been so long that the story may be incorrect or apocryphal, so take it all with a grain of salt…

Before I worked on Visual Basic, I spent most of my time working on Microsoft Access. In fact, I interned on Access about a year before it actually shipped its first version. The name of the project at the time was “Cirrus” and it had no official product name at that point. By the time I finished up my final year of college and made it back to the Access team, the product name had been chosen and we were just a few short months from shipping. One day I was chatting with one of the marketers on the team and he told me a story about how they’d come to the name “Access.” Apparently, they’d hired an outside research firm that specialized in product naming. They paid them some big chunk of change to go off and think about possible names for Access and then come back and give their recommendations. They came back with a set of ideas, but the one that always stuck out in his mind was “Microsoft Cept.” Yes, “Cept,” as in “con-cept” or “pre-cept” or “ex-cept.” They apparently had some wacky ideas about how Microsoft could run a whole marketing campaign around words that ended in “cept.” (Apparently ignoring the obvious homophone that immediately springs to mind, namely “septic.”)

Thankfully, the marketing department ignored the suggestion and took a look at the trademarks that Microsoft already owned. We’d apparently shipped a “Microsoft Access” product before – it was some kind of DOS dial up program that had died a quick death – and the name seemed to be perfect. And thus we have “Microsoft Access,” not “Microsoft Cept.”

Anyway, that’s how I remember the story. My apologies to those involved for any distortions that time has made to my memory…

On getting spanked by Anders and Raymond…

Some of the early session preferences are rolling in for the PDC and, as expected, I’m getting spanked by Anders and Raymond. I guess that’s just what you get when you go up against a Distinguished Engineer and the most popular Microsoft blogger…

Seriously, though, if you’re going to the PDC, do take a moment and respond to the Session Preference Survey and help us make good planning decisions for the conference. After all, when you show up to my session and find that there’s no space to sit because you didn’t say you were interested in coming, you’ll only have yourself to blame…

Tag: