# Wednesday, May 31, 2006

Microsoft has published a new white paper on the Micro Framework information page.

Wednesday, May 31, 2006 3:11:03 PM (Central Daylight Time, UTC-05:00)  #     | 

Ever want to make all CAB file installs on your device be silent?  Simply add the following registry key to your platform:

[HKEY_CLASSES_ROOT\cabfile\Shell\Open\Command]
    @="wceload.exe \"%1\" /nodelete /noaskdest /noui"

Wednesday, May 31, 2006 12:04:13 PM (Central Daylight Time, UTC-05:00)  #     | 
# Tuesday, May 30, 2006

Just as a mental exercise, today I decided to try to write a single method that would allow me to return information about the currently running assembly as a string.  One method needed to return the copyright info, the company info, etc.

The end result is this simple function:

public string GetAssemblyAttribute<T>(T attributeType) where T:Type
{
    object attribute = Assembly.GetExecutingAssembly().GetCustomAttributes((T)attributeType, false)[0];
    return (string)attribute.GetType().GetProperties()[0].GetValue(attribute, null);
}

And calling it is this easy:

string s = "";

s = GetAttribute(typeof(AssemblyCopyrightAttribute));
s = GetAttribute(typeof(AssemblyCompanyAttribute));
s = GetAttribute(typeof(AssemblyDescriptionAttribute));
s = GetAttribute(typeof(AssemblyProductAttribute));
s = GetAttribute(typeof(AssemblyTitleAttribute));
s = GetAttribute(typeof(AssemblyTrademarkAttribute));

Now why it has to be this ugly I'm not sure, but isn't reflection a hoot!? 

Tuesday, May 30, 2006 9:12:52 PM (Central Daylight Time, UTC-05:00)  #     | 

As I get older and busier I've found that I seem to have a hard time keeping up with artists that produce music I like.  The radio only plays familiar new stuff over and over and is a poor way to get informed, and I don't really have the time to go blog hunting to find someone with similar tastes and then look at their play lists, then look at each band.  I want simplicity.

Today I found Pandora, and I found it works beautifully.  Basically you put in a group or song you like and it just starts playing random songs that it thinks you might like based on that.  You can tune it like a TiVo - telling what you do and don't like (though I've not had to say no to anything yet).  Even more impressive is that it will give you an explanation of why it picked the song it's playing.

They have a revenue model as well - you can buy the song directly from iTunes or the entire album from Amazon from the interface, which means that they may stay around a while to continue bringing us music.

 

Tuesday, May 30, 2006 11:09:53 AM (Central Daylight Time, UTC-05:00)  #     | 
# Monday, May 29, 2006

For those interested in the quick version of how I got where I am, I just posted my partner profile at OpenNETCF.  If you want a more detailed version you'll have to catch me in person and buy me a beer.

Monday, May 29, 2006 2:19:41 PM (Central Daylight Time, UTC-05:00)  #     | 
# Friday, May 26, 2006

Ever have to do manual serialization of data in a DataSet?  The challenge is being able to call BitConverter.GetBytes on the data element when at compile time you have no idea what it's type is, and GetBytes doesn't accept an Object (though I'd argue maybe it should and attempt to convert the underlying type if it's resolvable).

Here's my solution:

byte[] elementBytes = (byte[])typeof(BitConverter).GetMethod(
   
"GetBytes", new Type[] { dataRow[columnNumber].GetType() }).Invoke(
    null, new object[] { dataRow[columnNumber] });

Friday, May 26, 2006 12:09:56 PM (Central Daylight Time, UTC-05:00)  #     | 
# Tuesday, May 16, 2006

Well actually it's not a first look.  You might recall the .netcpu development kits that shipped over a year ago that I wrote a little bit on.  Well the TinyCLR went back into the Microsoft oven to bake a while more and samples were pulled out at MEDC 2006 for attendees to try.

What is the Micro Framework (.NET MF)?
It's a very scaled down CLR and BCL that is capable of running on 32-bit architecture processors without any underlying OS.  Basically the MF has its own bootloader and OAL.  Developers write managed code (C# is the only thing supported in the community preview) that runs directly against the MF.  The MF code can directly catch interrupt vectors and set hardware pin states (how cool is that?).  The working size of the MF is ~250k. Yes 250k.

Where can I get the MF?
The MF is still in very early stages and isn't quite ready for a broad release.  MEDC provided a somewhat controllable release area where immediate feedback could be gotten from users and the hardware was a specific known set.

What exactly did MEDC attendees get?
They got a SumoRobot kit that was based on the Parallax SumoBOT.  It was not just a Parallax bot.  It had a custom PCB running a non-commercial ARM processor.  That means that even if you get the SDK, you cannot just go get a Parallax bot and use it (I've been asked a few times about this now - sorry for not being clear on it at the conference).  The attendees also got a early SDK that allowed for development against the bot.  The lucky 40 or so who actually got hardware got to take it home.

On Tuesday I held a lab where I walked through development and how to test the hardware, plus provided a little sample code.  On Wednesday night those with SumoRobots got to test them in a competitioon against one another.

I'm jealous.  Where can I get MF hardware?
There isn't anything available today, but the beta MF will be out in a few months and there are some hardware vendors working hard to have development kits ready to ship when that happens.  To keep up to date sign up at the MF web site.

Will OpenNETCF be doing stuff with the Micro Framework?
Silly question.  We already are.  We wrote the documentation for the SumoRobot and the lab and are working hard to make sure we can provide the value and platform extension work that you've come to expect from us.

Tuesday, May 16, 2006 10:12:39 AM (Central Daylight Time, UTC-05:00)  #     |