Jolly Boating Weather

If you are feeling a bit annoyed about my endless parade of photographs of good weather and happy times, please bear in mind that I’m writing this back home on Monday evening and it is cold, dark and raining… But on Saturday it was none of those things, so we went on a little boat trip.

DSCF5007.jpg

This is the view back up the lake to where we were staying. Torbole is on the right hand side. I bet that bit of rock made a great noise when it fell down.

DSCF5100.jpg

Nice church

DSCF5139.jpg

Part of a nice castle

DSCF5285.jpg

Wind surfers making the most of the excellent conditions.

Verona Day

One of the great things about being on holiday is that you don’t have to worry precisely what day it is. As far as we’re concerned, today was “Verona Day”. In other words, we got on a bus and went there.

DSCF4356.jpg

They have a proper Roman Amphitheatre. Apparently “One Direction” have played in this very place, so we are obviously in an area with a lot of history.

DSCF4434.jpg

According to local folklore, this is the actual spot where a bunch of nineteenth century marketing men got together and decided that they should get themselves a piece of balcony based “Romeo and Juliet” action.

WP_20130911_17_34_54_Pro__highres-2.jpg

The evenings here are rather pretty.

Holiday Hill Climbing

WP_20130910_14_56_08_ev3_Pro__highresAnd3more.jpg 

Today we took a walk along to Riva del Garda, a town just a couple of kilometres from Torbole. Very nice place. Great museum (I like museums) and a castle thingy half way up the hill at the side of the town. The guide book said it was a 20 minute stroll from the centre of the town. Which it is. For Superman.

For us mortals, arriving a somewhat exhausted forty minutes or so after setting off, it was well worth the trip though. I made the picture above from four shots taken with the Lumia 1020.

WP_20130910_15_35_01_Panorama-2.jpg

I also took a few panoramas while I was there.

Speaking Italian Like a Local

DSCF4015.jpg

The good news is that I can speak Italian like a local. The bad news is that it is a local of East Yorkshire, UK. I’m trying to pick up words where I can, it seems the height of bad manners to expect everyone to learn English just because they might one day want to speak to me.

It is not going too well. I usually have this unnerving habit of speaking French whenever I go abroad. It’s the only foreign language that I know more than a bit of and it sometimes works in France. In Italy it is more of a hindrance though, serving to massively confuse the person I’m speaking to and massively annoy any French people in the room at the time. Oh well, but I did manage to order the right kinds of coffee today, which must count as some kind of progress.

Heading for the Lakes

WP_20130907_19_05_34_Panorama.jpg

It’s been a while since I’ve travelled somewhere with the express purpose of doing nothing when I get there. Heading off to Imagine Cup, TechEd, Campus Europe or whatever is always great fun, but there is always that underlying concern that you might not have the right kind of VGA adapter for the Surface in your bag when you get there. And they might not laugh at the jokes.

Anyhoo, today we are setting off for a week in the Italian Lakes. Actually, not in the lakes, that would be silly, but in a carefully selected, economically priced establishment just on the shoreline. Of course, I’ve not completely released my grip on my iron work ethic, there will be blog posts and pictures.

But I’ll do them when I get back.

Hull Freedom Festival

DSC02526.jpg

Hull is one of the cities in the running for “City of Culture 2017”. On the showing of the Freedom Festival event we went to today I think it is there already.

It. Was. Awesome.

DSC02447_8_9.jpg

They had these fluttering flags all around the city centre.

DSC02654_5_6-Edit.jpg

And the museum up town had been suitably decorated.

I’m ashamed to admit that this was my first trip down to the festival. We are not normally around this time of year, but having seen some of the preparations and with a good (but not great) weather forecast we decided to go for it tonight.

I’m so glad we did. Everything was wonderful. You just walked around a corner and there was another great band, playing superb music. We bounced off various stages and I took some pictures.

DSC02681.jpg

This is Kirsty Almeida, with her brilliant band. Great jazz singing, amazing musicians.

DSC02697.jpg

I’m not sure who these guys are. But by gum they were good. And loud.

DSC02735.jpg

And this is acrobatics to a driving African beat.

Around the streets we had some donuts that were cooked before our eyes (and were yummy), went round an art show and visited the Museum of Club Culture who had a special David Bowie exhibition. Then we bought some strawberry sherbet bon-bons a pig shaped bag from the craft stall (not for me) took in a few more acts and headed home.

The festival is on for the rest of the weekend.

Get. Down. There.

Scary Lifts at Campus Party EU

WP_20130904_16_18_05_Pro

This is the last day of Campus Party down in London. Andy and the crew will be judging the Hackathon Entries and I’m back in Hull. Oh well. Good luck to everyone. And I hope that some of the things that I said on Tuesday (it seems such a long time ago) were useful.

One more story from the experience: We were carrying some stuff back to the “base camp” room with one of the O2 Dome security guys. As we were heading for the lifts the chap was talking about a science fiction film he saw ages ago about this futuristic society. Every year they took the brightest and best of their people and put them in a lift to “ascend to the next level”. Of course there was no next level, just a horrible fate. He finished his story just as he punched the button to close the lift doors.

I made the point that with me as one of the party, everyone was completely safe from anything like that…..

Campus Party EU Day two (for me)

WP_20130903_20_16_24_Pro__highres.jpg

For those of you who that aren’t convinced by the camera in the Lumia 1020 I say Ha! and Ha! again. I’m going to print out an A3 version of this, and I reckon it will look awesome.

I’ve got a confession to make. I’m surrounded by people working through the night, making things and talking tech. And last night at eight thirty in the evening I toddled off to the hotel to watch CSI: NY and turn in. I blame it on my advanced years and the fact I was up at 5:15am yesterday to catch the train here. A poor excuse I know, but I did have enough stamina left to figure out who the killer was A clue: It was mum.

Anyhoo, here are a few more pictures from the event..

DSC02391.jpg

A blimp giving some sound advice.

WP_20130903_14_31_20_Pro__highres.jpg

I bought these from a shop here. Sure takes you back..

DSC02407.jpg

Awesome quad copter with eyes that can follow you round the room. Literally.

DSC02430.jpg

Completely amazing steampunk retro computer.

WP_20130904_11_00_22_Pro__highres.jpg

Picture Puzzle: One of the people in this photograph is wearing a hideous wig. Using your skill and judgement draw a large X over them so that you can’t see them any more.

Rob at Campus Party EU

DSC02334_5_6.jpg 
I call this photo “Down in the trainstation at 6:00 am”..

What do Rob and George Osbourne have in common? Well, not a lot as it turns out, which is definitely good news for him. But one thing we do share is that we are both at Campus Party EU today.

I don’t think George did a talk on Windows Phone development though, at least I didn’t see him at mine making notes. I had a great audience of folks who were all keen to have a go at writing something for Windows Phone. There was quite a wide spread of development experience in the audience, so I kind of went for the “broad comedy” approach that seemed to go well enough.

DSC02351.jpg

This is the audience being warmed up for me.

DSC02353.jpg

And this is Riaz doing the warming.

DSC02384.jpg

They have an Xbox one here, not sure what the game is though. The whole thing is great. Like the Hacked.io event I went to earlier this year, but much, much bigger and international. The clue is in the name I guess. A big chunk of the dome is full of people making things, doing stuff and sharing ideas. A lot of fun is being had and good done.

WP_20130903_12_15_33_Pro__highres.jpg

I found this drawn on one of the Whiteboards. Indeed.

For those of you who were at my talk, you can find my Windows Phone App Studio screencasts here. You can find App Studio here. And you can find me in the open area near the Xbox One sitting typing at my Skinned Surface.

Windows Phone Progress Indicator

image

You might find this useful. If you want a Windows Phone program to show that it is busy, maybe updating content from the network, binding data to a page or emptying a bank account then it turns out this is very easy. All you have to do is create a ProgressIndicator and bind it to the SystemTray.

ProgressIndicator prog; 
protected override void OnNavigatedTo(NavigationEventArgs e)
{
prog = new ProgressIndicator();
prog.IsIndeterminate = true;
prog.IsVisible = false;
prog.Text = "Leave me alone. I'm busy";
SystemTray.SetProgressIndicator(this, prog);
}

The code above makes the ProgressIndicator in the OnNavigatedTo method for the page, there are lots of other ways to do this. You can set the colour of the text and background of the display, but I use the default because I’m boring. If you set the IsIndeterminate property to true (as I have above) , this means that you don’t know how long the action will take. If you set this to false you can then use a SetValue method to adjust the size of the bar that is displayed.

Then, when your program is busy it just has to go:

prog.IsVisible = true;
This turns on the busy indicator. I’ve made a tiny demo application which uses two buttons to turn the indicator on and off. You can find it here.

Peter’s 3D Printer

IMG_7511.jpg

I went out this afternoon to take a look at Peter’s 3D printer. You can find out more about it here. I’ve actually seen it now. It’s awesome. The most impressive thing is that all the parts were designed by Peter and some of them were printed by me. And it works. To the point that the fan mount on the picture above was actually printed by the printer itself.

I made my printer from a kit and I’ve been slowly discovering the best way to get things from a roll of plastic fibre into a useful shape. The learning curve has been steep at times, but what Peter has done is much more tricky. He has had to construct and align all the components himself.

The design of the printer is totally unlike mine. The position of the printing head is controlled by the movement of the three carriages up and down the three pillars. The controlling software drives stepper motors that are connected to cable that is looped around each pillar and pulls the carriages up and down. The great thing about this design is that the head can move really fast, and during printing the item being printed doesn’t move at all. The tricky thing is that printing in straight lines involves all the motors making complex movement (which is not a huge problem, the software does all the tricky maths) but any inaccuracy in the movement will result in straight lines becoming curved or slanted.

Peter has spent a lot of time aligning everything and now he is getting some excellent results. Eventually he will be using his printer to make a whole new one.

IMG_7532.jpg

This is my favourite view of the printer.

What does ?? mean in C#

WP_20130829_17_11_38_Pro__highres.jpg

I sent out a tweet asking folks if they knew what the ?? operator in C# does. Quite a few people did, which was nice. For those of you that haven’t heard of it, here is my explanation.

If you are a C# programmer you will know about references. The way that C# works, a variable can be managed by value or reference. A variable of value type is stored in a location in memory. For example:

int i;

This creates an integer variable called i. When the program runs the system will decide where in memory the variable should live. You can think of computer memory as a whole bunch of numbered locations. Because that is what it is. Perhaps the variable i could live at memory location 5,000. Then when we write the code:

i=99;

The effect of this is to put the value 99 in memory location number 5,000

So, if I write code like:

j = i;

This would copy the value held in memory location 5,000 into the location where the integer variable j is stored.

This is how value types work. Whenever we do an assignment of a variable managed by value what happens is that the value is copied from one memory location to another.

So, what about values managed by reference? Well, in these there is a level of indirection between the variable and the actual data. Suppose we have a class called Account, which is managed by reference.

Account a = new Account();

This statement makes a new account variable and then sets the variable a to refer to it. The variable a will hold a reference to the new Account. Perhaps the new Account will be located at memory location 10,000 which means that the variable a (which might be stored at location 6,000) will hold the number 10,000 – because that is where the Account instance is stored. The Account class might have a Name property, so I can write code like:

a.Name = "Rob";

When the program runs it will go to location 6,000 (where a is stored) and read the number out of there to find out where the Account is. In this case the variable a holds the number 10,000 and so the program will go to the Account there and set the name.

So if write code such as:

Account b = a;

This creates a new Account reference called b which refers to the same Account instance as a, in other words it will refer to location 10,000.

So, in the case of the value the information is just there in memory, but for a reference we have to go where the reference refers. With references you can also set them to null:

a = null;

This has the effect of putting a “magic value” in the variable a that indicates it really points nowhere.  It is a way of saying “this reference does not point to any object”.

The null reference is often used in programs to indicate that the thing you asked for could not be found, or hasn’t been made yet, or doesn’t matter.

This “nullability” is so useful that people wanted to be able to make values “null” as well. So they invented one.

int? ageValue;
The addition of the question mark makes an integer variable (ageValue) that can be made null. For example, the bank might store the age of a customer when it is important (when the age is less than 20 say) but once a person reaches a certain age, from then on the age is completely irrelevant to the system. They can mark the ageValue as null to indicate this.

ageValue = null;

Programs can also test for null

if (customerAge != null)
{
// Stuff you do if the age matters
}

In XNA you often find nullable value parameters being sent to method, so that the method can know to ignore them.

So, I’ve been writing for what seems like ages, and I’ve still not explained what ?? does.

Well, ?? provides a convenient way that I can map the null value of a nullable variable onto a specific value

int actualAge = customerAge ?? -1;

It saves us having to write code that tests for null and sets a value appropriately. The above statement sets the value of actualAge to the value in customerAge unless the value in customerAge is null, in which case it sets it to –1.

if (customerAge == null)
actualAge = -1;
else
actualAge = customerAge;

In other words ?? is a short form of the above test.

Feminine Logic

WP_20130827_17_04_42_Pro.jpg

Last week our washing machine broke. Yesterday I fitted the new one. Only problem is that the new machine is slightly larger and catches a cupboard door so that it won’t quite open as wide as it used to. This means that we can’t get the cleaning bucket out of the cupboard very easily. My proposed solution was to design and 3D print a new hinge that moved the door pivot point as it was opened so that it didn’t catch the washing machine and the door could open further. Number one wife suggested we put the bucket in another cupboard.