Playing with Windows Sensors in Windows 7

At PDC 2008, there was a booth for Windows Sensors & Location Platform (more here).  I was lucky enough to snag one of the free development kits.

I’m running the Windows 7 build from the PDC, and it is very stable.  I haven’t any problems with it so far.  The main reason for me to use Windows 7 for for this API.

Setting up the dev kit was really easy.  I posted my setup experience on the forums here.  If you are having trouble installing, maybe this thread can help.

I just stumbled across this today:  if you want to get your hands on one of these boards free you have one day left (closes Nov 19th, 2008) to get your entry into AeroXP.org (http://www.aeroxp.org/7-sensors).

Blair.

Toronto Code Camp

I just got back from the Toronto Code Camp.  I attended Bruce Johnson’s “Binding Objects in ASP.NET 2.0” and “Introduction to the .NET Enterprise Library 2.0” (Bruce covered for Bill Dunlop who couldn’t make it).  After lunch, I caught Shaun Hayward’s “Professional Look-and-Feel using Infragistics”, Sheldon Fernandez presenting “Code Access Security in Practice” and “OpenNetCF Smart Device Framework 2.0” by Mark Arteagea.  All the presentations were excellent, and for many presenters it was their first time.

 

I even won a book at the end of the day (with a lot of other people). 

 

Kudos to Chris Dufour and Jean-Luc David for leading this excellent event!

Flying in a Beech Expeditor

I'm a member of the Canadian Warplane Heritage Museum.  One of the cool benefits of being a member is the membership flight in a vintage aircraft.  This weekend I went on a 1/2 hour flight on a Beech E18S Expeditor.  I really enjoyed the intimate nature of this small transport plane.  I listened as pilots worked their way through the checklist and watched them hand-pump the fuel into the engines for startup.

I am trying to volunteer in the museum archives, but lately it seems my wife is volunteering there more that I am.

If you live within driving distance, you should check the museum out.  It owns and operates one of the last two flying Avro Lancasters (the other is in England, owned by the RAF). From what I understand, it is the only one where you can go up on a flight.

Fixing your Abacus

After months of my cheap Abacus SPOT watch constantly resetting, I found this on the internet:

http://forum.spotstop.com/showthread.php?t=726

I'll reproduce the post here (thanks a million, Kas) in case the page disappears:

“If your watch re-sets when you shake it try this:
1. Open your watch by removing the 4 screws on the back. Then get
a flat object to take off the back cover.
2. Check to see if there is a space between the battery and the battery holder.
3. If there is fold up a piece of tape and put it in the space.
4. Put the cover back on and test it out.
Note: When opening your watch watch the cover as there is a wire attached to it. (Thanks to Icedrey for this)
Be carefully while doing this. I take NO RESPONSIBLY if you damage your watch. It will as void you 90 day warrranty.”

I performed this fix, and I've been running for 4 months without a reset.

 

Where is Canada, anyway? Is my SPOT watch there?

Rob pointed me to this great deal at TigerDirect.ca for a Abacus SPOT watch for $30.  I wouldn't spend $150 for one of these things, but at $30, I couldn't resist.  I've been able to play with it for just over a day, and I must say, it is really cool.  I would love to be able to push my own content and code to it, but no SDK as of yet.

When I was waiting for it to charge, I thought I would read the Reference Guide.  I came across this:

Regardless of where you travel in North America or Canada, ...”

10-Seconds of Corporate Fame

The company I work for is creating a corporate video to advertise at a trade show.  It's about this BizTalk-based project that I've been going on about lately.  The reason that they are making this video is because it, as anyone who as ever made a workflow product can verify, is not very demonstrable.

They asked me if I would be willing to be taped, as they needed some sound bites (from a propeller head, I guess) to put in this video.  At first I wasn't sure if I wanted to do this, but I have always been curious on how they make those documentaries on PBS.  You see the archaeologist, practically jumping out of his seat, saying, “and then I flipped over this rock, and there it was, a big pile of dinosaur poop!”  I decided to go for it.

I must say, I have always thought they had this small camera, sitting beside the interviewer, and they managed to catch the guy jumping out of his seat.  It's not like that.  They had me wired up with a wireless mike through my clothes.  There are really hot lights beaming at me from various directions. They had lots of food around. There was a camera guy, a sound guy, the producer, the storyboard writer, plus the interviewer.  Fortunately, it was a co-worker that was “interviewing” me, which made things go much easier.

I would get things like: “Great! Except you used the project name, and you can't do that.  Say exactly what you just said, but use 'orchestration software' instead.”  I am thinking, I can't remember what I just said under these conditions.  I don't even know what I am saying as I'm saying it!  Things proceed this way for about ten minutes.

At the end, they tell me to repeat what I just finished saying but find a way to put this silly tag line in.  I attempt that, and suddenly the storyboard writer jumps up, saying “Perfect!  You just guaranteed yourself at least a ten second clip. OK, that's great, you can go.”  Now, I not sure if he was excited because he got this tech guy talking like the marketing folk, or he finally gave up on me.

I'll let you know how much of my “interview” actually made it.

A BizTalk Breakfast

Well, it's really official now, I'm going to presenting at ObjectSharp's Architect's Breakfast in December.

I've been working on a project involving BizTalk 2004, SharePoint, and InfoPath for some time now.  We hired a couple guys from ObjectSharp (Dave, Rob and Matt) to shore up some resource shortfalls.  I guess Dave liked what he saw as he asked me to be a big part of this breakfast.

My part of the presentation is talking about the software we used, and the things we learned along the way.  This project is definitely not the normal “hey, let's use BizTalk to glue together a bunch of old apps” or “let's automate our procurement process.”  Things of that nature are in there, but we've used BizTalk, SharePoint, and InfoPath for so much more.  We are also using SQL Server and right now, it is looking like we will be using Reporting Services, too. 

Now, if someone was to tell me two years ago that I would be doing a presentation with John Lam, I wouldn't have believed it.  Image that.

lock(typeof(MyClass))

I was in a code review this week, and we came across the mistake of locking the type of a static class for thread sychronization (probably because it was documented in MSDN to do it this way).

http://msdn.microsoft.com/library/default.asp?url=/archive/en-us/dnaraskdr/html/askgui06032003.asp

MSDE

I've heard, from time to time, that MSDE cannot be used for distributed applications.  This is not true!

I wasn't able to find any Microsoft Knowledge Base articles specifically for this, but I was able to find bits and pieces here and there, which I have combined here.

To enable the network libraries of your choice, run (TCP/IP and/or Named Pipes are a good choices):

Installation Drive/Program Files/Microsoft SQL Server/80/Tools/BINN/svrnetcn.exe

If you have access to SQL Server client tools, you have full administrative access to MSDE.  If not, here are some useful registry settings:

To change the authentication mode, set:
HKLM\Software\Microsoft\MSSQLServer\MSSQLServer\LoginMode
to 1 (Windows Only) or 2 (SQL Server and Windows)

To change the audit level, set:
HKLM\Software\Microsoft\MSSQLServer\MSSQLServer\AuditLevel
to 0 (None), 1 (Success), 2 (Failure), or 3 (All)

If your application has a very light load, MSDE is a cost effective solution (free).  The only limitation that I know of is that after eight concurrent queries, the optimizer turns off.  Well, there is also the lack of administration tools.

Active Desktop and Windows Server 2003

If you are developing on Windows Server 2003, remote access to the console, like in Windows XP Pro, is handy. By default, you get a new session, but if you want to finish something you were working on at work from home later in the evening, connecting to the console is the only way:

http://support.microsoft.com/default.aspx?kbid=278845

BizTalk 2004 and small schema

Today, I came across something totally weird with BizTalk 2004.  I'm hoping someone out there will have an explanation for this one.

When we want to build a web service for BizTalk, the first thing we do is create an XML Schema.  This gets compiled into code using xsd.exe.  Once done, we compile xsd.exe's output (together with other schemes) into an assembly.  Our web service that BizTalk consumes uses this assembly to define the documents that we want BizTalk to use when communicating with our web service.  In this way, we know what the schema will look like in advance before we work with it inside BizTalk.

So, today we built a schema that describes the following document:

<MyList>
    <Item name="sunrise"/>
    <Item name="sunset"/>
</MyList>

When we added our web method returning an object that serializes into the above, BizTalk refused to add the web reference.  Sometimes it complained about arrays returned from web services are not allowed.

If we change the schema by simply adding a node, like so:

<MyList>
    <Title>Times of day</Title>
   
<Item name="sunrise"/>
   
<Item name="sunset"/>
</MyList>
 

BizTalk is happy. 

So what is going on here?  Is this BizTalk that is getting confused or is the WSDL generator doing something funny?

Halo 2

I'm a big fan of Halo, and being Canadian, I should point you to the explanation of the differences in Halo 2: Canadian Edition (thanks Bruce).

Seriously though, I'm really anticipating the release of Halo 2.  I'm not sure why--I don't even own an XBox.  I'm not going to buy one for a single game, although I think Microsoft is hoping a lot of people will.

I better get to some user group meetings in the hopes of wining one.   BTW, if you live in the Toronto area, don't go to the Toronto Visual Basic User Group meeting (oh well, it was worth a try).

Podcasts and my Pocket PC

Last week, I saw this wild fire running through the blogs about podcasting.  I have a Pocket PC--perfect.  Of course, I ran in to problems right away, not the smallest being that Windows Media Player cannot auto-sync content with my Pocket PC (IPAQ 2210).

 

Looking on the web, it was suggested to use the file sync feature of ActiveSync.

 

However, there is no option to copy to a flash card, just to /My Documents which is in RAM. According to Microsoft you can adjust the registry on your device and desktop to change where the files will be stored. 

 

On the device: I used a registry editor (PHM Registry Editor) to set the following values to point to a directory on my compact flash card (\CF Card\My Documents\Podcasts):

HKLM\Software\Microsoft\Windows CE Services\FileSyncPath

HKLM\Software\Microsoft\Windows CE Services\NoSubFolderIn

 

On the desktop: I created a registry file to change the appropriate values. 

 

REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Windows CE Services\Partners\<deviceid>]
"NoSubFolderIn"="\\CF Card\\My Documents\\"


[HKEY_CURRENT_USER\Software\Microsoft\Windows CE Services\Partners\<deviceid>\Services\Synchronization]
"DeviceSyncFolder"="\\CF Card\\My Documents"
"Briefcase Path"="C:\\Program Files\\iPodder\\downloads\\"


[HKEY_CURRENT_USER\Software\Microsoft\Windows CE Services\Partners\<deviceid>\Services\Synchronization\Objects\File]
"Display Name"="Podcasts"
"Plural Name"="Podcasts"

 

[If you want to try this on your PC: change “<device id>” to your 8 character hexadecimal number for the partnership you want to change and if you are using an aggregator other than iPodder, change the “Briefcase Path” to suit.]

 

Now, I’m down to two problems.  First, iPodder has no file management so my podcasts will multiply with no end in sight.  I think I can create a scheduled task to remove files older than a period of time from that directory each night.  However, I cannot figure out a way (in Windows XP) of deleting old files.  I may have to write some code to do this.

 

The second problem is that ActiveSync says my podcasts are not synchronized, even though they are.  At the current moment, I’m stuck with a weird status display and the constant resynchronization of my podcasts. 

 

If anyone has any workarounds or solutions to these or even a better way to use my Pocket PC to listen to podcasts, please let me know!

Welcome to my blog!

I've been lurking around in the blog community for far too long. A big kudos to Jeff for setting up this blog to get me going.

I am the architect in a small software group.  I'm currently working on a couple projects, one of which uses BizTalk 2004, SharePoint Services, InfoPath, and, of course, .NET (mainly in C#).  I would have to say that it was BizTalk 2004 that drove me to this point in my life.  While I was learning enough of BizTalk to figure out if it was a good move to base our next product on it, the only real source of information I had were the beta tutorials and the people that were blogging about it.  I would like to return this favour to the community. 

About the title: back in the late 80's, I wrote a column in our local computer club. The other guys in the club thought it would be a great idea to hold a contest to name the column.  “Blair's Burnt Offerings” was suggested and won.

«December»
SunMonTueWedThuFriSat
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910