Monday, 7 December 2009

What a Bunch of Bastards!

Last year my friend and colleague Adrian went to PDC 2008 and had a good time. Learned a lot too.

He came back all enthusued about Windows Azure. "The next big thing !".

Well I have been so involved with Silverlight, WPF and all things .NET 3.5 that I worried that a year would go by and I would miss the Next Big Thing.

No sooner had Adrian returned and started writing a new Azure course than I had submitted a request to attent PDC 2009 (November 17th to 19th 2009). It was a little premature but it doesn't hurt to be first in the queue.


 
 
 
 
 
I updated that request 6 months ago to include TechEd Europe 2009 (November 9th to 13th 2009) in Berlin as a plan 'B'.
 
 
 
 
A circular was sent round the company saying that money was tight so it wasn't clear if anyone would be able to attend any conferences this year.

I figured "fair enough" but raised the stakes by justifying the expense of sending a single person to a conference in terms of that person then delivering a series of "distilled/bitesize" presentations to colleagues as I worked around the country.

The idea of staff presentations went down a storm and I delivered several on Silverlight. A few people caught the bug and there have been several events since. However, no word on the conferences.

In late September I got a call from my friend Adrian. "They" thought it best coming from him. Apparently there were so many changes happening in Azure that Microsoft felt that Adrian should attend PDC 2009 in order to update his knowledge prior to a sheduled run of events that we will be running for them in the new year.

What could I say? "Thanks for letting me know. I fully understand." Well I did understand and so although I was gutted, there really wasn't a problem.

Time passes, as time does.

There I was at my desk on the evening of 9th November watching the news from Berlin. It was the 20th Anniversary of the fall of the Berlin wall. And I thought "What a bloody brilliant time to be at TechEd 2009 ! I could have spent the day in assorted sessions and labs and then headed out to the wall."

 
 
 
Instead, I was sat at my desk in Burnley working on an ASP.NET demo when all of a sudden; PING ! I had an email.

"Hello from Bob. Your man in Berlin!"

Bob is another colleague.

One who apparently got to go to TechEd 2009.

What a bunch of bastards!


Updated 4th January 2010

Found out recently that Adrian came back armed with a free laptop and video camera.

Damn !



See you soon

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




Thursday, 25 June 2009

By the Silver Moonlight

A little bird told me ...

You will hear a lot about Microsoft's Silverlight over the next couple of weeks (due out on July 10th).

There is a version for Linux, which runs on Mono, called Moonlight 2.

Not a lot of people know that.

(Now Alina tells me she has been testing the thing for the past year).


Training?

In the meantime 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!"



Bank Holiday Accident (One for the Lancet!)

Both a cautionary tale and an unbelievable one.

You will NOT believe it.

It is not technical and in no way relates to my job.

By the way, this tale is not for the squeamish.

No. It really isn't.

"But surely the bank holiday was weeks ago. Why wait until now to tell us ?"

Well my ability and inclination to use a keyboard were affected by the accident I shall tell you about.

Now for those who are squeamish, could I suggest that you go elsewhere? Perhaps you could check out one of my colleagues' blogs?

Still here? Well you have been warned!

So there I was looking forward to a nice relaxing bank holiday after having just recovered from a nasty bout of gastroenteritis courtesy of my stay at the Hilton Pyramids hotel, Cairo. I reckon it was the buffet. Well it certainly wasn't Mr Heineken and his good friend Amstel!

The sun was shining and I thought I would start with the mowing. I fired up the petrol mower and hit the lawn. I had just completed two lengths of the garden when it was clear to me that the outlet to the basket had become blocked due to the damp grass.

So what do you imagine I did?

Now I don't want to come across as arrogant but I do like to think of myself as both intelligent and full of wisdom gained by a rich 46 years of life's experiences.

So naturally I put my hand into the basket and started scooping out the damp grass that was blocking the outlet.

It didn't take long for me to reach far enough in for the blade to cut through my fingertip.

Yes of course the mower was still running!

Now, being the workaholic that I am, I was far too busy chastising myself for wiping out a weekend's chores that it took my mind off the mess that was my right index finger.

30 minutes later I was walking into Burnley Accident and Emergency. My mistake; Urgent Care centre. We have been downsized.

Vita, my lovely nurse told me everything I needed to know about our forthcoming holiday to Florida while patching up my finger which REALLY hurt. Actually, when I said 'our' I meant the Stirpe family, not Vita and I!

Went home for a lie down and lots of painkillers.

So that week was interesting. I delivered a Core Web Technologies course in Leeds to a sympathetic group who overlooked the many accidents in Visual Studio 2008 due to my having to click with my middle finger. Don't get me started on my typing ability!

By weekend, the pain was almost gone but I was starting with an eye infection.

GP's don't "do weekends" so I had to wait until the Monday to get an appointment.

Actually I got in to see the practice nurse. Eye infections don't justify an appointment with the GP.

She told me that I had an eye infection and prescribed some drops.

I told her that I had a lot of pain in my left eye as if there were something lodged there.

She didn't take a look as she "didn't do eyes". She squirmed as she said this. She suggested that I try the drops for a few days as they would probably clear it up.

I headed to London for a four day Silverlight course armed with my drops.

As the week went on, the infection started to settle in my right eye but there was still something in my left eye.

I managed to get through the week until I could get to my local opticians on Saturday.

I was pretty sure that they "did eyes".

They did and within minutes he had spotted an object lodged in the centre of my cornea that had now been there for 13 days.

He kindly rang the eye ward at Burnley General (we still have one of those).

I got a lift there and within minutes the doctor was busy with his tweezers.

Just let me pause for a minute. My eyes are watering at the moment.

OK. I'm good.

When he's finished, he tells me that instead of a foreign body being embedded in my cornea, it was in fact a flap of the cornea that had been sliced open.

He removed it.

So here's the theory ..

When the blade cut through my fingernail, a piece pushed the laws of physics and probability to the limit and flew up to slice through my cornea.

Now you might think we have reached the unbelievable bit. No. That was just the improbable bit. The unbelievable bit will be along any second.

So immediate was the relief from pain that I felt positively frisky and I elected to walk home via the town centre as I felt that a drink at my local Wetherspoons was called for.

Furthermore, I was able to go to the 7th annual Northern Dressage Ball that evening and had a great time. The only problem was that I thought I had taken the wrong glasses.

I have two pairs. My readers and my distance glasses. Most of the night my vision was a bit blurred and so I assumed that I had brought my readers.

By dessert I realised my mistake. I hadn't brought the wrong glasses.

I simply didn't need them anymore.

My sight was better without my glasses than with them.

For the past couple of weeks, I have carried my glasses around with me everywhere. However, apart from perhaps the first hour after waking, I can simply see better without them.

Now that's unbelievable!

So shoving your hand in a lawn mower is a lot cheaper than laser eye surgery but perhaps carries a lower chance of success.

By the way. The finger is healing nicely now.



See you soon

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



How do you solve a AG_E_PARSER_ BAD_TYPE error in Silverlight

For those developing Silverlight applications, you might be familiar with the error 'AG_E_PARSER_ BAD_TYPE'. This can occur both at design time or run time. It is one of those error messages that covers a multitude of sins and therefore proves hard to track down.

I recently got this error whilst developing a demo application to show off data binding in Silverlight 2. As is often the case, I had no idea why I was getting the error. In fact, I spent several hours on the net looking for the answer.

Many developers will identify with the '5 hours spent on a single error' experience.

 
 
Every post that I found described a different scenario and not one of them related to my situation. It was getting late and the Heineken family and I were getting pretty fed up with the whole thing.

In the end, I did what I always do when I hit a brick wall; I did something else to calm down. As this was to be a demo application and therefore viewed by many critical developers I set about tidying up the code.

Half an hour later I was ready to shut down and have a night cap when I hit F5 by reflex and "Crikey !" it worked.

So now I had the task of figuring out what I had done to make the error go away. I could have just left it alone but I was likely to see the error again one day and wanted to be prepared.

Luckily, the Heinekens were still around to keep me company and 10 minutes later I had the answer. Any longer and I would have had to call room service!

Now, I knew that the error was data related. This was a data binding demo application after all.

My error turned out to be related to my namespaces.

I had a namespace called SilverlightData and another nested within it called SilverlightData.DataClasses.

At different stages, I was using a class from one of these namepaces. And in the same way that I would happily leave multiple usings or imports at the top of a code file, I didn't see a problem with my namespace declarations in the xaml file.
 
 

 

During my tidy up, I removed the namespace declaration for SilverlightData as I was no longer using a class from there.

Hey presto ! Problem solved.

Now I am not sure if that was because there were no classes in SilverlightData in use in the current xaml file or that I was simply allowed one clr namespace. Neither sounds convincing. Perhaps you cannot declare nested namespaces ?

Either way, it was late by this point and dawn was close at hand.

I went to bed.
 

 
So if you encounter a AG_E_PARSER_ BAD_TYPE error in your Silverlight application and trawl the net in search of a solution, perhaps you will hit this page. Who knows, maybe this will help you solve the problem.

Then again it could be something else entirely.

Happy coding.
 
 
 
 
 
 
 

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!"

When do you blog?

I first started posting to this blog in May 2008. The hope back then was for trainers to post interesting items that may or may not relate to their area of expertise.

In addition to being of potential use to the reader, it also helped raise the profile of QA as it led to more hits.

Initially I was worried that I would have nothing to say but in time ideas would usually present themselves. Occasionally it would simply be a rant but the rest of the time they would probably be interesting.

One evening in March this year I sat down in my hotel room and began typing when it struck me that I was sat in a dark room typing a post when everyone else was on the terrace drinking beer.

Was I missing a trick here? Should I be blogging by day by snatching a few minutes here and there throughout the day rather than spending leisure time doing it. After all, time spent blogging is time NOT spent bouncing on the trampoline with the kids, painting toy soldiers or sitting on the terrace drinking beer.

And so, I tried an experiment. I would not blog when not at work.

Here is me NOT blogging the day before my Silverlight course in Dubai (bank holiday Monday).

 

After three months dear reader, I can tell you that I haven't blogged once. Not for lack of ideas you understand. In fact, I often have an idea and jot it in a pad for reworking later. However, there is always something to do when I am not actually training. For example prepping, writing demo applications etc.

So I have a theory about the many prolific bloggers out there. Unless blogging constitutes part of their official workload, they either don't have much to do at work or the don't have a trampoline !

Aha! So what am I doing now? Surely I am blogging during the day?

Correct. And when I am late submitting my expenses this month, I'll have a good excuse!




See you soon

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




Wednesday, 25 March 2009

Hello World

It has become a right of passage. Just about every course, tutorial and book will begin with the ubiquitous Hello World phase.

"So let's start with a simple Hello World console application, Hello World WinForm, Hello World custom control, Hello World Silverlight Application, Hello World WCF service .." and so on.

In fact, when adding a web service to your ASP.NET project in Visual Studio, guess what they call the starter method ?


Now I have been in ( not into) IT for over 20 years. I started as a developer programming in Basic. There was a brief time spent with COBOL followed by some 4GLs including one called Sensible Solution.

In time, I moved on to C and then C++ and finally things got a little 'Visual'. I used every version of Visual Basic through to Version 6.0.

Finally there was .NET. However. This isn't a language. It was a whole new bunch of languages, libraries and tools. C#, VB.NET, ADO.NET, ASP.NET, WPF, WCF, WF and most recently Silverlight.

Every one of them has tried to get me to write Hello World.

Well I have a confession to make.

I have NEVER written a Hello World application. Ever!

Even the first time I was invited to try, all those years ago. Live Aid a recent memory. I resisted.
I think even then, I had a sense that everyone on the planet who had read that chapter of the manual had written the code exactly as printed and I felt uncomfortable about playing 'Simon Says'.

There have been times when I conceded to Howdy Pardner but that was only as a gag when delivering a demo.

In fact. I am proud of this little foible / eccentricity.

I have others you know.

Foibles that is.

Books. I don't buy as many technical books as I used to because the web is such a rich source of information.

However there are times when the whole subject has been put down in one place with care, narrative, structure and not too many typos. So why not simply buy a book and cut down on the surfing?

Ah. But what book to choose?

Well, if the author is known to you, that might well help make up your mind.

Covers too must play a part. O'Reilly are always putting attractive line drawings on their covers that are easy on the eye. Although I am not sure what they are supposed to say about the contents.

Just as those recruiting a new member to their team might identify a criteria that will easily eliminate half of the candidates so there are fewer to interview, for example "must have MCT, MCSD, MCTS, MCDBA, play wargames, good with livestock AND speak Italian!".

So I have a simple criteria that I apply when vetting potential books from a group of unknown authors.

The Chin Shot!

If the author is photographed cupping her/his chin on the cover then sorry, I don't want to read the book. It's just so cheesy !




The 'Chin Shot' is the Hello World of studio photography.

I have just realised that with the exception of the early 80's when I was a keen New Romantic, I am not one for following trends.

Rest assured, should I ever write a book, there will be no Hello World applications or Chin Shots for me.

Come to think of it, I am not into Line Dancing or 'must have' gadgets either.

Now does that make me an individual and my own man, or simply grumpy, pedantic and idiosyncratic?

That's enough self analysis for one day.



See you soon

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


Monday, 9 March 2009

Create a glassy button with Expression Blend

Here is a video that I discovered today whilst organising my files.


HTML5 player


I created this on a whim, Christmas day 2007 whilst my son was animating with World of Warcraft model viewer. I figured "If it's good enough for him...."

I had been practicing several techniques with Expression Blend for creating button controls.

Although the technique show in the video isn't one I would use for creating a reusable control in Blend, it does show off several features in Blend.

The  approach I took was a little extreme.

Rather than the 'Phil does voice over whilst doing the demo' approach, I simply recorded myself performing the tasks. I then loaded that video into Blend and created a story board that animated five copies of the same video.

The central video is moved around so that the eye can follow what I I am doing.

I actually created the effects using Expression Blend September Preview which is pretty outdated. The current offering is Blend 2 sp1. However, everything shown in the video is pretty mush as it is in the current version.

Finally, to jazz it up a little, I added a soundtrack.

I had designers in mind when I created this video because I have found that they focus more on the visual. In fact of those I have shown this video too, the designers do indeed prefer it more than developers who tend to like the typical voice over  approach as the narrator is often able to go into more detail.

I do intend to do some "proper" tutorials (with voice over) that cover the creation of Custom and User controls for Silverlight and WPF in Expression Blend and Visual Studio. But that's for another day.



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!"






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!"



Saturday, 24 January 2009

Know it all?

There is an expectation on the part of delegates that the trainer they are listening to knows a good deal more about the subject than they do. And quite right too ! However, the fact is that no trainer or anyone else for that matter can know EVERYTHING about a subject.
 
In fact, it is because this is the case that I enjoy my job so much. I start every event with the thought foremost in my mind, "I do NOT know it all". As a result, I welcome questions that stretch me. If I encounter a question that I haven't heard before or don't know the answer to, I will give my best guess and present it as such. However, at the very next opportunity I will do some research or experimenting in order to come back with the correct answer. I aim to have no questions unanswered by the end of each course.
 
The alternative is not a good place. i.e. flatly refusing to acknowledge that you don't know something in case it diminishes any 'power' or credibility you might have with the group.
 
I clearly remember an incident with a colleague many years ago (late 80s). Credibility (and masculinity) was a big thing with this guy. Early on in the course (one of the 10 week government sponsored training type courses where unemployed people learn something like C++ and hopefully find a job at the end) he was asked a question that he plainly didn't know the answer to (not having actually been a programmer).
 
Rather than saying that he didn't know but he would look into it, he came out with a long winded, nonsensical answer which had "I'M BLUFFING!" in six foot neon written all over it. The questioner challenged his answer at which point the trainer launched into a tirade which included phrases such as "How dare you question me!", "You must be joking!", "How would YOU know?".
 
That day he lost all respect with that particular group. A group who had to sit through a further five or more weeks of a course they were pretty sure their trainer didn't know.
 
Another memory illustrates the point in another way perhaps. I had to deliver the same five day course, four times back to back. A MOC 2310 ASP.NET course I think. By the fourth event I was just on auto pilot. Skipping most analogies, examples and jokes because I was pretty sure I had already used them.
 
I didn't miss out on any content because there was/is a structure to the course. However, because I "wasn't on the edge", I must have come across as a robot.
 
What brought this on ?
 
Two things.
 
I have been busy prepping demos and labs for the forthcoming Windows Presentation Foundation WPF readiness training for Microsoft as part of their METRO program.
 
These demos and labs involve the use of snippets in Visual Studio 2008. Not only are they of use to developers, they are also perfect for demos so that delegates don't have to sit and watch you type hundreds of lines of code.
 
So there I was trying out the demos and memorising the names of the snippets when I was cast back to this time last year. I was in Oslo to deliver one of the first Visual Studio 2008 and .Net 3.5 readiness courses for Microsoft.
 
The event was held at ProgramUtvikling AS that is run by a team of wonderful people (hello Kjersti and Arne !).

Whilst reminiscing about my week in Oslo, I thought of snippets. The Visual Studio 2008 course covered a vast area including Visual Studio 2008, Language enhancements, LINQ, ASP.NET AJAX, Windows Presentation Foundation - WPF, Windows Communication Foundation - WCF, Windows Workflow Foundation - WF.

As you can imagine, with that much to show off and demo, there were up to 100 snippets to memorise and use. I managed pretty well (I thought) for my second teach. I got through every demo without a hitch except the one where I tried to use the VideoBrush instead of VisualBrush when doing a WPF demo.

Like a bunny in the headlights I just looked at the code whilst 32 delegates looked at me and couldn't for the life of me see what I had done wrong. I finally remembered that VideoBrush was for Silverlight and not WPF ! Phew !

So I wrap up and delegates are heading off for trains and planes when one of the delegates walks over and quietly (bless you Arjan Einbu!) asks [at this point I should mention that the vast majority of the demos were written as Console applications] why I hadn't used the CW snippet?

Doh!

Come clean time. I hadn't forgotten it. I didn't even know it existed!

So I am sitting here reminiscing about Oslo and snippets and have just remembered (fondly) my last night. I had to stay an extra night which happened to be the day before my birthday.

A number of us went for a fantastic meal (thank you Kjersti) and afterward went to a 'typical' British pub/bar called Churchill's.

Here is a description that I have just pulled off the net: "Churchill's, undoubtedly the finest 'English style' pub in Oslo, and the meeting place for many ex-pats. The cluttered decor reminds one of a typical English country pub and is highly recommended."
 
 
 
 
Now I have been into pubs up and down the land (England) but I cannot think of a single "typical English country pub" that had 1/16th scale models of Spitfires and Messerschmitt 109's mid dog fight hung from the ceiling. Nor for that matter, one that has upwards of 36 (I counted) artistic pictures of nude or topless women.

I had a great night. Particularly when it turned midnight and became my impromptu birthday party. Strangers from all around the bar came over to wish me a happy birthday. The landlord even stuck a candle in a cream cake for me. Not a party cake candle mind you but a bloody big red one that would look more at home shoved in the top of an old bottle of Chianti.

Two and a half hours later I remembered that I had to catch a train to the airport in less than two hours and I was in a bar and hadn't packed!. It was then that I noticed that the clientele had dwindled to myself and Dr Nic Williams (Mr Ruby on Rails himself) (What a very very very nice man!).

Good night!
 
 
 
 
 
 
See you soon

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