LiveBlog - Mix08 Keynote

March 5th, 2008

MixB01Sniiiiiiiiiiiiiiiiiiiiiiiffffff…smell that?  Nerds.  Thousands of them!  Wait…are developers even considered nerds anymore?  I know when I look in the mirror I don’t see…well…it doesn’t matter.

If the logo to the left didn’t give it away, I’m at Microsoft’s Mix Convention.  Which is actually pretty exciting, because I haven’t really been working with WPF lately nor following Silverlight closely.  This is a chance to get caught up on all the things I’ve missed.  And what better way to drag you, kicking and screaming, through the experience with me than with a live blog!?!?  (I got the idea while following the primaries via a NYTimes live blog.)

Why?  Because I need  something to do when my mind starts to wander.  It’s getting close to Keynote time so while I try to find a seat, here’s a picture to help you ponder the ramifications of a rock band stage set up in the foyer for anybody to play with.

9:20 AM

Found a seat.  There’s nothing like being squished shoulder to shoulder with two other guys while we all balance our laptops on our laps.  It reminds me of my plane ride in.  I wonder if Microsoft is going to show “Alvin and the Chipmunks” too. 

Wait…we all have laptops!?!?  I thought I’d be the only one getting precious Keynote news out to you “unattenders”!!  I’m so disillusioned. 

Uh oh…dude on my left (who we’ll now call “IBMVistaLaptopGuy”) just noticed the glowing apple on my laptop lid.  Things could get ugly.

9:35 AM

Ooops…missed the introduction and applause.  I was too busy opening and closing Visual Studio over and over so IBMVistaLaptopGuy would see I’m running BootCamp and Vista and stop giving me the stink eye.  I promise I’ll pay more attention from this point on.

9:45 AM

Oooooo…he keeps saying things like “Device Mesh”, “Social Mesh” and  “new service”.  Sounds like he’s setting us up for something big.

I’m a little distracted by the guy on my right (IronicUnfunnyTShirtGuy) who keeps leaning over to read what I’m typing while trying not to be obvious.  Yeah…I saw you dude.  Like what you see?

9:55 AM

He lost me.  He went into a tangent about “utility computing” and a bunch of

business related products. Started thinking about how awesome Halo 3 would be on those giant screens and completely zoned.

10:20 AM

Now Scott Guthrie’s on stage.  Brought out people to show us some demos.

Here’s a quick overview of some of the things they dragged on stage.

IE8 - Basically it sounds like the goal of IE8 was to try and create a better experience for developers more than anything.  Were people having issue with IE7?  (I have to admit…when he showed us a webpage that worked in FireFox and Safari working in IE8…wow.) 

You can download the beta later today if you want to play.  The built in debugging stuff is cool though…seems like a more advanced “Firebug”.  I also think the built in Activity and WebSlices features have potential.  Though I’m not a big fan of “indicators” popping up all over the page I’m viewing.

10:40 AM

Soooo…Silverlight 2.0.  They talked about a lot of stuff.  It was really cool too.  I’d tell

you about it but IronicUnfunnyTShirtGuy saw my Halo3 comment while reading over my shoulder.  Now he just wants to talk about how he powns noobs.  He lost it when they showed the Silverlight Halo Advertisement demo.  Some people are so sad.  I should challenge him to a Halo3 game.  Good thing I brought my Xbox with me to Vegas.

11:00 AM

Missed the last 20 minutes.  I went to the restroom and was distracted when I started a conversation with an Elvis impersonator.  He really likes his job but mostly does it to “pick up chicks”.   Love it.  Got back in time to

hear the phrase “…Silverlight controls, all released as open source.”  Damn…sounds awesome.  Stupid distracting Elvis and his glittering attractive clothes. 

11:10 AM

AOL built a nice Halo 3 silverlight version of their online mail client.  Very cool.  Makes me almost wish I still got AOL cd’s in the mail.

 

11:20 AM

Another very cool Silverlight 2.0 demo done by Hard Rock.  Instead of writing about it you can check it out right here.   It’s pretty impressive how far you can zoom in on the images.  Very responsive.

11:30 AM

Aston Marton came on with a Silverlight 2.0 demo that’s pretty typical of car

demos.  A 3d experience where you can paint it, change things like the rims of your wheels, brakes etc etc.  Only cool because of the level of detail you can see.  They also whipped out a UMPC and remotely painted a virtual car pink.  They ended by showing a wpf app inside an Aston Marton car.  It was a dashboard screen that…i’m not sure what it did.  But it had a nice glassy interface which pretty much means I’m going to bankrupt myself buying an Aston Martin.

11:40 AM

Holy Crap, right when I was about to fall asleep they

brought out Cirque Du Soleil!!!…who totally disappointed us by talking about their business and demoing a “casting” application.  Watching Scott Guthrie juggle was fun though.  I’m starting to get claustrophobic here between IronicUnfunnyTShirtGuy and IBMVistaLaptopGuy. 

11:50 AM

Silverlight for mobile.  Now that could be fun.  Demo shows a social app that allows friends to find out which bars other friends are hanging out at.  Has video, images.  etc etc.  Kind of a silly demo but the concept is very hip.  Dig the “shared information” the mobile silverlight demo is hinting at.

11:58 AM

During the WeatherBug demo (shown on a Nokia S60 device running silverlight to emphasis the partnership Microsoft and Nokia have that will put silverlight on future devices) IBMVistaLaptopGuy shot me one last dirty look as he and a lot of others start sneaking out early.

12:00 PM

After a quick summation.  We’re done. 

So there you go.  A deep and informative description of the Keynote here at Mix.

It was like you were totally here…right?  Well, I felt like you were here. 

Honestly, I don’t know how these live bloggers do it.  It’s pretty exhausting task.  Ok…enough typing. My hands and brain hurt.  Time for lunch.

UPDATE: If you want to play with any of the new technologies Tim has some good links for you.


Build Your Own Times Reader

January 20th, 2008

Like Times Reader? Well now you can build your own! Follow the link below and you can start building your own…Syndicated Client Application! They even give you the source so if you don’t want to build your own News Reader it’s still a great source for some good wpf examples.

Syndicated Client Experiences Starter Kit


Poor Neglected Blog

December 6th, 2007

So I’ve recently drifted away from wpf development. As a result, I’ve had nothing for my blog. This does give me a chance to clean house a bit though. I went through all my old blogs as well as this one and choose what I felt were the more interesting posts. (Not surprisingly, the number was small.) I created a link on the left hand side (WPF TOC) which points to a page where I’ve collected these posts. So essentially I’ve taken a page from sitcom tv and created a “best of” post. A new low, I know…but it’s ok, I hit new lows almost daily.


LayeredStackPanel

August 5th, 2007

I inadvertently created this custom panel a month ago. I wanted my objects to be grouped together in a way similar to the way Media Player groups items…or so I thought. My first implementation just had an x and y offset. It also lets you specify the number of items you actually want to show. (This is in the event you bind to a collection with a huge amount of items. Looks silly.)

Today I opened Media Player and saw it doesn’t actually offset the items but rotates them. So I threw in an item rotation property. Of course the panel had already met my original requirements, so adding the rotation aspect was pointless…unless I blogged about it. Maybe somebody else can use it. So here’s some screen shots.

 

As you can see, you can get some pretty interesting layouts. If you think you could make use of this you can download the source from the link at the bottom of this post. (It’s about 1.5 MB because of the images used in the example app.)

I should let you know that the contents of the panel resize to fit available space when the horizontal and vertical offset are used. This is what I needed from the panel. Unfortunately, things aren’t as nice when you apply a rotation value. This is because I used RenderTransform instead of LayoutTransform on the items.

Download Test Application Source Here


I Just Want To Be Friends With Your Window

July 4th, 2007

A proper application should have proper persistence of its windows state between sessions.  Ummm…yeah.  What I meant to say was…

Don’t you hate it when you close a window and the next time you start your application it’s not in the same place?  Or even worse: I have a laptop that sits in a dock connected to two twenty-two inch widescreen monitors.  Each monitor is 1680×900 and I like to splay all my applications across my 3360×900 pixels of screen.  This is great until I’m working in bed late at night and half my applications open far off screen.  (Good thing for alt+space+m or I’d have gone mad.)

The crazy thing is how easy it is to put together a smart window.  Normally I wouldn’t blog on such a simple topic but at last count I have twelve frequently used applications on my machine that drive me bonkers.  (Yes, Times Reader is one of them and yes I did receive your email and yes we’re going to fix it and no I don’t normally keep my head up there.)

After performing some major grueling research, I found that there are three typical ways applications on my computer remember their state. 

  • The Normal Lazy Way
  • The Kind of Smart Way
  • The Smart Way

There’s also a fourth way that I came up with while goofing around.

  • The Scaling Way

In case those weren’t descriptive enough I’ll go into further detail.

The Normal Lazy Way

This is when you don’t implement anything and just let the window run with it’s default behavior.

Below are screen shots of an app I put together.  The first image shows the state of the window on exit.  The second image shows the same application’s state right after it was executed.  The main difference being the first image is with my laptop docked to two enormous 1680×900 resolution monitors, while the second image is my laptop undocked and using its puny 1024×768 resolution screen.

The downside to using the default functionality is your window never remembers its dimensions, nor its placement on the screen.  On the plus side, your app never opens outside the dimensions of your screen…like it does with the next method.

The Kind of Smart Way

This is where the developer tries to be smart.  Upon exiting, the app somehow stores the windows dimensions and placement on the screen.  The next time the application starts, it uses these stored values to draw itself.  You can see an example of the load and save methods possibly used by clicking here.  If you haven’t already guessed, there’s one problem.

ARRRGH!  I know you’ve all experienced this, so don’t try to deny it.  ALT+SPACE+M…arrowkey arrowkey arrowkey arrowkey…

Because of this one limitation, I’d rather folks just left the default window behavior active instead.  Or better yet, implement it correctly!  Like so…

The Smart Way

Now the smart way actually takes a little bit of brain power.  Instead of just loading and saving settings, you actually have to perform some checks to make sure that when your window draws, it’s actually on the screen.  Before we get into details, I should introduce you to the Virtual Screen.

The Virtual Screen represents the combined dimensions of all connected monitors/screens.  For example, the dimension of my virtual screen when my laptop is docked is 3360×900, while my undocked laptop and its single screen have a virtual screen with a 1024×768 dimension.  (Same as my “Primary Screen”.) 

If you’re working in WPF you can find information on your virtual screen under the SystemParameters namespace.  (I believe WinForms folks can find the equivalent under System.Windows.Forms.SystemInformation.VirtualScreen.)  In my code I just use the values of SystemParameters.VirtualScreenWidth and SystemParameters.VirtualScreenHeight.  I use these two values to make sure my window placement isn’t outside of my visual screen.  I also make sure that the width and height values of the window are less than the dimensions of my viewable screen.  You can see the sample load and save methods here or just look at the pretty picture.

I know it looks like the window is outside the edge of the laptop screen but that’s because my code moved the window from the far left to the inside of the screen and placed it on the very edge.

I think this is probably the best method someone could implement.  Of course that didn’t stop me from fiddling and coming up with…

The Scaling Way

This is pretty much the same code as the “Kind Of Smart Way” except I don’t store the hard values of the window’s placement and dimensions.  Instead, I store the windows proportions relative to the virtual desktop.  So if you close your window and it’s taking up 25% of your vertical space and 75% of your horizontal space, the next time you open it (even on a smaller/larger screen) it will be proportionally smaller/larger to the change in screen size, but it will still be using the same percentage of screen space.  Did that make sense to you?  Yeah..me neither.   I did the same thing for placing the window.  If you really want to understand it, you can view my code here.

There’s one reason I don’t like this simple approach.  While it works great when you’re going from one resolution to another, it does look a little odd when switching from a dual monitor setup to a single monitor.  The following image illustrates the weirdness.

Since my width changes by 2336 pixels while my height only changes by 132 pixels, the ratios became a little skewed…and so did my window.

Finally…the Conclusion

So I’ve just broken my first rule of blogging: keep it short.  This probably means most of you aren’t even reading anymore.  But if that means my next favorite app has smart windows, it’ll be worth it.

UPDATE: 06/05/07

As Franz points out in the comment section below, there’s a flaw in my code examples.  Actually, there are two flaws.

First Flaw I discovered:  You don’t want to save the windows dimensions and position when it is maximized.  That makes as much since as saving it when it’s minimized.  You want the app to have the proper restore values for when they start the app and then “un-maximize” it.

Second Flaw Franz Discovered: If the window is maximized on a monitor that isn’t your primary monitor it will still load maximized on your primary monitor.  I believe this is because I load the window settings before it is drawn so it “technically” is on the primary screen when it is given the maximized value.  I see two ways of avoiding this. 

  1. You could not call the Load method until your window is loaded.  The downside being your window will load, jump across to the second monitor and then maximize.  Kind of trippy. 
  2. The other solution is to remove the line in the Load method that sets the WindowState and move it to the window’s Loaded event.  This has a better visual loading affect but really tears apart the elegance of having a single load method and a single save method. 

I choose the less elegant but better user experience for my code sample below.  If you have a better way let me know.

Here is a really big hyperlink that will allow you to view the code with the solutions to the two problems I just described.  You should not have any problems clicking here.


Who Gets Todo What?

June 21st, 2007

So I just finished reading this article:

Microsoft to Alter Windows Vista

My immediate response was slight disgust. You know a ton of money is being spent on this issue. And reading all of the quotes of legal officers, attorney generals, janitors, etc each throwing in their comments…it’s a bit baffling. Then I read, “Richard Blumenthal, the Connecticut attorney general, said that as a result of pressure from the states, the Bush administration had taken a position closer to that of the states that found merit in Google’s complaint.” I have to admit, I really liked the idea of Cheney and Bush in a heated debate over Desktop Search.

In the end I asked, “Who cares”. And since I was alone I had to answer myself. “Microsoft and Google cares dummy.” And then it all made sense.

Usually I’m not one to use my blog to rant about real world situations, (just stupid things that make no sense), but immediately after reading this article I clicked the “open my email” button in Windows Live Messenger. Of course IE opened…despite FIREFOX BEING MY SYSTEM’S DEFAULT BROWSER! The caps were used to indicate how annoyed I am by this. Windows Live Messenger, Windows Live Mail (I’m testing out the app), and Foldershare are all apps that I frequently use that ignore my system default browser setting. So maybe there is something to this desktop search nonsense.


PC World’s Top 100 and Times Reader

May 21st, 2007

Who knew I could go so long without daily internet access. I’ve been away for two and a half weeks and I’ve come back to find a very pleasant surprise.

PC World apparently thinks Times Reader is a worthwhile application. It made number 24 on their “100 Best Products of 2007″. That will sure help me sleep at night.

For a full list click the following link:
http://www.pcworld.com/printable/article/id,131935/printable.html


My Mobile Device Evolution

April 28th, 2007

In less than a year my devices have shrunk from the size of my lap to smaller than my hand!

-The big guy in the back is actually one of my desktop monitors. Left it in for comparison.

-The next biggest guy (back right) was my dell 17” laptop. Despite being constantly made fun of for having a large laptop, I loved the giant thing. If the power connector on the motherboard hadn’t been bent I would still probably use it.

-Next in line (back left) is my work laptop. I think this is considered your standard laptop. It gets me through the day.

-My favorite is the Fujitsu Lifebook (front right). Everyday this little guy entertains me on the subway. I read comics, Times Reader, and e-books. I sometimes will even watch the occasional video. I use it to take notes in meetings or jot down random thoughts. It’s touchscreen means I don’t need a stylus but I loose the hover effect which is no biggie. It fits perfectly in my hand. Unfortunately, it technically belongs to a different department at the Times and now that we’ve got an Oqo I’m sure they’re going to want the lifebook back.

-Last, the insanely small Oqo2 (front left). We received this only a few days ago so I haven’t decided what I think. I’m trying to use it like I use the lifebook and there are some definite pros and cons. All in all though it’s a very hip device.

All of these devices are either running XP or Vista and if I’m wondering the city and can’t find an open Access Point they’ll all smoothly connect via my phones (Cingular 3125) bluetooth connection.


Nick’s Twisted Perspectives

April 8th, 2007

So I found myself looking something up on MSDN the other day and I caught myself thinking, “Man, this is really dry stuff.” Now I know if I’m looking for a hair raising good time MSDN is probably the last place I should look, but it got me thinking.

If you’re like me, you can learn a new technology and even successfully use it, but there’s always that last little bit that doesn’t quite click into place. I usually need to get elbow deep into a new technology and really have a go at it before I can get a good visual idea of what I’m working with. I don’t do well until my brain has had a chance to convert technical jargon and syntax into an abstract concept or a “mental image” if you will.

I’m guessing there are at least one or two other people out there who think like I do, so I’ve decided to attempt a series of posts that I would have liked to have had when I was first learning WPF. Something I could turn to AFTER I read the through the immensely large volume of technical information out there. The idea being to help the new WPF developer get to that, “Oooooooohhhhh, now I get it! AWESOME!” moment we all remember experiencing.

These are short little write-ups that have little text and lots of visuals. I tend to keep things pretty abstract, heavy on the metaphors, and the concept to code/xaml ratio is very small. I’m thinking of calling them “Nick’s Twisted Perspectives”, but that’s just because I’m bad at coming up with names.

My first attempt was an super high level explanation of Styles and Templates. I’m still not sure if I’m actually creating a usable and informative resource so feel free to leave your loves and hates in the comments section.

Since these posts will be image heavy and I don’t want to clog up your aggregators I’ll just be providing links to separate pages.

Nick’s Twisted Perspectives on Styles and Templates

Enjoy


Nick Recommends…

March 25th, 2007

Here’s a few things I’ve stumbled on lately that I thought a person who reads my blog might enjoy. So basically…I just totally called you a nerd!


The Physics of SuperHeroes


If you are an ultra geek, (or a closet ultra geek like myself), this book is probably right up your alley. The author does an amazing job of applying basic physics to common comic book heroes. For example: In the first Superman comic book the author takes the fact that Superman can jump tall buildings and using basic principle of physics determines the mass and size of Krypton and then shows why the planet exploded! Seriously…ultra geek reading material here. But don’t worry, the author has a great sense of humor and rarely bogs the reader down with over the top equations and calculations.


WPF Unleashed

If you consider yourself a serious WPF developer and/or designer and you haven’t purchased this book yet…for shame. This book is easy to read, very well structured, and I love the glossy colored pages. Yes, even I, with my seemingly limitless caverns of knowledge, learned a lot of “tips” and “tricks” from this book.


CopySourceAsHTML

/// <summary>

/// Great way to get code to your blog!

/// </summary>

public class CopySourceAsHtmlExample

{

    public static string ThisVisualStudioAddInRocks()

    {

        string ThisIs = “I totally”;

        string Very = “wrote this”;

        string BadAss = “in Visual Studio.”;

 

        return ThisIs + Very + BadAss;

    }

}

This is a great Visual Studio add-in for bloggers who hate having to convert their code/markup to html for post examples. (I’ve always just taken screenshots because I like to have the Visual Colors in my examples…and I’m lazy.)
It did take me a bit to install on Vista but it was well worth it. The example to the left was literally copy/pasted right out of Visual Studio in Wordpress.


“IE Tab” Add-On for Firefox

So I admit it, I’m not the biggest fan of IE7. I’m not looking to get into a browser debate, to each his own is my view, but suffice it to say I use Firefox. Of course this does make it a pain when dealing with xbaps or xaml files…or it was until I found this Firefox add-on.
All I had to do was tell it if the url being navigated too ends in “.xbap” or “.xaml” open the page in a IE tab. It works beautifully!


That’s it! The titles and images are hyperlinks if any of these peeked your interest.


« Previous Entries