Category Archives: windows

Word 2007 clipboard slowdown

Office 2007 is a great piece of work, but there are some annoyances. Here’s one. Ever tried to grab some text from a web page and paste it into Word? I do this, using IE7, and often experience an irritating delay of up to 30 seconds or so, during which time this message appears:

“Contacting the server for information. Press ESC to cancel”. If you press ESC, nothing gets pasted. If you let it do its thing, then eventually your text gets pasted, by default with some attempt to preserve layout. I almost always just want the plain text, so I select that from the little paste menu that appears (the last vestige of smart tags).

What’s going on here? Well, the Windows clipboard is a complex and ancient Windows feature. When you copy something to the clipboard, applications may place data there in several different formats. Creating all these different formats can be an expensive operation, so there is also an option for the recipient application (client) to query the sending application (server) dynamically. In other words, the paste operation might initiate a conversation, instead of just grabbing some data and inserting it into a document. It wouldn’t astonish me if it still uses DDE, the forerunner to COM from the days of Windows 3.1.

If the paste operation is complex, you can forgive a little delay. But Word 2007 now lets you specify a default paste, which I have set to plain text. I’m confident that IE7 puts plain text on the clipboard as soon as you copy. In fact, you can prove this by copying something in IE7, then pasting into Notepad, which only understands plain text. It appears instantly. Then switch to Word 2007 and repeat the paste. You still get half a minute delay, before the text appears.

The explanation must be that Word 2007 gets all the complex formats first, and only then pastes the plain text. In consequence, even if you only want the plain text you nevertheless have to suffer the delay. The only way round it is to use Paste Special and select plain text from the formats on offer.

I guess it might be possible to write a macro to do this and attach it to a keyboard shortcut. Perhaps I’ll investigate when I get a quiet moment.

Technorati tags: , ,

Vista, Office 2007 changes: cosmetic, or not?

This is the statement that most intrigued me in Walter Mossberg’s review of Office 2007:

These changes in Office, while much less publicized, are far bolder and more important than the mostly cosmetic user interface changes in the highly hyped new version of Windows, called Vista, which comes out on the same day.

Mossberg’s reviews are not deeply technical but he represents a good example of intelligent opinion on technology issues. Is he right about Vista? I’ve puzzled a bit over what he is saying here. I think he is only referring to the user interface, yet one could argue that all user interfaces are “cosmetic” since they are about appearance in contrast to underlying functionality.

My own view is that it is difficult to describe the user interface changes in Vista as cosmetic, though I am unclear how to define what is “user interface” and what is not. This is from an MSDN article on the Desktop Window Manager:

The new Microsoft Windows Vista desktop composition feature fundamentally changes the way applications display pixels on the screen. When desktop composition is enabled, individual windows no longer draw directly to the screen or primary display device as they did in previous versions of Windows. Instead, their drawing is redirected to off-screen surfaces in video memory, which are then rendered into a desktop image and presented on the display.

That said, the user just sees windows on the screen: it is not obvious that this is so different from XP. That makes Vista’s UI changes the opposite of “cosmetic”: it looks the same, but underneath it is radically different.

How about the little search box at the bottom of the Vista Start menu? A small detail, yet once you learn that you can start Excel just by typing “ex” and hitting Enter, it becomes a big deal. I could ramble on here about search as UI. Not cosmetic.

Another change which I think falls in the UI category is that Vista now treats the user’s home directory sensibly. I ranted about this on XP. The home directory is a key part of the Windows operating system, but on XP it is hidden under Documents and Settings and both hard to find and intimidating for users. Vista promotes the home directory to the Start menu, renames the obscure Documents and Settings to “Users”, and sensibly moves things like Music and Pictures out of My Documents to the top level; it also gets rid of the annoying “My” prefix. You could argue that this is a cosmetic change, though I think it is an important one.

For sure, there are cosmetic changes in Vista. I think transparency, which Mossberg or any user will soon notice, is an example. Cool, but of little practical benefit as currently implemented. What about the way that Window key – Tab displays a 3D view of all your open applications (the update to Alt-Tab)? Is that cosmetic? Actually, I don’t think it is. If you have, for example, multiple documents open in Word and Excel, seeing the preview image makes it easier to find the one you want. The same applies to the pop-up previews on the task bar. This is information the user interface did not give us before. My vote: Not cosmetic.

I like Mossberg’s take on the new Office UI, though I still think there is more than just usability behind Microsoft’s strategy here. Yet I am still using the same Office features that I used in Office 2003. The changes are do with appearance, not functionality. Doesn’t that make the new stuff in Office 2007 more “cosmetic” than those in Vista, important though they are?

Elementary error breaks Outlook 2007 POP3 mail, say users

Users are reporting that Outlook 2007 is immensely slow for POP3 email retrieval, because of an elementary error in the way it negotiates with email servers.

Specifically, it sends AUTH as the first command after connection. The server rejects this with an error response. The ensuing time-outs and consequent errors result in much slower mail retrieval, though it does arrive eventually.

I have 8 POP3 accounts that OL 2003 used to query in a minute or two (with 80 spams downloaded). OL 2007 takes 6 minutes. Plus I reckon there are other problems in the UI threading…..

says CW in a comment to an earlier blog post about Outlook 2007 performance. Corroboration comes from user Ken in a comment to this post.

I’ve not yet tested this myself, but will do shortly. It has a kind of horrific plausibility, since everyone at Microsoft uses Exchange for email, not POP3. Therefore POP3 performance will receive much less scrutiny, though you would have thought that the wider beta testing would have picked it up.

I think we will here a lot more about Outlook 2007 performance issues in the coming months, unless Microsoft comes up with a speedy fix for this and other problems.

Update

I’ve run some tests of my own and looked up some RFCs, with a little help from the microsoft.public.outlook.general newsgroup.

I tried Outlook 2007 with two POP3 servers. One is dovecot; the other is also running on Linux though I’m not sure which POP3 daemon it is. With dovecot, my ethernet trace does show a sequence similar to the one the above users are complaining about, something like:

Server: +OK dovecot ready.”

Client: AUTH

Server: -ERR Unsupported authentication mechanism

However, there is no significant delay introduced; it goes right ahead with user and password.

On the other POP3 server AUTH is again sent, but this time does not trigger an error.

There is something that puzzles me though: according to RFC 1734 AUTH should be followed by an authentication mechanism, not left without an argument. And there doesn’t appear to be any need to send AUTH at all in the standard plain setup.

The lack of an argument would explain the error the other users saw:

Server: -ERR An authentication mechanism MUST be entered

May be an email guru can tell me definitively whether Outlook is in the wrong here. However, it strikes me that the problem is only making a minor contribution to the poor performance. Even the timeout of 3 seconds which the user CW refers to is hardly going to make a huge difference.

That said – the fact remains that Outlook 2007 does have performance issues.

Using MSBuild from the command line

Now that the holidays are over, here’s some hardcore tweakery for Visual Studio 2005 developers. Visual Studio 2005 includes a completely new build system based on XML build files and a standalone build utility called MSBuild. Visual Studio project files are in fact MSBuild files. Open them up in a text editor and you’ll see that they begin like this:

<Project DefaultTargets=”Build” xmlns=”http://schemas.microsoft.com/developer/msbuild/2003″>

You can also build entire solutions from the command line. Just open up a Visual Studio 2005 command prompt (an easy way of setting up the correct path and enviromental variables), navigate to the project directory, and type:

msbuild yourapp.sln

This is NOT dependent on Visual Studio, since MSBuild is actually part of the .NET Framework redistributable package. This means you can take your project files and build them on machines that don’t have Visual Studio installed, which can be handy for servers.

But what if you want to edit the solution build file? Curiously, solutions are defined in .sln files which are not msbuild files. When you run MSBuild against an .sln file, it actually creates a new in-memory build file for compilation, making it hard to edit.

This is where the tweak comes in. If you define the enviroment variable msbuildemitsolution, then MSBuild generates the solution build file and leaves it there for you to edit. It is given the name yourapp.sln.proj. For the next build, you can run msbuild against this file directly, thus incorporating any manual changes.

Why it works like this, who knows? Still, it’s an intriguing tip and as you can guess I didn’t discover it by accident. I got it from Sayed Ibrahim Hashim’s excellent blog. He is the author of the MSBuild/ClickOnce book Deploying .NET applications. I haven’t seen the book, but I recommend the blog if you want to know more about msbuild; the book is likely good as well.

Technorati tags: , ,

The best and worst of Vista multimedia

A friend called on Christmas day. She was away from home and had forgotten to set the video to record a couple of TV programmes. We’re testing Vista media center, so it was a matter of going to Vista’s TV guide, scrolling to the programmes she wanted, and selecting Record. What about the transfer to DVD? Next day, I selected Recorded TV, and scrolled through the recordings, each of which has a preview image. When I found the right one, I clicked on it and noticed that Burn CD/DVD was one of the menu choices. So I stuck a blank DVD -R in the drive, clicked Burn CD/DVD, and a while later (quite a long while) it was done. Tested the DVD in a standalone DVD player and it worked fine. I don’t miss VHS one bit.

Now have a read of Peter Gutmann’s Cost Analysis of Windows Vista Content Protection. Gutmann is a security specialist who describes himself as a professional paranoid, which perhaps explains the tone of the piece – he calls Vista’s content protection a “suicide note”. I doubt he is correct in all his conclusions, but nevertheless it shines a fascinating spotlight on this aspect of Windows Vista.

It has always been possible to make unlicensed copies of media such as music and film, but in the pre-digital world it was inconvenient and always involved some loss of quality. Personal computers changed all that, particularly when combined with the cheap storage which we now have in abundance. This is bad news for industries that depend on selling this content rather than giving it away. Hence Vista tries to put media back into its uncopyable box, so that once again you have to purchase the official item.

A single pinprick is enough to burst a balloon, no matter how airtight the rest of it is. Similarly, to protect media you have to protect every link in the chain, from digital source to final output. Vista calls this the Protected Media Path; read the MSDN article here. The system is intricate and complex, and as Gutmann notes there are undesirable implications. The Protected Environment (PE) relies on “trusted components” such as drivers, codecs and content processors. Each component must therefore be signed by Microsoft after a verification process. But what if a bug or design flaw has slipped through, allowing content to be pirated (a pinprick)? Then the component can be “revoked”, which means some hardware or feature in your system will no longer work properly. Content publishers can even specify that their content will not play if a component known to be unsafe is present, by checking against a revocation list.

Ideally, a revoked component will be replaced by an automatically downloaded update. However, Microsoft’s document on the subject acknowledges that this may not always be the case:

In rare cases, an updated version of the component may not be available, for example, the company that implemented the component has gone out of business. If the component is not essential, the PE can work around the issue by not loading the component. If the component is essential, the application is provided with a URL that directs the user to a Web page that has information on the issue.

That might mean no more protected content for you unless you actually replaced the hardware with something else for which trusted components exist. I presume however that you would still be able to play unprotected content. Still, this would be a severe outcome if, for example, you had a large collection of HD-DVD movies that you played on the system.

It is understandable if hardware vendors such as ATI are unenthusiastic about all this. They have to do the work of creating suitable hardware and drivers, but the beneficiaries are the owners of the protected content.

Several obvious questions come to mind:

  • Will this really work? Such a complex system must be vulnerable to the efforts of determined hackers, as other DRM schemes have been in the past.
  • When playing protected content, what are the performance implications?
  • How about when playing unprotected content ? What, if any, is the performance impact of all this content protection then? Perhaps there is none. It strikes me though that there could be unwanted side-effects.

The existence of this DRM edifice also impacts all of us as consumers. When we purchase content, we’d like to be able to play it on as many devices as possible: home stereo, wireless streaming around the house, computers, portable devices. Technology is at last enabling this freedom, but now technology is also taking it away.

I’ll come back to where I started. Whether Vista content protection stands or falls will depend on the user experience. If it is good, as with my DVD burning from media center, then consumers will forgive a lot, to the frustration of anti-DRM advocates. That’s why Apple gets away with the iTunes store/iPod lock-in. If it is bad, this will damage Vista and Microsoft.

Update

Interesting thread here on audio processing in Vista. Here’s what Amir Majidimehr, digital media VP at Microsoft, has to say about DRM in Vista audio (and referring specifically to Gutmann’s piece):

The writer unfortunately, is misinformed about the Vista content protection capabilities. Yes, it is true that Vista has a substantially upgraded *infrastructure* for content protection. However, its usage is optional and no application is forced to use it. To wit, current HD DVD/BD players do not use any of it and as such, are only subject to provisions of copy protection for those formats (namely, AACS). Ditto for any third-party application that you may run on Vista. As long as they don’t call the new facilities, they run as they did always.

So for all practial purposes, Vista and XP behave the same wrt to playback of digital media.

Vista does allow new applications to provide a new level of robustness against attacks should they wish to provide this level of content protection. That may enable them to get access to content that would not be available otherwise (think HD downloads near Theater release window). As this feature required core operating system changes, we incorporated them into Vista. As with all new facilities, it may be years before they are taken advantage of.

That’s reassuring with respect to my third question above.

Farewell to consistent UI on Windows

Dare Obesanjo says 2006 is the year Microsoft gave up on consistent UI. It’s a follow-up to a post by Mike Torres in which he identifies inconsistencies in various new apps from Microsoft this year. One thing they all have in common is that traditional menus are deprecated, either hidden by default (IE7, Windows Media Player 11) or not available at all (Office 2007).

The reason this is happening is the influence of the Web. The Web gives designers a lot of freedom over how applications are designed, especially in conjunction with Flash. The Web also forces app developers to find some alternative to the traditional menu bar, since it has a page model rather than a window model. Standard desktop apps with File and Edit menus now look dated.

Microsoft has embraced the new designer religion, with the innovative Office 2007 UI, the Expression range of designer-oriented tools, and the Windows Presentation Foundation which gives far more freedom to UI designers.

Nevertheless, Microsoft has slipped up here. The differences that Torres identifies are bewildering to users. I predict that the company will settle on some specific approach (probably the Office ribbon) and try to enforce it throughout. Visual Studio with a ribbon UI?

It means developers have a tricky choice to make with new applications. Broadly:

  1. Stick with tried and tested menus and toolbars until things settle down.
  2. Adopt the ribbon, facing the sign-or-don’t-sign dilemma.
  3. Do your own thing, after all everyone else does.

For an in-house app I’d suggest (1). Menus and toolbars work pretty well, everyone knows how to use them, and most important, it is a lot less work. Further, when non-designers try to take a design-centric approach, the results are invariably ugly.

Technorati tags: , , ,

Why does Vista think my documents are music?

One especially memorable Microsoft bug was in Word 97. You would be typing away, and then Clippy popped up with a balloon saying “It looks like you’re writing a letter.” Invariably you were not. The phrase is referenced over 9,000 times on the Internet according to Google, proving that this blunder has indeed passed into tech folklore.

I guess some team put considerable effort into Clippy and thought it was making life easier for non-technical users.

I was reminded of this when I noticed Vista had decided that my Documents folder contained music. I’ve fixed this folder now, but I found another one to illustrate this blog. I promise I did not configure this manually; Vista did it all on its own:

As you can see, Vista’s Explorer is presenting a folder which happens to contain some Java code as if it were a music folder. There are options to play the files, or burn them to a CD, though I don’t suggest you try. It is actually fairly annoying. When I first hit this problem, I wanted to see the file sizes and dates. I realized it was a View problem, so I hit the View dropdown. I set it to Details, no joy. I tried Organize – Folder and Search options. Lots of options, none any use. The solution is to right-click one of the files and choose Customize this folder. Then you get a dropdown where you can set the folder type. All Items works fine for me.

Just an annoyance, no big deal. It’s disappointing though. Two obvious questions:

  • Why is Vista automatically setting folders as Music when they don’t contain any playable files?
  • Why doesn’t the View menu help me to view the files differently?

It reminds me of Clippy because it is another example of software trying to be over-helpful, and ending up obstructing rather than improving the user experience.

In closing, let me say that I prefer Vista to XP for all sorts of reasons, and software compatibility is proving less of a problem than I’d expected. And good user interface design is very, very difficult. So take this in that context.

Technorati tags: , ,

Bugs in IE7 RSS platform?

I welcome the introduction of the RSS platform in IE7; I think a central repository for RSS feeds is a great idea, even though Outlook’s RSS integration strikes me as totally broken

But is it reliable? I was using it to browse Jensen Harris’s excellent blog and noticed that the entries were from somebody else. A look at the feed properties reveals all:

It appears that the RSS store had somehow zapped the blog, but kept its title attached to a different feed, Bruce Schneier’s security blog as it happens.

I don’t think I have much hope of discovering why this bug occurred, unless someone from the team would care to comment, but it does cast doubt on the RSS store’s reliablity. Or could it be a problem with my blogreader app? The only time this writes to the store is when it marks a feeditem as read, which it does by setting the IsRead property on a FeedItem reference. Strange.

Technorati tags: ,

XNA, XBox 360 and the decline of computer science

I promised some more comment on the conference on XNA game development last week. It was a fascinating event, not so much because of sparkling content (though it was good), but because of the underlying themes. This conference was for the academic community, both students and lecturers. The idea was to promote the adoption of XNA on computer science courses. Presenters included members of Microsoft’s XNA team, Nick Burton who is a graphics programmer from Rare, and Peter Molyneux from Lionhead.

XNA is Microsoft’s new framework for games development. It is a .NET wrapper for DirectX, and a replacement for the earlier Managed DirectX libraries. You can create games for both Windows and XBox 360. The initial target is student and hobbyist developers, and the development kit is free except that to deploy to an XBox 360 you have to join the XNA Creator’s Club, for a modest subscription fee. Even then, you cannot distribute your 360 game except as source code to other club members; you would need to find a publisher or get the game on XBox Live Arcade. A future XNA studio product is planned which will target professional developers.

There is an obvious benefit to Microsoft if it can establish XNA in universities. It gets students familiar with the Visual Studio/Windows platform and helps foster the next generation of Windows and XBox 360 game developers. But what’s in it for the universities?

Here the context is important. There is a crisis in computer science, with dramatic falls in the numbers of students applying for courses. I spoke to Rob Miles, lecturer in computer science at the University of Hull. “The number of people applying to courses across the country has dropped by something like 40% over the last few years,” he told me. Including games programming in the syllabus is a bit of sugar to attract new students. “It will help me motivate students to want to learn to program,” said Miles.

Microsoft says XNA will help to address another crisis, this time in the games industry itself. Developing a game has become extraordinarily expensive. The industry has moved towards the Hollywood model of big-budget titles that can make or break their publishers. Gamers on the other hand complain of too many sequels, lack of innovation, and poor gameplay. Microsoft likes to talk up XNA as the future YouTube of games, recovering the community and excitement that was around thirty years ago, in the days of the BBC micro and other home computers.

Here XNA is competing with Flash, which already has a considerable community of game developers. XNA is vastly more powerful than Flash, but for small, easily deployed games Flash has many advantages including cross-platform support and browser integration.

Is XNA just another hobbyist game programming tool, likes others including AMOS and STOS (for the Amiga and Atari ST), or more recently DarkBASIC? There is a range of opinions here. Peter Molyneux enthused to me about XNA, saying it is “a fast, efficient, better language” than earlier more compromised tools, and “built with ambition in mind,” so that XNA programmers can create the next Populous (the game which made Molyneux his fortune).

On the other hand, Molyneux undermined his evangelism by also stating that C++ remains the language of choice for professional development. If this is the case, then XNA will always be a hobbyist niche, which implies that serious students of game programming should not waste too much time on it.

Not everyone takes this line. The Rare team has spent time with XNA and appears genuinely impressed with its capabilities. Nick Burton showed us both the dramatic reduction in code and the impressive performance of XNA code. While Rare is not yet using XNA commercially, it does expect to do so in a few year’s time. This might be some sort of mixed code, using XNA for game logic and C++ for graphics heavy lifting, or might be pure XNA. A factor for Rare and any professional game studio is the extensive C++ code library which it has built up over the years, which makes any quick move to another platform out of the question.

My view is that the productivity win makes XNA or something like it inevitable in games development at every level. Timing is another matter, and C++ will be hard to shift.

Finally, a couple of hot snippets of game gossip. One is that Rare is working on a Live Arcade title. I got the impression that it is fairly well advanced, though nothing is yet formally announced.

The other is that Molyneux talked up innovation in Fable 2. He told me that it has an unique and surprising feature which he had to fight to include, and which will be unveiled in March at the Game Developers Conference in San Francisco.

Microsoft’s XNA site is here. Note that if you want to develop in XNA, you are well-advised to get hold of the wired XBox 360 controller. It is a decent controller and works nicely with XNA both on Windows and 360.

Technorati tags: , , , , , ,

Installing XNA Game Studio Express on Vista

Yesterday I attended a conference on XNA game development. More on that soon; but first a quick note on what happened when, fired with enthusiasm for XNA, I installed the release build of XNA Game Studio Express on Vista.

At least I tried. You have to install Visual C# Express first (since for some reason XNA does not work with the grown-up Visual Studio 2005). That’s OK since it works side-by-side. Visual C# Express went on OK, but setup for XNA Game Studio Express failed towards the end of the install with an error about a file that could not be run. The install then rolls back completely leaving you with nothing.

I ran msiexec with logging to see more detail. Here it is:

Error 1721. There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: RegisterWithCSExpress, location: E:\, command: “C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\VCSExpress.exe” /installvstemplates

It occurred to me that even an install without the templates might be of some use, or perhaps I could manually install the templates. So I ran up Orca (MSI editor), opened the InstallExecuteSequence table, and deleted the RegisterWithCSExpress action (yes, I’ve wrestled with MSI before).

The hacked install ran OK, and to my surprise the templates were present. This might be because of the earlier failed install, or because I also ran:

VCSExpress.exe /installvstemplates

from the command line. This command, which tells VC# Express to refresh its template cache, is the one that fails. On my system it causes VC# Express to crash, which is why it trips up the XNA install, but it appears to install the templates before it crashes so it is kinda OK.

My official advice therefore is not to try and install XNA on Vista, but the above may help if you are determined.

Microsoft knows about problems with Visual Studio on Vista; we are promised a “Vista Support Update” next year. In the meantime it does mostly work if you run it with elevated permissions.

I noticed that the Microsoft folk were running XNA on Vista yesterday.