Wednesday, 25 February 2009

Silverlight in Johannesburg

Here we go again. In December I ran the first in a series of courses under the Microsoft Metro programme dealing with Silverlight 2.0 for Developers. The whole experience was a delight including the journey - and I don't travel well.

So here I am in Johannesburg for another event and thought it might be interesting to compare the journey to Sydney with the one to Johannesburg.

It was to be an evening flight so I got to spend the morning with the family. Sunday lunch was a fry up, a little going away treat.

Out the door by 1.30 pm.

Check in at Manchester Airport at 2.30 pm and discover that whoever booked my flight didn't request a through ticket so I was going to have to retrieve my bags at Heathrow and check in again.

Doh!

Had time for a coffee and an hour of admin in the terminal.

Boarded the shuttle to London Heathrow. I was one of the last aboard and struggled to find space in the overhead for my carry ons. I was seated in row 2 but the nearest overhead with space was row 23!

Several passengers were concerned about the location of their bags and the inevitable crush to retrieve them when we arrived. The purser (let's call her Debra Hogan) had a real attitude problem towards the passengers at this time. She shared her opinion of us with one of the stewardesses in such hushed tones that whilst working my way back to row 23 I heard her clearly at row 5. What a sourpuss!

As soon as the seat belt sign went off at Heathrow, I was on my feet heading towards the rear of the aircraft. Several of the passengers had reached their feet before I made it to my bags. By the time I had retrieved them, I now had a lot of people between me and the door I wanted to leave by.

Once off the aircraft, I had to head for the baggage hall to await my case rather than simply step onto the transfer bus. This took around 10-15 minutes. Once I had my case I had to leave Terminal 5 and catch the Heathrow 'express' to Terminal 3. I needn't have rushed.

When I reached the carriage 10 minutes later I still had another 10 minutes before it departed.

The trip to Terminal 3 only took 5 minutes but then it took a further 10 minutes of corridors, escalators more corridors etc. to exit the station outside Terminal 3.

Into Terminal 3 I staggered and headed for check-in. Thank heavens that was over! I reached check-in and thought I would try for one of those fabled free upgrades everyone keeps telling me about.

"I'll check for you sir. Just one minute!".

Things are beginning to look up.

Wrong!

"I'm sorry sir, check in is closed for that flight. We have a one hour limit and it is 55 minutes to take off".

Now rather than "do an irate business traveller", I opted for the bemused, polite, apologetic traveller. Many thanks to a nice guy named Andrew for letting me through.

I guess the other guys near me at check in must have gone for option (a) as they didn't get onto the plane.

By the time I got through the x-rays and to the gate, they were just about to take my case off the plane.

"Mr Stripe?" enquired the irked attendant.

I squeezed into my Economy seat for take-off but luckily there were plenty of free seats available once we were airborne.

I grabbed three over the wing.

I ate a Beef 'ready meal' Stroganoff over France. I'm sure it's supposed to be strips of beef rather than cubes but never mind.

I watched a film (Burn after reading) over the Mediterranean and Algeria then popped a pill as we entered Niger airspace.

Fitful sleep over Nigeria, a little piece of Cameroon, Central African Republic, Congo, Angola, a sliver of Namibia and then finally gave up over Botswana feeling pretty sick. It was either the pill or the Beef.

Flew over Botswana sitting in the toilet (excuse me - WC) just to be on the safe side. Emerged in time for some scrambled eggs and tea before landing in Johannesburg.

Can I just say at this point that the crew (Virgin Atlantic) were wonderful. Really pleasant and friendly. Especially with a guy who left his brain at home in Burnley and struggled to remember if he drank tea or coffee. Furthermore, did he take sugar?

Can I also say that the Qantas crew in December gave me a warm and fuzzy feeling too. I am still waiting to enjoy a British Airways flight (long or short haul). Come on BA!

Now perhaps I was tired but the walk from the plane to baggage reclaim felt an awfully long way. One bonus was that my bag was the first through the chute. Now there's a surprise!

All I needed now was to find the car that had been arranged to collect me and take me to my guest house so that I didn't have to submit myself to Johannesburg Airport taxi touts.

I came out the door looking at all these faces looking back at me holding those bits of A4 with a name on it.

I looked around for Mr Stirpe. I even checked again for Mr Stripe.

My car wasn't there.

I found out later that the document that I sent last week with my flight details was 'unreadable' but no one thought to get back to me to resend.

So anyway. I submitted myself to the Johannesburg Airport taxi touts.

Didn't take too long. My main concern as I got into the car was how much am I going to get taken for?

What I should have considered was that not all taxi drivers have 'the knowledge' of their particular patch.

When I told my driver where I wanted to go he dug out his Johannesburg road map and tried to find it. After a few minutes, he turned to me and said. "Here, you find it!", and set off.

And so the guy from 9337 km away took a look at the book and determined that the Little Tuscany Guest House could be located on page 15, grid DC-97. Better make that 9449 km. Burnley is 80 km from Manchester airport and the Little Tuscany Guest House is 32 km from Johannesburg airport.

All things considered, I prefer Business class!

I initially wrote this post during the one hour taxi journey.

Crikey, traffic is bad on a Monday morning!

Can't wait to see the guest house.

I had been cautioned about staying in a guest house rather than a proper hotel.

When the list of potential accommodation was sent through by Microsoft, the Little Tuscany Guest House was top of the proximity list.

Rather than spend time visiting every venue's web site to check it out, only to find out that it exceeded budget, I simply asked our resourcing team to start at the top of the list and work down until they found something that suited them. They booked the first venue.

I had my concerns. Budget and my comfort aren't always compatible.

And so we arrive at the Little Tuscany Guest House.


What a wonderful place. It is a series of lovely chalets in pretty surroundings. The room is brilliant! I am ground floor with a patio door that lets out onto a terrace that opens onto the lawn. Perhaps the only thing that this room is lacking is a mini bar. Then again, the bar is just a short stroll past the pool.

Have spent the afternoon at IT Intellect getting the room ready for the course tomorrow. There were plenty of helpful people on hand to help with setup.

We are just about set for the morning.

So a quick spell chek (only kidding), get this posted and then an early night.

Oh yes. One more thing. I had been hoping to spend quality African time with my kids using Microsoft Messenger and my new Microsoft Web cam. However, Messenger is unable to connect any longer on my Vista laptop (it used to). I am getting an error (80072f0d).

Now I have spent the afternoon with five 'techies' and they all came up with firewall. It wasn't the firewall.

So if anyone has any ideas, please let me know. I would be most grateful!

Thank goodness, life isn't dull.

I couldn't cope with dull.

I worked for General Electric Company - GEC and then British Telecom - BT many years ago.

That was dull !






See you soon

Phil Stirpé
"I don't do average!"

The Designer / Developer workflow

When I was Lead Programmer on The Darkening (or Privateer 2 as it ended up being called), a group of us spent some time at Origin Games in Austin Texas. One lunchtime (a Tuesday), there was a gathering in the canteen. Do they call them canteens in the States ?


Anyhow, it was quite the thing to allow anyone in the company no matter what their actual job title, to make a pitch to the company/ their colleagues . The day I was there, a guy (artist/designer) ran a movie he had put together in 3D Max. It formed part of his pitch for a game idea he was proposing. For it's day (1994) it was awesome!. Imagine NewYork, night time, ally way. Fire escape to your left. Steam (yes computer animated steam in 1994!) rising from grids in the road. It was beautiful, absolutely beautiful. Everyone in the room was looking at this thing and waiting to see what he came up with next.

I'll tell you. He told us his working title. "Hobo Killer". 40 jaws dropped. And if there had been a pin, you would have heard it.

I remember a game called Magic Carpet which had a very clever animation system for flying around terrain. It was fabulous. However, once you had flown around for 5 minutes there was in fact nothing to do. 'Gameplay' was rubbish.

During the Christmas holidays we invested in a number of computer and console games to help the Stirpé family bond.

My wife Julie (quite the accomplished equestrian) bought My WII Horse 2. Looking forward to getting 'clear rounds' when showjumping, she was non-plussed when asked to muck out and groom her horse. This was, as the game stressed an 'important part of the rider / horse bonding process'.





Whoever the consultant was on that game, they had too strong a voice !

Can you imagine my son Alex happily cleaning his MP-40 before getting stuck into the Red Army in Call of Duty 5? I don't think so.

I have known developers spend months developing a component that did exactly the same thing as a component that they could have bought from a reputable software vendor for less than £200.

One potential client balked at paying me for a day's one to one consultancy to help him realise a spreadsheet that he conceived and after electing to do it himself was still trying to 'crack it' 12 month's later.

Let's talk movies.

Soldier.

Worst film in the history of film. Sorry Kurt Russell (loved Escape from New York!) and Sean Pertwee. But it was awful. It must have started with one of those fabulous fantasy art concepts of a rusted aircraft carrier listing in a desert. Now I grant you, this was/is an awesome vision to take in. But from that concept we extrapolate a plot and film so awful that I am squirming in memory as I write.




For those who haven't seen it, the reason that there is an aircraft carrier listing to one side in a sand dune (and it did look fantastic) is because all junk (including misfits like Kurt) have been transported to a 'dump' planet. So rather than recycle all that useful steel, you transport it to another planet (using a spaceship smaller than the aircraft carrier) and drop it somewhere else.

It's not that I am a Green or anti-sci-fi. I love sci-fi and can cope with fantastic and outrageous. I just don't do 'stupid'!

Incidentally I have just had a memory. Before we were married, I took my wife on a date to see Indiana Jones and the Last Crusade. While we were walking back to the car I said to her, "Of course, the tank was travelling far too fast. It had a top speed of 10mph!". I get the look that says the next date is in joepardy. "So." she says. "You have no problem with a 900 year old knight and the bringing his father back to life with the cup of Christ, but a tank travels too fast and you're complaining ?!"

Why do we let a designer implement a concept as clever as it is useless in practice or allow a subject specialist/consultant to include a feature into a game because it is 'authentic'. Never mind the developer so focused on a problem that he cannot see the solution/alternative smacking her/him in the face.

Do you know, I am sure that I had a point that I wanted to make when I started to write this half an hour ago but for the life of me I cannot remember what it was.

Is there an actual point to this piece? Apart from a series of anecdotes that is.

Perhaps it's this. Having spent quite some time delivering training in both Silverlight and WPF worldwide for the past 2 years, I would caution designers and developers alike to avoid getting giddy. Particularly the developers. Now that they are free from the limitations of WinForms, they can push WPF to the limit and produce applications that are truly stunning and cutting edge.

But will they be so extreme that users will actually avoid (or be unable to) use them? I have seen a lot of 'Buttons' in the last two years. Some of them actually looked like something a user might actually think of clicking.

No. That's not it. At the top of this piece I thought I might warn of pitfalls when designers and developers collaborate. If fact, most times each group (and I include client/subject specialists here too) tempers or inspires the other and what is produced is a good or even great product.

However once in a while, one 'faction' will get away with something they shouldn't and you end up with something dire.

So. No actual 'Designer / Developer workflow' to speak of then. I promise to do a piece in the future showing how easily designers and developers can collaborate using tools such as Expression Studio and Visual Studio.






See you soon

Phil Stirpé
"I don't do average!"


What's in a name?

Sometimes I envy the Smith’s and Jones’ of this world. How often are their names misspelt?
 
At school I quite liked being different. After all. Every one named Smith had the nickname Smiffy. I on the other hand was called Stirpico (this was the 70's) which I quite liked. Any association (no matter how remote) to Al Pacino was fine by me.
 
I am quite used to having hotel receptionists not being able to find any trace of my booking. It happened again just last night. I end up asking them to check for a Mr Stripe.
 
The most problematic mix up was almost 20 years ago. The story begins with a younger and thinner me out shopping with my wife to be. As we passed a Manweb shop, an assistant pounced on us and asked if we would like to see a demonstration of the new VAX vacuum cleaner. As it happened, we were in the market for a vacuum cleaner so we accepted her offer.
 
 
She spent 15 minutes repeatedly getting a carpet tile dirty with a variety of messy substances such as mud, ketchup, blackcurrent etc and then cleaning it up with ease. Even the blackcurrent was shampooed away very quickly.
 
When she was done we agreed to buy one and accompanied her to the till. It was offered on 12 month's interest free credit which we opted for and she started to type in my details. Two minutes later, her expression changed and she told me that according to her system I was unable to get credit as I was blacklisted.
 
I asked why and she told me that the system didn't say and that I would have to ask head office. In the short term we still wanted a VAX so my wife-to-be said that she would buy it.
 
"Do you live at the same address?" she asked.
 
"Yes" we said.
 
It turns out that the house was blacklisted and so she couldn't have credit either.
 
As we left the shop we noticed a branch of a rival chain called Rumbelows. On the off chance we popped in and tried to buy a VAX on 12 month's interest free credit. No problem. In and out in under 10 minutes.
 
Whatever the problem was had to do with Manweb. I popped back in (with VAX) and asked to see the manager. I demanded to know why Manweb had blacklisted me when Rumbelows obviously didn't have a problem with me.
 
He fobbed me off with "Sorry, I can't tell you. Data Protection Act you understand." Now coincidently I had delivered a presentation on the very same act the previous week and so was able to counter with:
 
"What part of the act would that be? Certainly not the section that states

'The person who has their data processed has the right to view the data an organisation holds on them, for a small fee'.

Furthermore, I cannot conceive of a reason why I should be blacklisted. There has obviously been an error and so

'The person who has their data processed has the right to request that incorrect information be corrected. If the company ignores the request, a court can order the data to be corrected or destroyed, and in some cases compensation can be awarded'

would seem relevant."

Manager gets back in his box at this point and passes the buck. He directs me to contact head office of the parent company Norweb the power generation company.
 
The following week I was able to get into the Norweb office in Manchester and ask to see someone in authority. When authorative looking person turns up I ask to know why Norweb have blacklisted my house.
 
"I'm sorry sir. I cannot tell you. Data Protection Act. You understand."
 
"What part of the act would that be ? Certainly not the section that states

'The person who has their data processed has the right to view the data an organisation holds on them, for a small fee'.

Furthermore, I cannot conceive of a reason why I should be blacklisted. There has obviously been an error and so

'The person who has their data processed has the right to request that incorrect information be corrected. If the company ignores the request, a court can order the data to be corrected or destroyed, and in some cases compensation can be awarded'

would seem relevant."

Authorative looking person agrees to check and comes back with an answer.
 
Apparently the householder (me) had failed to pay a bond owing to Norweb for the supply of Electricity some 12 months earlier. This is a bond that all new customers were expected to pay when they first apply for electricity supply.
 
Now I was certain that I had paid this bond as I recalled being annoyed at the demand in the first place.
 
[You are probably wondering at this point if I might actually turn this story around and get to the point. i.e. What's in a name ?. Be there in a minute !]
 
I checked my statements that night and sure enough, a check to Norweb had been cashed a year earlier.
 
Back to Norweb.
 
I find my pet authorative looking person and show him my statement and ask what they have done with my money.
 
He has no idea how they are going to find out.
 
Then an idea occurs out of left field.
 
"Can you check to see if £100 was credited to my father's electricity account ? You see there are only two Mr Stirpe's in Britain and the other one is my father. I am wondering if someone has credited my father's account by mistake."
 
"I'm sorry sir. I cannot tell you. Data Protection Act. You understand."
 
I'll cut a long story short.
 
I made two more trips to Norweb. The first with my father in tow to insist that he look at his records which did in fact prove that a mystery £100 appeared in his account at the same time that my £100 vanished.
 
The second was to demand that the blacklist be removed which they refused to do. They also refused to acknowledge that an employee had made a mistake. They claimed computer error.

"Oh no!" I said. "A computer doesn't read Philip Stirpe and confuse that with Sisto Stirpe. A human who believes that there couldn't possibly be two Mr Stirpe's and picks the first that they come to, does it".
 
So there we were. Norweb refused to remove the blacklist and I didn't have the heart or time to pursue a legal challenge. What's a guy to do in that situation ?
 
We moved!
 
To those who currently reside at 50 Tootal Road Salford. I do hope you have been alright for credit over the last 19 years or so.
 
Here's a thought. Given that you can get sued if you don't declare something like a problem neighbour to the buyer of your house, could someone sue me for not mentioning the blacklist?
 
One good thing about the misspelling is that when I pick up the telephone to answer one of those 7pm tea-time cold calls and get asked "Is that Mr Philip Stripe?" , I just say "No" and hang up.





See you soon

Phil Stirpé
"I don't do average!"


 
 

Sunday, 15 February 2009

Styling controls for Silverlight or WPF using Expression Blend

This was one of the first video tutorials that I recorded and was aimed at styling controls for Silverlight in Expression Blend.

However, the technique works just as well for Windows Presentation Foundation - WPF.

You can read the tutorial here.


HTML5 player



Flash player


Interested in Expression Blend training?


Developing Windows Presentation Foundation applications with Visual Studio 2010 and Expression Blend 4  


Developing Silverlight Applications with Visual Studio 2010 and Expression Blend 4


Fundamentals of XAML and Microsoft Expression Blend


See you soon

Phil Stirpé
"I don't do average!"







Saturday, 14 February 2009

Styling controls for Silverlight or WPF

In Silverlight and WPF, all standard controls have a default look and feel (or style). In the case of these three buttons, they are the typical grey rounded rectangles that most people are familiar with.

 
 
As you can see from the XAML below, the only formatting provided relates to height, width and content. Everything else is built in.
 
 

Like cascading style sheets (CSS) for HTML, styles can be defined in XAML that can be applied to controls such as buttons.

As you can see from the style element below, styles are essentially a property bag. In other words a list of properties and corresponding values.

Here I have defined a style with it's Key set to RedButtonStyle that is meant to be applied to controls of type Button.
 
 


Properties such as Background and Foreground colours are set, so too are FontFamily and FontSize.
The style is defined in the Resources section of a Silverlight UserControl. However, it could just as easily have been defined in app.xaml and therefore be available to the entire application.

Once defined, a style can be applied to multiple controls of the appropriate type.

Here we have the same three buttons that have had their Style property set to the static resource called RedButtonStyle.
 
 

As you can see, they all have their Background, Foreground, BorderBrush, FontFamily and so on set to the same values.

They have been 'styled'.
 
 
You can of course define styles by typing the XAML directly but there are tools that will do much of the work for you.

For example, styles can be defined and applied very easily with Microsoft Expression Blend. A future tutorial will show you how.

I have recorded this tutorial as a video. You can watch it here.


Training?


Should you require any training in Silverlight, QA offer the following courses:

Developing Rich Internet Applications Using Microsoft Silverlight 4


Developing Silverlight Applications with Visual Studio 2010 and Expression Blend 4



See you soon

Phil Stirpé
"I don't do average!"