# Wednesday, October 28, 2009

We've made more today progress on Project Resistance.  It turns out that the earlier bug was indeed due to the fact that in the Compact Framework Color.Transparent is not a transparent color.  How intuitive.  If you do Graphics.Clear(Color.Transparent) what actually occurs is that the underlying bitmap gets filled with white.  We (and by "we" I mean "Alex") had to create some utility functions to directly manipulate the HDC and do actual transparency. 

Again, it's more than a little awkward, and how Microsoft might expect the vast majority of developers out there to get this right I'm not sure.  Even if everyone could write this code, I still think they shouldn't have to.  We should be focused on solving our business problems, not solving platform problems.

At any rate, we got a fix into the code, and I added gesturing support for the resistance bands in the ResistorView as well.

 

You can see that the background is not right, but that's an offset math issue (again due to the inability to draw transparent controls on a Form) that should be simple to fix.  Yes, the View for the numeric data at the bottom is hideous, but right now it's simply there to ensure that events get properly wired from the view above, down to the controller and back out.  Making it look good will require work from the graphic designer.

As a side note, Alex seems to be having some difficulties using SVN as a CodePlex client and that's why the fix took so long to get published.  I'm not having any problems with the TFS client.

Wednesday, October 28, 2009 12:59:50 PM (Central Standard Time, UTC-06:00)  #     | 
# Tuesday, October 27, 2009

Today has been a slow day here for Project Resistance because I'm neck deep in writing other code.  I did manage to get the gesture events for the Tolernace band on the ResistorView plumbed in so now you can swipe up/down with your finger and it actually changes the band color (though I noticed I need to fix a couple images) and it updates a second View with a text representation of the tolerance. Right now that view looks like an engineer created it, so no screen shot today - I'd rather not embarass myself.

On another, more fun note, fellow MVP and iPhone development author Christopher Fairbairn has started an iPhone port of Project Resistance.  He's also started blogging about his project.  Looking at his posts and how easy a time he's having so far makes me almost jealous.  If it weren't for the facts that you have to subject your eyes to the abomination known as Objective-C and you have to work on a Mac I just might be.  It should be interesting to see how the two projects track toward getting a product to market.  So far we're both just barely out of the gate.

Tuesday, October 27, 2009 5:35:35 PM (Central Standard Time, UTC-06:00)  #     | 
# Monday, October 26, 2009

Alex made some headway over the weekend on Project Resistance with the ResistorView and doing some drawing.  Now (on the WinMo classic emulator) it looks like this:

Notice the white border around the bands.  Nicely enough, Alex gave me a bug item for this, so I started looking at it this morning, thinking that maybe the images simply have some non-transparency problem along the edges.  Well, not so simple.  Here's a close up (using Paint.NET if you're curious) along the right edge of a Ring1 Yellow band (the one used for generating this view):

 

You can see that there's nothing wrong here.  What appears to be happening is that pixels with partial transparency (or partial opacity if you're a glass-half-empty kind of person) are getting incorrectly rendered as white.  So now we're off to chase down a redering problem instead of spending time developing logic for our actual business problem.  My off-the-cuff guess is that it's because we're storing the bands as a Bitmap class, which probably has no notion of an alpha channel, and therefore is just replacing these pixels with white.

It's worth noting that just getting this far with drawing has been heavily reliant on non-CF classes, and if my guess on the Bitmap being the problem is corrrect it means that even more of the drawing code will rely on objects not in the CF.  Again, this exemplifies the pain of creating WinMo apps that have the aethetics users have come to expect since iPhone came on the scene.

Monday, October 26, 2009 9:14:06 AM (Central Standard Time, UTC-06:00)  #     | 
# Sunday, October 25, 2009

Well, last night I got an email from Microsoft:

Not too bad.  Less that 48 hours from when we applied we got accepted, and I'm not sure what "contact" I was supposed to get from GeoTrust.  I did get an email response immediately after the application (within a few minutes) to confirm my contact info, but that was it.  All in all, a completely painless process.

Sunday, October 25, 2009 2:34:17 PM (Central Standard Time, UTC-06:00)  #     | 
# Friday, October 23, 2009

I didn't have a whole lot of time today to code on Project Resistance, so it didn't progress as far as I'd have liked, but I did get a few important things done.  First off I got the unit test project added to SCC after being admonished by Nick

I did a little bit of coding for the placement of the color bands on the resistor (though I'm not actually drawing them as anything but a rectangle right now).  This allowed me to code in "gestures" for them.  The idea is that you'll be able to put your finger/stylus on a band and swipe up or down to change the color (instead of popping up a menu or something).  Right now the gestures are plumbed all the way to the debug output.

I also started the process of becoming a registered developer for the Windows Marketplace for Mobile (seriously Microsoft, can you quit with these long names?  Notice how "App Store" is 2 syllables?).  Since I've pretty much ignored all of the info that's been pushed out to us on how this works, I'm actually a pretty good test case. 

I started the process with a Bing search for “windows mobile application certification” which apparently was a good choice since the first result led me where I wanted to be: the page on the “Application Certification Program”.

To be honest, this page is going to cause confusion.  I want to create and sell a WinMo app.  Why are there two separates paths to get there.  Please, Microsoft, let's streamline this.  Give me one path.  I understand that some people want just the "designed for WinMo" logo and not to put the app in the WMM (my lazy typing acronym), and that's fine. WMM certification should simply be an added step, not a completely separate process.

At any rate, I know we're after a WMM app, so I reviewed the “Prohibited Application Types” document.  Seems like a reasonable list, and as long as we stay away from resistor-ads and resistor-porn it seems we'll be fine.

Next I filled out the WINDOWS® MARKETPLACE FOR MOBILE REGISTRATION form.  Refreshingly short as far as forms go.  There was one oddity, though. When I entered my email address for the company email I got and error:

“The e-mail address provided for the corporate contact cannot be the same as the account holder's e-mail address. Please provide an alternate email address for the corporate contact.”

 

This seems a bit ridiculous. What about the single developer shop?  Why should they have to have 2 emails?  If someone wants to subvert this, using a distribution list would work so I see zero value in this this as a constraint.  Sure, it's a small bump in the process, but if Microsoft is after seamless and smooth these things add up.

 

I ponied up my $99 and I’m perfectly okay with that.  If I’m going to make my living off of software, then $99 is really nothing.  It's way less than we spend on tools, hardware or even coffee.

 

Now all I have to do is wait for GeoTrust to contact me “to complete the Identity Verification Process”.  No idea how long that might take, but I'll blog when it happens so you get a feel for how long this takes.


 

Friday, October 23, 2009 5:35:59 PM (Central Daylight Time, UTC-05:00)  #     |