Nokia Champ Rob

I found out last week that I've been appointed as a Nokia Developer Champion.

I'm not sure if it is for those WAP pages I used to write for my Nokia 7110 (I actually had a script that would read my email and convert it into WAP so that I could read my mail on the move), but it is rather nice.

Thanks to those of you at Nokia who thought enough of me to make the award. I hope I prove worthy of it.

Deal Extreme for Extreme Deals

If you are looking for anything electronic, and lots of things strange, then I can reccommend these folks. They have a huge range of stock which changes by the hour and includes lots of exotic and interesting components. They price things in dollars and their delivery is free (but very slow, allow four weeks). You can pay with PayPal, which is nice too.

I had a need for a little USB hub and network thingy and these folks were able serve up just what I wanted, at a very sharp price.

http://www.dealextreme.com/

 

What use is a structure?

DSCF1594.jpg

It is exam season here in Hull. Later in the week we have our programming exam. And I’m getting quite a few questions through about C# and stuff. Today I got asked the question “What use is a struct?”. I’ve been spending a lot of time talking about classes and references and how clever they are, and someone wants to know why, if classes are so wonderful, some objects in a program are managed by value. The answer is simple enough. It is because sometimes you really want a value which you can just copy around easily.

Consider the Rectangle type in XNA. We can use this to represent the position and size of something on the screen. And this is a struct, not a class. Take a look at this code:

a = b;
a.X = 99;

If a and b are both Rectangle variables the effect would be to set a to the value in b and then move the X position of a to 99. This would not affect the position of b.

If the Rectangle type was a class then we would have two references, a and b, that both refer to the same object in memory, so moving a would affect b as well. If we want to place objects in lots of different positions on the screen, and we don’t want them to be linked in any way, then structures managed by value is the way to do it.

Note that things like Textures are managed by reference. This makes a lot of sense too. An image is a large thing, and it is often very useful to be able to share one image for a whole bunch of things. Think multiple sprites in a space shooter. They will have a Rectangle value to give them a unique position and then a reference to a texture that they all share, to give them an appearance.

The XNA framework is full of objects that are actually structures because they work better this way. For example Color, Point and the Vector objects are all structs so that we can manage them by value. In fact, now that you know how it works, you should be able to look at any XNA type and figure out whether it is a class or a struct, just based on how it is used.

Page Navigation in Windows Phone Applications

IMG_6478_79_80.jpg

I got asked a question about Page Navigation in Windows Phone applications. Having a spare 10 minutes I thought I’d record a tiny screencast about it, which you can find here.

It tells you how to make a multi-page Windows Phone application and then navigate between the pages. You can find the sample application here. The text that is referred to in the screencast is the Windows Phone Blue Book, which you can find here.

Pulp Dates for your Diaries

Summer Bash Three Thing Game May

I’ve been playing around with the Pulp-O-Mizer to make some posters for the social events coming down the tracks at the end of this month. You use the web based interface to design great “future-retro” magazine covers.

If I lived in the ‘states I’d be able to get posters and other stuff sent through with this lovely artwork on it. There are also interactive comics and all kinds of good stuff. Well worth a visit. 

Matt Smith at the Imagine Cup Finals

Imagine Dr Who

Good grief. I mean golly gosh. I mean wow.

I’ve been involved with the Imagine Cup for a while. I sit at my computer writing emails and looking at entries and usually see it as “a student competition that I play a small part in helping to make work”. Then, when I go to the World Finals and I see just how much effort Microsoft put into it, and how much it means to the students that take part, I get the big picture.

I got another dose of “big picture” today when I found out that Matt Smith, currently doing a magnificent job as Dr. Who over on the BBC, will be hosting the World Finals in July. Blimey.

I’ve been a fan of Dr. Who since I watched it in the sixties on a black and white telly that could only receive one channel. To have someone like him taking to the stage on behalf of the competition marks a new high in my book. Amazing.

It looks like they are going to stream the finals live over the interwebs. It should be an awesome night.

The Proper Use of Exams

IMG_6422_3_4.jpg

I did a revision lecture today for the First Year. The exam is next week. Afterwards I got an email that I found both amusing and a bit irritating. The sender wanted to know what would be coming up in the exam this year “so that I won’t have to waste my time revising the other stuff”.

Oh well.

I think that person could use a slightly better perspective on why we are all here. I’m not teaching this stuff so you can get through the exams. I’m actually doing it because I want to pass on things which I think you should know if you want to do Computer Science. Another thing I find amusing/irritating (but also rather pleasing) is when we have students come back to Hull after they have graduated and say things like “You know, that stuff you taught is actually quite useful.”

Well, duh.

I use exams as a rather blunt instrument to make sure that folks learn the stuff that is really important about the subject. There is no secret about some of the topics that will be on the paper, since those things are there every year, and all you have to do is learn them. And by learning them I mean not being able to repeat the words, but actually achieve something using what you know. In fact, the way I see it, learning by applying the knowledge is actually much easier than just trying to bash in sequences of words that you can then trot out if you recognise the context of the question.

You could learn that “An interface is a set of methods that a class must implement in order that it is possible to create an instance of that class”. Or you could learn that you use an interface when you want to treat invoices, receipts, customers and any other objects in your solution as things that can be printed. The printing process only want to manipulate objects in terms of their ability to be printed, so you use an interface to describe the methods that give this ability and then make each object implement it.

Injustice: Gods Among Us

DSCF1655.jpg

Thanks, but I’ve been around long enough to know those…..

Number one daughter recommended “Injustice: Gods Among Us” as a good game. She reckons it is a good way to find out who would win in a fight between Superman and Batman. Since you can actually do that.

Yesterday I got hold of a copy. And she is right. Great game. I was expecting a good beat’em’up, but actually it is much better than that. There is also an engaging story mode that tells of Superman gone bad and even though it uses a Parallel Universe as a narrative device (quite the story telling mot du jour at the moment – hello Star Trek and Dr. Who), this does mean that you can have more interesting fights.

I got the game for the Wii U, figuring that the platform could do with some love at the moment. It works very well, with the Wii U controller either duplicating the video screen or showing you the player moves. I really like using the Wii U to play games. It now feels very natural to have a screen in your hands as well as in front of you. In fact, with Wii U consoles now available for around 150 quid I reckon they are a bit of bargain at the moment. Hopefully Sony will do something with the PS Vita and Microsoft with Glass to make the experience available on their platforms.

Anyhoo, we spent a happy afternoon working through various superhero permutations. Recommended.

Hull Collectors Fair

Last autumn they had a Movie Buffs fair in Hull and I went along and bought a few bits and bobs.Today there was another one and so we went along and took some pictures.

DSCF1652.jpg

Predator Jazz Hands

DSCF1638_39_40.jpg

Now, that’s a toy collection

DSCF1644_5_6.jpg

“Good time we had, yes”.

IMG_6960.jpg

What I bought, currently above the fireplace. Number one wife says it is “growing on her”, which is good enough for me. Anyone know the identity of the green guy with the red eyes and the figure to his left?

Pebble Watch

DSCF1624.jpg

So I  was looking something up on the http://www.coolcomponents.co.uk/ site. And I noticed that they had some Pebble watches for sale. They must have backed the Kickstarter at an early stage. Anyhoo, I’ve always liked different watches, and so I placed an order. And today it arrived. And very nice it is too. Very light, but not at all flimsy. And supposed to be very waterproof. You can see what’s inside here.

The watch uses a digital paper screen, rather like the ones in e-Readers. This allows it to display high contrast, high resolution (for a watch) black and white images very well indeed. It comes with a bunch of different watch faces which you can choose from. I like the big text one above. There is also a watch face SDK which you can use to make your own faces using a C program.

DSCF1621.jpg

Obligatory unboxing picture.

I’ve got the watch paired with my Nexus 7. It uses the Bluetooth connection to display emails and appointments and it works a treat. I’ve not got a great feel for battery life yet, but it went through the day without breaking a sweat.

What I really, really, really want to do is make it work with my Windows Phone. I’ve a horrible feeling that this will be rather tricky, even if I pair it with the phone and send data I’ll need to know what the protocol is. This is one of the very rare occasions where I wish I had an Apple or an Android phone, as it works with both of them. Maybe in the future it will be made to work with my lovely Lumia, For now I’m happy with what I get via the Nexus, but a phone connection would be awesome.

They say that Apple and maybe even Microsoft are working on watches like this at the moment. I can see why. I had a Spot watch a while back and I loved it (although you couldn’t really use it in the UK). A well connected, micro framework powered, version of the Pebble would be awesome. As it is, if you fancy something geeky but probably even useful, you should take a look.

Read the Specification. Please.

IMG_6292_3_4.jpg

I think that more software projects fail because of misunderstandings about the specification than for any other reason. The developer makes loads of assumptions about what the program needs to do and the customer can’t be bothered to keep an eye on what is being produced.

I was reminded of this when I was marking the first year coursework today. We set a tightly specified set of deliverables and then each student has 15 minutes to show what they have made. This is a lot of work. It takes five of us two and a half days to work through everyone. And then I have to spend at least two days going through the marked sheets and making sure that all the marks line up.

This year we set some quite complex deliverables and it was very pleasing to see that many students had risen to the challenge and produced some lovely stuff. But some of them had made really nice solutions to the wrong problem, because they had not read the specification in detail. They’d just read enough to convince themselves that they knew what was needed and then gone off and built it. And in many cases they needed to do more work to make their version than they would have needed to make the one that was required. Oh well.

Of course in a teaching situation this is not a huge problem. Folks lost a few marks and we moved on. And hopefully a lesson was learned, which is what it is all about.

One year I’m going to produce a huge, complex piece of coursework with a long and highly detailed description which has, right at the end, the phrase “Please ignore all the above. Just make me a program that prints “Hello World” in large friendly letters.”…

Lensbaby Bendy Lens

The LensBaby composer is a lens mounted on a ball and socket arrangement which you can twist to change the way that it focuses the light onto the camera sensor.

image

I bought one a while back and every now and then I get it out and have a play. It is quite fun. Very old school, in that it is basically a single lens in a sliding tube. There is no auto focus and you adjust the aperture (the size of the hole the light comes through) by dropping in and out little metal masks that are held in place with magnets. A bit fiddly to use, but the lens itself is pretty darned sharp, and you can get results that would be very difficult to get any other way.

IMG_6570_1_2.jpg

IMG_6547.jpg

IMG_6540.jpg

If you have a digital SLR and you fancy spending some time doing things the hard way, and never being quite sure how the pictures will come out, they are kind of fun.

Taking your Lumia 920 to bits

image

When I was a kid, whenever someone gave me some toy or other one of the first things I would to was take it to pieces to find out how it worked. To my credit, I was usually able to put the thing back together again, although I must admit that as devices have got more complicated I don’t do as much dismantling as I used to.

And the good news is that with the rise of the internets, I don’t have to. The folks at iFixit have recorded a lovely video of a Lumia 920 being taken to bits and then, most importantly, put back together again.

I’m not advising that you should do this kind of thing for fun, but the important part for me is that that I reckon that I could probably get away with having a go. Particularly as all the breakable bits like the headphone and usb sockets are on modules that look like they can be easily removed and replaced.

Even if you have no intention of ever taking your phone to pieces I recommend watching some of the video just to bring home just how much is going on inside that smooth plastic block.