Thursday, November 09, 2006

Note the strange silence after yesterday's elections.

Where are the broken voting machines and screams of foul play?
Where are the people turned away from the voting booth by scary people?
Where are the misleading ballots that trick you into voting for the wrong candidate?
The hanging chads?
The hacked-into diebold machines?
I guess those only happen when the republicans win the day.  How did we get through yesterday with only a single recount?  I guess those things only happen when the republicans win the day.  A republican victory, we should believe, is a sham, a proof of foul play, an abomination impossible to conceive.  A democratic victory is an affirmation, a proof of the righteous mandate of the people.

Oh well, back to writing code.

Thursday, November 09, 2006 11:43:32 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Wednesday, November 08, 2006

In Wisconsin here, we re-elected our Governor, and across the nation democrats are exhalted in their wins in House and Senate.  Somehow, I don't expect much to change.  The democrats have gotten more conservative and the republicans have started spending more money and thumping the bible.  They both serve the same corporate masters anyway.  Politics has turned into a footbal game beneath a 3-ring big top where team loyalty drives most discussion.  For my part, I don't vote for the DemoPublicans/Republocrats anymore.  I voted for 3rd party or independent candidates across the board yesterday.

My perspective on the democrat wins: I'm glad that flying cars, global happiness, unprecedented prosperity, meals in pill form, and universal harmony are just around the corner now!  I don't know which I shoud do first: go ahead and go out to spend $$ against the increased prosperity that is undoubtedly a few months away now, or maybe book my honeymoon in Iraq since it is probably about to be super-peaceful and friendly to westerners in a few weeks, or hell, I think I'll just go lick some doorknobs since the price of health care will be plummeting in a few hours, those doorknobs will be in Grand Central Station since the 85-cent-per-gallon-gas that's about to go on sale will make my roadtrip very affordable!

Wednesday, November 08, 2006 12:50:49 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback

If I can get everything squared away with borrowing the knockdown finish texturing device, carpet, and final inspection my theater will launch on November 29th.  The projector and screen came in yesterday and everything is coming together.  This has been a long time in the planning and development.

Wednesday, November 08, 2006 9:59:23 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Friday, November 03, 2006

So, this weekend I will be drywalling my home theater room.  This is the last step before I can paint it and subsequently watch The Matrix on my 106" screen.  The effort took a little longer than I wanted and cost a little bit more but I'm better off for the experience.  I would upgrade myself to Moderately Handy now.  I was trying to get this all done before Thanksgiving which will be a challenge since I am also doing some work from home and planning a wedding right now and those things must take priority.  I was hoping to just be able to pay someone to do the drywall. 

I got three quotes.  The cost, of course, was at least three times what I expected a one room job to cost.  And people think software is expensive and goes over budget.  So, I have 35 sheets of gypsum hardboard in my basement right now and I'll be spending at least two weeks mudding and sanding after its hung.

 

 

Friday, November 03, 2006 2:21:36 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [5]  |  Trackback
 Wednesday, November 01, 2006

For some reason I had been under the impression that there was not a provider model for session state in ASP2.0.  It seemed a shame that I could not provide my own iplementation for session state in my app.

http://msdn2.microsoft.com/en-us/library/aa479034.aspx shows that this was an incorrect assumption.

You may wonder what could possibly make someone want to implement their own session state provider?  While doing some pie in the sky architectural thinking about my current production environment I noticed that it does not seem that StateServer is clusterable.  I somehow don't think I'll ever get around to digging into this seriously, but I wonder what it would take to create a clusterable StateServer implementation?

Wednesday, November 01, 2006 1:18:27 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [1]  |  Trackback
 Tuesday, October 31, 2006

As I have posted myself, and not too long ago either, using the "as" operator in C#, as in SomeType t = obj as SomeType; does not throw an InvalidCastException, but rather returns null if the type conversion did not work.  In my Sorting example, the catch() should be changed to catch null pointer instead.

Tuesday, October 31, 2006 10:12:57 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Friday, October 27, 2006

This is, officially, not supported.  VS2005 is required to debug CF2, and VS2005 does not target CE.net 4.2 devices.  It was a good step forward when the CF2 service pack one came out with runtime support for CF2 and SqlMobile 3 on CE.net 4.2 devices but as someone who loves the debugger, lack of debug suport was a cruel omission.  Often things that are not officially supported will still work in many cases though, so when SP2 came out I tried debugging on my DAP ce4.2 devices.  "A file cannot be created when it already exists", an obscure error with hardly a mention on Google groups or MSDN forums, so I gave up.

Today I was debugging on a CE 5 device from this vendor.  Somehow it got set to "limited user" mode, a proprietery feature of theirs.  Limited user does not have access to read or write most things, including whatever VS2005 needs to start managed debugging on the device.  Lo, I get the same error on my CE5 device which had previously been working for a week "A file cannot be created when it already exists".  Changing back to "supervisor" mode on the device alleviated the issue.  On a whim, I tried the first CE 4.2 device I came across in the office and I get the error. 

Enabling "supervisor", and slowly but surely (much slower than CE5) it deploys to the device.  Starting debugging fails though and I get an error saying it cannot find a version of the CLR compatible with my application, "Some devices do not support automatic CLR upgrade".  Manually upgrading with NETCFv2.wce4.ARMV4.cab, System_SR_ENU.CAB, sqlce30.ppc.wce4.armv4.CAB, sqlce30.dev.ENU.ppc.wce4.armv4.CAB and I'm in business on CE 4.2.  If anyone else has this problem I would encourage experimentation, it might work.

Edit: I should note that my target platform in VS2005 was "Windows CE 5.0 Device".

Friday, October 27, 2006 1:36:04 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback

You gotta love Generics in .Net 2.0.  I had to do some Object-sorting in memory with some List<T> stuff. 

/// <summary>
/// Compare objects of type T using a certain property
/// </summary>
/// <typeparam name="T"></typeparam>
public class PropertyComparison<T> : System.Collections.Generic.IComparer<T>
{
/// <summary>
/// What property of the objects to use to compare one to another
/// </summary>
/// <param name="property"></param>
public PropertyComparison(string property)
{
_propName = property;
}

private string _propName;
private PropertyInfo _prop;

public int Compare(T x, T y)
{
if (null == _prop)
{
_prop = x.GetType().GetProperty(_propName);
}

try
{
IComparable xVal = _prop.GetValue(x, null) as IComparable;
IComparable yVal = _prop.GetValue(y, null) as IComparable;
return xVal.CompareTo(yVal);
}
catch (System.NullReferenceException)
{
throw new ApplicationException("Type " + _prop.PropertyType.ToString() + " is not IComparable");
}

}
}

So then I would use it:

if (!string.IsNullOrEmpty(prop))
{
CarSpot.Mobile.Types.PropertyComparison<Vehicle> c = new CarSpot.Mobile.Types.PropertyComparison<Vehicle>(prop);
try
{
_dataSource.Sort(c);

 

 

Friday, October 27, 2006 12:52:29 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Monday, October 23, 2006

I have 398 movies in my netflix queue right now, I have been told I will never catch up and get the list down below 300.

People are so negative...

Monday, October 23, 2006 9:20:25 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [1]  |  Trackback
 Friday, October 20, 2006

My custom home theater project has been on for a while now.  Yesterday the ole city inspector stopped by and gave me a green sticker on the rough-in of the room.  I live in a code compliant community which means if I ever want to sell this place I actually need to follow the rules as far as permits and Wisconsin Uniform Dwelling Code and such.  Now I just need to finish fishing some wire-conduit and insulate, drywall, paint, enjoy.  It will be a nice room, approx. 21' by 25' with 9' ceilings.  This has been a long time in planning before the house was even started, one of several big plans coming to fruition right now.

Most people could stop reading now, but some may ask what equipment I have:

  • Aragon Stage One 7.1 Preamp/processor
  • Aragon 2005 200 w/ch amplifier
  • Denon DVD-1930ci upscaling DVD/CD/SACD player
  • Main speakers: Klipsch Cornwall II
  • Center channel: Custom built "vertical cornwall"
  • Klipsch THX theater-style dipole surrounds
  • SVS 20-39 PCI active subwoofer
  • 106" diagnol Draper fixed-frame screen
  • Panasonic PT-AX100U projector
  • All cables are Belden copper rated for in-wall use

Later in 2006 or early 2007 I'll buy another 2 channel amp to do 7.1.  On completion, all Wisconsin area nerds will be invited to screen some action films.

 

Friday, October 20, 2006 3:14:25 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback

I cannot talk about a lot of the stuff that is going on at work, and I am suffering from Blog Withdrawl.  I think I am going to merge my technical and non technical blogs here.  Soon readers will be flooded with politics, audio, wedding planning, and more.

Friday, October 20, 2006 2:25:35 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Monday, October 02, 2006
Netflix has challenged the nerds to build a better recommendation technology.  I love the service but I dare say their recommendation system lags behind Amazon.com, at least for my tastes.  This problem seems to scream for some type of AI (genetic algorithms?) solution.  I wish I had time to play with it.

Monday, October 02, 2006 10:55:19 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback