in

Utah .NET User Group

Home of Utah's professional .NET developers.

Bryan Hinton's Blog

November 2007 - Posts

  • Happiness at Work - Some thoughts to live by

    A friend of mine passed along a link to the Happy Hour is 9 to 5 book.  It has nothing to do with drinking alcohol at work althoughly sadly that might be the only way some people could find happiness at work!  Chapter 1 was alright and Chapter 2 started just okay, but finished much stronger.  It is a good read and has some good ideas on things to try and make life around you more pleasant.  The ideas are really applicable to life in general and not just work.  In fact if you practice these things at work hopefully you are doing them first at home with those you care about

    The author of the book also has a blog entitled Chief Happiness Officer.  Today in fact he posted an interesting article where he called out to Americans - asking us a question about what makes us happy at work.  There is an interesting discussion building there about differences between America and Europe for example and how that impacts what makes us happy at work.  The discussion around the lack of a social safety net in America and the impact it has is particularly interesting.

    In regards to that article I guess my comment there would be that I want to be happy at work,  but work to me will always be first and foremost a means to an end.  That end is providing for my family.  That is priority number 1.  So my first answer to what makes me happy at work - it is that it lets me go home at a decent hour with a decent wage so that I can spend my time and money with the people I care about most.  Now while I am at work I think being happy and in general adhering to the principles that I have seen in the Happy Hour is 9 to 5 book is a great idea.

     

  • Map to all the RSS in Windows Live Spaces

    In writing a post to describe the content on my site I wanted to be able to clue people into the RSS feeds that would be available from my Live Spaces site, but I couldn't find enough RSS icons to satisfy me and so I did some Google searching to find out the details on RSS within Live Spaces.  What I found was great since there is tons and tons of RSS integration throughout the site.  I do wish they had made it more discoverable, but I guess that just leaves them with some room for improvement.  Here are a couple of links that I found handy.

    http://mike.spaces.live.com/blog/cns!FBABF8E542F5D5DB!8320.entry

    http://msdn2.microsoft.com/en-us/library/bb447761.aspx

     

    Technorati tags: ,
  • A couple of Windows Live requests

    In my previous post I talked about my impressions of what Window Live is doing and my overall excitement around how MS is evolving the Live platform.  That praise aside I do have a couple of critiques/requests.

    1.  Clarify the role of www.live.com, home.live.com, and your Spaces home page.  I haven't seen meaningful changes to www.live.com in a while and while it has similar functionality to iGoogle it doesn't have enough to make me switch and frankly my interest in iGoogle and it's usefulness to me is decreasing as well.  I find that between my Live Spaces page and home.live.com I get the information I need.  I would like to see home.live.com and the home Live Spaces page integrated together.  To me having them separate is silly they have subtle differences I suppose, but not enough to make them two sites (if for example you didn't have a Live Spaces account, but wanted to use home.live.com you just wouldn't see the Live Spaces content that someone who had an account does).  The content on both sites is sparse enough that integrating them seems to make sense to me.  Having www.live.com in addition to them seems silly unless there is some kind of collaboration between the three.  Perhaps some gadgets that show the content that normally is displayed on the home.live.com and Live Spaces home pages.

    2.  GOOGLE READER - I love the RSS integration in Windows Live Mail, IE7, and Vista in general, but web-based aggregation is where it is at.  That gives me access to my feed content on my mobile device, any PC I want, etc...  This is one area where I feel like Google just continues to stomp MS even though MS has a decent RSS integration story in its client products.  Where is the web-based aggregator - Please bring it - add in integration between it and Window Live Mail (the client software) and wham - what you have would pull me away from Google Reader.  Of course Google Reader is more than just web-based aggregation.  I love the starring and sharing features - the sharing especially with the Link Blog concept (RSS feed of your shared items) that so many use (Scoble notably) is tremendous.  Come on MS this is a huge hole in the Live family!  If you aren't anywhere close than buy Bloglines.  They are right up there and with some refocusing of their system inside of the Live family (and some simplification and addition of sharing and starring of course) maybe you can get relevant in this space faster!

    All in all I love what MS is doing with Live which is a marked change than what I thought and felt 6 months ago that is a tribute to the product teams that continued to churn out lots of new capabilities over the last 6 months.  I hope the next 6 are equally exciting!

    Technorati tags: ,
  • Windows Live Continues to Deliver

    The news community has quite a few reports on the release of many of the Windows Live services/products from beta as well as the introduction of at least one new beta (Windows Live Calendar).

    I have been using Windows Live Mail (which in what is still a little bit of a branding nightmare is the name for the desktop client to the Windows Live Hotmail service), Windows Live Writer, and Windows Live Photo Gallery for quite some time in their beta forms.  I have been impressed as they have been solid over the beta period that I have used them.

    I have been on the Windows Live Mail bandwagon for a while.  I have moved several of my family members over as it is a light-weight client and with the RSS integration I now have my grandma reading my blog and others through RSS!  I wish that Windows Live Calendar was integrated into it (there was minimal integration at some point in the product evolution).

    I love Windows Live Photo Gallery.  I was using Photoshop Elements for organizing, but no longer.  Live Photo Gallery does that stuff so much easier and I can map multiple machines to a share on my home network and base the Photo Gallery store off that and have it work.  Photoshop Elements would never load when I tried to do that.  The Photostitch stuff is fantastic - I have to stop myself from always shooting panoramas!  I love how easily they stitch together and create cool pictures (at least cool to me - any shortcomings in them is due more to me as a photographer than anything else).  The basic editing in it does most of what I need (and probably most of what the everyday Joe does as well).  I have Elements to shift into any really fancy editing if I really need to (which I rarely do). 

    Windows Live Writer is a great blogging tool - the add-on community is always introducing cool new things (the Live Spaces and Skydrive integration is cool and the Silverlight integration looks cool as well although I haven't tried it personally yet!).

    Windows Live Calendar looks very promising with the iCal integration - I'll report back once I have had a chance to play with it some more.

    I think the move to bring Live clients to the desktop to connect MS desktop properties (Vista especially) with the work being done on the web with the Live Services was brilliant and enriches the experience (Live Photo Gallery being a prime example - terrific move there MS).  Frankly it is these innovations that get me excited where MS is headed with Windows Live.  I have two key requests/complaints that I will detail in my next post - overall though Windows Live is taking shape nicely I think.

    Technorati tags:
  • Windows Live Photo Album Screen Saver

    Now that I am using my Windows Live Spaces extensively for blogging and posting pictures I started to look around software that would allow me to use as a screen saver the pictures in my Photo Albums.  I use a couple of different computers and I love to have personal pictures as my screen saver, but it was such a hassle to have to copy new ones from time to time over to each machine.  At one point there was an MSN Screen Saver that purported to have this capability, but I couldn't get it to work with my Windows Live Spaces account.

    This was a great opportunity to play with VS2008 and LINQ.  I have had the Express Beta 2 version on my machine for a while, but done little with it up to this point.  I took the Screen Saver starter kit from the VS2005 Edition and upgraded the project to 2008 (by opening it in 2008).  That worked without a problem and so it was on to customizing the project to pull the files from my Windows Live Spaces albums and hooking that into the Screen Saver code.

    I have uploaded the source code zipped to my SkyDrive.  There are many changes to be made, but the code is working.  I don't have the options dialog working yet to configure through the GUI the Live Spaces Album feed to use so you'll have to change the hard-code and recompile.  Before too long I will update the code to include that as it isn't hard to do.  When you compile it copies the exe output and a helper dll to the system32 directory and renames the exe file to an scr file which is what Windows wants to show you the screen saver in the Screen Saver tab within the Display options.  REMEMBER YOU MUST HAVE .NET 3.5 Beta 2 INSTALLED FOR THIS TO WORK!

    The RSS feed you provide can be for all your albums or from a specific album the code automatically detects it and will parse it accordingly.  The WindowsLiveSpacesPhotos.dll holds the parsing code which isn't very complicated really.  I use LINQ in it to examine the XML and find what I need.  I love LINQ.  It changes the whole way I look at solving problems.  If I need to query data (however that data is stored) I can now express it in common terms rather than having to primitively code my queries in a sequence of loops, ifs, and temporary variables.

       1: public List<Uri> ProcessFeed(string feedURL)
       2:         {
       3:             SyndicationFeed feed = SyndicationFeed.Load(new Uri(feedURL));
       4:             var Result = (from extension in feed.ElementExtensions
       5:                              where ((XmlElement)extension.Object).Name == "live:type" && (((XmlElement)extension.Object).InnerText == "photos" || ((XmlElement)extension.Object).InnerText == "photoalbum")
       6:                          select ((XmlElement)extension.Object).InnerText);
       7:  
       8:  
       9:             if (Result == null) throw new ArgumentException("The feed URL provided is not a feed of all photo albums or a feed for a specific photo album and thus it is not a valid feed");
      10:             var PhotoFeedType = Result.SingleOrDefault();
      11:  
      12:             if (PhotoFeedType == "photos") return EnumeratePhotoAlbums(feed);
      13:             if (PhotoFeedType == "photoalbum") return EnumeratePhotos(feed);
      14:             return null;
      15:             
      16:         }

    Windows Live Spaces extends RSS feeds with extended properties if you will that identify the feed if it is a photo album or if it is photos which means that it is a list of photo albums (where as photoalbum means the feed consists of a list of photos that comprise the single album).

    I then use LINQ to inspect the feed to extract the items that I need.  The code snippet below I am especially proud of as it is my most advanced LINQ query to date where I am nesting queries and from one of them querying over the return from a method call.  The thing I like is the way it goes into each photo album RSS feed extracts out the links to the actual images and then returns them flattened out with all image links from all photo albums in one list.  I would try to explain it, but it is much more effective to play with this sequence of code and work with the debugger to inspect the different ways that data can get returned (nested differently).  It took some playing with it along with a little Internet searching to figure out how to get it flattened out correctly.

       1: private List<Uri> EnumeratePhotoAlbums(SyndicationFeed albumFeed)
       2:         {
       3:             var Results = (from item in albumFeed.Items
       4:                 from extension in item.ElementExtensions
       5:                     where (((XmlElement)extension.Object).LocalName == "itemRSS")
       6:                     from photolink in EnumeratePhotos(SyndicationFeed.Load(new Uri(((XmlElement)item.ElementExtensions[3].Object).InnerText)))
       7:                     select photolink).ToList();
       8:  
       9:             foreach (Uri uri in Results)
      10:             {
      11:                 Console.WriteLine(uri.AbsoluteUri);
      12:             }
      13:  
      14:             return Results;
      15:             
      16:         }

    I won't bother showing the Screen Saver code as I didn't change too much there.  I do spin off a new thread to check the feeds for updates and then I store them in a temp folder and when I am done downloading the images (I save them local so that the screen saver can work in the rare instance that the computer might not actually be connected to the Internet).  I then signal the UI thread and inform it of the new folder and it then switches the screen saver from using the old image folder to using the new and voila! we have our screen saver.

    Once I get a little more work done on this I plan on posting it to CodePlex.  I want to clean up the code by adding in an object model to express more appropriately the domain model that exists as well as making the options dialog work like it is supposed to.  I would love to have the same image layouts and transitions that the built-in Vista Screen Saver has, but that for now is beyond me, but who knows maybe getting the code to Codeplex will help me find someone who has the know-how to do that!

  • What everyone should know about using Bitmap Indexes with Oracle

    I am only through part one of the three parts of the article that Jonathan Lewis wrote about bitmap indexes, but it was so good that I had to post it now.  He takes on the common understanding/misunderstanding with bitmap indexes.

    Technorati Tags:
Copyright © 2000-2007, Utah .NET User Group
Powered by Community Server (Commercial Edition), by Telligent Systems