Wintellect  

For those that missed the announcement last week, PhotoSynth is live and after a pretty bumpy start looks like you can at least play around with it now.  I've managed to load two of my sets of photos from a trip to the High Sierras a couple of years ago.  It definitely still has its bumps as I had to cancel and restart the synth several times as it would hang indefinitely.  I didn't get really high "synthy" scores as I wasn't taking the photos with PhotoSynth in mind at the time.  However, the PhotoSynth team has supplied a document of points to keep in mind while shooting photos if you intend to make a PhotoSynth out of them.  I can't wait to try it out when I actually shot the photos for synthing.  There are numerous really great examples on the PhotoSynth site, including some shot by the National Geographic Society photographers.  I like that you can go full screen (or full browser) as that really helps make the experience a bit more of an immersive experience.  Also, the slide show and thumbnails really help as well. 

PhotoSynth is now giving 20GB (!) for free to anyone to try PhotoSynth.  It takes a LONG time to use 20GB in JPEGS!  Give it a try. 

Since my photos didn't all relate to one another, PhotoSynth sort of creates mini-PhotoSynths inside each.  You'll want to check the thumbnails page to see the various scenes that it stitched together. 

Here are links to my first two:

High Sierras - Dana Plateau

High Sierras - Saddlebag Lake Area

This past weekend a few of us Wintellectuals made the trek Atlanta to Murfreesboro TN to present at the annual devLink conference.  I really can't say enough about the level of professionalism and obvious preparation that went into devLinkJohn Kellar, Tommy Norman, and Leanna Baker and the entire team that made it happen are well deserving of accolades for their accomplishment.  The conference was held on the campus of Middle Tennessee State University which was also perfectly suited for the task.  All of the rooms were nice, large, and well-equipped (even though said equipment was apparently timed to shut off exactly at the 1-1/2 presentation mark).  As a vegetarian, I can't say too much for the food, but that's pretty much on par with any gathering...I've learned to carry plenty or protein bars over the years.  Bottom line, for $50 this absolutely has to be best value for your buck in training (other than Wintellect's DevScovery, of course *smile*). 

While my colleagues, Steve Porter and Keith Rome, offered four really great talks on Silverlight topics, I was there to present on all the new things available with Cascading Style Sheets (sarcasm off).  Actually, my CSS talk went really well and I received lots of good feedback which I'll continue to roll into that presentation.  All sarcasm aside, most web developers (especially those in Enterprise positions) are stuck with CSS for the foreseeable future and this presentation really aims to go through the major areas where I see developers struggling and try and cast some light on how all those pieces play together.  Thanks to all that made it to the talk (standing room only!) and for the emails that I've received since.

I've updated the slides and code with this past weekend's revisions and you can get it here:

CSS Deep Dive for the ASP.NET Developer

I believe that the other presentations will be posted on the devLink website, so keep an eye out for them.  There were a lot of good ones!

Thanks to all the folks that came to my Deep Dive CSS for the ASP.NET Developer session at this past weekend's Atlanta Code Camp.  I got some really great feedback from the evaluations and will definitely incorporate some suggestions into this presentation in the future. 

The abstract, updated code and slides are available here:

 Deep Dive CSS for the ASP.NET Developer

 

We saw it when the world first discovered Flash and I'm sure we've got a lot of it left to live through with Silverlight, so this is pretty timely advice from the "Godfather of Web Usability" himself, Jakob Nielsen.  This should be required for every web developer.  There are some great links within the post as well, so be sure to click around.

Top-10 Application-Design Mistakes

There is finally a (relatively) painless way to receive your Free Annual Credit Report from the Big 3 Credit Agencies.  It is a really good idea to keep your eye on your credit report these days.  The folks at AnnualCreditReport.com have integrated the registration processes for the three Credit Agencies into a seamless wizard type experience.  I was able to print all three of mine in less than 10 minutes.

The Silverlight Weather Widget made it to the Silverlight.net Showcase and is mentioned in the News section of the Home Page.  WooHooo. 

In mathematics, a Set is typically thought of as a collection of distinct objects that is usually defined by some rule that determines whether they are a member of that particular Set.  For example, a Set could be defined to contain "all the odd numbers under 100" or "every number divisible by 2" or whatever.  The main points here being that the objects in a Set are distinct (i.e. NO duplicate objects are allowed) and the objects are not ordered or sorted in any way.  (If you really feel the need to geek out on Set Theory, be my guest).

According to the MSDN Documentation for HashSet, "a set is a collection that contains no duplicate elements, and whose elements are in no particular order."  Sound familiar?  In the .NET Base Class Library, there has never been a true Set class until now with the release of .NET 3.5 and the brand-spanking-new System.Collections.Generic.HashSet<T> class. 

In the past, when we needed to implement a Set in .NET, we sort of bastardized the List<T> or other unsuspecting Collection classes into something like this:

int[] intArray = new int[]{ 1, 2, 5, 7, 4, 1, 7, 9, 8};
List<int> intList = new List<int>();
foreach(int theInt in intArray)
{
  // checking to make sure that the object is not in our List before adding
  //  so we are calling Contains() and then Add() on every time through the loop
  if (!intList.Contains(theInt))
    intList.Add(theInt);
}

What we needed was a Set that would let us just keep adding objects to it and free us from having to worry about it being there first.  A recent example of when I really needed a true Set class was while working on the Weather WidgetThe Weather Channel provides some 40+ images for use in their SDK, yet in the Weather Widget I never need more than maximum of 11 (and usually less as there is usually duplication).  So, I had the idea to dynamically zip the images that I actually needed for a given Zip Code and use that file for my image assets in Silverlight via CreateXamlFromDownloader.  Obviously, I don't want these images duplicated in the zip file.  So, I came up with this:

HashSet<string> assets = new HashSet<string>();
foreach (ForecastDay day in forecast.Days)
{
  // no Exception here if duplicate...it just doesn't add it.
  assets.Add(Server.MapPath(String.Format("~/images/{0}", day.IconDay)));
}
Utility.WriteZipFile(assets.ToArray<string>())

This just scratches the surface of what HashSet<T> is capable of.  There are member methods available for most Set operations, such as IntersectWith(), UnionWith(), IsSubsetOf(), IsSupersetOf(), RemoveWhere(), etc.   Here's a link to all of the HashSet<T> Members.

Recall that being a member of a set depends on some rule that determines this membership.  With the HashSet<T>, you can define your own rule of what it means to be in a Set.  For a good example of defining your own EqualityComparer, see Introducing HashSet<T> from Kim Hamilton on the BCL Team Blog.

So, welcome the New Kid on the Block to the Generic Collections. 

One last random link I had on the subject for those interested in LINQ:
Good side-by-side comparison of the HashSet and LINQ Set Operations

How many times have you written this to trim a trailing slash from a path:

if (myPath.EndsWith("\\"))   /* or "/" in the case of a URI  */
  myPath = myPath.Substring(0, myPath.Length-1);

Next time, try this:

myPath = myPath.TrimEnd(new char[]{'\\', '/'}); >> >

In addition to String.TrimStart() and String.TrimEnd(), there is an overload on String.Trim() that accepts a character array. There are good examples of usage in the MSDN Library.  Here are the links:  

System.String    Trim(char[])    TrimStart(char[])    TrimEnd(char[])

 

I had a chance to attend the recent Atlanta stop of Wildermuth Consulting’s Silverlight Tour this past week and wanted to offer some quick comments about it here for anyone considering the class. 

Going into the class, I had about 3 weeks of heads-down knowledge of Silverlight 1.0, but I had spent no time at all with Silverlight 1.1 (now 2.0).  I had also read Silverlight 1.0 Unleashed, watched a lot of the webcasts available and I had just (mostly) completed my first Silverlight 1.0 project.   

The 3-day Silverlight Tour begins with Day 1 of mostly concepts and terminology and an introduction into the Expression Suite.  This was mostly review for me, but I still managed several “a-ha” moments during the day as the presenter, Shawn Wildermuth, explained the “why” behind a lot of the concepts and decisions that were made in regards to Silverlight.  It was a good “shoring up” of my skills in the foundations of Silverlight. 

Day 2 was all about the code.  We spent about ½ the day on Silverlight 1.0 and the other ½ on Silverlight 1.1.  We had several labs, lecture, and discussion throughout the day.  (A good mix of the three, in my opinion).  One of the strengths of the class was that when questions would come up, we had the flexibility in the schedule to actually go off on short tangents and explore different ideas as a class.  I walked away from this day with a much better understanding of how the code side of Silverlight works with the design side, as well as, a lot of anticipation for Silverlight 2.0.  

Day 3 was the main reason I had taken the class and Shawn did not disappoint.  One of the things I struggled most with while working through the Weather Widget was how to organize projects and where do I use this method from the AJAX assemblies and where do I use Silverlight, etc.  These are the types of things that just aren’t in books yet, but Shawn has been there, done that and you are getting it first-hand.  We learned about the integration points with ASP.NET Ajax and Silverlight, and even newer technologies such as ASP.NET Data Services and the Entity Framework.   Further, we talked about packaging of Silverlight controls and other ways of thinking about the generation of XAML…ways I hadn’t thought about until then.  Very cool stuff from someone that truly understands the subject matter and takes the time to explain things in such a way as to really help everyone “get it”. 

So, I walk away with a head full of knowledge about all kinds of fun things that will be filling my life over the next year (and dying to tear my entire project for the Weather Widget apart and do it with all the new Best Practices I managed to acquire over the past 3 days)!  

<>

A couple of weeks ago, I had the good fortune of catching a webcast from Jeff Prosise of Wintellect entitled:  "Squeeze Your ASP.NET Applications Until They Scream".  I was really impressed with the content and with Jeff's presentation of same.  The event was sponsored by Compuware and they have given me permission to post a link to the presentation. 

Squeeze Your ASP.NET Applications Until They Scream

Over the holidays, I was finally able to catch up on some reading and take some time to play with Silverlight 1.0.  The two books that I spent the most time with are ASP.NET Ajax in Action and Silverlight 1.0 Unleashed.  Both of these, I HIGHLY recommend!  >

My first project is a Silverlight 1.0 application that I call Weather Widget (for lack of a more exciting moniker).  The Weather Widget will accept a 5-digit US Zip Code and return a 5-day forecast from The Weather Channel.   You can see it in action here:  >Weather Widget.  (Note:  This will require the Silverlight 1.0 plug-in). >

I also took the time in this project to use (experiment) with a lot of new toys such as: 

·         LINQ to XML (and the XDocument/XElement classes)

·         New C# language enhancements including Automatic Properties, Object Initializers, Implicitly typed variables, etc. 

·         Javascript key events – some hard-learned (and forgotten and now painfully re-learned) lessons to share here

·         Integration of ASP.NET Ajax and Silverlight – my implementation here is rudimentary right now as I’m still sorting through the most efficient blending of these two technologies

·         Integration of DOM Elements with Silverlight (good post from Keith on that topic here)>

·         Expression Studio (mostly Blend) -  I have much to say about this (some of which you can read in this discussion in Shawn’s comments here).  Overall, I really like a lot of things about Blend.  I am finding myself there more these days though I miss a lot of things about working in Macromedia (now Adobe) Fireworks (which I have used for MANY years for all of my design work).  One upcoming post I’m working on here is “Top 10 Things I miss from Fireworks while working in Blend”.  >

·         Using JSON – I had never used it so now I have

Guess that about covers it.  I’ll link back to the above points as I blog about each. 

I have several things I’m planning to add (and am open to suggestions), but wanted to get it out there in its current state.  Once I am happy with it, I’ll post it to the gallery on the Silverlight.net site.  >

Let me know if the Widget blows up…at this point, I’ve tested only on IE7 and Firefox on my laptop (Windows Vista64). 

>

 

This page has a list of changes, as well as, a link to get the bits:

http://www.microsoft.com/expression/products/download.aspx?key=blend2preview

 

 

Today, I was struggling with getting some code deployed to a client's test server and called him to double-check FTP credentials and such.   He casually mentions having the ability to share your hard drive (and other devices) with a Remote Desktop session.  How many times would that have come in handy?!?!   Anyway, I dug into it further and it works! 

Check out Dan Mork's blog posting on the topic as he does a great job of walking you through the process.  (Make sure and check the comments as there is another really good tip there about saving your Remote Desktop connection with your configuration). 

Thanks everyone for the comments and tips offered after I gave this presentation at Alabama Code Camp, as well as, at the Atlanta Cutting Edge .NET group last week.  I received several "so that's how it works" comments and that was exactly the point of this talk.

Here is the abstract of the presentation:

This will be a thorough discussion of all that is CSS.  Whether you know it as the necessary evil or the great enabler (that just hasn’t quite clicked for you yet), you should walk away with something valuable from this discussion.  I will begin with the basic box model and travel all the way to the holiest of grails (the no tables here, two and three column ASP.NET Master Page layout…yours to take home for free!).  Along the way, we’ll touch on some CSS Best Practices and gotchas in ASP.NET and take a look at the new CSS tools in Visual Studio 2008 (Orcas).

Get the download here.

Note:  The solution file provided is from Visual Studio 2008 (Orcas) Beta 2.  There is nothing .NET 3.5 specific (as most of it is HTML anyway).   

Update 04/01/08:  Updated the download to compile under Visual Studio 2008 RTM

Finally able to grab a minute to post my code and slides from the Introduction to Generics presentation that I did this past weekend at the Alabama Code Camp at the University of Alabama. 

This is the abstract from the presentation:

With the release of the 2.0 version of the .NET Framework, Generics became first class citizens

in the Common Language Runtime.  Yet, many still shy away from using them because of perceived difficulty or other misconceptions.   This presentation will seek to dispel a few of these myths and offer a gentle introduction into using Generics on a daily basis.  Along the way, I’ll also demonstrate language enhancements in the .NET 3.5 runtime that lend themselves nicely to working with Generics. 

 

Get the download here.  

Note:  The code is compiled on Visual Studio 2008 (Orcas) Beta 2.  The only project in the solution that uses .NET 3.5 specific code is the Collections project.  This uses C# 3.5 Automatic Properties and Property Initializers. 

More Posts Next page »