Understandably some developers were a bit upset when they found out that their native Windows Mobile code couldn't be moved forward to Windows Phone 7. Their effort investment had essentially reached a dead end. While the decision to use Silverlight as a core technology for Windows Phone broght an end to the usefulness of some code it also opened the door for other existing code to become useful in the mobile space. I was playing with an accelerometer driven program that I had written and was working on making a desktop component that would let me visualize my recorded accelerometer data. I was using the Infragistic Silverlight Data Visualization Controls (version 9.2) for Silverlight 3. I couldn't help but think "Man, if I could use these controls on Windows Phone 7 then I wouldn't need to make a desktop component." Then I decided to try it. I made a simple chart in a Windows Phone 7 project and deployed it to both an emulator and a real device and to my surprise it worked!

I personally invested a lot more in managed code than I did native code and feel that it's nice to be able to share more of my desktop development knowledge with my mobile development activities. But I'm overjoyed to see that my Silverlight 3 investments extend into Windows Phone 7
Tags: Windows Phone
9b0601dc-bd5a-403a-b7a4-232a8a782879|0|.0
As a Software Engineer I'm interested in how tightly coupled that one piece of code is to another. Coupling is the amound of dependencies that one entity has on another and tightly coupled code tends to be less portable and adaptable. But the concept of coupling doesn't stop at software. Coupling is also applicable to the relationship between hardware and software and I'm interested in avoiding tight coupling between the hardware and software for my code too.
With real implementations of Windows Phone 7 devices floating around it would be easy for some one to attempt to write an application that is tightly couple to that implementation. In some cases these low risk associated with doing this; for example if one tightly couples to screen resolutions (and there will only be two screen resolutions) it could be some time before some one needs to address another screen resolution. I'm writing a piece of code that is going to be sensative to the sampling rate of the accelerometer. And easy but tightly coupled way to handle this would be to measure the sample rate of the accelerometer and then write my code accordingly. But if I do this then I assume quite a few things. I would be assuming that other phones have the same sample rate. I would assume that the same phone will always have the same sample rate. I don't know that either of these assumptions are true.
The time information returned in the from DateTime.Now is precise enough for me to perform the measurements that I needed. So I wrote a quick application that would measure the accelerometer sample frequency and display it in a text box.
Here is my initial code
private Accelerometer _accelerometer;
// Constructor
public MainPage()
{
InitializeComponent();
this.DataContext = this;
_accelerometer = new Accelerometer();
_accelerometer.ReadingChanged += new EventHandler(_accelerometer_ReadingChanged);
_accelerometer.Start();
}
void _accelerometer_ReadingChanged(object sender, AccelerometerReadingEventArgs e)
{
DateTime previousUpdate = LastUpdate;
LastUpdate = DateTime.Now;
double period = LastUpdate.Subtract(previousUpdate).TotalSeconds;
double frequency = 1.0/period;
if (frequency > HighestFrequency)
HighestFrequency = frequency;
}
// LastUpdate - generated from ObservableField snippet - Joel Ivory Johnson
private DateTime _lastUpdate;
public DateTime LastUpdate
{
get { return _lastUpdate; }
set
{
if (_lastUpdate != value)
{
_lastUpdate = value;
OnPropertyChanged("LastUpdate");
}
}
}
//-----
// HighestFrequency - generated from ObservableField snippet - Joel Ivory Johnson
private double _highestFrequency;
public double HighestFrequency
{
get { return _highestFrequency; }
set
{
if (_highestFrequency != value)
{
_highestFrequency = value;
Dispatcher.BeginInvoke(() => { OnPropertyChanged("HighestFrequency"); });
}
}
}
//-----
void OnPropertyChanged(string propertyName)
{
if(PropertyChanged!=null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
#region INotifyPropertyChanged Members
public event PropertyChangedEventHandler PropertyChanged;
#endregion
}
Ofcourse there may be those that are curious as to what value a real device will currently returned. Of course publishing that type of information could result in more tightly coupled code being written. I'll post more once the code I am writing is done.
Tags: Windows Phone, Programming
22dd0666-26ef-4070-bec0-d735d35a50be|0|.0

When I arrived at home on Friday I had a notice from Fedex that they attempted to deliver a package. Speculating that it was something from Microsoft I jumped back in my car without going into the house and immediatly drove to the Fedex to pick up the Package. It was an LG Windows Phone 7 device.
It's nice to be able to run my code on real hardware. The first thing I did was run the acelerometer example in the Windows Phone 7 page and I found a simple bug in the code that I would have never found on the emulator. The device uses an AT&T 3G radio (I am on T-Mobile USA) so I've not been able to use it in 3G mobile, only in edge. But this is more than sufficient for my purposes. I'm about to hop in my car right now to test out a location based application I had written.
Tags: Windows Phone
96ab0266-0c25-4e31-8ddd-35489af0e57f|0|.0
PreEmtive Solutions announced that it now has support for the Windows Phone 7 variant of Silverlight for its Dotfuscator product. Dotfuscator will obfuscate ones XAP file by renaming the elements within it. While this doesn't make the assembly impossible to reverse engineer it does make the process more difficult. For some one attempting to reverse engineer your code their decompilation tools will still work but will produce something with less meaningful names. There is a cognitive component to reverse engineering and obfuscation interferes with that component of the process. More information on the product can be found on PreEmptive's site.
Original Story: WmPowerUser.com
Tags: Windows Phone
69d2e456-79b9-4d19-85c1-f00cf1e57efd|0|.0
Yesterday the Windows Phone team announced the languages and countries that will see the first Windows Phone 7 devices this year. The five languages that will be supported at launch are English, French, Italian, German, and Spanish. The 17 nations that will see the initial devices are Australia, Austria, Belgium, Canada, France, Germany, Hong Kong, India, Ireland, Italy, Mexico, New Zealand, Singapore, Spain, Switzerland, UK and United States. Also in case you missed it the first preproduction Windows Phone devices ship this upcoming Monday to developers (I'm keeping my fingers crossed and hoping that by some miracle I receive one!).
source: Windows Team Blog
Tags: Windows Phone
76c3d939-64bf-4e73-9091-2bb6d517afad|0|.0
An updated version of the Windows Phone 7 tools will be available soon. The link is posted (though the files to which it refers are not yet there). You'll be able to find the download at this location.
There are some breaking changes between the CTP and the updated version. You can find the full list of those breaking changes here
Just to highlight some of the changes
- All of the assemblies that began with
Microsoft.Phone.* and the Microsoft.Device were merged into a single assembly, Microsoft.Phone
System.Locations was moved to System.Device
ListView and ListViewItem were removed.
- A number of classes were renamed
The blog entry referenced above also contains information on exactly what you need to do to migrate your projects over from the earlier CTP to the current beta.
Tags: Windows Phone, Beta
7941f84b-2416-4ec4-bca3-4f09fa4298b6|0|.0
Last night at the Atlanta Mobile Developer's meeting there was a lot of discussion over three of the mobile operating systesm. There was talk from Google IO and the new features of Android 2.2. There was talk of what was discussed at WWDC (the videos from that event are free this year. Last year one had to pay to see them). Last night Glen Gordon of Microsoft had a prototype Windows Phone 7 device and he and I were able to talk about Windows Phone 7 to the developer's there.
I was surprised to see how interested every one was in Windows Phone development; being in a room full of iPhone and Android developers I couldn't help but have that expectation. But every one seemed truly interested and had lots of questions. Overall things went well. So now I'm looking forward to a couple of other opportunities coming in the next month or two to go and speak about Windows Phone 7.
 |
Mobile ATL Devs checking out Glen's WP7 hardware
Click to see larger image. |
Tags: Windows Phone, Presentation
371b6d50-ca95-46da-993a-c8aa4633ab11|0|.0
I tend to keep track of what's going on in the Windows Marketplace for Mobile and remember seeing an application with the same functionality as mine in the store for India. As of last night it was also available in the USA application store. That's fine, after all competition is a good thing.
What I didn't notice until later was the keywords that the application was associated with. If one were to do a search for my application by it's title the other application comes up too. It reminds me of the Angry bird thing all over again (If you aren't familiar with that search for Angry Bird in the iTunes App Store. In addition to finding a game by that name you'll also find a number of other applications from other publishers making it hard to pick out the actual game).
This specific example is not one of much concern; the only reason the application has a price was to prove to some one that it wouldn't sell (and boy was I wrong). But it does bring up a higher concern. In addition to the Angrybird case there seem to be a number of different applications in all the Marketplaces that I've looked at in which one application intentionally makes an association with another to "ride on it's success." One could argue it's common practice. There was a USA case in which one insurance company had done something so that when web searches were done for some other insurance company both companies would come up. The other insurance company took it to court and the ruling was that the practice was fair. All the same it makes one ask how they can ensure that a consumer can differentiate their product from another. I can't say that I know the answer to that, but it is something worth thinking about.

Update : Ugh! I was trying to find an applicaiton called "SpeedTest" for the iPad and ran into problems identifying it. Turns out what I needed is named "SpeedTest.net." But now there are lots of other applications using "SpeedTest" in their names!
Tags: Marketplace, Windows Mobile
d45fd6c8-2708-48bf-b847-a117a03797f4|0|.0
I registered for iPhone development almost a year ago and haven't done a danged thing with my registration since this. This weekend I finally decided to take the time to look at it and willful decided that I would neglect most of my weekend demands in favor of learning something new. I've heard a lot about Objective-C (primarily from people that don't use it on a regular basis) and primarily wanted to experience it for myself. I keep hearing the phrase "It's C trying to be like C++." That's usually said while some one is declaring that Objective-C is not a good programming language.
My thoughts? I see where the phrase "It's C trying to be like C++" came from. But I'm not going to agree (or disagree) with the statement. When developing in C++ the VTable and other information about the class is pretty much abstracted away or not accessible to other pieces of code. C# by contrast shares much of this information through the Type class and other metadata objects that one can probe. In Objective-C the class data is actually stored in a struct. An object of type X will have a reference to the structure that defines members of X. One can walk through this structure, examine the child members of a class, and so on.
There were some other things that looked notationally cryptic at first but quickly started to make sense, such as one syntax available for calling methods. In the C languages one might see a call like X.DoY(); but in Objective-C one may see it written as [X DoY].
As per usual if I do a lot of reading on something I'm going to end up writing something down. In this case you can see the collection of my notes as an article on Code Project in a getting started article ( http://www.codeproject.com/KB/iPhone/iOSGetStarted00.aspx ). If you see places where it can be improved then be gentle with what you say; this was my first time looking at iOS programming. So I'm sure there are a few things I've missed. I might come back and read more about Objective-C and eventually write something else. But for now I'm going to return to my concentration and finish up some Windows Phone 7 projects I'm working on.
Tags: iPhone, Objective-C
be32f4ff-6ce1-476b-966a-01f31e3b35cd|0|.0
If you weren't able to make it to TechEd 2010 and wanted to see what you missed the videos are now available online. You can find the Windows Phone sessions here. Some of the topics include building games with Windows Phone 7, building high performance 3D games on Windows Phone 7, a deep dive on the Windows Phone architecture, and an overview of the forthcoming Marketplace functionality for Windows Phone 7.
Tags: Windows Phone
1362a985-9f34-4d24-8595-80ac97bd6671|0|.0
An updated version of the rules for the Windows Marketplace for Mobile have been published. The most significant changes is that you can publish an unlimited number of paid apps for your 99 USD yearly registration fee. You can publish up to 5 free apps for that fee. For each additional app over that $5 the fee is 20 USD instead of 99 USD. A trial API has also been added so that customers can try out an application at no risk. The full list of policies can be found in the Windows Phone developer portal at http://developer.WindowsPhone.com.
Tags: Marketplace, Windows Phone
3cdfccc5-5a2d-4126-b258-998094750cb2|1|5.0
I read a story on IStartedSomething.com saying that Windows Phone 7 Development Hardware may be available next month. The hardware is said to come from a number of different OEMs but will be speced similarly enough so that it won't matter. The hardware and its software won't be retail quality, but hey, it's a start!
Tags: Windows Phone 7, Rumors
6200420d-8be4-4285-b2a6-7fa08b26c1b5|0|.0
ca37cb3b-ef90-4f0d-b088-440d06444570|1|5.0
Apparently I wrote part of WinMoSquare. I just got a tweet from some one a few moments ago saying that he had seen an exception of type j2i.net.WiFiPositioningError. It's been at least two years since I was in that code so I don't even remember what it means. Was interesting to hear that I've contributed to something that a decent amount of people use. Though I kind of hate that it was discovered though an exception message.
Tags: Windows Phone
f48a838e-e6b5-4734-b896-3e717bf7d311|0|.0
As a developer if you are not using some type of code generation tools then you are not achieving your true potential. In addition to plugins being available such as ReSharper or CodeRush Visual Studio has had the ability to automate some code generation builtin. One of the facility provided is code snippts. A snippet is a code template. You can define your own for patterns that you find yourself implementing over and over.
If you've never used snippets and want to get started then start off by downloading this file. It's a template for making your own snippets. Then watch this video demonstrating how to use that file to create and use your own snippets.
Tags: Visual Studio, Productivity
7c169bd0-d054-4234-9791-e14b4307a3c8|0|.0