WELCOME

This blog is where I post about my consulting work with Microsoft Technologies, and other random tidbits that don't fit in my Photo Blog or my Iraq Blog.

Wednesday, June 9, 2010

What I'm working on: Image Analysis at 3M

I'm working on an interesting project at 3M.  The Visual Attention Service (https://vas.3m.com/) is an online service that will analyze an image and tell you what parts of the image a viewer is most likely to look at in the first few seconds.

A very useful thing in designing advertising... what will users notice first?  The surgeon generals warning or the 10% off coupon?

So here's a real world example of the tool in action:


If you are not familiar with this image it's a classic bit of software developer humor about compiling and testing code.

It turns out that the tool believes that most people will notice the scary monsters first NOT the kittens (as shown by the heat map below)...


DISCLAIMER: No kittens where actually harmed in the creation of this blog post.

Monday, May 24, 2010

Customer support issue: Installing Silverlight on the Mac

I was just dealing with an escalated end-user problem with a production Silverlight application here at *nameless* Fortune 500:

User:  I can't get your Silverlight app to install on my "new" Mac.

Support: What browser and OS version are you running.

User: I'm using Safari on a G5 tower running OSX 10 something.

Me:  Um... The G5 is a PowerPC based computer.  Apple announced their retirement in 2005, hasn't sold them since early 2006, and the current version of OSX doesn't install on them...  And no, Silverlight doesn't run on them either...

Sorry...

Wednesday, May 19, 2010

Solved: RIA Services work on development server but fail on IIS

I'm building a prototype Silverlight 4 application using the Silverlight Business Application template as a starting point (I chose this template so that I could get ASP.NET forms authentication working "quickly").

My test app worked fine in the development web server (aka Casini if you are old enough to remember that), but it didn't work in IIS.

After some digging I found this post: Deploying Application built using RIA Services RC which solved my problem.  Solution: disable basic and integrated (aka: NT) auth.

Details from Saurabh's post:  "WCF (and by association RIA Services) has a limitation that it does not support MultipleAuthenticationSchemas enabled in IIS. So if you are using Forms Authentication in your application (if you built your application using the Business Application template, Forms Auth is the default there) you need to make sure that for the IIS VirtualRoot that hosts your WebApp Forms Auth is enabled. Forms Auth + Anonymous will also work fine but Forms Auth + Integrated Auth is not supported."

Wednesday, March 31, 2010

The iPad and the future of "computers"


Eric Sink has a great post today discussing the future of computers:

http://www.ericsink.com/entries/dual_class_computing.html

The key points that caught my attention (paraphrased and reinterpreted by me):
  1. The iPhone and iPad represent a shift in the "computer" market towards simpler devices for consumers that do what they want and they can't screw up. These devices will start to meet the computing needs of most users. No need for a "real" computer, and no need to call your geeky relative to come fix it regularly.
  2. "Computers" as we know them today with numerous options and a high degree of complexity will become a niche product for a relatively small number of users with specialized needs.
  3. Microsoft is set to miss this seismic shift in the computer landscape.

Tuesday, February 2, 2010

Souce code for deleting Google/Gmail Contact Groups

Over a year ago I posted a little utility for deleting unwanted groups out of your Gmail Contacts.

Blog post here: http://blog.scrappydog.com/2009/01/deleting-4000-gmail-groups-or-repairing.html

Application install here: http://scrappydog.com/GoogleGroupCleanup/publish.htm

I wrote this for my own use because a bad replication tool had created 10,000+ bogus groups in my Contacts, and I REALLY didn't want to delete them by hand!

Apparently, it has saved a fair number of other people's bacon as well...

Today "Ben" asked if I could post the source code for my tool? And so here it is (not much to it):


using System;
using Google.GData.Contacts;

namespace GoogleGroupCleanup
{
class Program
{
static void Main(string[] args)
{
try
{
Console.WriteLine("Google Gmail Group Cleanup Tool");
Console.WriteLine();
Console.WriteLine("Written by: Eric Bowen (googlegroupcleanup@scrappydog.com)");
Console.WriteLine();
Console.WriteLine("This application is provided WITHOUT any guarantee. Use at your own risk.");
Console.WriteLine();
Console.WriteLine("This application will delete ALL groups from your Gmail account.");
Console.WriteLine("It will NOT delete any of your contacts or email.");
Console.WriteLine();
Console.WriteLine(
"This application deletes up to 1,000 groups at a time. If you have more than 1,000 groups to delete you will need to run it multiple times.");


Console.WriteLine();
Console.Write("Enter Google email address (this will not be stored): ");
string email = Console.ReadLine();

Console.WriteLine();
Console.Write("Enter Google password (this will not be stored): ");
string password = Console.ReadLine();

var service = new ContactsService("gmail-group-cleanup");
service.setUserCredentials(email, password);

var groupQuery = new GroupsQuery(GroupsQuery.CreateGroupsUri("default"));
groupQuery.NumberToRetrieve = 1000;
var groupsFeed = service.Query(groupQuery);

int counter = 0;
foreach (GroupEntry group in groupsFeed.Entries)
{
Console.WriteLine(group.Content.Content);
group.Delete();
counter++;
}

Console.WriteLine();
Console.WriteLine(counter.ToString() + " groups deleted");
Console.WriteLine();
}
catch (Exception ex)
{
Console.WriteLine("Exception:");
Console.WriteLine(ex.Message);
Console.WriteLine();
}
Console.WriteLine("Press any key to exit");
Console.ReadKey();
}
}
}

Friday, December 4, 2009

SetPropertyValues never called in custom ProfileProvider

I've been writing a custom ASP.NET MembershipProvider, RoleProvider, and ProfileProvider from scratch with Amazon SimpleDB as a backend. Everything went swimmingly with Membership and Roles, but I've spent an embarassing amount of time fighting with Profile...

Profile's underlying object model is complex and less than intuitive. The challenge for me was trying to figure out what things had to be implemented in order to get basic functionality working.

The major roadblock I ran into was that at the point that I was code complete and everything seemed like it "should" have been working I couldn't get anything to save. No errors, but nothing was saving.

All Profile saves go through SetPropertyValues and when I set a break point on my overridden version of this method it was just never getting hit.

After hours of trashing about I finally found the answer in this thread: http://forums.asp.net/t/635411.aspx

The gist of the problem is that before every save Profile calls GetProfileValues, and if the result returned by GetProfileValues isn't properly populated SetPropertyValues just doesn't get called. Highly unintuitive.

Here is the quote from the thread that finally solved the problems for me:

"Basically, somewhere in GetPropertyValues, there should be code new'ing up SettingsPropertyValue instances that looks like:

SettingsPropertyValue sv = new SettingsPropertyValues(SettingsPropertyInstanceGoesHere);

You get the SettingsProperty instance from the SettingsPropertyCollection that is passed in as a parameter to the GetPropertyValues method."

When I'm done these providers will be published on Codeplex as part of my ScrappyDB C# library for SimpleDB.

Sunday, November 29, 2009

Happy Holidays!


, originally uploaded by ScrappyDog.

Family 2.0 portrait at "the Farm" in Grand Marais over Thanksgiving. Photo by Gramma Betsy.