Thought for the Dazed

I've had to give up that Distance Learning course as I was having trouble seeing the teacher.

Flickr
www.flickr.com
RobMiles' items Go to RobMiles' photostream
Twitter
C# Yellow Book

Search entire site
Tuesday
Sep182012

More On Broken Software

IMG_4611.jpg

It’s not as if I’ve been lying awake at night worrying about writing software (OK, perhaps slightly) but I have been pondering the “Is everything broken?” question a bit. And I’ve come to the conclusion that, at the end of the day it probably is, but then again it doesn’t really matter that much.

All of the terrible examples that are quoted are irritations in the great scheme of things. Nobody has been hurt, nobody is going hungry because of them and if the worst thing that happens to you in your life is that you can’t put any more music on your iPhone then I really, really, want a life like yours. True, it is annoying that things don’t always work as they should, and true, it would be nice if people felt moved to provide higher quality than they sometimes do, but at the end of the day stuff mostly works, and that is the important thing.

Technology now lets us do things (albeit imperfectly) that we just could not do before. It is also a great leveller. The Queen might have an iPhone that is covered in precious stones (although she might deem that a bit tacky) but she can’t do anything with it that you can’t do with yours. Although she might not worry as much about roaming charges as you do. The best phone in the world, whatever that is, can be obtained by literally millions of people, not just one or two. And, what’s more, anyone can make programs and sell them on the devices, providing a path to riches that just wasn’t there in the past.

I think, at the end of the day, we are always going to be upset with the status quo, and want it to be better. I vividly remember reading a piece some time back that was written by a retired general type. He was moaning about the way young people were more useless and lazy than he was in his day, and how their lack of discipline and application would lead to the collapse of civilisation as he knew it. Turns out he was a retired general from the Roman Army and was writing this a few thousand years ago.

The best thing to do is to take these issues on board, try to move things on a bit and give our children something even more fantastic to complain about when they get to our age.

Monday
Sep172012

On Broken Software

IMG_4097_8_9.jpg

Both Scott Hanselman and John Batelle have been having problems with their software over the last week. Both their posts are well worth a read.

Years and years ago Gerry Weinberg wrote "If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilisation". Not much has changed since.

It's always more fun (and more lucrative) to make and sell new stuff than it is to mend broken old stuff. And software lets you sell stuff that isn't finished. Unlike things like bridges: "Hey, that doesn't reach the other side!", and buildings: "Hey, where's the top floor?", many faults in programs take a lot longer to show up.

With a program you can leave out error handling, load testing and all the other boring bits that make a program properly useful and still ship a product that will sell by the boatload. With a bit of luck not that many people will notice. Of course, you could spend a lot more money and time getting it right. Snag is, I don't think that anyone would stay in business today making completely perfect software that took ten times as long to write as the current state of the art. People will go for new and shiny over old and working most of the time I'm afraid. I don't think I've ever seen an Engadget post about a new version of a product that is exactly the same as the old one, but works properly.

I’ve been writing software for an unfeasibly long time and some of it has wound up in the hands of proper users. I pre-date objects, Test Driven Development and pair programming. I wasn’t there when the loop was invented, but I I think I saw it in the papers. When I write a program I worry about everything, particularly what could go wrong. To me “The Happy Path” is an aside. I’m spending all my time fretting about “What happens if the response never comes back?” or “What if I get millions of these when I only asked for five?”.

It drove me nuts when I found out that the standard input/output libraries in C didn’t actually check the length of what was given to them, making the potential for buffer overrun part of the run time experience. I wrote my own input validation suite. I put it in all my products. I added timeouts everywhere. I didn’t particularly do this as part of a methodology, I just did it because it seemed sensible at the time, rather like a builder would make the ground floor before starting second floor. My programs hardly ever went wrong. Even the really big ones.

As a person who also teaches programming I try very hard to make sure that students take this approach when they write code. We start with defensive techniques and move on from there. As soon as you have a need for a number (say perhaps the age of your customer) then start to worry about how it might go wrong, become negative, very large, or change by more than 1 after a year. I don’t see this as tied to any particular methodology, I just see it as common sense, and I really want my students to have the same mind-set when they write their programs.

Modern development environments give you a lot more tools for making products that can be more reliable. Of course, the flip side is that the products can also do a lot more and that the demand for new, innovative solutions delivered in record time has never been greater. For me the only really good news is that where it is important to get code really right, for example in cars, airplanes and nuclear reactors, the software industry does seem to be able to deliver properly working systems, albeit slowly, and at great expense.

For the rest of us, I think it is as much our fault as anyone else’s that we are in this situation. We are keen to queue up for the next iPhone when the one that we have doesn’t actually work properly. Until we start only buying software that really works (and probably paying more for it) then this is how things are going to stay.

Sunday
Sep162012

Castle Howard

IMG_4344_5_6-Edit.jpg

I don’t think that Castle Howard is really a castle. But it is a great place to go and see. It is a country residence on a grand scale, the kind of thing it takes several generations of “unbelievably richness” to come up with. We’ve visited it on and off over many years and once saw Bryan Ferry play live there. That was a good night, that was. It is also famous as the place where “Brideshead Revisited” was filmed. Twice.

Today we went for another visit, and I took the big camera along. We also did something we never normally did when we took the kids. We paid extra to have a look inside the house itself.

IMG_4679_80_81.jpg

This kind of puts our hall to shame….

IMG_4398_399_400-Edit.jpg

This is what they have instead of a garden shed.

IMG_4733_4_5.jpg

They seem to have lots of flat screen TVs, but they are all stuck on one picture…

If you are looking for a nice day trip (around 75 minutes from Hull) I can strongly recommend it.

Saturday
Sep152012

Tekken me back to my youth..

image

Well, not really “Tekken me back to my youth”, as that was long gone when I got my PSX (Playstation 1) and took part in my first “King of Iron Fist Tournament”. But it was a great game. And now I can play it on my PS Vita. Which is really growing on me. I’ve actually finished Uncharted and now I’ve discovered that a lot of PSX back catalogue is available for tiny prices. I used to love Tekken 1. I liked it so much that I actually got the game music off the game disk (in those days you could do that) and and I still have it lying around on the phone. I did the same for Ridge Racer and also Destruction Derby. In fact with these games you could even swap out the disk during gameplay and have different music accompanying your driving/fighting/crashing action.

If you fancy some nostalgic fun for not very many pennies, you can also get these games, along with the first Tomb Raider from the Playstation Store. And next week we get the Vita version of Little Big Planet, which I’m just about to pre-order.

Friday
Sep142012

Visual Studio Express 2012 for Windows Desktop

image

The new Visual Studio 2012 Express is very nice to use. I’m even liking the funky dark colour scheme. But the fact that all you can create with it are Metro apps is a bit of a bind. However, Microsoft have now released Visual Studio Express 2012 for Windows Desktop. It lets you use the fancy new version of Visual Studio 2012, complete with SHOUTY MENU BAR, to create desktop applications in C#, C++ and Visual Basic.

Incidentally, if you want to put the menu bars back to how they used to be, Deborah will tell you how. She writes a really good Visual Studio blog with some very useful tips on the program.