Hewlett Scrapyard

Just had over an hour of "the wrong kind of fun" courtesy of an HP printer. Under normal circumstances I have a lot of respect for HP products. Their printers give good, reliable, results and I've never had one of their ink cartridges dry up on me. Always a bonus. When people ask me which kind of printer to buy I used to say "HP" out of reflex, because I reckoned they would get a good device that will not let me down.

Until now.

Dad got an HP "all in one" disaster area with scanner, printer, colour screen, card reader, WIFI, Fax and some kind of personality module that is permanently on stupid. During my tussles with the darned thing I explored the very limits of disbelief that something could be so stupidly over designed. The printer software installation itself takes around half an hour on your computer, then you start to grapple with the printing process.

The initial problem was that the printer buffers incoming printing, so that it can receive a lump of data over the network and then print it. Nothing wrong with that. It even stores the data in non-volatile memory, so that it can recover from power outage. Nothing wrong with that too. But if the printer is given a partially completed, corrupt, file to print this stays in memory for ever. Each time we turned the printer on it tried to print the file, and then locked up. There is no command to flush the printer buffer, no way to get around this and it means that if data sent to the printer is damaged or incomplete it turns into a noisy, expensive paperweight.

I've written embedded code myself in the past. One of my golden rules was that it should never, ever, be possible for your device to lock up. There must always be a button that can be pressed to get control back. My devices never got stuck. Not once. Never.

HP are not in my league. Not close. We ended up playing a game of skill where we had to cancel the print before it crashed the printer. Fortunately my video game powers came in handy and so we got past this duff job, at which point the idiot device pumped out every failed print job since then. We ended up putting the same pages back into the input tray again, to save paper. Of course it probably cost us a bit on ink....

So, finally the printer was working. But no. Now when you printed a page it produced it many times, over and over, like the bit from the Sorcerer's Apprentice, where Micky can't stop the brooms from fetching water. At this point we felt like taking an axe to the printer as well...

So, we gave up on network use (the main reason why we bought the printer in the first place) and went back to USB. Which when I left (at speed) was working OK.

I'm not sure which printers to recommend any more.

Sailing the Amazon

I've now taken advantage of the Amazon Connect service to add a little bit of Rob to the pages of Amazon.com. Hapless viewers of information about my books on the Amazon site will also get excerpts from these hallowed pages, as well as a link to my new Amazon blog with book related content.

To celebrate this I've uploaded the second section of Simple Simon, an XNA pattern matching game which has nothing to do with pies, to verysillygames.com.

St Anne's Masterclass

We had a bunch of students come to see us today from St. Anne's. They were great. As usual I took a picture of the audience at the start, while they were still smiling.......

2604578140

Audience View

At the end of the talk I did a kind of Aibo vs. Pleo thing, where I turned Digby and Trevor loose together to see what would happen.

2604580742

Will they fight?

They seemed to ignore each other most of the time, although Digby did keep trying to climb off the edge of the table.....

The FreeSat Plot Thickens

(I'm wondering why you should care about my satellite TV woes. But then again, it's my blog. So there.)

Anyhoo, yesterday left me with nothing working and a pile of broken bits on the floor underneath the dish. Today Dave from next door came round and, hearing of my plight, offered to go up his ladder and take a look for me. On the windiest day of the year. What a guy.

Actually, it wasn't that windy round the side of the house. And we were able to establish that actually the dish hardware looks fine. The bits I found on the ground must have been left by the Sky+ installer ages ago. That or we have a really clever prankster out there (I'm tempted to go round to the place where someone I really don't like lives, and leave a pile of slates on their front lawn in a similar kind of vein - but then again there's nobody out there I really don't like, and I'm very lazy - so it probably won't happen).

I wonder if my shiny new box is broken?

Fun with FreeSat

Every now and then I do something silly-ish. Just to remind myself that if I was constantly sensible life would be really boring. Today I bought a FreeSat box so I could ignore the European Cup in High Definition (not that keen on telly football to be honest). The internets had told me that it would work with my old Sky dish, which is presently rusting away gently on the side of the house. We did away with Sky last year, when I got a Media PC which does all the bits that Sky+ used to do, without costing me 36 quid a month.

Anyhoo, FreeSat is free, once you have bought the box. So I bought the box and plugged it in. And it doesn't work. I was kind of expecting this. After a particularly loud storm some time back I found some bits of satellite hardware on the ground underneath the dish, but I figured that since Sky+ uses two LNB receivers, and I'd only found one on the floor, I might be able to get away with it.

Note to self:  Every time I find myself thinking "You might be able to get away with this" I must remind myself (perhaps with a slap around the face to make the point properly) that I am Rob, and therefore not destined to get away with anything.

I went next door to borrow a ladder so I could go up and have a look, but then number one wife found out about this and banned me from climbing up there, what with my fear of heights and everything.

So at the moment I have a dish that doesn't work, a FreeSat box that doesn't work, or some wire that doesn't work.  Ho hum.

Cars that never made it

These names were not dreamed up in a Staff Meeting. Oh no. I spent the entire time paying careful attention and making copious notes.

The Ford Caveat: "The car with the hidden surprise"

The Fiat Scenario: "The car that sounds like a great idea"

The Renault Gravitas: "For the driver who wants to boost their presence"

The Seat Ulterior: "You'll never really know why it just did that"

Indiana Jones and the Kingdom of the Crystal Skull

2592031503

Tonight we went to see the latest (and probably last) Indiana Jones movie. It felt like this is one of those films that you are obliged to go and see and so we went and did our duty. At the end of the day I reckoned that it was a proper Indiana Jones movie (but then again I watched some of the originals recently and formed the same opinion about them).

Much has been made made about the directors' determination to use "real" special effects rather than the inferior computer generated ones. This approach seems to have extended into making the CGI effects that they did use look rubbish, one or two sequences would have looked bad in a computer game. And some of the model work was so obviously a model that they didn't need to add a trademark camera wobble to give the game away as they panned over it. But they did.

And for a movie produced by seasoned professionals the continuity was very bad. I'm not very good at noticing things. Just ask number one wife after she has had her hair done. But even I spotted the way that the sauce bottles mysteriously stood themselves back up again in the diner scene.  All this served to detract a bit from the lush locations and expansive musical score.

At the end of the day, as I always say, "If you don't like what it says on the tin, don't open the tin". This was always going to be a big, dumb, action movie with one or two good set pieces. I don't think anyone has a right to ask for anything else. If that is what you want, you'll love it. Like I did.

Loading Web Pages

I don't usually put up techie pages with code in them, but today I present something that I think might be useful and I've not found anywhere else. It is part of my RSS reader for the XNA display program, and it solves a couple of problems that you might hit. My feed reader needs to read feeds that are on a password protected site, and it also needs to read feeds that are compressed. This method does both:

private StringBuilder readWebPage(
    string url,
    string username,
    string password,
    string domain)
{
    // used to build entire input
    StringBuilder sb = new StringBuilder();

    // used on each read operation
    byte[] buf = new byte[8192];

    try
    {
        // prepare the web page we will be asking for
        HttpWebRequest request = 
            (HttpWebRequest)WebRequest.Create(url);

        if (username.Length > 0)
        {
            request.Proxy = null;
            NetworkCredential credential = 
               new NetworkCredential(username,
                                     password,
                                     domain);
            request.Credentials = credential;
        }

        // execute the request
        HttpWebResponse response =
            (HttpWebResponse)request.GetResponse();

        // we will read data via the response stream
        Stream resStream;
        Stream inputStream =
            response.GetResponseStream();

        // Might have a compressed stream coming back

        switch (response.ContentEncoding)
        {
            case "gzip":
                resStream =
                   new GZipStream(inputStream, 
                          CompressionMode.Decompress);
                break;
            case "":
                resStream = inputStream;
                break;
            default :
                debugOutput.PutMessageLine(
                    "Invalid content encoding: " +
                    response.ContentEncoding + " in: "
                    + url);
                return null;
        }

        string tempString = null;
        int count = 0;

        do
        {
            // fill the buffer with data
            count = resStream.Read(buf, 0, buf.Length);

            // make sure we read some data
            if (count != 0)
            {
              // translate from bytes to ASCII text
              tempString = 
                Encoding.ASCII.GetString(buf,0,count);

              // continue building the string
              sb.Append(tempString);
            }
        }
        while (count > 0); // any more data to read?

        return sb;
    }
    catch (System.Net.WebException w)
    {
        debugOutput.PutMessageLine(w.Message);
        return null;
    }
    catch (System.Net.ProtocolViolationException p)
    {
        debugOutput.PutMessageLine(p.Message);
        return null;
    }
    catch (Exception e)
    {
        debugOutput.PutMessageLine(e.Message);
        return null;
    }
}

This is not very elegant code, but it does work. I've pulled it straight out of the program and so there are a few things you need to know. I have a class called debugOutput which I use to send messages to the user. You either need to create one of your own, or remove those lines. If you need to use a username and password you need to add those to the call, otherwise you can leave those fields as empty strings.

Mending Headphones with McDonald's Straws

I got some Ultimate Ears headphones a while back. They sound wonderful. However, they have a little problem which has been causing me grief recently. They use an "in ear" design, with a tight fitting plug which goes inside your ear so that all the sound comes your way. Nothing wrong with that, until the plug bit starts to come off and stay in your ear when you try to remove the phones. I think this is caused by the rubber stretching slightly and becoming slack on the fitting. Whatever causes it, I don't like it as it then leaves me picking bits out of my ear canal, which doesn't look very cool.

Anyhoo, I've fixed the problem by the use of some drinking straws from McDonalds. I've put them around the outside of the rubber sleeve that goes over the headphone bit. This stops the sleeve from stretching quite so far, and makes it fit really tightly. I don't think it is the kind of thing you can get the Nobel prize for, but it works for me.

2577991277

Earpiece with straw power

Oh, and while we are in a McDonalds mood, don't the drink lids look a lot like faces?

2578823268

Scary face or coffee cup cover? You decide.

"Upgrade Your Life" by Gina Trapani

Now here is a book I really do like. Generally I avoid "self help" books, seeing myself as mostly beyond help - especially from myself. However, having spent a while last week in the Tech-Ed bookstore reading this one and trying to make mental notes of all the good tricks presented in this book, I eventually cracked and bought a copy. And it is jolly good too.

It is broken down into chapters that deliver tips to improve your life. It starts with email and then move into data organisation, using the web effectively and even how to motivate yourself to get work done. None of it is really rocket science I suppose, but you have to know these things to be able to use them. For example, I didn't know that Outlook has an option that lets you display all email sent only to you (as apposed to a list with you on it) as blue. (Tools->Organise->Using Colors). You can also flag messages from different people in different colours.

You can read the book from cover to cover and try to remember everything, or you can dip into it at random in the sure knowledge that you will learn something useful. The content is based on material presented over the years at lifehacker.com and covers Windows and Mac platforms, along with good old common sense.

Great stuff.

"Microsoft 2.0" by Mary Jo Foley

Whilst I was at TechEd last week someone gave me a free copy of "Microsoft 2.0" by Mary Jo Foley". It is supposed to tell me "How Microsoft Plans to Stay Relevant in the Post-Gates Era". I'm not sure it does.  I summarised it as follows:

  • Bill Gates is leaving Microsoft and other people will be doing his job
  • The Future for Microsoft is complicated, and almost certainly not the same as The Present

There is a lot of background on the people at Microsoft, which stops just shy of being libelous in some cases. There is some detail on products and where they might be going in the future which you can pick up more easily (and in an up to date form) on the web. There is a a fair bit of repetition. And more than a few errors. The Xbox 360 has never suffered from the "Three Rings of Death" - that just sounds like a very dangerous circus. And Microsoft didn't actually manage to buy Yahoo that I recall...

Each page has big callouts on it, presumably designed for high flying types who don't want to read all the text (and it also reduce the number of words required to fill the 283 pages). My favourite is on page 191 "Microsoft must avoid several obstacles as it moves from the old way of doing business to the new." Yeah. Right.

I did not like this book much, and I got it for free. If I'd paid 29 dollars for it I would be rather cross. Perhaps the detail was lost on me, or perhaps I already know a fair bit of what was being said. Either way, take a look at the text before you part with any cash.

.NET Micro Framework Hardware

If you want to target real hardware with your .NET Micro Framework programs you will need to obtain a device. I pulled this information from the .NET Micro Framework pages on MSDN.

Developer Kits

Crossbow Technology WSN Developer Kit

The Imote2.Builder Kit includes everything you need to create wireless sensor networking applications, including three development boards with embedded radios and two sensor boards.

Digi Connect ME JumpStart Kit for Microsoft .NET Micro Framework

The industry’s first Ethernet networking solution for .NET Micro Framework. Digi JumpStart Kits are a new breed of development kits that make it easy, fast, and economical for engineers to develop network-connected devices.

Device Solutions Tahoe Development Kit

The Tahoe Development kit, featuring the Meridan CPU, allows for experimentation, evaluation and just plain fun, while slashing the time it takes to transition from prototype into production.

Freescale i.MXS Development Kit for SideShow

Freescale's high performance i.MXS Development Kit supports .NET Micro Framework applications.

GHI Embedded Master Development System

The Embedded Master includes FAT file system and USB host support, in addition to Ethernet, CAN, and other connectivity options, to provide everything you need to get started developing small devices.

SJJ Embedded Micro Solutions EDK

Includes a multipurpose development board with the .NET Micro Framework installed and ready to run C# applications. Suitable for a wide variety of embedded applications, the EDK is ideal for engineering students, hobbyists, and OEMs of small devices.