All posts by onlyconnect

How to debug into .NET Framework source code

Shawn Burke has posted the steps needed to step through the .NET Framework source when debugging your application.

Good news for a couple of reasons. The first is the most obvious: if you are getting surprising or perplexing behaviour, you now have a better chance of working out why.

Second, and perhaps more important, this makes it easier to submit bug reports or feature requests to Microsoft along the lines of “why does your code do this when it could or should do that“?

All going well, this should improve quality. For example, the .NET Framework library code is huge, and I’ve heard it muttered that there is considerable duplication within it. Separate teams working on different parts of the library may solve the same problem with different code, causing bloat and possibly inconsistency. Opening up the library to public scrutiny makes it more likely that issues like this will get fixed.

Daniel Moth has a screencast.

My Mac day: Jobs of the print variety

While Steve Jobs was extolling the merits of thin laptops (I prefer small to thin, but tastes differ), I was in the depths of /var/log fixing a print issue with a friend’s Mac Mini and her LexMark printer.

It was almost the same issue as described here by Ted Landau, though I got there a bit quicker thanks in part to his post. Symptom: you hit print, but get a printer stopped message. You can restart the print job but it immediately stops again.

It wasn’t obvious what was wrong, especially as the printer passed all its self-tests including printing its test page. There were no clues in the OS X GUI. The USB cable was OK.

I was helped by familiarity with other Unix-like operating systems. The first thing to look for is an error log, and in this case there was one sensibly located at /var/log/cups. It told me that a cartridge change had been detected and the new cartridge was not yet aligned, a condition that the driver treated as a fatal error. At this point the user confessed that the black cartridge was new, and that the printer had not worked since. However, she had run the alignment utility, several times in fact. Getting warm.

In Landau’s case, there was old ink in the cartridge bay preventing a good connection. In my case, the cartridge itself was faulty; a replacement worked fine. The deceptive aspect is that the cartridge had ink and could print; it just could not register its alignment for some reason.

Landau has a little rant about this:

Neither Lexmark’s nor Apple’s software were able to get the relevant error message to pop up anywhere where a user would be likely to see it. Having no message at all in the Printer Queue and having the key message buried in a cups log file is not the ideal situation.

His underlying point is correct. The cuddly GUI hides huge complexity. Windows is the same of course.

The point I will make is that both operating systems do a poor job of surfacing error logs. In Windows most logs are accessible through the Event Viewer GUI, but only advanced users find this. When a hard drive fails, you sometimes find that the event log (presuming you recover it sufficiently to read it) has been reporting bad blocks for ages, but the user was unaware.

In this case I suspect the real issue is Lexmark’s poor driver, which could have reported this problem in a sane manner.

How did we fix computers pre-Google?

Technorati tags: , , , ,

Burton Group slams ODF, praises OOXML

Fighting talk from Burton Group on ODF vs OOXML:

ODF is insufficient for complex real-world enterprise requirements, and it is indirectly controlled by Sun Microsystems, despite also being an ISO standard. It’s possible that IBM, Novell, and other vendors may be able to put ODF on a more customer-oriented trajectory in the future and more completely integrate it with the W3C content model, but for now ODF should be seen as more of an anti-Microsoft political statement than an objective technology selection.

You can download the free report here, though I found I had to exaggerate my annual revenue to get past the compulsory fields on the registration form.

Wonder what Becta thinks about this?

Technorati tags: , , ,

Does Google rot your brain?

According to Prof Brabazon (via Danny Sullivan) it does:

She said: “I want students to sit down and read. It’s not the same when you read it online. I want them to experience the pages and the print as much as the digitisation and the pixels. Both are fine but I want them to have both, not one or the other, not a cheap solution.”

She will be giving a lecture on the issue, called Google Is White Bread For The Mind, at the Sallis Benney Theatre in Grand Parade, Brighton, on Wednesday at 6.30pm.

I’d like to hear more detail of her argument before passing judgment. I’ll observe though that there seem to be a couple of things confused here. One is about print versus online, as in the quotation above. The other is about how to research online:

Too many students don’t use their own brains enough. We need to bring back the important values of research and analysis.

She said thousands of students across the country, including those at the universities of Brighton and Sussex, were churning out banal and mediocre work by using what search engines provided them.

Here, I agree. It is easy to get mediocre or simply wrong answers from a quick Google search. It’s especially dangerous because of the internet’s echo effect. Misinformation can spread rapidly when it is something people want to believe. This then looks superficially like corroboration. For example, a poorly-researched paper on DRM in Vista was widely treated as authoritative because the story, that Microsoft broke Vista for the sake of DRM, was so compelling. See here for more on this. I am not making a point about DRM in Vista here. I am making the point that arriving at the truth takes a great deal more work than simply reading the first article you find, even if it is widely quoted.

This implies a need to educating students in how to do research, rather than banning online sources. I agree though that a trip to the library is also important. Not everything is in Google’s index, yet.

Great anecdote in the Economist about the decline of the CD

The Economist has a report on change in the music industry, which kicks off with this anecdote:

IN 2006 EMI, the world’s fourth-biggest recorded-music company, invited some teenagers into its headquarters in London to talk to its top managers about their listening habits. At the end of the session the EMI bosses thanked them for their comments and told them to help themselves to a big pile of CDs sitting on a table. But none of the teens took any of the CDs, even though they were free. “That was the moment we realised the game was completely up,” says a person who was there.

Becta’s report on Vista and Office 2007: wise advice, or mere polemic?

I read Becta’s report on Vista and Office. Becta is a UK government agency supporting IT in education. The report is a ponderous affair and tells us that XP still works, so why bother with Vista; and that Office 2007 saves by default in a tiresome new format that few other applications can open; and that free office suites like Open Office work well so why pay for something else?

All this is fair enough; but I’m surprised that Becta didn’t spot a couple of other things. One is that Office 2007 can easily be set to save by default in the old Office binary formats that pretty much everything can read. The other is that while ODF is indeed an ISO standard, it is also pretty awkward from a compatibility point of view.* So I’m surprised by this recommendation:

When specifying new systems, schools and colleges should normally insist on the desktop having access to office productivity software that is capable of opening, editing and saving documents in the international standard ODF, and setting it as the default file format.

I suppose the idea is that if kids come home with their homework on a USB key and find that their documents will not open on the home PC running Microsoft Office, that they just download and install Open Office. Fair enough I suppose; but why not just use .doc and .xls?

The report adds:

Becta did not conduct technical assessments of the merits of either the existing international document standard (ODF) or the proposed second international document standard (OOXML).

There is however a lengthy discussion of the inadequacies of the half-baked ODF converter add-in which Microsoft has sponsored. I agree; but I’m not sure why it merits so much space.

I would have found it interesting to see a bit more examination of the merits or otherwise of the ribbon UI in Office 2007; better, worse, or indifferent for education? What about overall usability and functionality versus Open Office? It would also have been good if Becta had considered the large market share Microsoft Office enjoys, especially in business. Like it or not, it is relevant to this discussion.

I didn’t see much attention given to security, which is perhaps the biggest single reason for adopting Vista versus XP (it could also be a reason not to use Windows at all). This is not only a matter of Vista being more secure, if it is, but also that it aims to fix the insecurity of Windows long-term by fostering well-behaved applications that will enable future versions of Windows to be more tightly locked-down. Not interesting in education? I’m surprised, since when I talk to IT people in education, security is one of their chief concerns.

I find myself wondering whether this is really a document aiming to offer wise and objective guidance to schools, or a more polemical report promoting ODF and open source in education.

I reckon there is a good case for promoting open source in education. However, considered as a report on Vista and Office 2007 this is a poor effort.

*PS: It is interesting to see what Asus has done with its Eee PC, which  actually gets an oblique mention in Becta’s report:

We have also noted the emergence of low-cost innovative ‘mini-notebooks’ that have been brought to the market running a version of Linux and a range of Linux-based applications including OpenOffice.org.

On my review Eee, which was supplied by RM for the education market, Open Office is set to save in the Microsoft formats by default. I imagine that Asus wanted to make the Eee fit seamlessly into a Microsoft environment if necessary. It must have been a conscious decision, since an untweaked Open Office install uses the Open Document formats by default.

Technorati tags: , , , , ,

Trying out SqueezeCenter and Jive (updated)

I took a look at Logitech’s Jive, a platform for smart remotes that link with its SqueezeBox players and SqueezeCenter (formally SlimServer) music server. Incidentally, it looks like all the names are getting the Squeeze treatment; even Jive is to become SqueezeOS. Personally I prefer Jive, but there it is.

So what is Jive? Let’s start by saying that it is the firmware for Logitech’s new remote, the SqueezeBox Controller, which is “coming soon” for $299.00. A hefty price; but Logitech is betting that users will love the new gadget. It is a world away from an infra-red remote that just sends commands to a SqueezeBox. This is a handheld computer which connects by wi-fi (no need for line of sight). You can browse through album art, tune into Internet radio, even run applets which might be games (Space Invaders anyone?), enhancements such as lyric display, or other utilities.

Long-term Jive is intended to have its own audio capability. In other words, you could plug headphones or speakers directly into the controller. Apparently the initial release of the controller will have an audio-out socket, but it will not be active.

It’s not much of a stretch to consider this as a (potential) portable MP3 player that could access your music from anywhere in the world, provided you have a fast wi-fi connection. All the main pieces are in place.

Although Jive can be called firmware, it is somewhat decoupled from the hardware. You can run it on a PC or Mac, and Logitech is thinking about implementations for other devices such as Apple’s iPhone. That will be an interesting test of Apple’s resolve in opening up its hardware to third-party applications.

Trying out Jive

I don’t actually have a Jive-capable remote, but got it un and running on a PC. It is all bleeding-edge stuff right now. Jive requires SqueezeCenter, also known as SlimServer 7.0, which is still pre-release. Furthermore, you cannot yet download Jive binaries, you have to check out the source and build it yourself. It is open source, as in “you can download the code”, but the license is more restrictive than with SlimServer, a fact that has prompted considerable debate. Jive makes heavy use of other open source libraries, including Lua, an embeddable scripting language.

I opened the provided solution in Visual C++ 2008 and it built first time, so no complaints there. See here for a guide.

The new SqueezeCenter looks smarter than its predecessor, and Jive looks good too. The user interface in the current build is clean and uncluttered. I used the arrow keys to navigate the menus. You can play audio stored in your SqueezeCenter library, or from the Internet. SqueezeCenter optionally hooks into an iTunes library, and everything is fine provided you don’t have any DRM-encumbered purchases from the iTunes store.

Jive is great if you want to control your Squeeze clients from an expensive remote, but it has competition from another strong feature of SlimServer SqueezeCenter, which is that you can use it from any old device with a web browser – like an Asus Eee PC, for example, or a SmartPhone. Finding the music you want is a lot quicker with a full keyboard, than with a remote. There’s no inherent reason Jive can’t support a keyboard as well, though you need a controller with a (soft or hard) keyboard. But note this little menu in SqueezeCenter:

This lets you use an alternate skin for SqueezeCenter, including some that are suitable for small devices.

I’m not alone in liking the keyboard input offered by the browser UI, but Jive fans in the Squeeze community point out several benefits to the new controller:

  • You pick it up and it just works
  • More responsive
  • Does not require SqueezeCenter to be running (for Internet radio etc)
  • Less geeky
  • Can be used one-handed

I suspect the Jive-based controllers will be popular, even if a few of us still prefer the browser.

There is still space for alternative rich clients for SqueezeCenter. The communication protocols are all public and as far as I know anyone is free to use them.

Editorial note: I’ve revised this article extensively since the first draft

Postscript: On the subject of alternative rich clients, I’ve just discovered Moose, which looks promising. Especially in conjunction with squeezeslave, which makes in effect a player as well as a controller. Snags: Windows only, and search is a bit clunky.

8GB Asus Eee PC from April 2008, Windows or Linux

RM has announced an upgraded version of its popular miniBook, also known as the Asus Eee PC. The details:

  • 1GB RAM (up from 512MB in the current version)
  • 8GB solid state drive (up from 4GB)
  • Same 7″ screen, webcam and built-in mic, speakers
  • Prices “in the region of” £229 + VAT for Linux, £259 + VAT for Windows XP Home
  • Available from April 2008

I would assume that the same machine will also be available from other vendors, with small price variations.

The Eee is already a great machine and having more space is nice, though it’s a shame that the biggest weakness of the Eee is not yet being addressed: the limited 480 pixels vertical resolution of the screen. This makes some applications and web sites hard to use, since few are designed for this size of screen. In some cases dialogs appear with no buttons; in other cases there is little working area left because of the space taken up by toolbars or header and footer panels.

Why Windows? RM says:

The introduction of the Windows based miniBook means that schools that already have curriculum software which is Windows based can add this to the miniBook. Also, schools with Microsoft Volume License agreements have a route to upgrade to XP Pro and enable network connection using Windows.

I can see that there is demand for this. On the other hand, Windows needs some tweaking in order to work at its best on the Eee. One of the issues is that frequent writes to the solid state drive are reckoned to reduce its life, so it makes sense to configure Windows without a swap file as well as cutting out unnecessary components.

Will the Windows Eee, which costs £30.00 more (plus VAT), come with an equally generous suite of bundled open-source applications, such as Open Office, as found on the Linux version? It will be interesting to see, though I doubt it.

It will be fascinating to see how take-up of the Linux and Windows versions compares, both in the education market, and more widely. I’d suggest that Linux is better suited to the device, but Windows has familiarity, compatibility, and arguably ease of use advantages. It will be a shame if Windows ends up dominating on the Eee, as it has given a boost to the visibility and adoption of Linux on the desktop.

Finding obscure commands in Office 2007

I was intrigued to see an article on CNET called Word 2007 loses the ability to export outlines to Powerpoint. It says:

There’s a great little feature in Microsoft Word 2003 and earlier versions of the word-processing program that lets you export to Powerpoint an outline of any Word file formatted with headings … I was all set to tell you how to use the feature in Word 2007 when I realized it has been removed.

I wondered if perhaps the feature was still there, but the author missed it, so I used my usual technique for finding obscure commands in Office 2007. Go to Customize Quick Access Toolbar, then choose More Commands, then All Commands. Hey, there it is:

This is a great place to look if you cannot find a feature you used in earlier versions of Office.

SharePoint’s secret sauce

Just before Christmas I spoke to Daz Wilkin, Microsoft Developer Platform Evangelist, about Office development and Sharepoint. I’ve wanted to catch up on Sharepoint for some time, since it is achieving significant usage. Here’s a recent study which claims that:

the number of SharePoint applications in place today will quadruple over the next 12 months

Wilkin says that:

SharePoint is approaching becoming a billion dollar business for Microsoft. It’s vastly exceeded all of our estimates.

I suspect that journalists, myself included, have given Sharepoint insufficient attention. One reason is that it is a slippery product to describe and seems to straddle several categories, such as portal server, smart file store, and workflow platform. “I don’t think Microsoft has done a bang-up job in being able to articulate it. It is many things to many people,” says Wilkin.

Another problem is the confusion over SharePoint Portal Server (paid for) and SharePoint Services (free add-on for Windows server). You can find a point-by-point comparison here. The free SharePoint Services, on which Portal Server is built, are surprisingly rich. Once you have them installed, which can be a little painful, you get instant wikis and blogs, shared documents with versioning, permissions, and the ability to open and save directly from Office applications, shared calendars and tasks, and online forums. Here’s the settings panel for a shared document store:

Site options including content approval,versioning,permissions and check out 

It’s a shame that document versioning is off by default, but there is plenty of value in these features. Note we are mainly talking intranet rather than internet, though hosting SharePoint is a growing industry and it is also core to Microsoft’s own hosted service efforts.

Why is installation painful? Well, you need Windows Server, and if you want to use ASP.NET for something other than SharePoint on the same box, it needs a bit of tweaking. For example, if you run Exchange and install SharePoint Services, it breaks Outlook Web Access. On my server I got round this by adding a second host name in local DNS, pointing to the same machine, and using this for the SharePoint site using IIS host headers. Real-world businesses either install SharePoint on a separate server, or have Small Business Server which builds it in, so this is mainly an issue for journalists and the like. Perhaps this is a small factor in why SharePoint gets less coverage than it should; it is not something we can just pick up and use like Office itself.

So why is SharePoint taking off? According to Wilkin, it is about “group productivity”. He talks about how SharePoint deals with the classic document review process. Emailing documents around a company and getting numerous edited versions back is a hassle. Apparently Microsoft itself is now using SharePoint more intensively, and users just check-out a document, make changes, and check it back in. He adds,

…If you then combine that with the ease with which you can check that document into a workflow, and then have it automatically routed around the organization, and then very naturally combine that with data going in and out of backend systems whatever they are, that to me is the magic. Customers tend to get the value more quickly than some of the ISVs.

Visual Studio 2008 has support for SharePoint projects and this is something I plan to write about soon. If anyone has been doing SharePoint and/or Workflow Foundation development, I’d be interested to know how you found it.