Archive for October, 2008

October 29th, 2008

Are you a Programmer or a Manager?

A man flying in a hot air balloon suddenly realizes he’s lost. He reduces height and spots a man down below. He lowers the balloon further and shouts to get directions, “Excuse me, can you tell me where I am?”

The man below says: “Yes, you’re in a hot air balloon, hovering 30 feet above this field.”

“You must work in Information Technology,” says the balloonist.

“I do” replies the man. “How did you know?”

“Well,” says the balloonist, “everything you have told me is technically correct, but It’s of no use to anyone.” The man below replies, “You must work in management.”

“I do” replies the balloonist, “But how’d you know?”

“Well”, says the man, “you don’t know where you are, or where you’re going, you expect me to be able to help. You’re in the same position you were before we met, but now it’s my fault.”

Taken from Stack Overflow Thanks Gulzar!

October 28th, 2008

The joys of working for Microsoft

I work at PBJS a creative agency that does a lot of work as a vendor for Microsoft. As a creative agency we do a lot of design work on Macs. The entire Art Department has Macs, I have a Macbook Pro laptop, our editing stations are Mac Pros. You get the idea. This is nothing shocking, the majority of creative agencies I’ve seen have Macs as their primary workhorse machines.

Since I do a lot of development I have a PC as my primary work machine, along with my fellow Interactive developers. I use Visual Studio for a lot of my coding. I’d even say “I’m a PC” on one of those ads. The fact is, I use them both to do my job depending on the given task.

Right now we are doing an installation for the new Microsoft Company Store. This week myself and the art director are going on-site to tweak in the space. Since we need to have our work computers with us, we needed to find a way to sneak a Mac Pro into Building 92. A picture is worth 1000 words!

MacPro box, turned inside out with Simon, our logo, and the words “I’m a PC”. That should do nicely!

October 9th, 2008

Access WPF Storyboard in XAML from code-behind (C#)

At more than one time working with WPF I’ve wanted to create a generic Storyboard using Blend because it saves me time and gives me a nice time line type layout to create/tweak my Storyboard. What happens is when you save the Storyboard it’s added to the Windows.Resources collection the XAML. In Silverlight you can access these Storyboard resources directly using their x:Name value. In WPF, however, you need to do it slightly differently.

  • First, You need to specify x:Key for each Storyboard
  • Storyboards must be found using TryFindResource:

    Storyboard myStoryboard = (Storyboard)TryFindResource(“myStoryboard”);

  • TryFindResource will only work if the Storyboard is in the Window.Resources section of the XAML and you’re in the code-behind of that XAML
  • Once you have the reference to the Storyboard contained in a variable you can call the various Storyboard methods on it. To run it, use the Begin method:


Here is a quick code snippet to help you out.

Here is the XAML: