I recently picked up a copy of "Upgrade Your Life: The Lifehacker Guide to Working Smarter, Faster, Better" by Gina Trapani and quickly figured out three ways to optimize my email.
1) Color Code Email Sent Directly To You
If you click on Tools > Organize in Outlook, you'll notice the following pane:

Click on the Turn On button next to "Messages sent only to me now appear Blue". Now all the email directly emailed to you will be highlighted.
2) Create a "Message Sent Directly To You" Rule

In this rule, it will look for messages not addressed to me, however the messages with my name (JL or Jean-Luc) will remain in the inbox.
3) Create a Facebook/Twitter Rule

I find myself getting a lot of "noise" email from Twitter and Facebook - I want to know what's going on (new friends adding me, messages, ect) but want to avoid jumping into the inbox everytime a message pops up. I've added the major Facebook aliases (groupmaster+mdvvmuv_@facebookmail.com, confirm+mdvvmuv_@facebookmail.com, notification+mdvvmuv_@facebookmail.com, ect).
Everything looks good so far. If you have a handy tip to optimize your own email, post it in the comments!
In the Part 1, I talked about some of the applications you can build for the Zune today, and specifically, my plans to create a wrapper for the Zune user card Web service using LINQ to XML. Note that this is a quick and dirty class I baked in a couple of hours. If you are looking for a more robust implementation, be sure to check out Mehfuz's WebLog - specifically his posting on integrating REST with LINQ to XML, and his custom LINQ.Flickr provider. Let's take a look at the namespaces: using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
You'll notice that System.Linq (to access the core LINQ functionality) and System.Xml.Linq (to access LINQ to XML) are included as namespaces. Then a class called ZuneCard is defined and a bunch of public auto-implemented properties are defined (a feature of C# 3.5 - each property corresponds to a node in the Zune Card XML tree): namespace ZuneCardApi
{
public class ZuneCard
{
// Exposed Properties
public string id { get; set; }
public string label { get; set; }
public string firstName { get; set; }
public string status { get; set; }
public string tileBig { get; set; }
public string tileSmall { get; set; }
public string name { get; set; }
public string location { get; set; }
public string bio { get; set; }
public string backgroundLarge { get; set; }
public string backgroundSmall { get; set; }
public string totalPlays { get; set; }
Then ZuneCard is implemented and the tag parameter is passed (corresponding to the user's Zune tag). The XDocument object is used to load in the XML data for the user card. Note that this operation happens only once, then the data can be manipulated and queried to your heart's content in memory (which has performance benefits). public ZuneCard(string tag)
{
XDocument zCardXml = XDocument.
Load(@"http://zcards.zune.net/zcard/usercardservice.ashx?zunetag=" + tag);
Next, we need to call our LINQ queries. Essentially, we are transversing the nodes of our XML tree (found here) starting at the user node. Anonymous Types (another C# 3.5 feature) are used liberally here (as you can see below): var user = from u in zCardXml.Descendants("user")
select new
{
_id = u.Element("id").Value,
_label = u.Element("label").Value,
_firstName = u.Element("firstName").Value,
_status = u.Element("status").Value,
_tileBig = u.Element("image").Value,
_tileSmall = u.Element("image").Value
};
var userData = from uD in zCardXml.Descendants("userData")
select new
{
_name = uD.Element("name").Value,
_location = uD.Element("location").Value,
_bio = uD.Element("bio").Value,
_backgroundLarge = uD.Element("image").Value,
_backgroundSmall = uD.Element("image").Value,
_totalPlays = uD.Element("totalPlays").Value
};
Finally, we need to iterate through the collections and load the values into the public properties (as shown below):
foreach (var u in user)
{
id = u._id;
label = u._label;
firstName = u._firstName;
status = u._status;
tileBig = u._tileBig;
tileSmall = u._tileSmall;
}
foreach (var uD in userData)
{
name = uD._name;
location = uD._location;
bio = uD._bio;
backgroundLarge = uD._backgroundLarge;
backgroundSmall = uD._backgroundSmall;
totalPlays = uD._totalPlays;
}
}
}
}
In the next part in the series, we'll take a look at how to handle collections corresponding to playlists, badges and other user preferences. In the meantime, if you have any suggestions on how to improve this code, feel free to post a comment.

Just a quick note to highlight some of the .NET community meetings happening in Toronto in June. If you get the chance, attend these meetings as you'll get great training on new topics and an opportunity to network and connect to your peers. If you see me there, be sure to drop by and say hi!
June 4 (today) - Toronto Silverlight User Group (inaugural meeting!) Register at: http://www.torontosilverlight.com/
June 17 - Toronto Visual Basic User Group http://www.tvbug.com/
June 25 - Metro Toronto .NET User Group http://www.metrotorontoug.com

I'm a big fan of the Zune (I own four of them, believe it or not) - so as a developer, I'm naturally inclined to think about novel ways to write applications for the device. There are several different approaches I've uncovered so far:
In this blog post, I will focus on the before last bullet point - how to create a API wrapper for the Zune Card Web service. To access the Zune user card service, simply point your browser to the following URL (including your Zune Tag - in my case, stormpixel):
http://zcards.zune.net/zcard/usercardservice.ashx?lcid=1033&src=external&zunetag=stormpixel
You'll notice that the Zune Card (zCard) is based on a custom XML schema. The uri provides a link back to the user card service. The id denotes the Zune user id. The firstName, status message and tile images are self-explanatory. The manifest contains additional information about the user, badges, playlists, contact information and preferences:

I've created a preliminary API wrapper using LINQ to XML to access the information contained in the Zune cards. To access information about a Zune card, you can instantiate a variable of type "ZuneCard", passing into it the zune tag of the user. Once the object has been instantiated, you can then pull in user properties and collections (deserialized for your convenience). The example below is a console application where I'm querying the ID for the user stormpixel: using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace DisplayZuneCard
{
class Program
{
static void Main(string[] args)
{
ZuneCard zuneCard = new ZuneCard("stormpixel");
Console.WriteLine(zuneCard.id);
Console.ReadLine();
}
}
}
If I run the application, I get the console window shown below. In the next blog post, I'll explain in more detail how I implemented the API.

You can get a lot of perspective on where we are at in terms of cloud computing and storage if you take a look at a specific domain, such as photography. Not so long ago, I was completely relying on film based cameras. I would take a bunch of photos and get them developed. The whole process was so highly unreliable. If the lighting was bad or the image was blurry - too bad. I wouldn't know until I got the pictures back from Blacks' or some other photo finishing place. Took about an hour to print (at a premium). You also have to buy albums to store your "physical media" - film and photos.
Old school film-based cameras are still around - but getting harder to find (you can still buy disposable cameras that has film in it, some professional photographers still use film, and so forth).
Fast forward to today - my first digital camera was an HP PhotoSmart 735 (not a great camera by any stretch, but did a satisfactory job). I now use a Nikon Coolpix S50C and I've suddenly become a decent amateur photographer. I can preview the photos I take on a nice LCD screen and get instant feedback on the quality of my shots (my style has evolved to iterative, agile photography instead of waterfall).
Once you go into a digital direction, you soon get faced with the problem of massive amounts of data - how do you store and manage it? My preliminary solution was to burn CD-Recordable discs. But again, there is a reliance on physical media. What if the disc has a scratch on it and is unreadable? What if my house burns down? An extreme circumstance - but it can happen.
I solved the problem by moving my photos up on Flickr. Now my entire extended family and friends can access them (in fact, my pics have been viewed over 16,703 times), I can upload them through the website or using a client (Flickr Uploadr). I currently have 2,486 photos online. If you estimate that each photo is approximately 1.44 MB in size, that totals about 3.5 GB of storage. I don't have to worry about storing them on physical media and creating backups in several locations (in case of floods or house fires). I can access them from anywhere - and I can keep my photos up to date very easily. In my household, cloud computing has arrived. My camera even supports wifi and will automatically upload my photos online (although I haven't explored that feature yet).
Live Mesh is looking very promising in providing similar capabilities for the desktop, you can sync up files and access them in an online version of your desktop or on multiple computers. I've been testing it out - it has a wonderful potential to provide the same benefits I'm getting with photos through Flickr. Instead of using USB keys, I'm finding myself using Windows Live SkyDrive more often than not for sharing files.
As a developer, I'm getting quite excited about the prospect of storage and reliability capabilities in my applications. Ubiquitous data rocks - I can create a Web, desktop and mobile application that shares the same data store and membership capabilities. No need to worry about the plumbing involved in synchronizing data across these different application platforms! How has cloud computing affected you?
While exploring Long Zheng's great blog (istartedsomething.com), I stumbled across a really amazing wallpaper called Dark Aurora. Here is a screenshot:

(click on the image to download - 1500×1125 resolution)
To set up the blogging infrastructure for this website, I installed DasBlog v.1.8.6025.3. The process was pretty painless - unzip the files, upload them into a folder onto the web server, make that folder a Web Application in IIS and set a few permissions on "writable" folders. No database connections to fuss with - it just worked out of the box. A lot of prominent bloggers use DasBlog including Scott Hanselman and Canada's very own Kate Gregory.
Note that I'm hosting this blog on an IIS 7.0 server and I initially got an error that the application had to run in Classic Pipeline Mode instead of Intregrated mode. As soon as I flipped the bit - the site worked fine. Mike Volodarsky has an excellent article on how to create an ASP.NET site that is compatible in both Integrated and Classic Mode. Once I get a few cycles, I'll make the changes and create a post about it.
Next step in the process was customizing the UI. I chose the "business" theme. Here is what the directory structure looks like:

homeTemplate defines the "look and feel" of the page as a whole. This is where your Classic ASP skills come into play - John Forsythe posted a very useful set of DasBlog macros you can plug into the template. itemTemplate defines exactly what will be shown in every post - I've added support for a number of social networking sites including Digg and Technorati. Of course, theme.css can be used to customize colors in the theme and positioning. Overall, I'm pretty happy with the makeover.
If you are interested in achieving the same results, I've posted my templates on my SkyDrive. Also found what appears to be two minor bugs with DasBlog:
- If I try to enter a very long URL into the text editor, it gets shortened which results in malformed HTML. I've been using shrinkster to mitigate this problem.
- My SkyDrive won't embed on the blog. Works perfectly on my homepage however.
|