johnvisiomvp

Life with Visio and other Microsoft Toys!

Archive for the ‘PH Factor’ Category

Rule 1 of samples. – They should be helpful.

with one comment

I was looking forward to working with the new WP8 development environment. So after the delays in releasing the WP8 SDK and taking care of the extra needs to run the WP8 emulators, I was glad to see how easy it was to upgrade my WP7 apps to WP8. There was a lot of work required to upgrade from WP7 to Win8 and it was looking like the transition to WP8 would be a similar problem. Win8 had a number of similar features, but did require a lot of extra care. Pivots and WrapPanels did not exist in Win8, the way languages were handled also changed. When I was able to run the WP8 SDK, it was a one button click to upgrade the WP7 code to WP8 and no issues were found. Though the emulator took its’ time starting up and shutting down, the code actually seemed to run faster.

So now that I was comfortable with the new environment, it was time to start writing WP8 apps. I am still on the fence as to whether I should go pure WP8 or continue to write WP7 apps because of the existing users. There are a few tempting WP8 features, but so far most of what I need is in WP7. It would be interesting to hear, other than the tiles, what WP8 features actually make it into WP7.8.

One of the features I was interested in playing with was the LongListSelector in the Phone Toolkit. After downloading and installing the Phone ToolKit and the samples, I found a number of other tools that looked very interesting. When WP7 came out, must of my learning was from disecting examples posted by others, so I dove into the Toolkit. Unfortunately, I was not impressed by how they created their examples. Rather than a collection of samples, it was a monolithic solution that contained samples for WP7 and WP8 and included both the VB and C# code. The code to rebuild the toolkit and the samples were also melded into the solution.  It took a bit of digging to try and work out the structure of the program. The solution is great for demonstrating the features of the Toolkit quickly, but it is extremely poor way how to use the features in code. The actual code for the feature is easy to find, but there is a lot of ancillary functions that are needed to make it work and they are mixed in with all the ancillary functions of the other features.

There is also a bit of cute code. Stuff that is remeniscent of my APL days when you tried to cram as much functionality into a single line of code as possible. Or use of some of C# cryptic features. My favourite in the LongListSelector was this gem

public static string GetRandomFirstName() {return (_rnd.Next(2) == 1 ? _rnd.Next(CensusFemaleNames): _rnd.Next(CensusMaleNames));}

If these are to be examples, then the procedure should span several lines and a standard if {} else {} used. The frustrating part is that the above code works in the sample, but not when the module is copied to a new project and the only change was to the NameSpace. ;-(

So which approach to use to make a reasonable working example to build upon? Copy the sample and try and hack out what is not relevant? Start with a clean WP8 solution, add the obvious relevant modules and add the missing pieces as the compiler complains? Since it is not always obvious what is and is not relevant, I pefer the second approach.

So when it comes to creating samples, I prefer the Gene Simmons approach, keep it simple and lose the fluff.

So it looks like the PH Factor is still in effect. After posting to PH, I came across a simplified example by Microsoft’s Rohan Thakkar that was a simple demo of the People Hub using the LongList Selector http://code.msdn.microsoft.com/wpapps/PeopleHub-Windows-Phone-80-88abe94d  The Dev Center has other good AND SIMPLE examples.

John Marshall… Visio MVP       Visio.MVPs.org

Written by johnvisiomvp

December 21, 2012 at 1:12 am

User Groups and the PH factor

with 2 comments

The local Microsoft office, Microsoft Evangelists and the local MVPs do an excellent job supporting the local user groups and encouraging members to step up and present. They also encourage locals to attend the user groups and support these novice speakers. Of course, in some cases, it is hard to tell a difference between the novices and the pros.  Probably because the Microsoft crowd help out with speaker preparation.

Having someone at the front doing the presentation and warm bodies to fill the seats and encourage the speakers are good, but there is the PH factor. PH testing is used to determine if something is too acidic or too alkaline. It is an indicator of the middle ground. For user groups, you do not want one extreme or the other.  You want a balance.

In user groups, the balance is obtained by the individuals who go beyond just attending. They help out with the organization and setup for the events. People who act as cheerleaders for the group. These individuals inspire others to attend, help out or present. They are the core of the user groups. Their presense will determine the viability of the user group.

John Marshall… Visio MVP       Visio.MVPs.org

Written by johnvisiomvp

November 27, 2011 at 6:53 pm