Update on Video Source Code

Update on Video Source Code

First, thanks for your patience. I’m happy to confirm that the source code for Element to Element Binding and Using 3d are all correct for the Beta release. In addition, we’ll be posting the source code for Part 1 of Using 3d today as well.

ElementBinding

Element to Element Binding

3dPart1

Using 3-d Part 1

3d Part 2

Using 3-d Part 2

 


Timer Input

There was a very minor change to the enumeration for showing seconds used in the Timer control and we are uploading the revised code for that video immediately,

Timer

Timer Input Control

 


Domain Up/Down

The DomainUpDown control requires two minor changes. First, you’ll want to allow just a bit more room in the Xaml for the control,

image

Domain Up Down Control

<StackPanel x:Name=”AirportStackPanel”
   Grid.Row=”3″
   Grid.Column=”0″
   VerticalAlignment=”Stretch”
   Margin=”0,10,-0.25,0″
   Grid.RowSpan=”2″>
    <ContentControl Content=”Airport List”
          Style='{StaticResource Header}’ />
    <StackPanel x:Name=”DomainUpDownPanel”
      VerticalAlignment=”Stretch”
      Background=”#aa000000″
      Height=”89″>
       <input:DomainUpDown x:Name=”AirportUpDown”
                 ItemsSource=”{Binding}”
                 Height=”90″>
<input:DomainUpDown.ItemTemplate>
 
 
Be sure to compile your Toolkit controls against the appropriate Toolkit library (for Silverlight 2 or for Silverlight 3).  The code is unchanged, the API is unchanged, but you must choose the correct set of APIs. 
 
More about where the Toolkit libraries are now stored in my next post.

Previous: Compiling the Silverlight 3 Video Code                 Next Quick 3-d Update

Posted in z Silverlight Archives | Comments Off on Update on Video Source Code

Compiling the Silverlight 3 Video’s Code

As of this morning I have uploaded five videos (with C# and VB source code) for Silverlight 3.  To have this ready at the moment of release I opted for most to build with pre-beta code. This note will review what to do if you run into trouble making the code work (and if it is a problem I’ll quickly rebuild with the release Beta code).

ElementBinding

Element to Element Binding 

3dPart1

Using 3-d Part 1

3d Part 2

Using 3-d Part 2

Timer

Timer Input Control

 

These were  all built with just-pre-Beta source and should present no trouble at all.  I will double check them today and if there is a problem I’ll post how to fix and I’ll replace the code immediately.

image

Domain Up Down Control

 

This control was actually built with using Silverlight 2. We’ll have both  C# and VB Silverlight 3 examples posted as quickly as possible. 

Toolkit Control User Interface

It is always possible that between the time we create the video and the time the Toolkit control is released, the dev team will decide to “reskin” the control. That is the wonderful thing about “lookless” controls.  The good news is that the API and functionality is unchanged, and you can reskin them yourselves as well, as explained, for example, in the thread starting here

Posted in z Silverlight Archives | Comments Off on Compiling the Silverlight 3 Video’s Code

An Hour Being Flexible

 

You never know where you’ll end up discussing Silverlight…

TheFlexShow

I recently had the extraordinary opportunity to spend an hour talking about Silverlight with Jeffry Houser and John Wilker on The Flex Show (my part starts 4 1/2 minutes into the show, which you can listen to here).  It was great fun, and they couldn’t have been more welcoming.


This work is licensed under a Creative Commons Attribution By license.
Posted in z Silverlight Archives | Comments Off on An Hour Being Flexible

Sparkling Client Podcast on The Bubble Chart

SparklingClientLogo

I’m very pleased to provide this link to a brief discussion with Erik Mork about the Bubble Chart from the Silverlight Toolkit, which I believe ties in nicely with this post from late December.

 

BubbleChart 
[Bubble chart from the most recent samples, slightly modified]

                [ Previous Podcast on the Silverlight Toolkit ]

      Previous: 1 Chart – Three Axes         Next: Podcast


This work is licensed under a Creative Commons Attribution By license.
Posted in z Silverlight Archives | Comments Off on Sparkling Client Podcast on The Bubble Chart

Tiny Laptops

 

 

Wind The latest craze among us geeks are the ill-named Nettops; – ill named because they’ve quickly exceeded the implicit assumption that they are best used for surfing the net and not much else. 

These micro-laptops are now typically under 3 pounds, have keyboards that are around 80-85% the size of a full keyboard and screens in the 8.5 – 11" range. They also cost a pittance.

The first one I saw was the Dell Mini 9. Boy was it sweet. Scott Hanselman fell in love with his, and wrote this great review

He’s very convincing. In fact, I bought my MSI WIND about 18 seconds after reading his post. 

— A digression —

I’ve mentioned before that at Citibank[1] I worked for a guy named Larry Weiss, who used to describe consumers of electronics as falling into quintiles [5 reactions of technology, though not groups of equal size].  He’d often draw a pyramid like this:

Pyramid

The first quintile is, well,  most of you, and certainly me. Is it new? Interesting? Geeky? I’ll buy it. Hock my kid if I have to.  We’re buying Nettops now. And adding extra RAM.

2nd quintile will buy it if there is a clear benefit and some experience that shows it works.  Actually, 2nd quintile may be buying now too, things are speeding up since Larry formulated this in the 80’s.

Third quintile buys when the technology meets a "felt-need" – they are the bulk of your target audience when you are making mass-market technology (at the time we were talking ATMs and home banking). 

Fourth quintile needs to see a huge benefit, lots of experience, and feel very warm and fuzzy. Those folks are thinking about high speed internet about now.

Fifth quintile: forget it. Pull the trigger, kill me, I’m not using it.

</digression>

Admitting that I’m in the first Quintile and thus bought this before I knew it made perfect sense, I will say that I had some justification: even my small laptop doesn’t really fit on the try on jets these days (seats are getting smaller and I’m getting bigger), batteries on most laptops give up too fast to get much work done, and I just signed up to do two books: the reincarnation of the Silverlight book that wasn’t (more on that soon) and a book I’ve wanted to write for a very long time.

The Yowza! effect

But here’s what I’ve discovered, this is another in a line of what I call "Yowza!" devices.  A Yowza! device (and the exclamation mark is part of the term, though if you’re in the first quintile, you know that mark by the name "bang") is a device that you buy thinking "I’m a first quintile compulsive person who can’t help but buy this and I sure hope it does something useful" and then, somewhat to your surprise, you discover that it is not only useful, but it is essential. Within an amazingly short time,  not only can’t you live without it, but you feel a  sacred and moral obligation to tell everyone you know about it.

Here are some Yowza! devices:

  • The VCR
  • Cordless Telephones
  • The Cell Phone
  • The DVR
  • The GPS

Commodity Pricing

While I know that Scott gets great usage out of his Dell 9, the progress in the past few months has been staggering. Here are the basic specs on the computer I bought. But before you read the specs, keep in mind that I spent,  delivered the next day to my door, $400.92.

AmazonInvoice

  • Intel Atom 1.6 GHz Processor
  • 512 KB L2 Cache
  • 1GB RAM + (for $12) a second GB [2]
  • 160 GB 5400 SATA Drive, Windows XP installed
  • 6 Cell Battery
  • 1.3 MP Web Cam
  • Wireless card with 11 b/g/n
  • 10/100 Ethernet
  • Bluetooth
  • Mic, Speakers, Soundblaster
  • 4 in 1 card-reader
  • Weight with battery: 2.8 lbs
  •  

    This is a serious laptop. And, there are lots of others as good (and some would say better). And more are coming every day. 

    (I’m told that Windows 7, Silverlight and the rest of Microsoft’s software runs like a top on these machines, and that is good news indeed).

    If I Were Apple, I’d Be Very Worried

      My daughter is incredibly lucky that we bought her Macbook when we did, because I’d be hard pressed to justify spending over three times as much. Her computer is aMacBook2 lot better, but I’m not convinced it’s $1,000 better.

    Much more important, and more dangerous for Apple, a lot of parents and a lot of school districts will be asking themselves the same question. Especially if they’re buying them by the classroom. Especially when you consider that there is very little software you can’t run on XP SP3 with 2 gig of RAM and 160 MB of drive.

    Generally speaking, I’ll be putting product reviews on my Reviews page, but this was too relevant to our world to hide in the back. 

    I’m reasonably convinced that these tiny computers are not just a passing phase or an interesting side show, but the harbinger of a trend that will be fed by the confluence of diminished economics and increased bandwidth.

    More soon.

     

    ———————

    1 This was back when Citibank was the biggest bank in the world, and solvent, and innovative. After I left, things seemed to….

    2 In the late 1980s I worked for PBS and the cost of RAM was $1,000 / megabyte. Thus, 1 gigabyte would have been $1,280,000.00. It is now $12. That is a savings of 5 orders of magnitude in about 20 years. Amazing.


    This work is licensed under a Creative Commons Attribution By license.
    Posted in z Silverlight Archives | Comments Off on Tiny Laptops

    Moo cards

    You’ll have noticed that some of our biz cards seem to have shrunk. This is the "moo card" phenomenon….

    MooDrop Moo is a very hip, very friendly site that will print almost anything for you, but what has clearly caught on is their "mini-cards" which cost only $20USD/100, are full color on one side (with up to six lines of print on the other); come in a very nice box and let you choose what goes on the front from any number of photo sources (your computer, Flikr, Etsy, bebo, Facebook, etc. ) You can have 100 different mages, 100 of the same image, 50 of two images, or whatever combination you want.

    Customer service is top notch and with a little work, even a total non-designer (like me) can make a decent card.

    [Update 1pm GMT-5 Good grief, there was a typo. Here is the fixed card]

     

    moo4a

     moo4b  

     

    Interestingly, ad hoc surveys find people hold on to these more than full size cards, though no one can quite prove that.  In any case, they make great bookmarks.

     

    Mix09Smallest Got these just in time for Mix. You are going, yes?  See you there.

     

    jessesigbg


    This work is licensed under a Creative Commons Attribution By license.
    Posted in z Silverlight Archives | Comments Off on Moo cards

    Using statistics well

    I recently wrote a rant about the use (and overuse) of statistics, and pointed to the Twitter Influence Calculator (now Twitalyzer) as a working example of statistics of questionable value.

    I should have paused.

    It turns out that (a) they are quite thoughtful about the metrics they are using and (b) more important those metrics can in fact teach someone (me for example) how to use Twitter more effectively.

    Twitter is a funny thing, and suggesting it can be used effectively may strike some as risible; but the truth is that in my job, making frequent high:signal contact with the community is valuable, and, it turns out, Twitalyzer zeros in on some of the more interesting aspects of that contact.

    There is the obvious, such as  Influence which they define (in more detail than I will here) as “number of followers, number of times you are retweeted, your generosity (see below), times you are referenced by others and number of updates you publish in a week.  One can argue for different metrics, but it would be hard to make the case that these are absurd.

    Mr. Rogers  In addition to giving you your “score,” they go on to tell you your change, which is helpful, and then if you like, how you might improve that score (e.g., you need more followers and friends…. Won’t you be my neighbor?)Signal

    The second number they provide is Signal, and they use it exactly in the same way I do when I write “More Signal/ Less Noise” – that is do your tweets contain useful information. They define useful information in this case as any of the following: references to other people, links to urls, hashtags and retweets (given that they must do this by machine and semantics are hard to interpret, this seems reasonable). They even break these out for you in TwitPie a handy pie chart and another chart showing change over time.

    The third value is Generosity, defines as the number of retweets you provide. I was skeptical about the importance of retweeting (in fact, I worried it was just noise) but asked about it on Twitter and received many amazing, thoughtful (brief) responses. Best of the lot was from Bob Martin (@uncleBob) whom I’ve admired for many years, who wrote “twitter is a loose network of tight clusters. RT is the means for communicating beyond your cluster”  Not only do I find that compelling, it is almost a haiku.

    The penultimate measure on Twitalyzer is Velocity, defined as  the rate at which you tweet. Velocity + signal/noise gives you a good sense of your contribution.

    Finally, Twitalyzer measures your Clout: that is, the number of references to you divided by the total number of possible references (that latter number is a bit fuzzy to me, but I think there is an upper limit set by the Twitter API). In any case, the more folks reference you the more clout you have.

    Charts, Tables and Analysis, Oh My

    Once you’ve absorbed all that there are endless charts and analysis, but many are targeted at helping you increase your effectiveness, which makes this exercise worthwhile  For example, one analysis offered to me was to compare my average values for number of follwers, retweeting,e tc. with the “11,343 people we’re tracking who have about 25% more influence (on average) than you…”)  Nice.  What stands out in the chart, right away, is that on average, those folks have more friends than I do (story of my life). Where is Mr. Rogers when I need him?

    All in all, more information than you can shake a virtual stick at, and much of it useful. And a wonderful distraction when you should be working.

    It will be interesting to see (a) how the metrics are refined over time and (b) to what degree the very act of measuring influences that which is measured (The “Liberty’s Group Behavior Uncertainty Principle – measuring the activity of a group causes the members of the group to change their activity” (I’m certain I’m not the first to say it.)

    A police officer pulls Werner Heisenberg over for speeding. “Do you know how fast you were going, Herr Doktor?” asks the trooper.  “No,” replies the physicist, “but I know exactly where I was.”

    Related Resources

    Some Twitter Social Network Analysis
    My Experiences with Twitter Part 1
    Scott Hanselman on How To Use Twitter
    Perl Script for Twitter Analysis

    Previous We Love to Measure Everything


    This work is licensed under a Creative Commons Attribution By license.
    Posted in z Silverlight Archives | Comments Off on Using statistics well

    Dispatcher, Cross-Thread Property Setting & Lambda Expressions

    I am finishing up my tutorial on Hyper-video and in the more advanced section I discuss the idea of displaying a button when the video’s marker is hit, and then removing the button after a short time has passed.

    To make this work, I instantiate an object of type Timer and pass in the name of the (static) callback method, the button that was pressed, the length of time I want the button to be visible (in milliseconds) and the time between invocations – in this case the value Timout.Infinite to indicate that I do not want the timer to restart after it calls the callback.

     

    Timer t = new Timer(
       EndShowMore,       // call back
       ShowMore,          // state
       2000,              // dueTime
       System.Threading.Timeout.Infinite   // period
       );

     

    When the timer dueTime (2 seconds) passes  the callback method (EndShowMore)is invoked.

    As noted, EndShowMore must be static. Its job is to make the button invisible and disabled. But the static method and the button are in different threads and so the method cannot set these properties directly.

    What is needed is a dispatcher in the same thread as the controls. Fortunately, the button (ShowMore) is provided as an argument to the callback (you passed it in as the second parameter to the Timer constructor.)

    Once we cast that state object back to type Button we can grab its Dispatcher and use that to call BeginInvoke which will execute a method asynchronously through a delegate.

    iStock_connectTwoWiresXSmall

    You can write the EndShowMore call back as follows,

    private static void EndShowMore( object state )
    {
      Button btn = (Button) state;
      btn.Dispatcher.BeginInvoke(
         delegate() { btn.IsEnabled = false; } );
      btn.Dispatcher.BeginInvoke(
         delegate() { btn.Visibility = Visibility.Collapsed; } );
    }

    That will certainly work but the syntax is a bit cumbersome. I find the use of a Lambda expression makes the intent clearer and the code a bit simpler,

    private static void EndShowMore( object state )
    {
       Button btn = (Button) state;
       btn.Dispatcher.BeginInvoke( () => btn.IsEnabled = false );
       btn.Dispatcher.BeginInvoke( 
    () => btn.Visibility = Visibility.Collapsed ); }
    
    

    More On Hyper-Video

    For more on the subject of Hypervideo see the thread of blog posts that starts here or these How Do I videos: Part 1, Part 2Part 3. The tutorials (in C# and VB) on Hypervideo should be posted before Mix.


    This work is licensed under a Creative Commons Attribution By license.
    Posted in z Silverlight Archives | 1 Comment

    Hypervideo put to work


     

    Eric Mork (of Sparkling Client) SilverBayhas created a site with videos using Joel Neubeck & Tim Heuer’s video player that makes terrific use of Hypervideo.

    Eric creates short teaching videos, and embeds markers in each.  When the video hits each marker, the table of contents is updated in a separate but related window,  and the code associated with what Eric is teaching is shown in a third window. The integration is a work of art.

    MorkHyperVideo 

    For more on Hypervideo check out these resources:


    This work is licensed under a Creative Commons Attribution By license.
    Posted in z Silverlight Archives | 2 Comments

    Better Navigation

    I was pretty happy with the threading navigation I had introduced…

    OldNav

     

    Just to double check, I asked my buddy David Platt, author of the absolutely essential Why Software Sucks, to take a look. He was quite gentle in ripping my guts out.

    He pointed out that the juxtaposition of the word More with a left pointing arrow is so jarring it just forces you to stop and think (Don’t Make Me Think!"). He also noted that putting one link at the top of the article, and the other at the bottom was odd (not clear you want a link to another article before you start reading) fights the standard used throughout the industry. 

    PrevNext2

    Once he pointed it out, it was painfully obvious… as was the fix.

     

    NewNav

    Navigation all at the bottom, and no ambiguity. Much nicer.  Thank you David. I owe you yet another one.


    This work is licensed under a Creative Commons Attribution By license.
    Posted in z Silverlight Archives | Comments Off on Better Navigation

    We love to measure everything

    I just received a note from a colleague about the “Twitter Influence Calculator.”  Not being able to resist, I immediately put in my name and out popped more statistics than you can shake a stick at…

    influence

    I chopped out the actual numbers because they are beside the point (and tiny).

    Is this a good thing?

    There are so many ways to respond (I’m of two minds about my ambivalence).

    Is this site and others like it, a reflection of our endless self-absorption or is this another useful tool for measuring our interaction and effectiveness with the developer community? 

    More generally, do sites provide these numbers because they are meaningful or because they can?  Are they meaningful?  I’m not enough of a statistician to know whether the values make sense, though the person who created this site clearly has a great deal of expertise

    But we do this a lot.  There is also Twitter Grader which happily assures me that although my overall rank is 17,705, that is out of 1.4 million Twitter users, giving me a rank of 98.8 which they pleasantly round up to 99. 99 is good. I like Twitter Grader better, cause I have better numbers there.

    Side note: my one good number on the Influence calculator is the Twitter Ratio, where I scored 11.3.  The explanation you receive when you click on the term (see the last line in the figure above) is quite detailed but it includes this: “A …ratio of 10 or higher indicates that you’re either a Rock Star in your field or you are an elitist… You like to hear yourself talk. Luckily others like to hear you talk, too. You may be an ass.”

    Take that!

    Figures Lie and Liars Figure

    Microsoft is big on numbers, we spend a lot of time measuring influence and customer happiness (remember to fill out your eval forms after each talk) and I think that is great, because what you measure you’ll get more of, but sometimes we split things a little fine.

    salt shakerWe measure everything, and then we set our pay and rewards based on those decimals and infinitesimals. Overall, who can argue? It makes for a highly motivated group, and weeds out the dead weight, but one does worry a bit about how stochastic some of the results are. 

    Qualitative != Quantitative

    At another company I worked for, we used to hold focus groups with 20 people, ask their opinions, and then come back and say “83.7% of the people we talked to said…”  It made my head hurt.  When n = 20 (or 50!) you really don’t want to be using quantitative values finer than, “some” or a lot” – and even then with a shaker of salt.

    Sour Grapes

    Don’t mind me, I’m just jealous that Scott Hanselman and I set out to Twitter around the same time and a week or so later he has, according to  the Twitter Influence Calculator, over 8 thousand followers with a visibility that they characterize as “Astonishingly High.” What can I say? He’s a rock star. I’m a roadie.  Life is good.

     Next: Using Statistics Well


    This work is licensed under a Creative Commons Attribution By license.
    Posted in z Silverlight Archives | Comments Off on We love to measure everything

    And now for something completely different

    I’m not sure it is useful,  but it is one of the more creative approaches to searching I’ve seen. Amaztype takes an entirely different approach to finding things on Amazon.  They start by presenting you with a sparse (beta?) window

    amazTypeSearch

     

     

    I’ve put the word Silverlight into the title. I then click Start Search and it begins beeping and fizzing as it gathers data.

     

     

     

     

     

     

     

     

     

     

     

     

    Books begin to appear;  small, sparse at first…

    AmazType1

    If you move the browser, it starts over with a "boop"  Soon small piles form

    AmazType2

    Then larger piles, one on top of another…

    Books

     

    Click for Details

    If you click on a book, you zoom to that pile and a second click gets you quick box with essential info (author, price, etc.)

    AmazType3

    Another click takes you to the web page.

     

    But if you are patient….

     

    If you hold back, and just let it cook for a while, something interesting happens with the piles of books….

     

    AmazType4

     

    ( Yes, it’s flash, not silverlight, but it’s RIA and an interesting approach. )


    This work is licensed under a Creative Commons Attribution By license.
    Posted in z Silverlight Archives | Comments Off on And now for something completely different