Google Reader and Subscriptions to WiredPrairie

If you’re reading this via Google Reader and the Reader insists that old posts are new, you might be subscribed via my older RSS feed.

I have a number of new subscription options that you can use if you’re having the problem I’ve noticed:

I believe that switching to any of these should resolve the problem. Note that I have also added a comments feed.

  • Standard (RSS 2.0)
  • Standard (Atom)
  • Comments
  • Add to Google Reader
  • It’s not that the old posts have changed (it’s easy to confirm that the pubDate element hasn’t changed), and it’s not that the actual RSS feed is incorrect … it’s something odd that’s up with Google reader.

    Sorry about any inconvenience it may have caused. If you notice the behavior using other feed readers, leave a comment and I’ll look into it more.

    (I hadn’t ever noticed that Notepad is able to directly open Internet files if the file path is preceded with http. Cool.).

    iTunes, by dummies?

    I downloaded a few videos over the weekend about the new iPhone SDK via iTunes. My iPod Classic isn’t set up to synchronize movies, so I need to adjust the settings so that the movies would be available on the iPod.

    Here’s the warning dialog that was displayed when I clicked "Sync Movies":

    image

    All existing songs, movies and TV shows will be removed and replaced with movies from my iTunes library? What happens to the songs and TV shows? Huh?

    I use Media Monkey to manage my iPod’s music collection as iTunes is TERRIBLE on Windows for managing music, playing music, searching music … pretty much everything it does is sub-par and odd. But, this?!

    Does Apple secretly have a guidebook internally, "Apple Inhumane Interface Guideline for Developing Mediocre Windows Applications: A Simple Guide to Getting People to Hating Microsoft Windows More."

    Unfortunately, Media Monkey isn’t able to manage movie/video files.

    I’m not willing to click "Sync Movies" if it should wipe out all of the songs I have. It takes hours to copy them all back.

    Converting a mapped drive letter to a network path using C#

    Occasionally you might have the need to convert a mapped drive letter to a UNC or network path. For example, a drive letter such as  “Z” might be mapped to a network share:

    image

    In this example, the “Z” drive is mapped to a “Personal” folder on a server named “Home”.

    If you want to store for example a UNC path to a file rather than a drive letter, you’ll need to convert the “Z” drive to the corresponding UNC root path. Here’s the C# code I wrote to do this:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Runtime.InteropServices;
    using System.IO;
    
    namespace WiredPrairie.Samples
    {
        public static class Pathing
        {
            [DllImport("mpr.dll", CharSet = CharSet.Unicode, SetLastError = true)]
            public static extern int WNetGetConnection(
                [MarshalAs(UnmanagedType.LPTStr)] string localName, 
                [MarshalAs(UnmanagedType.LPTStr)] StringBuilder remoteName, 
                ref int length);
            /// <summary>
            /// Given a path, returns the UNC path or the original. (No exceptions
            /// are raised by this function directly). For example, "P:\2008-02-29"
            /// might return: "\\networkserver\Shares\Photos\2008-02-09"
            /// </summary>
            /// <param name="originalPath">The path to convert to a UNC Path</param>
            /// <returns>A UNC path. If a network drive letter is specified, the
            /// drive letter is converted to a UNC or network path. If the 
            /// originalPath cannot be converted, it is returned unchanged.</returns>
            public static string GetUNCPath(string originalPath)
            {
                StringBuilder sb = new StringBuilder(512);
                int size = sb.Capacity;
    
                // look for the {LETTER}: combination ...
                if (originalPath.Length > 2 && originalPath[1] == ':')
                {
                    // don't use char.IsLetter here - as that can be misleading
                    // the only valid drive letters are a-z && A-Z.
                    char c = originalPath[0];
                    if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))
                    {
                        int error = WNetGetConnection(originalPath.Substring(0, 2), 
                            sb, ref size);
                        if (error == 0)
                        {                        
                            DirectoryInfo dir = new DirectoryInfo(originalPath);
    
                            string path = Path.GetFullPath(originalPath)
                                .Substring(Path.GetPathRoot(originalPath).Length);
                            return Path.Combine(sb.ToString().TrimEnd(), path);
                        }
                    }
                }
                
                return originalPath;
            }
        }
    }
    

    All of the magic takes place in a Windows API function call, WNetGetConnection.

    I’m using this function so that I can verify that given two file names, I can be assured that they are pointing to the same physical location. (Is “Z:\Backups\Backup1.zip” the same as “\\home\Personal\Backups\Backup1.zip”).

    How do you do search and filtering?

    If you’re creating a user interface for searching, what’s your approach?

    Something simple?

    image

    What happens after the results is presented? Can the user filter and refine the results to find exactly what they want? Are they forced to use an "advanced" mode? Or, scroll through pages upon pages of results hoping to find the right match?

    If you’re interested in making a better search, read Pattern: Refining Search from Looks Good Works Well.

    imageOne of the most recent filtering searches I’ve used is from NewEgg. I was trying to find a new quiet graphics card to replace the hair drier model I’ve currently got installed. It’s clear that NewEgg is attempting to cater to many types of users. They have three different types of searches! The one with the most potential, but doesn’t necessarily follow all of the suggestions in the blog post linked above is the Guided Search. What I like about this search is that it provides feedback before I make a selection. For example, in the screen shot, I can see that there are 6 graphics cards that are priced between $10 – $25. If I click on that link, the list is updated with a new set of choices.

    imageThe Advanced Search takes the old school approach, one where you can almost imagine the SQL query that is constructed when the user hits the "Search" button. My simple complaint with this one is that my searches usually end up with no results as I have "over-specified" my requirements. I won’t know this until I hit the search button though. Worse, I don’t often know what to remove or simply in the search. It’s too hit and miss.

    image Finally, they offer a "Power Search." This search expands the drop-down list idea and allows the user to multiple select from each category. Again, until the search is completed, there’s no sense of whether a search will generate any results. Hardly a spectacular user experience.

    Although not perfect, the Guided Search is the most discoverable and friendly search that NewEgg offers to the general consumer. It uses Ajax nicely to update the results. One major challenge with the Guided Search from a user perspective is that the list is constantly changing, which means that the user must reorient themselves after each click.

    Do you have any favorite search and filtering experiences you’d care to share? Leave a comment.

    Adobe announces, AIR, Flex 3, Open Source, and the kitchen sink

    Adobe made a handful of announcements early this morning:

    The Flex team’s blog announcement has more details and a lot of links to get you started.

    Is it just me, or are none of the demo applications very compelling?

    image

    The biggest change from "yesterday" is that it might be easier today to write a cross-platform application — as long as AIR/Flex supports what you want to do outside of the browser. I’d like Adobe to offer the "Express" edition of Flex Builder so I can build things for free, just like Microsoft does with Visual Studio.

    Are you excited about this "AIR"? (Or Flex?)