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
 Tuesday, September 12, 2006

If you know me, you know I am an audio nut.  A peak at my living room (pictured here) might give you an idea I'm not well in the head, let alone the lunacy involved in the custom home theater that's being built in the basement right now.

The world of audio is a great place to observe tons of Snake Oil being sold and a sad, sad departure from the available Science that could guide us towards better sound.  Its not unlike many areas of computer science, where the Morts have never even heard of the science their day-to-day work is based on.  If you know SQL experts who are great at their job but who weren't aware that the concepts come from relational algebra, set theory, etc. then you know what I mean.

Over the past year I've become very interested in the effect the listening room has on sound.  Audiophiles like me spend a fortune on equipment that has perfect frequency response and near-zero harmonic distortion then put the system in a room that creates 30db peaks and valleys and flutter echos that ruin the stereo image, the list of room problems goes on and on.

I recently created a Room Mode calculator for my audio site, http://www.KlipschCorner.com/.  Room Modes are essentially the frequencies your room will cause to sound louder than they should due to the dimensions of the room.  For example, a 60hz sound wave is 19 feet long making a room with any dimension being 19feet a bad call.  Rooms with the common 8ft ceiling are tough to treat due to the frequency ranges being close to 8ft or 4ft.  A room mode calculator is useful when planning a new listening room because one can quickly see if there will be room modes at any "problem" frequencies and also see the distribution of room modes, where an even distribution is desirable.

There is a graphical component as well as a tabular component.  My hosting provider, while their service is great, chose to license a rather poor charting utility, so if anyone wants to send a free license of Infragistics my way you'd be saving me a lot of pain.

You can see the end results at http://www.KlipschCorner.com/Tools/ModeCalc.aspx and I suppose I can make the KlipschCorner.Acoustics library as it stands now available via some open source license.

I wonder if DirectSound could be made to do some time-domain analysis (using test tones and a microphone for input) for calculating sound decay rates vs ambient noise in a room?

.NET | ASP.NET | DirectX | Rant
Tuesday, September 12, 2006 9:41:47 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [6]  |  Trackback

Its not like me to not blog like this, man have I been busy.  Its time for an update.

My new title is Director of Mobile Technology at CarSpot.com here in Milwaukee.  My mandate is to create a .Net development department for Mobile, Web, and Desktop development, establish code guidelines, architectural guidelines, and best practices, try to get some best practices carried into the other technical departments, etc. 

So far I have re-architected and re-written one of our products, and am in the process of doing a 50-client release of this product.  Fifty units is a big deal on this product so I've had my hands full.

Generally, I'm hoping to have a better chance at "doing things right" than I've ever gotten as a consultant.  At a product company, where the product IS the focus, its easier to convince management to invest in getting the right tools and going back to refactor things and all that.  Contrast this to consulting where "Oh that damn web site project for FY07 planning" is always being pushed out far faster than is practical and quality of product and quality of life always suffers.

I have some long overdue technical stuff coming up next.

Tuesday, September 12, 2006 9:27:24 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback