Peter Wieland has posted instructions for getting into the Vista beta. I’ve been building with the beta2 wdk for a few days now with no issues so far.
Archive for May, 2006
How to get into the Vista beta
Tuesday, May 30th, 2006Visual Studio Express Edition: A-
Monday, May 29th, 2006OK, I’ve spent my entire holiday weekend working with Visual Studio 2005 Express Edition. In particular, I’ve been working with VC++, writing what they tell me is unmanaged
code, whatever that means. After logging a few hours, I thought I’d share some feedback.
First, let me start by saying that this thing is really the real deal. If you’re trying to learn how to be a coder (on Windows), this toolkit will do it for you. There are some annoying holdbacks from Standard Edition and better, but overall this thing will work for producing serious software. If anything, Microsoft dramatically under-bills its capabilities on the website.
I’ve covered the missing SAL support, missing x64 compiler, and missing profile-guided optimization before, so I won’t re-hash all that. A couple of other irritating points came up, though. First off, Express Edition [apparently] doesn’t support building ATL projects, at least on x86. Getting the PSDK doesn’t help either; it is broken in at least two ways: it has a #pragma in atlbase.h to statically include atlthunk.lib, but there is no atlthunk.lib in the SDK. There’s no way to explain that one away. And, for the icing on the cake, there’s actually a c++ conformance bug in atlwin.h [IIRC] related to standard for() scoping.
I’ve complained about FrankenKits before, and while I was able to work around the atlthunk.lib issue by re-coding the missing functions in my own static library, I was reduced to editing the atlwin.h file in place. That is a huge no-no, and while it’s obviously not Express Edition’s fault per se, Standard Edition comes with enough ATL machinery that the PSDK’s crappy ATL is unnecessary. And as a parting shot: If you’re not going to support a feature (i.e. ATL), don’t include options in the project config for letting you specify how you want to link to ATL.
Which brings me to my second minor beef. One of the things I like about Standard Edition is the capability for organizing projects into sub-folders in Solution Explorer. I hate long lists – as much as I love build.exe, its requirement to keep everything in one directory[*] is really terrible. Same goes for projects in the IDE. So imagine my surprise when, after organizing all of the 40-ish projects in one of my workspacessolutions into folders using Standard Edition, Express Edition flatly refused to load those projects. I guess they had to pick some things to differentiate Express over, but maaaan, that one is just annoying. Fine, no profiler. But seriously: no subfolders?
A couple of other 1.0-ish problems happened now and again. For some reason, the IDE kept wanting to build projects that were unchanged on a couple of occasions. The compiler would fire up, realize there were no relevant changes, and rip through the file list in no time. But, it was annoying; a re-start of the IDE fixed it each time. Another nitpick is related to dependency ordering in the .sln file – every time you save the .sln, it reverses the order of the dependencies in the XML file. This has no effect when it comes to the IDE, but it’s hell on source control. I have tons of revisions of my .sln files that are essentially NOPs. Any white noise like this just makes it harder to keep your eyes open for relevant changes in a multi-user environment. Anyway, I suspect both of these bugs are in all of the 2005 editions, and I bet they’ll both be gone by SP1.
So, overall I’d give Express Edition an A-. If it had cost me money, it’d be a pretty solid B, but the price sure is right, and what they do ship is really very good. Enthusiastically recommended.
Visual Studio 2005 and property inheritance
Sunday, May 28th, 2006I was just surfing around trying to identify some phantom property sheets that seem to have attached themselves to my Visual Studio projects, when I ran across this post from Peter Huene. It’s the best description of this property sheet inheritance functionality that I’ve seen so far.
I’m gratified to see that they had some trouble figuring out how to graphically represent this:
This is where the view can get slightly confusing (we toyed with several different representations early on in Whidbey). Where as the configuration nodes are “contained” by their parent project nodes, the configuration nodes inherit from their child nodes (likewise for each property sheet node). Projects have no relation, property-wise, to configurations in our build system, so the project nodes simply act as a method of grouping configurations together.
At Positive Newtorks, we have a remarkably flexible configuration system called the Policy Manager (catch naame, eh?) that has been dealing with this exact problem since 2001. After a lot of early gnashing of teeth over the GUI, we settled out on something similar to this. I remember thinking at the time that there had to be a better way to organize the information, but nothing any better came up during design discussions, so we went with the tree.
Now, I’d hesitate to hold out the VS 2005 UI as the paragon of interface design, but I know they spend a lot of time on this sort of thing at Microsoft, so I’m intrigued to see that they came up with the same solution. And, on the flip side, I know how hard this design problem can be – the level of flexibility they’re trying to provide here is very difficult to represent visually.
Some quickies
Saturday, May 27th, 2006- RoadRunner + Microsoft FTM = downloading bliss – I just downloaded the beta 2 WDK at 600K/s, which may be the fastest nontrivial download I’ve ever done from home.
- I got a new MacBook Pro 17″ this week. Good: fast processor, fastest VM ever (via Parallels + Intel virtualization technology), MacSaber, and the smartest scrolling trackpad in the universe. Bad: it gets really hot.
- I hate stupid [car] drivers. On an interstate, there are two apparently nonobvious rules that everyone must follow: 1) drive in the right lane whenever you aren’t passing, and 2) never pass on the right. It’s not such a difficult concept, but GOOD LORD people clearly don’t seem to know this. ARGH…
- And finally, congrats to my little sister-in-law Liz
ShermanHenak, who got married last weekend. Wine + Tuxedo + Swing Music == Goooood…
A minor VS 2005 nitpick
Saturday, May 27th, 2006You should never complain about a freebie, right? I just got done converting our usermode Windows code to build with VS 2005. It turns out that Express Edition builds our product quite well, and the SDK has an x64 compiler in it, so other than resource editing, we’re not actually losing much by going with the free version. This is obviously a big step up in value from the VS2003 tools that consisted of essentially just a command line compiler and linker. Although, come to think of it, that’s the way I prefer to work anyway. But I digress…
One thing jumped out at me. Why on Earth is the build toolbar not on by default? It’s not on in the Standard Edition either. Furthermore, why isn’t there a (defualt) way to build just the project I’m on? We have dozens of projects in our usermode workspacesolution, and I rarely want to build the whole thing.
Anyway, I’m reallly impressed with MS for giving this thing away for free. The very best UNIX toolchain has been free for years; now the best Windows toolchain is free too. I wonder if it will have the desired effect.
Clarifying the C++ commentary from yesterday
Thursday, May 25th, 2006When I took Stephan Wolf’s example of fixing a warning with a cast the other day as an example of a place I’d have preferred a C++ casting operator, I didn’t mean to get the Mother Of All Holy Wars started again. So, I’m going to be slightly rude and check out of that discussion once and for all. There’s already enough C++ vs. C in the Internet’s archives for one millennium.
Unrelated: millennium is hard to spell.
Back on topic: I actually use C for all of my driver projects; in case I didn’t make it clear, I wasn’t trying to advocate the use of C++ per se (although people like Mark Roddy certainly seem to do quite well for themselves in C++). I was just squaking about one of my least-favorite features of my most-favorite programming language.
Anyway, sorry about my contribution to the noise half of the SNR. Obviously I must have been a little delirious when I hit the send button.
On the topic of annoying blogs
Wednesday, May 24th, 2006I’m all for hard-hitting commentary, and my wife routinely accuses me of being a pessimist. I love Shakespeare tragedies and I’m even enjoying Crime and Punnishment.
But even I have my limit. And so I ask you: does Mary Jo Foley of Microsoft Watch fame ever say anything nice? Good GOD, I’ve been reading her blog for months and don’t ever remember her doing anything other than looking for the most negative angle she can put on absolutely any story about Microsoft. She’s complaining about slow download speeds of the Vista beta at the moment, referring to it as a snag
!
Enough with the negativity already! This is why I can’t handle election year television. I don’t need it in my newsreader. Subscription deleted!
64-bit porting and casts
Wednesday, May 24th, 2006One of the few truly compelling reasons to use C++ over C is the casting syntax. Earlier today, Stephan Wolf (another MVP) posted the following on a newsgroup:
Well, the following should also work without a warning: ULONG x = (ULONG) strlen(...) ..because an explicit type cast tells the compiler "yes, I do this conversion intentionally and I am aware of any possible truncation".
This was in response to someone complaining that strlen’s return type size changed. The real truth, of course, is that the original code was using the *wrong* return type, but that’s another story for another day.
The problem with C-style casts, as was pointed out by Bjarne Stroustrup ages ago, is that they are virtually impossible to detect with a regular expression. Casts often hide bugs, often intentionally – that code above has a bug in it, unless you happen to know something about the input to strlen(). So, you’re left with a bit of syntax that often hides bugs and can’t be filtered through a checkin script, for instance.
C++, on the other hand, provides several casting operators that are all much easier to detect. Stroustrup said that he thought casting operators should be ugly because casting itself is an ugly operation. To wit:
const_cast() static_cast() reinterpret_cast() dynamic_cast() [caveats]
These operators are easier to grep for, and better yet, are separated by purpose, so you don’t have to worry about false-positives for intentional downcasts to derived casts and such.
See, I told you so. :-)
Tuesday, May 23rd, 2006Last week I complained that Microsoft hadn’t made the benefits of SAL available to people who didn’t plunk down the money for their top-of-the-line development tools. Well, today Michael Howard pointed out that the Vista beta 2 SDK includes PREfast and can therefore take advantage of SAL. I’m downloading the new Vista stuff now (still…), and I can’t wait to check this out for myself. I’m glad Microsoft decided to take my excellent advice, even before I offered it!
It’s not a perfect solution, though; you still have to be an engaged enough developer to go looking for this stuff (i.e. I didn’t know it was there, for example), and it’s not clear to me if this integrates into the VS build environment. But, it’s definitely a start – I can start recommending SAL to everyone now, even if it is a bit of extra work.
Vista beta 2
Tuesday, May 23rd, 2006Windows Vista beta 2 has appeared. Downloading now!
I hear it includes the next version of PatchGuard as well.