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.

Home, with Added Jetlag

We thought we were coming home to chill out in "Cool Britannia". How wrong we were. England is very hot and, allowing for the fact that nobody here has aircon, less comfortable than Florida. Special thanks must go to Manchester Airport for taking over an hour to serve up our luggage, and Airparks Gold, for only having one working bus ("Really funny story" said the man, "The gearbox broke on one, and the other burst a water pipe...") and taking an extra hour to get us to our car.

Final TechEd Sessions

Today I went to my final two sessions at TechEd 2008, which is rather sad. I really love these conferences. I only have to get a whiff of brand new nylon carpet (which they must use loads of) to be transported into a world of name badges, backpacks and session planning.

The first session I went to was by Jonathon Kagle who was doing something rather uncharacteristic for a Microsoft Product Manager. He was lifting the lid on the next version of his product, .NET Micro Framework 3.0, and even inviting comment and discussion. He has put a really good post onto the Micro Framework blog describing what is coming down the tracks, believe me it is good stuff.

One of the great things about the Micro Framework team is that they are staying true to their roots. Some products get kind of bloaty and feature creepy as they get older. Stuff gets added which might be useful in some contexts, but not all, and the whole thing gets larger and more complex as time goes by until it becomes less useful with each release. I'm a bit worried about C# 3.0 in this respect, stuff has been added which I don't really see the need for.

This is not happening with the Micro Framework. Version 2.5 actually has a smaller memory footprint than 2.0, as the team have got better at squeezing quarts into pint pots. At one point Jonathon said that they had actually figured out how to add generics (a very useful but by no means essential part of C# 2.0) to the framework but that this would have added around 17K to the memory footprint of the platform, with no easy way to disable it.

That amazed me for two reasons. The first is that someone managed to get generic support into the runtime in 17K of code, the second is that 17K is a tiny amount of memory. Less than a full stop in this text is taking up on the screen. However, in the context of a platform that needs to be able to fit into 400K or so, it is big deal, at around a 5% increase. So they left it out. The Micro Framework will now fit onto a single chip microprocessor (a single 9mm square chip). Amazing.This platform just gets better and better.

The next session I went to was about Linq, which is also amazing. The reason you go to TechEd is to find out things that you'd never get hold of any other way. Like PasteXmlasLinq. You can find it in amongst the samples provided with Visual Studio 2008. For me it was  C:\Program Files\Microsoft Visual Studio 9.0\Samples\1033\CSharpSamples.zip\LinqSamples\PasteXmlAsLinq.

This does exactly what it says on the tin. it converts a file of XML into the Linq code to produce that XML output. it provides a magical way of taking an existing lump of XML and getting code that will write it. So rather than having to mess around with writing elements and building up the structure the hard way, I can just paste the XML source into Visual Studio had have the code written for me. You have to play with it to believe it. If you have any interest in the use of Xml you should know about Linq. In fact, if you work with data in any way (even if you are not even using a database, just objects) you should know about Linq. Dan Fergus, the MVP who gave the talk did a first rate job of showing the power of Linq, and how you can use it to good effect on a mobile device.

TechEd Party Time

Imagine a theme park where the queues for the rides are around 10 minutes, all the food and drink is free, and there are people wandering around just giving you stuff. I don't have to imagine this (lucky me) because I've been to the TechEd 2008 party. It was at Universal Studios, which was nice because we got to go on the brand new Simpson's ride, which is ace by the way.

2557544566

Entering the park.

2557545118

Invasion of the nerds....

2556723335

The Simpson's ride is quite a big deal, and great fun.

2557546570

...indeed it does

2556723367

The end of a perfect evening.

The .NET Micro Framework in Action

Today I went down to the Hands On Lab area at TechEd and had a go at the Micro Framework lab, just to see what it was like. The first exercise was to drive an LCD panel from a Micro Framework device....

2557543376

Shameless .NET Micro Framework promotion....

Then it was on to building a little burglar alarm controller. Great fun. And the lab section was enormous.

2556720635

We think our labs are quite large at the university in Hull, but this is just silly....

2557544286

In fact the conference itself is just plain enormous. This is one part of one part.

If you want to find out more about the .NET Micro Framework, including devices and how to get hold of the development kit you can go to their site on MSDN. They also have a very active blog.