Windows 7 is Lovely

I’ve been running Windows 7 Beta on my tiny netbook for a while. This week, having downloaded the Release Candidate I thought I’d step up to that. I had to do a complete re-install, which was a bit of a pain, but the effort is well worth it. Everything seems a lot more polished and there is some lovely artwork in the desktop and background themes that you get with the distribution.

From a technical point of view it doesn’t seem to have lost any of the responsiveness of the earlier releases and it found and used all the hardware in my device. If you are using Vista, or even XP, you should take a serious look at this, it really is very nice.

JSON and the Micro Framework

Our entry to the Dare To Dream Different competition is coming along nicely. We’ve spent a goodly chunk of today working on how we are going to pass messages from the Micro Framework device and the server it is attached to. Number one son suggested using JavaScript Object Notation, or JSON.

We could have used XML, but this has always struck me as a rather verbose way to pass data. JSON on the other hand is nice and tight, and has the benefit that its entire syntax can be expressed on a single web page. We are presently writing a set of JSON classes for the Micro Framework. This is actually proving to be quite fun (there might be ready-written versions out there but I quite like writing my own versions of these kinds of things, just to keep my hand in).

If you are interested in a beautifully simple way to express a design for data structures you should take a look at this page and see how the author has done it. I’m also thinking that if you are looking for an exercise for your programming smarts you might want to create a library of classes that will read and write data in this form.

Once I’ve got ours working and I’m happy with it I’ll post it out there so that the Micro Framework can use this rather neat data structure.

Windows 7 on the Advent 4211 Netbook

I’ve been using Windows 7 for a while now. I put the beta version on my little tiny Netbook PC, the Advent 4211 which has a little Atom processor and only 1G of ram.

By gum, it works well. I’m getting a better than Vista experience on a machine that just about runs Windows XP. I even took the machine to Portugal last week and used it to run PowerPoint and Visual Studio (at the same time bless it) during the presentation. It worked really well, the only problem was when I accidentally engaged screen magnification at the end and wasn’t able to turn it off. However, that got the biggest laugh of the session, so perhaps it was OK after all.

One thing that is very impressive is the handling of external monitors for presentations. When you plug a display in you get the four options of netbook only, clone, extend onto external display or external only, and you can manage them very easily by using the new Windows+P hotkey. But, better than that, it works in a very clever way. It actually picks sensible resolutions for each device, even if you are cloning the screen. My little netbook is widescreen, unlike most external displays. Windows 7 took this in its stride, giving me a stretched display on the netbook but a good looking display on the projector, which is exactly what it should do.

In fact, there is a whole lot of “exactly what it should do” in this version of Windows. Stuff seems to work the way you would expect and with a minimum of fuss. The operating system has been rock solid for me and I’ve not had any blue screens of badness. Good stuff, roll on release day.

I M Wright Speaks

You’ve probably heard me go on about I M Wright before. He is the “Microsoft Development Manager at Large” alter ego of Eric Brechner. He wrote the book Hard Code, which is a wonderful look at how to create software properly. He also has a blog which is brilliant. And now he has a podcast too, so you can listen to the good word rather than have to read it. You can find the file here.

SmallBasic

If you want to rediscover the joys of writing little programs and doing fun things with computers you could take a look at SmallBasic. It is inspired by the tiny Basic interpreters that you used to get with your Commodore 64 or BBC micro and lets you write programs using a very simple language in a friendly IDE.

I’m a great believer in starting to program by keeping your focus on the algorithms and things like this can only be good. Although I’m not sure about the Goto statement figuring quite so large....

http://msdn.microsoft.com/en-gb/devlabs/cc950524.aspx

Bad/Mad Practice

Alfred Thompson had a good post in his blog about software testing. Alfred and I are around the same generation (I hope he won’t mind me saying this) and we’ve both written software for money in the past. When I was writing my largest projects I didn’t make use of any kind of tester particularly, I just make sure that it worked before I handed it over. Alfred was the same.

Nowadays it seems that there is a trend towards developers handing stuff over which they haven’t really tested, on the basis that the test people who receive it will find any mistakes they made. Alfred (and I) hate this idea. I put quite a verbose response to this effect on his post you can find here:

http://blogs.msdn.com/alfredth/archive/2009/01/27/how-not-to-develop-software.aspx

I’ve since talked to people in the business and was appalled to hear that this practice is not uncommon nowadays because developers are pushed to meet deadlines and the only way they can do this is by skimping on the testing they do. Ugh. I reckon this really goes back to Bad Management, in that a manager will get a good feeling if they are enforcing a strict regime with tight deadlines which the programmers are all hitting.

The end result though is that the testers keep sending stuff back for re-working because it has bugs in, the developers lose time on the next phase because they have to fix all these bugs, so they send the next version out (in time for the deadline) with more bugs and so on. The words Vicious and Circle spring to mind. Along with Bad and Product.

It turns out that one of my heroes, Eric Brechner, has written a lovely post about this that sets it out really nicely:

http://blogs.msdn.com/eric_brechner/archive/2009/01/01/sustained-engineering-idiocy.aspx

Poladroid

I used to have a little Polaroid camera. I loved the way that the pictures appeared over time, and the strange way it had with colours. Nowadays such technology is being replaced by digital, but the Poladroid application does give you a way to recapture that old magic. It takes pictures and gives them the Polaroid treatment, right down to the borders and the way that they take time to appear. You can actually watch the image develop, and even take snapshots of the slowly appearing picture.

You can get the application from: http://www.poladroid.net/

3233155255     3233155309

A couple of snaps which have been converted.

Great fun.

Microsoft Tag

Microsoft Tag is a new way you can put out links to web sites or whatever. The links are printed as patterns a bit like bar codes which you can read with your mobile phone camera. They use a cunning colour technology which means that even when they are snapped out of focus they can still be resolved into a readable address.

image

The tag for this blog.

The tags are linked through the Microsoft Tag site, which means that you can put expiry dates in them and the use of your tags is automatically logged so you can get reports on how much they are being used.

There are reader programs for most Smartphones including Windows Mobile, J2ME, iPhone, Blackberry and Symbian S60 devices. To work the phone needs a camera and of course internet access.

I'm thinking that when paired with a Polaroid PoGo printer, which prints sticky coloured prints just the right size for some text and a tag, this would be a very neat solution. I'm thinking about having a Tag treasure hunt at the next departmental bash. You can find out more about Microsoft Tag here.

Lousy Software

I hate bad software. It gives us all a bad name. I particularly dislike it when the program makes a job that could be simple a lot more difficult, whilst at the same time trying to seem friendly.

Yesterday I got a couple of photo album and paper things from HP. The idea was that I would print out some pictures and make some nice personalised gifts. I was further encouraged in this when I found that the package came with some HP Photosmart software that would arrange the pictures for me and put them into some nice looking templates.

That was the plan. I had this simple minded idea that I would pick pages from a template, drop pictures into them from my hard disk and then print out what I wanted.

Not so. First off the program insisted in cataloguing all my pictures. And I have rather a lot so that took a while. In fact, it got so slow that in the end I made up some directories holding a subset of my photos and turned it lose on that. Next it forced me to select from a slow moving and hard to use menu which pictures I wanted in my album. It then stuffed these into the album pages in no particular order, forcing me to move them all into the right place. I had no way of choosing the order of the pages, or deleting excess ones. But of course it saved the best bit until last.

Just as I was finishing off my design I noticed a "settings" option in the top right hand corner. Thinking that this might let me re-arrange pages or delete them I clicked it. It had some fairly useless options that were no good for what I wanted, so I tried to get back to my design. Which had vanished. All my work had gone away, without so much as a warning. Wah.

Sometimes there is great satisfaction to be had watching the uninstaller do it's business.

Deep Zooming with Ed

Ed Dunhill from Microsoft came to see us today as part of the Inspiration Tour. He gave an excellent talk to a whole bunch of students. One of the things he showed us was Silverlight and Deep Zoom. This is wonderful. A bit like Photosynth, but you can create your own images into which web users can zoom and zoom and zoom. And zoom. Don't take my word for it, have a look at the Hard Rock Memorabilia site.

If you want to make your own Deep Zoom pictures you can download the Deep Zoom Composer for free here.

Windows 7 - Putting the win back into Windows

I've been using Windows 7 as my main desktop for a few weeks now. I love it. There are a few rough edges, but nothing that would send me back to Vista. From the point of view of what you can do with it I've not noticed much different, although I haven't looked very hard to be honest. What I have noticed is the speed. Things happen an awful lot faster. Programs load and run at the kind of rate that they should do on a machine with a 2G processor.  File copying and archive unzipping are now happening at a proper speed. People I know are digging out old and slow machines that won't run Vista very well, loading up the Windows 7 test version and turning them into useable devices, which is very interesting.

It used to be that a new operating system meant a new computer. If the final version of Windows 7 manages the same level of performance of the one I'm using it could actually reverse this trend. One of the reasons why Vista didn't work very well in the early days was that some suppliers did a pretty poor job of supporting it with drivers, leading to lots of people with brand new "Vista capable" machines that didn't work properly. This must have made Microsoft a bit upset at the time, but with Windows 7 Microsoft might just get their own back on the hardware makers, since everyone will rush out and buy the operating system and have no need to get new machines.

Running Windows 7 for Fun and Profit

At the PDC last week we all got given "The Goods", in the form of a hard disk full of software and a bunch of dvds with Windows 7 on them. They are heavily marked "For testing purposes only" since we are some way from a Beta release of Windows 7 and you really aren't supposed to use the system for real work.

I thought I'd give it a go anyway. So tonight at 7:00 pm I started an upgrade install on my main Vista machine. I didn't go for a clean install, life's too short for re-installing all those applications. At 10:30 the upgrade had just about finished and I was able to get my first flavour of Microsoft's new system.

It works. It works fine. I'm using my MacBook (which might make for interesting times if I ever try to boot back into OS X) and all my hardware has been detected with no problems. Since the current test release is based on Vista I wasn't expecting driver trouble and so far I've not had any. Setting up the monitors was a bit fiddly, but I soon managed to get them arranged how I like. And after a slight kerfuffle with the login for Outlook I've now got a very good place to work that does all the things it used to.

The whole machine seems a lot more zippy, with applications opening much more quickly and running very well. I've not really had much chance to play with any of the new features, but I don't think I'm going to have a problem living with this test release. If you were at PDC and are thinking about putting Windows 7 on your machine I'd say go for it.

Head in the Clouds

Sorry for the title. I find cloud computing quite easy to poke fun at. In fact:

"Are clouds the ultimate form of vapourware? And if is called Windows Azure, surely that's the colour of the sky, not the clouds? Shouldn't it be called something like 'Windows White and Fluffy'".

See. Easy. Although after the sessions today I think it is probably a bit unfair.

I was up very early, almost in time to catch the third bus to the conference centre.

2981235018

This scene was outside the hotel at 7:00 am this morning. I think it sums up the American Dream quite nicely.

But enough of this, the keynote started at 8:30 and so after a very nice breakfast it was down to the really big hall.

2980380295

This is just part of the Hall.

Ray Ozzie took over from Bill Gates earlier this year, and this was the first time that he had flown solo so to speak.  He was very good, describing his vision of computing that is just "out there" very well. I'm less convinced by the sample application that they chose to first articulate this vision though, the BlueHoo social networking app that lets you find out if anyone around you is someone you know - I kind of high tech, Bluetooth powered, cloud network,  version of looking and shouting.

But that aside, the underlying thinking seems very solid, and when I heard that one of the people behind the cloud architecture was Dave Cutler, the man who made Windows NT all those years ago, I was much more interested. Windows NT is the basis of the technology that sits underneath all the Windows desktop and server platforms.

2981236454

Ray on the stage

Whether or not cloud computing is the next big thing is debatable, but you can't deny that it is big. What Microsoft want to do is provide a means by which you can take code that you have written using conventional languages and tools and put it up on their servers so that anyone can use it, from anywhere in the world. And if millions decide to use your program, they can - because the underlying system will handle the distribution of the software around the world and the balancing of the load on the various servers.

Of course horsepower on its own is no good to you, there is also a need for data stores of various kinds. from blobs of data to SQL databases. And all this must work in an environment where systems crash, networks fail, and bad people are out there trying to break things all the time.  Tricky stuff.

If Microsoft can pull this one off they will really have moved computing onto the next stage in its development. The architecture and the way you manage your programs seems very well thought out, although they admit that the system will be a "work in progress" for a while yet.

As far as I'm concerned it is all very exciting. People write software so that others can use it. The cloud means that if I have an idea for a million user, killer application - say I want to write the next MySpace - then I don't have to worry about getting server farms, buying network bandwidth and hosting all the user's data. I can get just put my application out there on the cloud behind a network address for people to use.

Of course money will have to change hands. Microsoft will want me to pay them to host my software, but this payment will be based on the use of my program. I only have to pay for the services that I consume. I'll pay more if I have more users, but since the more users I have the more income I should have then it all comes out OK in the end. This is a new business model that anyone who writes programs that provide services to others will have to take note of.

The thing that really does it for me though is the way that I can now take C Sharp and Visual Studio and write code for thumbnail sized computers to control my Christmas tree lights or go all the way to the other end of the spectrum and turn out an application for millions of people to use. All with the same essential skills. 

I went to a few more talks on Windows Azure as it is now called, and I must admit it looks good.

And I'm feeling a bit guilty about poking fun at it.

Hull Computer Science Twitter Feed

We now have an experimental Twitter feed for the department at Hull. This will be used for sending out messages as a supplement to the RSS news feed that we run internally. You can find it here:

http://twitter.com/HullCompSci

Since Twitter has an API I was thinking of writing a program that reads an RSS feed and tweets any item under 150 characters in length to twitter. This would make it a completely automatic extension to our message system. Does anyone know if this has been done already? Does anyone fancy doing it?

Oh, and you can follow me on Twitter at:

http://twitter.com/RobMiles

I'm not a very good twitterer (or is it twit?) to be honest, I have enough problems thinking of something to say in daily blog posts, but if you want to follow me you are more than welcome.

EverNote is Neat

If you do anything that involves holding little bits of data and then using them from wherever you happen to be you will probably find EverNote useful.

It is a "cloud" application that lets you lob pictures, notes, web links, bits of files and whatever onto a central storage location that you can then access from your PC, Mac, browser, Windows Mobile device or iPhone.

It has some nifty search facilities, even being able to pull handwriting out of images you have captured as notes and then use them as search keys.

It seems to work really well, and you can use it for free if you don't want to upload much content. Even the paid service is not bank breaking, at $5 a month.

Whether you are studying on a degree course, running a business or just going shopping I reckon that it is well worth a look.

Software Design

I'm still writing stuff that is intended to teach programming. Great fun,but very hard work (apparently). I'm up to the bit where I'm trying to make a game more interesting.

BlockBuster
..but how do you detect when all the red bricks have gone?

I am recreating a game I first made many years ago in Lucidata Pascal on a South West Technical Products 6809 based microcomputer.  It is a simple breakout clone with one or two interesting touches as you go through the game. Apparently it was responsible for a lot of lost time in the Psychology department at the time I wrote it, because they had the same computers and spent ages playing it. Chris used to spend entire lunch-hours on it, holding a ruler against the screen to line up really tricky shots....

Anyway, I digress. The place we've got to is where we have a row of blocks and a ball, and we can destroy the blocks with the ball. It gets a bit boring when all the blocks have gone, so our program must detect when the last block is removed. There are essentially two ways you can do this, you can keep a counter of blocks that are left and reduce it each time you remove a block, or you can look through the blocks and see if you can find any which are still visible. But which is better?

Keeping a counter has the virtue of simplicity and makes the smallest program. However it also adds a counter variable which is coupled with the array of blocks. If the counter and the array get out of step for any reason the program will misbehave. If the program checks the array each time there is no question of this happening. In other words one design leaves the system open to bugs that could not occur in the other. I'm trying to get people thinking about the craft of software development and into the habit of worrying about things like this when they write programs.

I often get asked "What is the best way to do this in software?" as if there is an solution which is perfect in every way. I tend to reply that there usually is no such thing a best solution, there will be a fast one, one which doesn't use much memory, one which has the shortest program code and so on. To that you can hopefully add "simplest" which is the one that I tend to go for, unless I'm really worried about performance.