All posts by onlyconnect

Open Document to Office Open XML converter: not good

The first full release of the Open XML to Open Document Format translator is available for download. Great news for interoperability – or is it?

I like to try things out before writing about them, so here’s what I did. I downloaded the Word 2007 add-in and ran the setup. Then I opened Word, and opened the document I was working on, which happens to be called Using DigiKam.docx. This is just under 800 words long and contains no graphics. I went to Home – Save As, and looked for Open Document in the list of document types. No deal. Puzzled, I looked again at the Home menu in Word 2007. Ah, there it is. A separate top-level entry for ODF with Open and Save As menu items. Not ideal in terms of integration, but never mind.

Note: there is an important issue here. Imagine you are an organization that has decided to mandate ODF for your documents, but to continue using Microsoft Office. What you want to do is to fiddle with Group Policy and have Word default to opening and saving ODT (Open Document Text). As far as I can tell, this is not possible with this version 1.0 release. In fact it is worse than that. If you have a new document, and choose ODF – Save As, you get the following error:

Please save your document before exporting to ODF. So instead of just clicking Save, users have to save twice, first as .docx, next as ODT. Ugly. It gets worse, read on.

OK, so I decided to save my current document as ODF. A wait message appeared: it took the converter about 30 seconds to save the document. I don’t like to think what would happen to a 10,000 word report full of charts and tables.

Next, I closed the document, went to ODF – Open, and chose the document I just saved. Another 30 seconds later I get this message about lost elements:

If I go into details, it tells me that the header dimensions and document creation and modification dates might have been lost. Fair enough, nothing drastic – unless perhaps I am laying out a booklet for publication. Of course you would be mad to use a document converter like this in such circumstances – but let’s not forget the implications of potential inflexible government legislation that might mandate such a thing.

I notice a curious thing. My opened document has been renamed to Using DigiKam_tmp.docx. Let me get my head round this. Let’s say I want always to save in ODF. I have to save as .docx, then export to ODF. Then I open the ODF document, which now has _tmp appended. I make some changes, and want to export it as ODF. I get, you guessed it, the “Please save before exporting” message. So I click save, and get a view of all my temporary documents, because the converter puts the imported document in my temp folder. If I try to save it directly, I get a “this file is read-only” error. So I save it to My Documents, then I go to ODF – Save As. Next session, I go to ODF – Open and guess what. My file is now called Using DigiKam_tmp_tmp.docx.

So the message is: don’t even think about using this converter as a means of standardising on Open Document while still using Word. It will cause immense and unnecessary hassle. However, it could still be useful for importing and exporting documents interchanged with others using, say, Open Office.

Not the same

That said, I noticed something else about my round-tripped document. It was different. In Word, I have my Normal style set with no space before or after. After round-tripping, these paragraphs had 10pt space after applied.

It gets worse. The converter lost all my paragraph styles – not the formatting, but the style tagging. This is a deal-breaker for me, as I depend on paragraph styles; but I am probably in a minority. Still, it prompted me to look at the list of unsupported features. Casting my eye down the page I came across this item:

In Open XML in real spacing between two consecutive paragraphs is the biger [stet]. For example first paragraph style has spacing after 10pt and second has spacing before 20pt the real spacing is 20pt. In Open Document Format real spacing is sum. In our example the real spacing is 30pt.

Is that my spacing problem? It could be related; but this is not what I would call a model of clarity. Let’s just say that the ODF converter will mess up your paragraph spacing.

Question: why was I warned that I might lose “header dimensions”, but these more significant issues – no paragraph styles, messed up spacing – went unmentioned?

Not professional quality

I realise that despite the flaws this converter could be a life-saver if you get a document that would otherwise be unreadable, or if you are forced by regulation to send a document in ODF format. However it does not merit Microsoft’s effusive press release, nor Brian Jones enthusiatic blog entry. It falls far short of the standards set by Microsoft Office. Perhaps I am judging too swiftly; but you will understand my scepticism considering the design flaws noted above, the extreme performance problems, and the fact that it somewhat messed up my short document without any graphics.

Practical considerations

In closing, some practical notes. If you really want to work with Open Document, don’t use Microsoft Office. If you want to use Microsoft Office, don’t use the converter except in an emergency, not in this release at least. For Word documents, RTF is the least bad option and macro-free; or failing that, the Office binary formats are actually well understood by third-party applications.

What if you use an application that supports Open Document and want to distribute richly formatted documents to others? Well, in the real world Microsoft Office is everywhere, so the same applies: RTF or Microsoft Office binary formats will help the recipients to get their work done.

Update: I spoke to Microsoft’s Jean Paoli about a number of Office Open XML issues – see here for the interview. He acknowledged there are some issues but said that performance is usually better than I found it to be. I’m sceptical but will try to do some more testing.

Technorati tags: , , , , , , ,

CD loudness: the pro perspective

I noticed this comment on my piece on CD mastering, from the webmaster at APRS (Association of Professional Recording Services):

By making CDs Extremely Limited we are not only destroying natural dynamics, we are also reducing the clarity and making CDs which are far more difficult and tiring to listen to…I’ve lost arguments and jobs over this a number of times. You master something and make it sound as good as possible, just the way the client and musicians agree they want it to sound; you transfer it at the maximum level possible without destroying it, then they take it home and complain that it’s “just not loud enough”…

I have sympathy for professionals who are in an impossible position. They have to make CDs that sound worse than they should, sometimes much worse, or risk losing their jobs.

It’s a bad situation, but there is hope. Publicising the issue must help the pros win more arguments. Technology may solve this too. ReplayGain and Apple’s Sound Check are both techniques for matching the replay volume of music automatically, removing any supposed advantage from “loud” mastering. Broadcasters already use compression and limiting on their output. There is no need to compromise the source. 

Technorati tags: ,

Miguel de Icaza on ODF vs OOXML

Novell’s Miguel de Icaza has an important and unusual perspective on Microsoft technology. Unlike many open source advocates, he is deeply familiar with the Microsoft platform because of his work on Mono, the open source implementation of the .NET Framework. I therefore read with interest his comments on the war against Microsoft Open Office XML now being waged by the sponsors of the rival Open Document Format. 

As de Icaza observes, it is “hard to articulate” the difference between OOXML and ODF. They are XML schemas, inpenetrable to non-technical folk. Both appear to do the same thing, yet in detail they have little in common. Here’s a key comment:

The high-level comparisons so far have focused on tiny details (encoding, model used for the XML). There is nothing fundamentally better or worse in those standards like there is between XML Schema and Relax NG. ODF grew out of OpenOffice.org and is influenced by its internal design. OOXML grew out of Microsoft Office and it is influenced by its internal design. No real surprises there.

I agree. But isn’t the OOXML specification too bulky and verbose, as its opposition claims?

If Microsoft had produced 760 pages (the size of ODF) as the documentation for the “.doc”, “.xls” and “.ppt” that lacked for example the formula specification, wouldn’t people justly complain that the specification was incomplete and was useless?

Quite possibly. And I am unimpressed by the efforts of Rob Weir and others at IBM in taking pot shots at flaws in OOXML rather than being constructive in helping Microsoft transition from proprietary binary document formats to XML formats with a standardised specification.

That said, OOXML and ODF do have different aims, something which Weir does not recognize. He writes in his response to de Icaza:

OOXML, on the other hand, matches to an inane degree the internals of a single vendor’s legacy application, with no concessions to platform-neutrality.

The point Weir misses is that (as I understand it) the rationale behind OOXML is to be able to represent all the world’s immense archive of Microsoft Office documents in an XML format with a published specification and without loss of information. In that sense, its goals are less lofty than those of ODF, which wants to be the one true office document specification for the world.

That means OOXML has a huge legacy burden to carry. It also implies that much of the cruft in OOXML is not there to be used by new applications, but rather to document what has to be done to support old stuff in Office.

My background is in software development, and I’ve explored the intricacies of RTF (Rich Text Format), the non-XML specification for Word documents and pretty much what you had to use prior to OOXML. I found the documentation inadequate, too closely tied to versions of Word, and difficult to work with. OOXML is delightful in comparison. The ability to generate and consume Office documents in XML substantially benefits developer productivity.

Another benefit is in working with Office documents on the server. Ugly solutions like automating Office applications on a server in order to create or process documents are no longer necessary.

I therefore disagree that OOXML has no value.

A single Office XML format for the world would have been nice. If the ODF folk had got Microsoft on board in the early days of the specification that might have been possible, though the scenario was politically implausible. What we have instead is two formats; but at least they are both XML and therefore amenable to programmatic manipulation and conversion. I think that’s progress, though it falls short of the ideal. Furthermore, it likely would not have happened without the existence of Open Office and ODF. They have won the argument for open document formats; no need to spoil it by obstructing the standardisation process for which they fought.

 

Technorati tags: , , , ,

Bloor on the failure of antivirus products

Robin Bloor has another pop at the antivirus industry in this Businessweek comment.

I agree with him. The failure of PC security is easy to prove. Most users have it, yet infections remain common. I am not saying that AV software is completely useless. No doubt it prevents some infections. However I am not convinced that it is worth its cost, which is threefold. First, there is the cost of the subscription. Second, there is the performance impact. Third, it’s not unusual for AV software to interfere with the normal running of your system, through false positives, conflicts, or disabling useful features. At worst, bugs in AV software have been known to make a computer less secure than it would be without it.

A further concern is that users may think they are fully protected by some supposed “security suite”, and therefore make bad decisions about what they download and execute from the web or from emails.

I am not suggesting that everyone removes their AV software. I do suggest that it is considered a last resort. If the malware gets so far that only the AV software catches it, something else is probably wrong.

 

Technorati tags: ,

Free WPF datagrid control from Xceed

A notable omission from the controls available in the first release of Windows Presentation Foundation is a datagrid. Component vendor XCeed has stepped up with a free WPF datagrid. Registration is required, but Xceed says:

The free license is a perpetual license and includes royalty-free distribution, bugfixes, and new features, so your company can use it with full confidence.

Paying customers get support along with an option for source code.

I’ve not tried the control yet, but if you are experimenting with WPF, it strikes me as worth a look.

Technorati tags: , ,

Intel: don’t bother us with bug reports

Intel’s production graphics driver for the 945GM chipset on Windows Vista has some bugs. I thought I should report this to Intel. Trouble is, you can’t. At least, the “Contact support” options here don’t tell you how, not unless you are signed up as an Intel reseller or partner. Nor does the general contact information page give any clues. Intel would like my pre-sales questions, or my website feedback, or any number of non-technical enquiries, but bugs? Forget it.

Can it really be that Intel gives you no way to report a bug? I dialed the support number. Note: I am now paying for this call. I explained to the support person that I wanted to report a bug in the Vista driver for the 945GM chipset. He said he was sorry, but the support line was only for Intel boxed product. Even though I had downloaded the driver from Intel’s site, my bug report should go to Toshiba.

Clearly I could report it to Toshiba – perhaps I will – but will the feedback ever thread its way back to Intel? Who knows.

By the way, I get the same bug with the slightly older driver on offer on Toshiba’s site for this laptop. Further, the same hardware is stable in Windows XP, which suggests that the problem lies with Intel’s driver, or conceivably in Vista, rather than than in the hardware.

Bottom line: there is no way for an end user to report a bug to Intel. I think that’s silly.

Update

Toshiba won’t accept the bug report either. Reason: the driver was downloaded from Intel’s site. Nor will they accept the bug report on the older driver downloaded from Toshiba. Reason: it is a US site and my machine is UK. Maybe if I would care to wait until I can download the same driver from the UK site, it might take some interest. Frustrating.

Further update

Ah, there is a way (sort-of). You go to this page, and complete the form. The only link I can find to the form is via the form for website feedback. So you complete the form, and the bot emails you a bunch of links to articles. At the bottom of the email is an “escalate” button which claims to “escalate your question to a technical support representative.” I’ll keep you posted…

 

Technorati tags: , ,

Vista display driver takes a break

I’m seeing an annoying error on my Portege M400 running Vista. The thing is almost clear of beta drivers now, after numerous downloads from Toshiba, including the display driver. The graphics chipset is a Mobile Intel 945GM, and I have a production release driver dated 13th December 2006, version 7.14.10.1151, though I saw the same problem with earlier releases.

Specifically, from time to time the display blanks out and an error 4101 is logged. Sometimes I get this supposedly reassuring toast pop-up:

The warning message is:

Display driver igfx stopped responding and has successfully recovered

The error is worse than it sounds. The screen blanking is irritating, and sometimes causes the current application to crash (I’ve seen this with games). I’ve also seen it when working with multiple displays. Fortunately it only seems to occur with the display is being stressed in some way – I can work all day in Word and Excel, and not see the problem.

I’ve tried turning off Aero and it makes no difference.

A bug in Intel’s driver I suppose (I never get this on my Vista desktop), though it is not exclusive to Intel; this user reports the same problem with a GeForce 7900.

This is the kind of thing that spoils Vista right now. I think this OS will work much better six months from now.

Technorati tags: , ,

Delphi and Windows Installer: small problem, fiddly solution

A Windows technology I love to hate is the Windows Installer, the setup engine built into Windows that is hard to avoid if you want to comply with Microsoft logo requirements and system management tools.

I have a little application which uses this, which uses a custom action written in Delphi. Originally this was an executable with some command-line arguments, which worked fine except that occasionally the custom action needs to show a dialog. Sometimes (not always) this would show up behind the main setup window, causing users to think that setup had hung.

Incidentally, I saw this exact problem when installing Delphi itself on Windows Vista.

It is all to do with a long-standing and complex Windows issue concerning whether applications can force a window to be on top of other windows. In a nutshell, a well-behaved application should not normally do this, though it can make itself flash in the taskbar. Not a great user experience. However, you can ensure that a window is on top within a specific application (in this case the setup), provided you know the handle of that application’s main window. Unfortunately there is no obvious way to get this value, other than via an API called FindWindow which might occasionally find the wrong window, for example if the user managed to open two instances of the setup.

The correct solution for this is not to use an EXE as a custom actions, but rather to use a DLL. This runs in-process with the setup, which enables it to call MSI (Microsoft Installer) functions like MsiProcessMessage, enabling it to show dialogs safely. You can also do useful things like writing entries to the installer log. (Thanks to Mike on the Microsoft.public.windows.msi newsgroup for this tip).

Therefore I converted the custom action to a DLL. Not too difficult; but I discovered that the Windows Installer is not especially flexible about calling custom actions in DLLs. The only argument it can (and must) give is a handle to itself. That’s unlikely to be enough. So how do you pass data to your custom action?

If you use an MSI editor such as that in Visual Studio, you will see a property called CustomActionData which you can set when calling a custom action. All this does is to set a property within the installer. Your custom action can then call MsiGetProperty to retrieve the value. It is a single string; if you want to pass several values, you need to use some sort of delimiter and parse it within your custom action code.

Although many Windows API functions have Delphi wrappers built into Delphi’s runtime library, the Installer functions are not among them. I hate reinventing the wheel, so I searched for a Delphi wrapper for msi.dll. It’s not easy to find, suggesting that few developers have gone down this route, though it is part of some versions of the Project JEDI JCL (JEDI component library). In the end it was easier to find the header files in the SDK and do my own wrapper for the few functions I needed.

Delphi is a great tool, but at times like this you realise that there is a price to pay for not falling in with the crowd and using Visual C++. All the low-level Windows API documentation assumes that you are at least using C++.

The good news: it all works fine. Dialogs appear reliably above the setup window, and access to the MSI API may prove useful for other things as well.

That said, it all goes to demonstrate why developers sometimes take ages to fix seemingly simple problems.

 

Technorati tags: , , ,

Sun’s J2EE certification may be too slack

In a series of blog posts here and here, Compuware’s Andrei Iltchenko writes about incompatibilities between different vendor implementations of J2EE. He works on the OptimalJ MDA (Model Driven Architecture)  product which generates Java code from language-independent application models. He found unexpected inconsistencies between Sun-certified J2EE application servers, for example:

When we started testing our code generation modules for J2EE web services on one vendor’s application server, we were in for a big surprise. The application server had a non-XML Schema aware web services stack, which effectively meant no proper support for WS-I Basic Profile. Why wasn’t such a major omission caught by SUN’s compatibility test suite for J2EE 1.4?

I was also surprised by his comments since in general Java’s cross-platform, cross-vendor compatibility strikes me as much better than it was in the early days. No doubt Iltchenko stresses this more than most developers, but note his conclusion:

With the differences in implementing the same J2EE 1.4 features I described, one should probably start questioning how feasible it would be to maintain a J2EE 1.4 application that needs to run on more than one application server and not be rigged toward a given vendor.

Technorati tags: , , ,

Tube trains show off Windows Presentation Foundation

If you have any interest in .NET Framework 3.0 I recommend this keynote presentation, from Microsoft’s UK developer launch for Vista and Office last weekend. It was given by Sanjay Parthasarathy, Vice president of the Developer and Platform Evangelism Group at Microsoft Corp. He reiterates the themes Microsoft watchers will have heard before: unifying designer and developer, SOA (Service Oriented Architecture), Office as a platform, Enterprise mashups and so on. I’d advise skipping forward to about 38.30 and viewing the presentation given by a couple of developers from the London Underground on their WPF (Windows Presentation Foundation) application for managing the network.

The London Underground is a busy network, clocking up 971 million passenger journeys last year. The WPF app is a real-time visual presentation of its status, based on the familiar tube map. There are “teardrop” indicators which show where there is congestion, technical problems, crime or other incidents. You can click an indicator to open a detailed panel, and dock the panel to get live update. All the data is driven by web services. Everything zooms and drags; you can show or hide specific lines and indicators; and finally there is an amazing 3D view which seems to model the entire system so you can access a report on any part of it with a click. Of course there is an option to see little trains chugging round and stopping at lights; how could this fail to enthuse developers?

The claim is that WPF/XAML combined with SOA makes creating this kind of application much easier than in the past (the whole thing is an XBAP – browser-hosted WPF).

I certainly found the demonstration thought-provoking. This particular case study is a great fit for a highly visual presentation, but to what extent does this also apply to the mainstream business applications that occupy so much developer time? What about the danger of prettification – highly visual apps that are slower and harder to use than the simple GUIs they replace? That app you are working on right now – would it benefit from a WPF redesign?

If you have any insights or comments on the above, I’d love to hear them.