The Importance of Meaning

I've found another interesting blog post. This one is about the way that Service Oriented Architecture (where you create applications from components which expose what they can do in terms of services that they provide via a network connection) may not be the way and the truth.

This is because although you could provide a service called "Sell Widget" you can only use it properly if you have a good understanding of the meaning of precisely what it will do - which is not something that is guaranteed.

On the way to his conclusion the author provides a nice description of the archicture. Worth a read.

Green Green Grass of Google

Found an interesting blog post today. It is written by a bloke who works at Google (lucky chap).  If you are interested in the business of Software Engineering you really should read the post (and all the ensuing comments). It will take a while (I spent a whole lunch break reading it) but it is worth the effort.

If you think that things like computer programming are not prone to fashion and ideology the whole discussion should sort you out good and proper....

The Madness of XAML

Spent a whole evening achieving virtually nothing. I'm writing a little program for the plasma display in our new, spiffy, meeting area in the middle of the department (if you think that this means I'm a lot better at starting projects than finishing them- Icon Invaders, Moosaic etc etc then you are probably right - but this one needs to be done pronto and I'll get round to the others later).

Little know fact: Pronto was Tonto's younger, and much more punctual, brother.

Anyhoo, I'm using WinFX which is very nice. Got the latest versions of .NET 3.0 and all the trimmings and I can make swooshy windows now. I even managed to figure out how to read the RSS feed that is going to provide the data source for the display, and unpick the data from it that I want.

Then I try to put messages in the WinFX containers that hold my text. Now I'm using my usual learning technique here, which is to use Intellisense and MSDN and not read any books. Bad move. Simply couldn't figure out how to get text onto the control. Unlike old style windows components, which have a Text property, WinFX is much more complicated. It has FlowDocument and Paragraph and Block and all kinds of paraphernalia. But no Text property. After a lot of messing about I found that there is an InLines property which does pretty much what I want and lets me add strings of text to the display. Hurrah.

But the really good news (which probably makes the 90 minutes of cursing and swearing worthwhile) is that it will do all the formatting for me using Xaml cues in the string to lay out the text.

Which means that whilst it has taken me ages to do the easy bit, the hard bit should be really easy. If you see what I mean.

I'll post the program in source form once I've got it working.

But is it a bug?

I noticed a little "foible" of Windows when I was writing my Moosaic program. Windows provides a lovely way that you can load an image into a program. You just go:

Bitmap b = new Bitmap ( filename );

This goes off to the filename and gets you a shiny bitmap which contains your picture. However, it also leaves open the connection to the file, so that if you try to delete the file you get an error saying the file is in use. I don't think that it is. I've just read an image from it, that is all.

This is rather frustrating if you want to reuse a temporary image file. In the end I had to use a stream to read the file, which I could then properly let go of..

StreamReader streamReader = new StreamReader( filename );
Bitmap b = new Bitmap( streamReader.BaseStream );
streamReader.Close();

This is messy, but works in that the file is released. I'm wondering if I've found a bug or a feature...

Moosaic Takes Shape

One of "Robert's Rules" is:

Any software development takes longer than you think, even if you allow for this.

Of course, having a day job as well has kind of hampered development...

So I've not finished the Moosaic program just yet. But it is looking quite tidy:

249244108
Coming to a setup program near you....

I've got the image download and the grid selection just about sorted, Now I just need to get the tile output done and we will be in business.

Prepare for Icon Attack!

231272342

I've been playing with the new XNA Express stuff which lets you write games using XNA. Great fun. I'm presently creating a little 2D shooting game which is provisionally titled "Icon Attack", where you fly "My Computer" into battle against massed hordes of Windows Icons, running in fear from the "Recycle Bin of Doom".

I've just got the first bit working, which is the moving icon starfield that will provide the backdrop. I'll keep you posted (quite literally) about how the development goes. Eventually I'll put the source up for you to marvel at.....

Live Writer Flickr Inkifier now available

I've finished writing the code for the latest Live Writer plugin. It lets you grab images from Flickr, annotate them with ink and then post them back. It also has a few image processing feature, including a "wild" thing which is quite fun. You can find out more here.

It's always the social issues that get you...

I've been playing more with my Flickr inkifier and it is now nearly ready for release into the wild. By that I mean that I've solved all the technical problems, but now I have to deal with the "social" ones.

These are the ones which give you the most grief as a developer because there are no hard and fast answers. When I wanted to add my plugin to Live Writer this was easy. Copy the example, read the documentation and away you go. But now I have to deal with users.

To post a picture to Flickr you have to login to the service. Fair enough. There is a lovely mechanism for this in Flickr which means that once a user has authorised my plugin with them they never have to do it again. But the plugin also has to remember some stuff about the login. So questions start to arise; "Where to I store the information?", "What do I store?", "How will the user interact with it?", "Do I store the data on a per user basis?". Ugh.  

 So, wrestling with all these issues has slowed me down a bit. That and marking all the programming resit exams and coursework. Double ugh.

Imagine that Live Writer Plugin

I've just made a plugin for Windows Live Writer which lets me easily post my Flickr pictures. There is a proper plugin available as well as mine, but mine does exactly what I want, which is quickly find the images and then add them to the post in the correct size. And anyway, I wanted to write my own to see how easy it is. So there.

One thing that I have learnt from the exercise is just how darned easy it is to string things together these days. Figuring out how to write the plugin wasn't too hard, and writing a .NET program to pull pictures off Flickr turned out to be much easier than I expected. So, without further ado, lets import some snaps:

 222860553
This is one of the dancers at the Imagine Cup party in Agra

222860621
This is outside the hotel lobby. I just love those white cars

222860583
And this is your room, after the room tidying faries have been round..

My First Post from Live Writer

This is my first post using Windows Live Writer Beta. It is a program which lets you prepare blog entries off line and then submit them from your computer. I might use it a bit because it is somewhat easier to use than the interface on my usual provider, and it lets me write stuff when I'm not connected to the internet. It found the settings of my slightly non-standard blogging service straight off the bat, and so far I'm impressed. Although I've not actually pressed the publish button yet.

There is also an API which lets you develop blogging applications

Of course, what I really want is a version of this program which runs on my Pocket PC. Perhaps later...

Mobile Developer Webcasts From Rob

In a week or so I'm giving my first ever webcast. It is a kind of "remote presentation" where I run through some slides and demonstrate some programming. The audience can chip in and ask questions, and the whole thing is also recorded for posterity so that you can refer to it later. You can connect to it from anywhere in the world and take part via the internet.

This will be number one of a series of 4, all about mobile game development.  If you have ever had an urge to develop a game (on mobile or otherwise) then you might find it interesting.  I'm also going to tell my favourite joke in all the world exactly 23 minutes into the talk, so it is worth tuning in just for that.....

I'm setting up a resource centre on these hallowed pages to underpin the webcasts . I'll be adding stuff as soon as I've finished each talk. Find out more here.