tag:blogger.com,1999:blog-64438160215678576962024-02-19T03:47:03.818-06:00Mister JamesThis is me blogging the experience of programming at the speed of me. I work mostly on web apps and Windows Phone 7 and enjoy writing about the ups and downs of development in those spaces. I program on the .NET stack, am lovin' Windows 7 and Visual Studio 2010. Truth be told, the only ones that call me 'Mister James' are the three- and four-year-olds at Sunday school. But I'll take what I can get...ChipOnehttp://www.blogger.com/profile/16709607564824798285noreply@blogger.comBlogger226125tag:blogger.com,1999:blog-6443816021567857696.post-8823078559381545202011-10-12T21:45:00.000-05:002011-10-13T09:50:44.888-05:00CustomBinding on Service Reference Results in TransportBindingElement Error<p>I’m coding an ASP.NET MVC 3 web site in Visual Studio 2010.  I added a service reference to a SOAP 1.2 version of a web service and started updating my code (I was using a SOAP 1.1 endpoint previously).</p> <p>Unfortunately the switchover wasn’t as clean as I had hoped. The first method I changed resulted in an error, even on a call that appeared identical to the previous version. The error message I received was:</p> <blockquote> <p><em>The CustomBinding on the ServiceEndpoint with contract 'SubscriberServices' lacks a TransportBindingElement.  Every binding must have at least one binding element that derives from TransportBindingElement</em>.</p> </blockquote> <p>…which looked like this:</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWeW_G221XlWvKaFH6oN2yEYmI7UL2-QGu_yXK6eqFGSh0azXD7n_LOBB1lXPx9eDHRmYVtOk7L5yoWr9dkn5-5lR9EKdDY4bQk9KLajMuPRi7Cmrx0lYXNt_V3dzHnTXYPFUvRs05pxM/s1600-h/image%25255B2%25255D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTY1st9dhMuIkSngsbJSBqtojUIW3FpCuptbaTeR_o9TShA5yJSe1htij6z0aFup_q5sNQ382SefqC2lonEoECbWkT2aJUSTavXWgyvrZ5WRizRQfvWk-Gye6BNRWm5qOQTn4TwCP_KQY/?imgmax=800" width="244" height="146" /></a></p> <p>For the quick fix, head to the end of this article.  Keep reading if you want to know what’s going on.</p> <h3>What Was Going On?</h3> <p>The two things that gave me the strongest clues where “CustomBinding” and “TransportBindingElement”, but for different reasons.  CustomBinding was a little unexpected as the service was added via HTTP. I guess I always assumed that it would be using an HTTP binding? The other piece suggested a derivative of the TransportBindingElement, which according to <a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.channels.transportbindingelement.aspx">MSDN</a> is an abstract base class.</p> <h3>Off to Our Config File</h3> <p>Actually, at this point, I wanted less noise, so I quickly created a console app and added references to both services.  The differences were, at this point, fairly obvious. The 1.1 version of the service <em>was</em> using a basicHttpBinding element (which I was expecting), whereas the 1.2 service was using a custom binding:</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTSVcx4jUGNL6z_aj3eQBKe9i26nQYmt2Tcg4FYWvIzdB9EMqymEo49lYosc3e95Nahs6XcKpq25X-lA6obr2nTu74HgcRDH4lG1yCaMUpJku8EkzLIucGQxWeSm-6N5IxG08RmEztdJo/s1600-h/image%25255B8%25255D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2hWVa5nuix9MJuinoNARSCCz4z6P6fxT5ZfOWxdj8xnWxKR8zxwsJRKrtcR8s6EU3wdRbx9jiQMLFzdHZEPa4BUJVBvi1QmUFfiybH48VKOkMDSuZYFDYnQdEhyrLH7_drU9onZW3L6Y/?imgmax=800" width="491" height="308" /></a></p> <p>So, what we’re looking at is trying to get the custom binding to know which transport we want to use. This is something that is implicit in the basicHttpBinding but needs to be explicitly set for customBindings.</p> <h3>The Fix</h3> <p>Following the links on the TransportBindingElement will lead us to the <a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.channels.httptransportbindingelement.aspx">httpTransportbindingElement</a>, which has both code and config file samples.  Adding a short and simple section to the binding did the trick; all I needed was an httpTransport element in the customBinding\binding element. The updated config section looked like this with the MSDN sample config injected:</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEic6YMR2pt_NqGyJMJjlfdMNL4Zz9YzXUoZE178VjZdKF0hYO4OG6a7h-GmiSJNtc8fMNDaw0reCCcvp4aUgNuZHlw0sBC-2KIBmlC8DdijLVZvYVX-fWFemUaOC8pCnDnkYZJlMmDdn1w/s1600-h/image%25255B20%25255D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_6Vvla6BNsiNwj1DiRdCvquXvRi0vF81ormu5ct47ZBUHaVaLfH4eRtFQumlLYzMBd7s1MiJuR-KGVb9EJFRYSTGDkvk54PB7X6-pdDIOytRHGnrUEB9OSS47ttak43toehk9r9-7HW4/?imgmax=800" width="463" height="204" /></a></p> <p><a href="http://msdn.microsoft.com/en-us/library/ms405872.aspx">Further reading</a> shows that all the properties set in the MSDN example are actually all defaults, which means that our httpTransport element can simply be reduced to a single, self-closing tag:</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6AhbbWgkuWGBS9hAtDNCn8C2z2yUFJc5KZpMBuHQ4RsFC_bP3V_bnqU7mFHcfBmH4rkI6Frk_jGTU1q545cO9ezfRqVlHN6EK5rY6G8Rv364UoDuNt7GIj2NueWQBwpLoTz1F75hm5OM/s1600-h/image%25255B25%25255D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCrSU1MgttbZNDhijwrP9zY8orKSlXM2ep2z1uIoSDAdse3L-GJfnvgPrEUNau2niNzcVAvPq0rFl66mnVXfiq_lozAanrNZLLY7seA65FqOUrImaO2o770_Zx56PRRLVKRUKlW52jHFg/?imgmax=800" width="467" height="173" /></a></p> <p>Great!</p> <h3>Quick Recap</h3> <p>So, in short, if you’re using a SOAP 1.2 service reference, or any service reference that requires the use of a custom binding, make sure you’ve added a TransportBindingElement (such as httpTransport) to your config file or in your code.</p> ChipOnehttp://www.blogger.com/profile/16709607564824798285noreply@blogger.com0tag:blogger.com,1999:blog-6443816021567857696.post-83955143914515622132011-10-06T06:45:00.000-05:002011-10-06T14:30:58.340-05:00Setting up ASP.NET MVC 3 to work with jQuery UI 1.9<blockquote> <p>Caution: I don't recommend trying this in a production environment. The branch of jQuery UI I'm using in this series is not considered stable and is not meant for prod releases.  You can, however, learn about the new features in the UI library and stretch your development capabilities!</p> </blockquote> <h3>The New and Juicy Bits</h3> <p>jQuery UI continues to impress. The development team's commitment to extensibility means that their own widgets are up for review at each release, and even at each milestone of a release.  The great thing about the modularity in jQuery UI is that you can build your own widgets or customize the existing ones with the very parts used to build the core set in the first place.  </p> <p>But, before you even have to venture in that direction, you already have the ability to work with the many themes (or roll your own!) to make it look and feel the way you want to.</p> <p>Focusing on stability and flexibility in the 1.9 build, here are some of the important bits that will be surfacing in this release of jQuery UI:</p> <ul> <li>Improved, tested code in many of the existing widgets </li> <li>Much better accessibility accross the suite (for disabled users/browsers) </li> <li>Revisited the API design on a number of widgets (Button, Dialog, Position, ProgressBar, Slider, Tabs) </li> <li>Improved collision detection on Position and added a new flipfit mode </li> <li>A new version of Theme Roller, the download builder and the web site </li> <li>New widgets: Tooltip, Spinner, Menu and Menubar </li> </ul> <p> </p> <p>Here's the descriptions of the new Widgets from the horse's mouth:</p> <ul> <li><strong>Tooltip</strong>: A tooltip is a small overlay that sits over the main page that can be used to provide content or functionality that does not need to be always visible. </li> <li><strong>Spinner</strong>: A spinner (stepper) is a simple widget that allows users to increment or decrement the current text box value without having to input it manually. </li> <li><strong>Menu</strong>: Menu transform a list of anchors into a widget with mouse and keyboard support for selecting an item. </li> <li><strong>Menubar</strong>: A horizontal menu with nested vertical flyout menus for each menu item. </li> </ul> <p> </p> <h3>Getting jQuery UI 1.9</h3> <p> <br />While I'm a huge fan of the integrated package manager in VS2010, you're not going to find these bits on Nuget.  You're going to either need to follow the links from the <a href="http://blog.jqueryui.com/2011/09/jquery-ui-1-9-milestone-6-spinner-2/">Milestone 6 post</a> or grab the bits directly from <a href="http://jquery-ui.googlecode.com/files/jquery-ui-1.9m6.zip">googlecode.com</a>.</p> <p>Once you grab the zip, unpack it and have a look at the contents.</p> <p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9-fsoZx1QzYOychab2XhtUpIpNPhme2jfEGqTkkqCqRhmS_ncwaCvl0nFaC8n6N5DpHOntxZ6cdxI9ioJIOh43FeXjTcivveMwfN-iSim33jNhhWH3CpseH-6yif1DpGKEIBcwHMmjMM/?imgmax=800" width="292" height="209" /></p> <p>Pretty much everything we're going to need will be in the UI and Themes directories.  If you're not familiar with jQuery UI, the Themes directory is where all the CSS is stored for making the entire UI has a consistant look-and-feel.  UI is where all the code exists for all components.  </p> <p>You have the choice of building up your own set of functionality for the widgets you're using by including the smaller UI libraries, or you can fire up the full kit with one library.  This allows the bandwidth-concerned developer the opportunity to choose lighter weight code files (or even compile only the needed scripts into a minified script of their own creation).</p> <p>As an example, if you wanted to make use of the new spinner, you'd need to include:</p> <ul> <li>jquery.ui.core.js </li> <li>jquery.ui.widget.js </li> <li>jquery.ui.button.js </li> <li>jquery.ui.spinner.js </li> </ul> <p> <br />Of course, you would also need to include the relevant CSS files, but with a total weight of 7Kb (and the option to use multiple CDNs out on the web) you might as well just include the full jQuery-ui.css.</p> <h3>Using jQuery UI 1.9 in ASP.NET MVC</h3> <p>I'm going to assume you've done a little MVC work before, if not, hold tight for the walkthrough after the bullet list. I'm using version 3 of the MVC Framework in Visual Studio 2010 SP1.</p> <p>Here's the steps:</p> <ol> <li>Create a new MVC 3 project using the "Empty" template </li> <li>Delete the "themes" folder in Content </li> <li>Update jQuery with NuGet </li> <li>Add jQuery UI 1.9 files to the project ("themes" go in Content and "UI" go in Scripts) </li> <li>Add a HomeController </li> <li>Add an Index view for HomeController </li> <li>Modify the _Layout.cshtml file (your master page) to include jQuery UI and the theme CSS </li> </ol> <p> </p> <h2>Walking Through the Setup</h2> <p>Here's the visual play-by-play of that in action.</p> <h3>Creating and Cleaning up the Project</h3> <p>Open up Visual Studio 2010 and select File –> New Project.  Create a new ASP.NET MVC 3 Application.</p> <p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyxEnaA8iHAHV0yNh58FcGenPFfZXcEeVnP1XR6z6c1YnKK032KiP4WbhDugW0dyFXO7b-kdPK_GE12WZNL06T8lMO88Ztguy_y2AwBXqayYPYoGsDJ2FV-uJ4eQn9lRUtD5A1R7B31oI/?imgmax=800" width="448" height="43" /></p> <p>Name the project and click OK.  Finally, select the “Empty” template from the list and click okay.</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-fJhgsL5oMIPDIJAT_pllMhe0q4AH2agVzvzE_3U_06LvbOHhHtjGDedzZ1VqnMSBoMP0tV_iLLqCnWTA9snKUrDXCoy8riwZniGe_Zz58CQ2-gDiQ6JQAQ2sTSX5eB-6HlhQ4muxv6E/s1600-h/image%25255B14%25255D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgz2Kvl9jYtFRf4jyJAgKncswfjWMyDCTJR3ECn3v2xVRq2vRgoDs7so_limdk4MlQlHPwQSjrn5hNq2NQeGT31BQQET2-8uBPpFU-exeIdfcBf4w1JLX0wHRdvqrKx2EM95xN-JncvWRo/?imgmax=800" width="244" height="119" /></a></p> <p>Navigate to the content folder at the root of the project and delete it.</p> <p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5pRMVqiNGCyVoM9Ce-q7_AM4-_j7qyP50D4c-5IkBSg50OrM_C0nMcLymFShNxZXwb3SgGB36akrAFmU1FBP0aPHU8maGGF3DkiV1FnwBWZNRlxQnp7RPeCrYLr28mIpfCQTOirsqDSU/?imgmax=800" width="186" height="117" /></p> <h3>Updating jQuery</h3> <p>Next, we need to get the latest version of jQuery so that jQuery UI 1.9 is happy with us.  Go to the Package Manager Console and type:</p> <p><font face="Lucida Console">Update-Package jQuery</font></p> <p>…and you’ll see the following:</p> <p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEZc6Aj5rRJbikvWZzLZvoucLFmlhqIY9hefGJ4V8uw2-jpJJOpKIPauNpAWNxx5GHpwMTqeIDy1XOcnnZigPppMsHSIscNHZjPKJ0wR78h8OiXaJ-g1PglHQN15LU4bmdDOsRD0AEACM/?imgmax=800" width="612" height="114" /></p> <p>NuGet (the heart of this console) happily goes off and updates all our dependencies for us.</p> <h3>Adding jQuery UI 1.9</h3> <p>Pop over to that zip folder you downloaded. You’ll need to make sure you’ve extracted all the files. Copy the themes directory, then switch over to VS2010 and paste it into the content folder.  Do the same with UI, but paste it as a sub folder into Scripts.</p> <p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7p1WlPeEOPJVi-N_aqfy4cxqdCIuK77AfSDsW53zJrlva5gWqq-tZwOUZtKZEG3TpuAd76WGXMvXR8zor2L5tYggKo0cm-ZA2CAYgKt3xcPFXyWMKECPd3jcw9bwa6jWyyeRPLpfI8ng/?imgmax=800" width="212" height="177" /></p> <h3>Adding the Controller and View</h3> <p>We’re going to use the tooling in MVC 3 to do the next bit of work for us, in particular, the code generation that creates controllers and views for us.  Right-click on the Controller folder, then select <strong>Add –> Controller</strong>.  Call it HomeController when the dialog prompts you (this is so that we can take advantage of the default routing rules in MVC).</p> <p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsM0IzkpxOqWDlVoL1JviO0bi-PwW3ZbPdfi0aV5QEbKwyGdVeOEw9pY1hsUpglMNzcf-LFvN1mnOsK6zFWYrX8xauSAfiSygzQgpe0oHu_KRuDWK8DNkCZjVzLdEQi8Y30AaqOYLSjRI/?imgmax=800" width="455" height="228" /></p> <p>Your HomeController class is automatically generated with the Index action created for you.  Right click on the name of this action and select <strong>Add View</strong>. Accept the default name (it picks Index for you because that’s the action you right-clicked).</p> <p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXoREOIg76ITTH616TIucl0n8HQisHxrw4VBvEVX39UMFVOpv7bfbH1-R-jy5VOS0dO6SBs_myFfMYvnuEpTorgyj3V0zk-9M_NunVneLxutZ41-y8JvFq7bM5dOnExhlUAolvp-3BpAo/?imgmax=800" width="403" height="73" /></p> <h3>Updating the Layout</h3> <p>Almost there!  All that’s left to do is to adjust our Layout.  The _Layout.cshtml file is like a MasterPage from our days of WebForms and we use it to inject our head element containing the script and CSS references.  </p> <p>There’s already a jQuery reference there, so that needs to be update to the correct version (1.6.4 as at the time of this writing).  You’ll need to add the jquery-ui.css and jquery-ui.js files as well.</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgx_jU8sJC9RfM0ZGGVQ_adAKc2W0gKPyM6AaDRVteJQlQwNt5ZWPgWrQOsxe2wakkFbf-FiFAZHZX2KhaClA3ayYdKkZferluwEk8MM0DlpjJpjzG0r9-4C3afK5vFgmS-FxVBf7YMqqQ/s1600-h/image%25255B52%25255D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhi0HXKOMgpnFxYWPz1jTKuhzc3Wc9qDik4Rz2_gFwVpSy6o3g5oC5PomZYpw60LViNUm_hcwe_mLGiUZpNwHf4RVtK8boNVNaCvncBPZWUnl2H20vRMh3GMsC6C0ZksPyWcSABawgDZ_E/?imgmax=800" width="496" height="125" /></a></p> <p>For you copy-and-pasters out there:</p> <pre>    <link href="@Url.Content("~/Content/themes/base/jquery-ui.css")" rel="stylesheet" type="text/css" />     <script src="@Url.Content("~/Scripts/jquery-1.6.4.min.js")" type="text/javascript"></script>     <script src="@Url.Content("~/Scripts/ui/jquery-ui.js")" type="text/javascript"></script></pre><br /><br /><p>And that’s it! You’re all set up to use jQuery UI 1.9.</p><br /><br /><h1>Next Up: Using the Spinner with Entity Metadata</h1><br /><br /><p>Now that you’ve got the library in your project, we’re going to have look at some of the controls in more detail. One of the great things in MVC is the insanely simple templates and data binding, especially when coupled with something like Entity Framework.</p><br /><br /><p>Hold on to your hats, in the next segment we’re going to use data annotation attributes to wire up a jQuery UI Spinner widget!</p> ChipOnehttp://www.blogger.com/profile/16709607564824798285noreply@blogger.com0tag:blogger.com,1999:blog-6443816021567857696.post-22522095192738979622011-04-21T23:17:00.001-05:002011-06-26T19:30:25.440-05:00Time to Move OnI'm starting to chart a new course - still in software development, but trying to focus more on a couple of technologies in particular: Asp.Net MVC framework and the NuGet open source package manager.<div><br /></div><div>As well, I'm going to start sharing my development experiences with other developers and aspiring developers at conferences, workshops and user group meetings.</div><div><br /></div><div>You'll be able to find my new ramblings at my new site: <a href="http://jameschambers.com/blog">http://jameschambers.com/blog</a> which will be created with the open source <a href="http://www.orchardproject.net/">Orchard project</a>.</div><div><br /></div><div>After being with Blogger for so many years (since 2003, I think?) it will be fun to be working on a new blog engine that is extensible and on the same platform that I develop on (.Net). </div><div><br /></div><div><div>Thanks to the many 1000s of you who come here each month, dozens who leave comments and to those of you who have asked questions, made corrections or sent me towards resources I had otherwise overlooked.</div></div><div><br /></div>ChipOnehttp://www.blogger.com/profile/16709607564824798285noreply@blogger.com0tag:blogger.com,1999:blog-6443816021567857696.post-38298411912383043072011-04-04T23:48:00.000-05:002011-04-05T16:49:56.937-05:00Canadians Pay for Music<p>…but you have to let us at it.</p> <p>In 2010 Canadians purchased 31.5 million albums.  Folks, that’s darn near the equivalent of one CD <em>per person</em> in the country.</p> <p>I’m guessing the average album would have sold around the $10 mark.  A digital music store would have taken $3.33 of that.</p> <p>I hate to continually flog the Zune folks here, but I fail to understand how there is absolutely NO UPDATE or additional information of music in the Zune Marketplace. I started following a few threads in the forums and it seems there is a rising level of frustration, more with the fact that there are no straight answers.</p> <p>Like I’ve previously said, tell me who the hold up is, and I’d be happy to chase resolution.</p> <p>This is a market worth 1/3 of a billion dollars, and one that will continue to grow when Canadians have access to reasonable digital content from multiple competitors at a fair price.</p> ChipOnehttp://www.blogger.com/profile/16709607564824798285noreply@blogger.com0tag:blogger.com,1999:blog-6443816021567857696.post-35723475355049020262011-03-25T08:08:00.000-05:002011-03-25T11:24:39.000-05:00Problems with Diamond DisplayLink BVU160<p>I run a multi-monitor setup and love the extra real estate.  Unfortunately, due to an error in ordering my PC I ended up with a slim chasis and can’t find a dual-head card that fits. I resorted to using the Diamond USB adapter, which for the most part has been a nice way to get that third monitor running.</p> <p>But lately this little guy has been causing me headaches.</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZftBJrlx16p2NfakvrXQbWOko1JfILG_pJ0MVs266nMqAq6QheQ-OpZsV2TqBxiP2LU6OG6PNqv0WErnVwYylHw5jYXOo-8sAwKYh3r0MyEeuFA9IXI2Yakm10paxFV0N9xg-hd4SOeY/s1600-h/WP_000186%5B4%5D.jpg"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="WP_000186" border="0" alt="WP_000186" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKSfbmdLCDuvNhSSGzUOnNv3m6JjzDxWyeuGoJYz4uFfHQW0ywQoUMQPDu-6_hRYThw72zRijZLNKL1jedrWaVyc7Gd0C5_-YUin21PJq8vfzujnuQ3BIbjizVviACM3we9tjqQ31cU2E/?imgmax=800" width="397" height="315" /></a></p> <p>Here’s the formula:</p> <ul> <li>Windows 7 Ultimate x64</li> <li>Diamond BVU160 v1.0 DisplayLink adapter, driver is up to date</li> <li>Windows Phone 7 attached (Samsung Focus)</li> <li>Dell E198FP monitor</li> <li>ATI Radeon HD 3400 Series display drivers, up to date</li> </ul> <p>The screen “freezes” up and does one of two things:</p> <ol> <li>The image is locked in a sense, and only redraws small invalidated regions as I drag my mouse across the monitor.  I can also restore a window, invalidating the whole screen, and get the whole thing to redraw.  This works a few times, but then the screen goes black.</li> <li>It skips #1 (or I just don’t notice as I’m working on a different monitor) and just goes black.</li> </ol> <p>At this point I have to unplug the power of the monitor (power cycling doesn’t do anything, I have to physically remove the AC cable), disconnect the Diamond adapter, reconnect power and then attach the USB adapter again.</p> <p>This is happening about 2-3 times a day when I have the phone connected and the display adapter is almost hot to the touch when it gets to this state.</p> <p>I have a fairly high level of certainty that this is related to a conflict with Diamond’s adapter and Windows Phone.  It only ever freezes like this with the WP7 device attached.  I thought it was perhaps Folding@Home, but I uninstalled that and I’m still getting this problem.</p> <p>If anyone else is running into this and has a workaround, please let me know!</p> ChipOnehttp://www.blogger.com/profile/16709607564824798285noreply@blogger.com0tag:blogger.com,1999:blog-6443816021567857696.post-17605289531476049082011-03-23T22:48:00.000-05:002011-03-24T12:40:53.511-05:00How Windows Phone 7 Could Fail in Canada<p>Folks, let me start by saying that I love my Samsung Focus.  Everyone’s seen an iPhone by now, but you can still turn heads when you’re zipping through the home screen on a WP7 device.  The interface is slick, the apps you need are mostly in the marketplace and the cooler ones – I’m still waiting for the possibilities of augmented reality apps with video and compass APIs – are on the way.</p> <p>The phone is well integrated into my other communication points, from email and messaging to scheduling and sharing, and though I’m a heavy user I’ve seen little by the way of bugs.</p> <p>But I live in Canada.  And the sale of this phone platform to my friends will be tough.  It’s not because the platform isn’t great – and I do think WP7 phones <em>are</em> on a great platform – it’s because the phones in Canada are crippled.</p> <h3>The Show Me Factor</h3> <p>We are moving away from a people with music players to a people with multifunction devices that have music players on them.  At least, those of us with the ability to support a smartphone contract are.  Well, us and the teenagers whose parents spoil them, but I digress.  I had my first MP3 player over 10 years ago and haven’t missed it a bit.</p> <p>But the music marketplace in Canada Sucks.  Yes, “sucks” with a capital “S”.  We have very limited choices in where we can purchase our digital content outside of the iVerse.  I’ve used Puretracks and played with the paid versions of some other services but not all the content I want is there and I’ve previously had troubles with DRM content on mulitple devices.</p> <p>I want my family – we have four PCs all running Windows 7 as well our our Xbox 360 – to be able to use something more fluid within our ecosystem, connected to and built into the devices we use.</p> <p>Including our phones.</p> <p>Look, there’s going to be a point where people will have seen it/been there/done that and if the experience isn’t positive they won’t want to go there again.  There’s a really good, but shortening, window that Microsoft should be able to leverage.</p> <h3>The Switchover Debate</h3> <p>Look, if I can’t convince my wife, my soul mate, my partner until forever to buy a Windows Phone device then I’m not going to get too far with others.  These things should sell themselves, but this media marketplace keeps kicking WP7 in the face.</p> <p>We’ve talked about the switch to a smart phone and she’s been leaning towards an iPhone for some time.  All of her music is in iTunes and we’d need to spend some time converting it (in some cases with DRM that might not be possible) and then we’d be left with the purchase void.</p> <p>That chasm is too far to cross at the moment.  We’ve agreed to wait for a bit to see if the marketplace changes, but at this point it’s a wide open yawn’s worth of information available and no one is giving any updated information.  For fully three years we’ve been hearing “Keep checking the Zune web site for your region” and nothing more.</p> <h3>Challenge #1 - Marketing</h3> <p>I eagerly waited for the Zune HD here in Canada, only to have my hopes dashed when Future Shop pulled the remaining original Zune devices from the shelves.  A new employee said to me, literally three days after I almost bought one, that he’d never even heard of Zune.</p> <p>What?!  How could that be?  How could the only device poised to be an iPod killer not even enter the general population’s vernacular? We are talking about a company who did the unthinkable here and broke into the video game industry, a move previously believed impossible as the market already had enough players.  How could, in this young and developing area with few serious players, Microsoft miss the boat with visibility?</p> <p>The same thing seems to be happening with Windows Phone.  I can still walk into a room of people completely unaware that WP7 devices were actually out.</p> <h3>Challenge #2 – The Marketplace</h3> <p>This appears as #2 on my list, but not because it’s less important.  I will say this as directly as possible, Microsoft: the music marketplace <em>must</em> be fixed.</p> <p>Technically, it’s not broken.  Because it’s not here.  This is the number one reason my wife won’t buy into the ecosystem, and it’s almost always one of the first things I’m asked of when I’m showing my phone.  You fire up Shazam and it’s right in your face: excellent execution followed by a lack of follow-through.</p> <p>I am a sell out here, folks and I know it.  I’m a die hard.  This is a platform with great potential and I’ve even gone so far as to evaluate my “grey area” options (US credit card, friend’s address).  But I’d much rather see the ecosystem change for WP7 in Canada so that we can do things legitimately and without hassle.</p> <p>I understand that there may be other problems.  I’ve heard everything from the CRTC blocking Microsoft, to third party licensing complications, to Apple threatening to make things messy.  But Microsoft hasn’t said peep squat about what the problems are.</p> <h3>Challenge #3 – Marketing</h3> <p>Yes, it’s the same as reason one, but different.  You see, the thing is that Apple didn’t sell it’s iPods to the millions of customers that have them.  The other customers did. Unfortunately, proud Canadians wielding their WP7 phones are ill-equipped to make the sale.</p> <p>Heck, even the stores clerks aren’t really there as far as sales pitches.  When I asked to see the Focus at Future Shop, I was greeted with a, “Really? Why?”.  He was even more shocked when I took it home with me.</p> <p>I’m not selling these phones and I don’t work for a cell phone company or Microsoft (yet<img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-winkingsmile" alt="Winking smile" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhP-hhMBXWbqiScPg95ZDZDNqPGAveifpNHvYu5YKu8TeFhrvcIcMi6j4q-yj62go1fVMa2J0Q7I8KlF7PJLD44bRBSX7oEqmcn9bhuKVAm05OmlH7-08zQ7wBsYdAgMuedhHrK6JxIcDs/?imgmax=800" />), but if a guy can’t convince his wife to get one, we’ve got a problem.  Shoot, I even convinced her to <em>marry me</em>, but I can’t pawn a phone on her!</p> <h3>The Fix</h3> <p>Actually, Fixes.  It’s plural.  Here are the things that can right the course for this beauty of a ship:</p> <ol> <li>Figure out the content licensing and make music available in the marketplace. If it’s a ways out, for now you must, <em>must</em> clearly communicate what the issues are.  Customers would be happy to lobby any group that is blocking the process. </li> <li>Set up Zune Pass now, even at a lower cost and with limited content. Get buy in from the Canadian content providers to get them in the streaming mix be it independent radio stations, the CBC, CTV or the sports broadcasters. Flesh out the product and give Canadians the same level of product that’s available in other countries around the world. </li> <li>Give out some more free phones.  Future Shop wouldn’t even let me play with one of WP7 phones until I said I was surely going to buy one.  They wouldn’t take it out of the box.  This is wrong and bad and a poor purchase experience and bad, too.  Apple has kiosks setup to demo different models of the iPod/Pad/Phone/Thing and for WP7 I get to look at a cellophane wrapped box? Boo! </li> <li>Increase visibility.  Get storefront space. Encourage cell phone dealers to use and promote the phone.  Roger’s booth in our mall here had the iPhone 4 announcement posters up <em>six weeks</em> before the phone was launched.  There is still <em>nothing</em> in the mall about WP7.  Nada. </li> </ol> <p>I am a software developer and though my previous experience has been on other platforms and technologies, right now I work exclusively on the MS stack.  I am going to MIX11 and am super pumped to see what the year ahead will bring us. </p> <p>I’ve already come to terms with the fact that most of my concerns will not be addressed by the time the event rolls around, but you can be sure I’ll be sharing my thoughts with whomever will give me an audience.  Basically, it’s a conference where I’ll be hanging out with a ton of folks who’s phones are cooler than mine; sadly, we’ll have the same phone.</p> <p>This is a phone that can really give customers a fresh experience with a unique level of integration with communication, search, maps, gaming and social networking.  I really hope that WP7 survives in Canada long enough to bear the fruit it is longing to produce.</p> ChipOnehttp://www.blogger.com/profile/16709607564824798285noreply@blogger.com0tag:blogger.com,1999:blog-6443816021567857696.post-12984803391848450852011-03-20T22:50:00.000-05:002011-03-21T10:51:59.584-05:00jQuery IntelliSense with ASP.NET MVC and the Razor View Engine<p>The Razor view engine in ASP.NET MVC3 brings great improvements to the readability of code in the view.  Unfortunately, some of what I’d previously lamented in missed productivity improvements has stuck around.</p> <p>If you are working with Razor’s reimplementation of Master Pages – Layouts – then you will likely run into the same kind of limitations with IntelliSense that existed in previous ASP.NET editors: you simply don’t get IntelliSense for jQuery on your views when you include the script reference in your _Layout.cshtml.</p> <h3>Enabling IntelliSense</h3> <p>The only way to get those digits moving at the speed of computer-type-it-for-me is to add the script references to your view.  Because we don’t want the script written to the page twice – once through the viewstart/layout and once through the view – we simply use our old if(false) trick <a href="http://theycallmemrjames.blogspot.com/2010/04/aspnet-mvc-and-jquery-part-1-getting.html" target="_blank">(see part way down)</a> to get IntelliSense back online.</p> <p><font size="1" face="Lucida Console"><font style="background-color: #ffff00">@</font><font color="#0000ff">if</font> (<font color="#0000ff">false</font>) <br />{ <br />    <script <font color="#c0504d">src</font>="../../Scripts/jquery-1.4.4.min.js" <font color="#c0504d">type</font>="text/javascript"></script> <br />    <script <font color="#c0504d">src</font>="../../Scripts/jquery-ui.min.js" <font color="#c0504d">type</font>="text/javascript"></script> <br />}</font></p> <p>Write the if block out and then drag and drop the files from your scripts folder in the Solution Explorer as an easy way to do this.  Once you’ve done this once, you can then put it in your Toolbox by highlighting the code and dragging it to the Toolbox window.  Here, I’m about to rename it to something more useful:</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwohouLPCQM88YsNhkTgmk6DMMaDCJ2hoGLdu4IvjGDiqWhVk7rwDsZp7KTp6N9sPfZq1dh14HIkpRL3VTLh0GT9TrSwjq7d7uH7hfKWKTWy_em6jaMHirq3TIGsqeasdHVa2CoJKTcG8/s1600-h/image%5B5%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn8MtC9Aj6oAjIKEajQe4vnJepP7ShoGq-coiQVHw1nKjNqkPWj8GHKjOiNxDPl1TPcuL2wQVpdaevT7NN_DuXYzJ3XMeeQtTOWV701JzMWUFViNReCwtgrkVe2vusQk2zZFo0wUJkUdA/?imgmax=800" width="448" height="214" /></a></p> <h3>How This Could Be Fixed</h3> <p>To understand why it’s not working we have to look at what the IDE is aware of and what it does to figure out what styles/scripts are available in the editor.</p> <p>When you’re on a view, Visual Studio doesn’t really know which layout will be used to render the view.  In some cases you may have many and you may be dynamically selecting it based on, for instance, the role of a logged in user.</p> <p>However, we also know that the MVC Framework relies heavily on convention, and chances are that the default, most-used scenario with the ViewStart/_Layout.cshtml being used is likely the one that most folks will be dealing with.</p> <p><strong>So I would propose this:</strong> in the event that there is only one _Layout in the Views folder, assume that this is the one that will be used. Infer style sheet and script references from this file and enable IntelliSense based on the same.</p> ChipOnehttp://www.blogger.com/profile/16709607564824798285noreply@blogger.com1tag:blogger.com,1999:blog-6443816021567857696.post-27627389996883305442011-03-20T18:42:00.001-05:002011-03-23T10:15:02.061-05:00Making the Most of It<p>Well, we’re set to receive up to a total of 35cm of snow in the next 24 hours. With the gorgeous weather at hand, but the threat of a raging river looming, you need to do something to take your mind off the impending flood.</p> <p>We had a great afternoon of sledding, snow ball fights, snowman building and hot chocolate with marshmallows.</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh59508tp5RDbxmpyuymqW5qZpgXda87xpOK1Mp1hiIWaSNncTOeEyGfC4IuX0YLhOi3QPXC77SdYNpCZ24YrHcOZ0pej7RhyphenhyphenSVYyHSqzIW4KHiJ7soTtl9F19A7bTQv-eVmRilXBtVVs4/s1600-h/image%5B4%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPrRRBLm0-sXtlYYk691AhQGJxWySwaIuaMIFK0NI5_fRErIn9gJWEiBAdIIhFAO0mpEKnqrQ0XpVVONv6zf4cWnZwuVWqJ1UE4_qtMcOg1mVmMAIBscK-az6EeYaVSCCHlBHiUrLOFNg/?imgmax=800" width="298" height="424" /></a></p> <p>Mr. Frosty here is a good 45cm taller than my son. An incredible afternoon.</p> <p>After completing the snow adventures we drove back home past the sandbagging efforts of the city, which are required in order to keep major traffic routes from being submerged.</p>ChipOnehttp://www.blogger.com/profile/16709607564824798285noreply@blogger.com0tag:blogger.com,1999:blog-6443816021567857696.post-37485490336916980802011-03-17T18:28:00.000-05:002011-03-17T18:28:00.243-05:00ASP.NET MVC3: The Razor View Engine and Text<p>I knew this, but I had a brain fart here and couldn’t figure out what was wrong. I was trying to output some simple text to the browser based on some condition:</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia-giqC3ECEF-OiFaiLV1MAnEM3SRRG_vTdN9XQzPicjvkzWXPXkGU4kJ5syOR0HVLZUuTnP12Ew7-6WTBdWq1kvgUdNpw8w1DcoyFS3zUR4b49BfmJOhyphenhyphenhRul3gjpaQRz7CEA2PkDeiY/s1600-h/image%5B4%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQjwS4YFE_2Yq3hHW-zr9aYe6dQDkAtPeAZDhY_b5BBCMFwBK4EvGm9hZBeHJSQ2TI-blA3zGdVupPUVlrIc8kwQ6sqCNJXVtOi4AIpqt_5HG_1EfXK8oGu8kToIZowoFkNGqHA-Bo7Jc/?imgmax=800" width="356" height="95" /></a></p> <p>I started to get the following error message:</p> <blockquote> <p>The type or namespace name 'Do' could not be found (are you missing a using directive or an assembly reference?)</p> </blockquote> <p>Along with a list of others:</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEip4gX0Ymd86EIslhkPfUqEZ-tdwvDXYWiOgdP8bQEx2fyHG0HzmYynSaObH-Gc0jR9LzQTQrWLMuN_qKXmvX34OJKZHPVdkhEtBr0hCzfVxdcMOZQ2uaNpjrMc0sv4OO5IUqJD_5cZN58/s1600-h/image%5B10%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXTwqFh4i3giOVGoy2HknDJQsnNS6iWJwKGe3CKEXUQ8bk72A1crvdtLaZCCnvENduS6_-BYZh6_sijIJ_eEd6m1jBmAXBQgrrIoOAWqpwSirzPx9e4MQInyuJDC2rH4u3-cuuUEEYraI/?imgmax=800" width="542" height="167" /></a></p> <p>But nothing really said what was wrong.</p> <p>Nothing’s really <em>wrong</em>, per se, but Razor can’t figure out what I want to do here and doesn’t know that Do should be text and not me trying to code something. To fix it, simply wrap the text in a <span> tag and roll:</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheSTDiKJMUBynBBLIr6ZsfkcjtDSVaB0XeClLxEXbsPBP6Aiexy9MylrkXQqfqyXFJ7jvUyVasW8QTo3zMB5MXTLOh5xdo1CrXOOp3q4xr_U4qmj1f6O6J1sLQNeOGxEPiFu91btJdXqk/s1600-h/image%5B15%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqGKEj_RFNCr1dKe5yM1pkrwWj_1vuEFwWLR3ROKov-8hqG0OhD6KvN67AxRvQ9AYDeNZQh_ElKKODuNRAEA6sfpw_NjWnqsKFhYR64w3dl5Gje3MnPCyn1SnJ0-A4W6kcws7RFjvdf68/?imgmax=800" width="397" height="99" /></a></p> <p>Tada! </facepalm></p> <p>The only reason I ran into this was because I copy & pasted the text. Normally you’d get IntelliSense as soon as you start typing and that should throw up a context flag pretty quick.</p> ChipOnehttp://www.blogger.com/profile/16709607564824798285noreply@blogger.com4tag:blogger.com,1999:blog-6443816021567857696.post-54774131339332116222011-03-15T22:57:00.000-05:002011-03-15T22:57:00.256-05:00Google News Fail<p>Ran into this today when checking the news:</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl5HtwuSCwlmV9YmFBkg_B32bL_3d_fhJ_YA_C4VF76FrEkY3uf-o-H-DR4UNSETniSaVft3A64WHDiYgp950jeQXhk2cCCQ5BiSY4llPqT1916keIV3i4CyBG4Fduc7JvFB-MpesxFa0/s1600-h/image%5B4%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdDrbNAJcCb04PUrpQe6XzYWSizQGrWrI4kt4Q8y-li_QjYwjt4yu0YuDPcLBr2NTow83y8i_cqs2oMWrFHRv5wHeYzegblTdqbn0sq2fMdUm8uf09x3e-l8rU89UUzp78ru40il6_mtw/?imgmax=800" width="507" height="211" /></a></p> <p><strong>The headline reads:</strong> Japan’s PM warns of radiation risk</p> <p><strong>The body of text below:</strong> Scientists say they may have discovered the lost city of Atlantis buried deep under the marshlands of southern Spain, north of Cadiz and near the Straights of Gibraltar.</p> ChipOnehttp://www.blogger.com/profile/16709607564824798285noreply@blogger.com0tag:blogger.com,1999:blog-6443816021567857696.post-16077459298098963392011-03-06T22:35:00.000-06:002011-03-07T14:47:13.225-06:00Who’s Smarter Now, Mr. Computer?<p>The New York Times have posted the game <a href="http://www.nytimes.com/interactive/science/rock-paper-scissors.html" target="_blank">Rock-Paper-Scissors – You vs. the Computer</a> in the wake of the big Watson computer win over the human Jeopardy contestants.  They reduce AI to “building on simple rules and statistical averages” and present a game of chance, with some big claims.</p> <p>They have two versions of the game, one that has to learn as it plays, the other that has some experience in the mix.</p> <h3>Picking an Opponent</h3> <p>I’m no rookie, I have been known to dominate the RPS scene at my office and I know how to stare down an opponent.  Oh, wait…shoot.  I start with the sure-fire winner, the one you should put your money on.</p> <h3>The Veteran Presence</h3> <p>So here’s their idea…after several rounds of play their computer will use statistical analysis to figure out your strategy, backed by 200,000 previous rounds of play. They don’t define the 200,000 rounds – as in, were they human played, were they 200,000 different people, if nationality or race or education played in – but for some reason that’s enough data to “exploit a person’s tendencies”, and yet, I have my doubts.</p> <p>I decided to play 40 rounds.  If there was anything akin to AI in the pot, this thing should at least win one third of its games.</p> <p>Here’s where I was a few moves in:</p> <p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtLIgBj5MALm38OdqykatoyJm55_HpNoc3j72h6GXlKtfzxc9U_KTtSbKzD05b90ffJtD4CWLZjUyDFozgDbn2JYiJd_TKvcgIgHeHnrYUvoxhS4_bYyCciAB9uADjNo_paZ4_8lWEmK4/?imgmax=800" width="534" height="292" /></p> <p>While it made some ground up towards the end, I was able to hold it off of any streak and the closest it got was within two.</p> <p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIi8vZ2EjjgYa7g2dOmOLJjTyc22ZYQFQkxvPAjiAhFN7COtmaFbp-cRjqg7ZVhkU8nQisy4Jjxg0v6rPvjoecgB4BjjpTXUWhIImkhnO4yK56k8sxxZZzF9wI6u4VZmGcB_TQoI5tXTw/?imgmax=800" width="244" height="102" /></p> <p>After that, I teetered on +2-3 points and as high at +4-5 points, and ended up +4 over the computer, thus solidly proving that, <em>minimally</em>, if we’re going to partner a game of chance with technology called “AI”, we have a long way to go.</p> <p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD7QEAY7g2X1pMc9527XFbotLWRhAb-eRTvNqEzJ_SU2iU3L-kdv8DihVF-raPBGD_cYvPXOC3wGY0OQ6R_qGxKEBYbt908rP1A52nYCJtGcoT6pasIC9av-1KNTzHwS-pncjhDgi_zpY/?imgmax=800" width="244" height="99" /></p> <p>There was no stopping me by some ‘simple rules’ engine. ;o)</p> <p>I want to point something important out about this statistic: for the one who is winning more that the opponent <em>and</em> the tie, they are beating the odds.  I am a combined +10 on 40 rounds here at the end of the game, meaning that not only am I beating an expert player, but I’m beating the tie-chance handily as well.</p> <h3>Bring in the Rookie</h3> <p>Finally, I tried out the “dumb” version, the rookie alter-ego that must first learn the rules and doesn’t get the benefit of 200,000 other players’ moves in a database.  I decided to give it an extra 5 moves as a chance to learn some of the rules before getting into the play.</p> <p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8BQJ5v20VBfRZSDk_rue66DgLqkB0bMMxMcVVcZomCMk-LZ6esu9W5qGMCufSv5QJFjFsm6aTOJw-tBX_rSa4XNVZHAa0_xLtk5emYVY_zcy3aAqagKMruCvn0NXPwMdPguerjDUg5b4/?imgmax=800" width="242" height="98" /></p> <p>What? Shocker?! How could it be that with 5 more moves against an (arguably) weaker opponent I could have fewer wins?!</p> <p>Oh right…it a <em>freeking game of chance.</em> Unless you put on your idiot cap and play the same hand each time, this is a game of odds and they are 1/3, 1/3, 1/3 as to what I’ll play next.  Period.  Just because 200,000 other people picked R-R-P-S-S-R before me doesn’t mean that I’ll play P instead of R on my next move.</p> <p>This is not a prediction, even when backed by hundreds of thousands of records, not any more than a lady in a tent with a lit glass ball.  Over time I will win 33%, lose 33% and tie 33%.  It’s no different than a coin toss, with one more side to the coin.</p> <p>The only learning that this ‘AI’ does is around the rules of the game.  To that end, there’s only really six (counting ties), and it seems to know when it’s learned them all, suggesting a bias in the first place.</p> <h3>Okay, Yeah, But…</h3> <p>There’s more going on. I know it does some pattern matching and what not, but that doesn’t mean it’s AI. </p> <p>After playing these games I walked through it’s demonstration about how it thinks.  It uses some good buzz words making it sound like it’s thinking, but really, this is just straightforward math equations muxed with some simple filtering that any first year CompSci student should be able to figure out.  </p> <p>No magic here, folks, move along.</p> <h3>Conclusion</h3> <p>The programmers at the New York Times have created a good gimmick that will fool most of the general population into believing that they have created some form of artificial intelligence that, when it mates with Watson, is ready to techno-freak the humans into submission.  </p> <p>Hey, it may even be an impressive chunk of code, but it does not represent any of the modern complexities that some impressive minds (like those at IBM) have solved.</p> <p>I could likely to write a version just as capable by picking randomly the answer. </p> <p>Better yet, I’m going to write a traffic light color prediction engine.  </p> <p>Look out, Matrix, we’re all about to take the blue pill. Or was that the red?</p> ChipOnehttp://www.blogger.com/profile/16709607564824798285noreply@blogger.com0tag:blogger.com,1999:blog-6443816021567857696.post-87992207881957239632011-03-05T11:28:00.001-06:002011-03-05T11:28:10.753-06:00This update improves the experience of updating your phone in the future.<p>Well, it’s arrived, my phone’s hit the list for updating.  I got the notification on my phone and plugged it into my laptop to start the process.  My update was delayed as I was on the brick list; I have a Samsung Focus.</p> <p><a href="http://www.bandofgeeks.net/blogimages/This-update-improves-the-experience-of-_9BB3/image.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/This-update-improves-the-experience-of-_9BB3/image_thumb.png" width="479" height="565" /></a></p> <h3>First Things First</h3> <p>Before I was able to apply the update, Windows Phone 7 required an update to Zune.  </p> <p><a href="http://www.bandofgeeks.net/blogimages/This-update-improves-the-experience-of-_9BB3/image_3.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/This-update-improves-the-experience-of-_9BB3/image_thumb_3.png" width="409" height="61" /></a></p> <p>This process took about four minutes, including the download.</p> <p><a href="http://www.bandofgeeks.net/blogimages/This-update-improves-the-experience-of-_9BB3/image_4.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/This-update-improves-the-experience-of-_9BB3/image_thumb_4.png" width="493" height="202" /></a></p> <h3>Updating the Phone</h3> <p>After the Zune update was complete the software shut down but did not restart on its own.  I left my phone plugged in, but was not prompted to update. </p> <p>When I restarted Zune I had to go into Settings->Update where I was able to launch the update process.</p> <p><a href="http://www.bandofgeeks.net/blogimages/This-update-improves-the-experience-of-_9BB3/image_5.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/This-update-improves-the-experience-of-_9BB3/image_thumb_5.png" width="510" height="142" /></a></p> <p>The only thing different this time around was that the warning had been updated to note that telephony would be disabled.</p> <p><a href="http://www.bandofgeeks.net/blogimages/This-update-improves-the-experience-of-_9BB3/image_6.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/This-update-improves-the-experience-of-_9BB3/image_thumb_6.png" width="499" height="67" /></a></p> <p>The estimate was 20 minutes for the entire process and I was on step 6 of 9 in about 15 seconds, so I was optimistic.</p> <p><a href="http://www.bandofgeeks.net/blogimages/This-update-improves-the-experience-of-_9BB3/image_7.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/This-update-improves-the-experience-of-_9BB3/image_thumb_7.png" width="487" height="122" /></a></p> <p>When the reboot was complete the updates were pushed to the phone and the computer installed new device drivers. One more reboot, the updates completed installation, and the phone was as good as gold!</p> <p><a href="http://www.bandofgeeks.net/blogimages/This-update-improves-the-experience-of-_9BB3/image_8.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/This-update-improves-the-experience-of-_9BB3/image_thumb_8.png" width="513" height="238" /></a></p> <p>Total time: 18 minutes, start to finish.</p> ChipOnehttp://www.blogger.com/profile/16709607564824798285noreply@blogger.com0tag:blogger.com,1999:blog-6443816021567857696.post-28483950588073459152011-03-03T22:52:00.001-06:002011-03-05T15:04:46.271-06:00Windows Phone 7 Wishlist #3<p>There are two things I am looking forward to in a big way, but not on my wish list (because these will be realized for sure):</p> <ol> <li>The upgrade to HSPA+ in my area, and,</li> <li>The Windows Phone 7 first update.</li> </ol> <p>I’ll get to my wish list in a moment.</p> <p>I am stuck on the Edge service network because of my locale. The towers were upgraded months ago, but one of the partners in the carrier network (not mine) have equipment and services and software older than bunk and they can’t flip the switch until everyone’s ready. This is going to happen in <em>days</em> and I can’t wait until I’m pulling down 7Mbps on my phone.</p> <p>I have a Samsung device and have not yet received the update. I’m not sure if it’s a candidate thing, or a rolling update thing, or even if my carrier is blocking it (I’ve heard all three) but I am looking forward to the pre-update update that is currently in the works, especially as it paves the way for The-Big-One in the next few weeks.</p><p><i></i></p><blockquote></blockquote><blockquote><i>I wondered here if my carrier might be blocking the update, but I don't think that could really be the case. The phone checks for updates, likely directly to a WP7 service, and the device itself is <a href="http://theycallmemrjames.blogspot.com/2011/03/this-update-improves-experience-of.html">updated through the Zune software</a> on PC.</i></blockquote><blockquote></blockquote><p></p> <h3>Here’s My List</h3> <ul> <li>I would like a way to search my text messages. This is present in mail, so it seems like it’s not too far fetched in texts. I had someone text me the phone number of my friend ‘Mike’, but I couldn’t remember who sent it to me. The text was something like “Hey Mike’s new cell is…” so I should have been able to find it fairly easily.</li> <li>I would like an editor for my alarms and ring tones. Build it into Zune, or make a Windows Live ZuneTone application that you can download and make your own ringtones and alarms. Let me set cues for vibration. Let me shift pitch and even layer multiple audio tracks. Let me share it through Zune or Live or something with my friends.</li> <li>A first-party, no frills sound recorder. The same level of function as the one built in to Windows 7. In fact, I would love it if I could also use the audio jack as a line in to record. I volunteer on a regular basis and work the sound board (or at least help) and I hate lugging around a laptop to record the audio.</li> <li>Because I feel as strongly as I do about this, I’m going to say it again: Canadians <em>want</em> to pay for their content. Please make Zune Pass available in Canada. If this plea doesn’t work, I’m going to track down folks at MIX11 and talk to them in person! ;o)</li> </ul> <p>I have a couple of other items on my list, as mentioned previously:</p> <ul> <li><a href="http://theycallmemrjames.blogspot.com/2011/01/windows-phone-7-wishlist.html" target="_blank">Windows Phone Wishlist #1</a></li> <li><a href="http://theycallmemrjames.blogspot.com/2011/02/windows-phone-7-wishlist-2.html" target="_blank">Windows Phone Wishlist #2</a></li> <li><a href="http://theycallmemrjames.blogspot.com/2010/07/dear-microsoft-give-us-zune.html" target="_blank">Dear Microsoft: Give us Zune</a></li> </ul>ChipOnehttp://www.blogger.com/profile/16709607564824798285noreply@blogger.com0tag:blogger.com,1999:blog-6443816021567857696.post-31546288448395964802011-03-03T21:13:00.000-06:002011-03-03T21:13:00.602-06:00Extension Methods for Converting ints and bools<p>I was recently working on a chunk of code where I had three different scenarios for conversion.  With two external libraries (something I couldn’t change) and this not being a big enough project (so not worth a facade) as driving factors I rolled a couple of simple to use extension methods.</p> <h3>The Code</h3> <p>I won’t lollygag here too much.  You need a namespace and static class name that work for your (they’re more-or-less irrelevant in the grander scheme), and a couple of static methods.</p> <p><font face="Lucida Console"><font color="#0000ff">namespace</font> ExtensionMethods <br />{ <br />    <font color="#0000ff">public static class</font> <font color="#a5a5a5">Extensions</font> <br />    { <br />        <font color="#0000ff">public static bool</font> ToBool(<font color="#0000ff">this int</font> i) <br />        { <br />            <font color="#0000ff">return</font> i == 0 ? false : true; <br />        }</font></p> <p><font face="Lucida Console">        <font color="#0000ff">public static int</font> ToInt(<font color="#0000ff">this bool</font> b) <br />        { <br />            <font color="#0000ff">return</font> b ? 1 : 0; <br />        }</font></p> <p><font face="Lucida Console">        <font color="#0000ff">public static int</font> ToInt(<font color="#0000ff">this bool</font>? b) <br />        { <br />            <font color="#0000ff">return</font> b.HasValue ? (b.Value ? 1 : 0) : 0; <br />        } <br />    } <br />}</font></p> <p>Basically, we’re just using a tertiary operation to decide which value is appropriate to use in each of the contexts. </p> <p>The third method is there to help out with nullable boolean values.  This was handy in my case, not sure how many people would need this.</p> ChipOnehttp://www.blogger.com/profile/16709607564824798285noreply@blogger.com0tag:blogger.com,1999:blog-6443816021567857696.post-24510501439643276542011-02-28T22:57:00.000-06:002011-03-01T10:59:32.255-06:00Fixing “Unrecognized configuration section userSetting” Errors<p>Though I have not seen the error “Unrecognized configuration section userSetting” as a standalone exception, it has come up a number of times for me and surfaces as the inner exception on a “Configuration system failed to initialize” exception.</p> <p>If you’re running into this error and following along, I’m currently using Visual Studio 2010, mostly on .NET 4.0 and I program in c#.  If you’re using a different environment some of the file names or UI might be a bit different, so you’ll have to adjust accordingly.</p> <p>The exception will be raised in Settings.Designer.cs, on the first attempt to read a value from the application’s configuration.</p> <p>You can fix the error by navigating to the current directory where the user settings are being saved for your app.  This will be in %system%\users\your_user\AppData\Local\Microsoft\YourApp.vshost.######\version</p> <p>Delete the user.config file, clean your solution and rebuild all.  This should fix the problem.</p> <p>If that doesn’t work, you may need to go so far as to shut down Visual Studio, clean out all the %system%\users\your_user\AppData\Local\Microsoft\YourApp directories of any config files and then follow the above steps.</p> <h3>What’s Happening?</h3> <p>When you first add a setting to the application through the UI, the default is to create a user-scoped setting.</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhADFNG6_4yBZRFLRF3BSwBLxUc7uTRPaIShsH5nHqxcpTWaLUcx6-NRb9LF5QY5PATO9x4ZAMh5U154hFd9-JF0HlEZylDcsLJ56lMBm2paN5pgVUb43i0lLPZLEVjp6rdr5J_2nEfz0U/s1600-h/image%5B4%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU4lTpbxsGaqeLxVyJeJf6Y2DHbJcGVvRYs8IwWnoT27xeSb554iYscNu14wKqk6Vhtj7p_YDLyI6Cp1AOTMtdooyuA3IzqD3a8WUwlOUKMO1s6ogXfl1FQUN-gF2z1mZ6bkGNqiHxynQ/?imgmax=800" width="437" height="81" /></a></p> <p>User settings and Application settings are primarily different on two fronts:</p> <ol> <li>Storage location</li> <li>Run-time accessibility</li> </ol> <p>User settings are read/write and can be altered at run-time. These are perfect to save things like favorites, window layout, user-specific options, color preferences and the like. These files are stored in a directory created for the application, basically sand-boxed from system-wide access and the only place your app can read/write from for free (elevated privileges aside).</p> <p>Application settings are read only at run-time and can only be altered by changing the XML file and relaunching the application, or by some creative XML file management (and then a reload on your configuration data).  These files are stored in the app directory in app.config and also contain the default settings for users who have not yet launched the app (these are the settings that will be defaulted in for the new users).</p> <p>I have hit the “Configuration system failed to initialize”Configuration system failed to initialize error a couple of times, and it always seems to be the User scope default biting me in the arse.</p> <p>Basically, I create a setting, plug along for a while, then go back to add another setting and realize that I had left it in user scope.  I switch the first setting to application scope and keep plugging away.  Somewhere between then and the next time the application tries to access that property, the exception is thrown and doesn’t give you much detail at the surface level.</p> <h3>Figuring out the Files You Need to Delete</h3> <p>I said you can likely delete the user.config files without much regard.  Truth is if you’re into testing something settings-related that can be a real inconvenience. </p> <p>I will drill into the inner exception to find the problem file; it’s only two deep, so it’s easy to find the path of the file in question if you’re willing to dig.  </p> <p>Trust me, folks, your debugger is your best friend.</p> ChipOnehttp://www.blogger.com/profile/16709607564824798285noreply@blogger.com1tag:blogger.com,1999:blog-6443816021567857696.post-66424509451583933862011-02-25T20:52:00.003-06:002011-02-25T20:55:49.211-06:00Windows Phone 7 - What if?<p>Nice. Looks like Microsoft is starting to ramp up the ooh-la-la with their advertising. Combined with the web-based ads with the head-to-head comparisons, the new Windows Phone 7 commercials are starting to look a little more playful.</p><br /><iframe title="YouTube video player" width="640" height="375" src="http://www.youtube.com/embed/mrhpXQqS3Is?rel=0&hd=1" frameborder="0" allowfullscreen></iframe><br /><p>Yeah. My phone does that. :)</p>ChipOnehttp://www.blogger.com/profile/16709607564824798285noreply@blogger.com0tag:blogger.com,1999:blog-6443816021567857696.post-42525565773793284132011-02-14T22:50:00.000-06:002011-02-15T13:25:58.697-06:00An Azure Deployment Primer<p><em><font color="#a5a5a5">From the Developer & Evangelism Labs: Introduction to Windows Azure</font></em></p> <p><font color="#000000">This post is a summary of the notes I took while working through the Introduction to Windows Azure lab in the January 2011 Platform Training Kit.  I ran into a couple of road bumps and bruises along the way and thought I’d share. </font></p> <blockquote> <p><font color="#000000"><a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=413e88f8-5966-4a83-b309-53b7b77edf78&displaylang=en" target="_blank">The Platform Training Kit</a> – The download for the kit</font></p> </blockquote> <p>The sample is a guestbook that lets you write your name, a message and post a photo.  A background service resizes the photo and the thumbnail is linked to the full size image.</p> <p>The lab walks you through setting up the relevant bits of the application locally, then walks you through deploying it the application to the cloud.  I found it to be a good balance of hand-holding and explanation, but you may find many questions left unanswered. The Microsoft Platform Evangelism team has certainly lowered the bar for folks to get in over their head! Thankfully there are 26 other labs to help quench your thirst.</p> <p><font color="#000000">When you get it up and running, here’s what the end product looks like:</font></p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpt0k_QAYRYjE4vk1nHArzQWrHtpEVc_5Neqh64Kp0Ck9jhXPmUdyCBAmoXbUt77fWzLFMl_UjncMksZ7NGQCaaC9DbntlfVrVi6lqLpRRiCNaZiktFIkWX1oL-bOCm_9SovXCARUyPBE/s1600-h/image%5B21%5D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcWk6LU6mdV90rvhUxQD6Zg8v7Icuoy4bWay-LTnSxkC7RuTXN59tF2Qnbs3r7A7X3CfDoX8_MShr3bsKxhqXetANGNj40Mi6hiCkP0QI2Tuujedro6Lk-qSmdllC3CWHaHZmBCjeNtO0/?imgmax=800" width="425" height="253" /></a></p> <p>Well…that’s what it looks like if you post a picture of the snow on my roof with a name of MisterJames!  </p> <h3><font color="#000000">Snags, Detours and Road Bumps</font></h3> <h4>Documentation Gap</h4> <p>Following the lab from the first step and trying to use the project through all of the exercises has its pitfalls. First of all if you make a mistake, that carries through the whole way.  Secondly, when preparing for and throughout exercise 3 (deployment) there isn’t much clarity around the implications of misnaming your hosted service or storage account.  There are also rules around naming (they have to be DNS suitable names) but this isn’t clear through the docs.  Worse, the error you get when you make an account naming mistake is not very leading: One of the request inputs is out of range.  I was getting this error when making a call to CreateTablesFromModel, and nothing really pointed me back to the name.</p> <p>You can, however, opt to jump in with the files provided for the lab.  At each step of the exercise the team has provided us with an updated, accurate solution to continue from.</p> <p>This is good, as in step 3 it assumes you’re using that and doesn’t give clear instructions on the updates required in the service configuration file.  The nodes and values required are in the provided solution.</p> <h4>Error Loop on Deployment</h4> <p>After I completed the lab I started playing around with config files and some simple changes to the app.  In that process I managed to botch a deployment package (the configuration bits).  Unfortunately, I didn’t realize that until I had already deployed the package as an upgrade to the first version.  The instances were stuck in some updating/starting/waiting/resetting cycle that took over 40 minutes to work itself out. The result was an error state, which until reaching I was unable to stop and update the service.</p> <h4>A Missing Warning</h4> <p>I just want to add another voice to the mix here: remember to stop and delete your project as you don’t want to be incurring charges or burning up valuable compute cycles.</p> <h4><font color="#000000"></font></h4> <h3>Time Expectations</h3> <p>This is a lab that is scheduled to take approximately 60 minutes.  In addition to the coding bits I took two phone calls, answered a few IMs and emails and was wrapped up on the code/deployment side of things inside 55 minutes. I did muscle through it pretty quickly, though, as I’ve done several of these labs and know the style.  </p> <p>If you aren’t patterned to recognizing the parts you should and shouldn’t need to read, this lab could take up to 75 minutes to complete.  One other note: I already had my Azure account up and running, so I was able to skip that part of the task.</p> <p>After plugging through the juicy bits, I then had to wait for the succession of updates, host starts, role starts and what not.  This easily pushed me over the allotted 60 minutes.</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyP5SiDryGp8hXgKy5vfC9WAQV31etyRuK0mKpuFa536MuN2EwBLQd5RNy2FguEncXerPqUIG1IbRL5PzncSrKpwzRssguhMj_aaY-lVViJEDeAtsPrGS3Wm_hTnesYWe85Y9VKv4KIR4/s1600-h/image%5B4%5D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj78oVqWECXCvP1UF6tIDT0yeF33JHETqh65xKJIrXBYolvLLm66CXzY00DnidgAJgWbzSnAejWkgJf-OB0rpwIKkKf0U1PGkkSAjD2hfXQrn2WVa92W-fvyJ5hpm5Rjh1cXRpVRr5i9T0/?imgmax=800" width="660" height="223" /></a></p> <p>For all of these services to finish their progression to their final states took about 20 minutes, at which point we end up here:</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtrS66JYgb4blqVwCqnABX51ziloA8pLPanUrtShjDMy6E2-UySOPzxy65DbbMvUCk7QVX4iipHsB3my96T_OKY9F7s5XLdTSwgxIyRSkv_7ErBqzyevFcvpQNlq-eEzbVDpvvIMGPxu4/s1600-h/image%5B15%5D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhalC0QR9EgGWndlNdGS4S2pji7YityJpQYl-THhc363l3esfgFjluFRKjGCxsWDGYQVQy6NHcnC0tFXURJ_ncOI1rsA-Y_VFARd_oD_dbPZip6RgiM6CgrPy8f8ltU8YH7zzh95a3hXmA/?imgmax=800" width="416" height="152" /></a></p> <h3>Conclusion</h3> <p>Set aside a two-hour slice of time and you should be able to move casually through the lab, start to finish. The Introduction to Windows Azure does a great job of touching on many of the concepts you’ll be working with when you get into cloud development.  You will be left with questions around deployment and configuration, but this start is good exposure and the walkthrough doesn’t leave out any important steps.</p> <p>Don’t forget to delete the services created in the lab!</p> ChipOnehttp://www.blogger.com/profile/16709607564824798285noreply@blogger.com0tag:blogger.com,1999:blog-6443816021567857696.post-10428009109595982802011-02-13T20:58:00.000-06:002011-02-14T11:59:30.639-06:00Mixin’ it up<p>Bootcamps. Keynote. Sessions I’m actually interested in. Meeting folks that I’ve only ever known online.  Should be a great event!</p> <p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" border="0" src="https://msteched.blob.core.windows.net/media/Default/BlogPost/news/MIX11_BB_SeeYouAt_1.gif" /></p> ChipOnehttp://www.blogger.com/profile/16709607564824798285noreply@blogger.com0tag:blogger.com,1999:blog-6443816021567857696.post-28626521762952483852011-02-08T18:22:00.000-06:002011-02-08T18:22:00.124-06:00Parents, Open Your Eyes<p>I just read this blog post from over on ZDNet: <a href="http://www.zdnet.com/blog/hardware/its-time-for-itunes-and-xbox-live-to-put-spending-limits-in-place/11303" target="_blank">It's time for iTunes and Xbox Live to put spending limits in place</a>.  Mr. Adrian Kingsley-Hughes writes that:</p> <blockquote> <p><em>There’s a fine line between something being lucrative, and starting to feel scammy. Apple is certainly sailing close to the wind with some of the in-app purchases it is allowing, and Microsoft could certainly do more to prevent this kind of bad publicity. [...] And it’s clear that the current mechanism of relying on parental controls isn’t enough. Both companies need to get their act together.</em></p> </blockquote> <p>I would agree that parental controls are failing – couldn’t that be said about a lot of things? – <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_EA0HgUTbKMLcYM1gSZhrIXlHSVSl5GC1e5qFXpoFosuch89Q3W3i3vDN8PeWf_OVZtFIhnakRqTXX68hFJH_29BTnmw_QQIwX0nZN31DQ_iLhupQt9NjNppTAX7grdzOYifj6lB-5D0/s1600-h/image%5B4%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 20px 0px 20px 22px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLTGBBqq4ziJdX_QSnvugk-mjn5a4pdsKV3PQmyOYuLkSN_G9Li2ibfRMiPsIHNZ5BU6hfimthKCc0GAfWQrED6gZe40EZS3dgBMWZcgyu3B-JTAwf6_FIALjgVe85qScKcjj2KC2b46E/?imgmax=800" width="240" height="35" /></a>but we would stop short of flogging a parent who pulled off the same stunt at Wal-Mart and then tried to blame the store management.  </p> <p>Could you imagine walking your child into the store, giving them a shopping cart and meeting them at the checkout – at which point you blindfold yourself and let the check-out clerk scan all items…and then your credit card?  And you don’t even check?</p> <p>Look, I’m no fan of Apple, but I don’t think they (or Microsoft) are in the wrong here.  My wife has disabled in-app purchases and we don’t share our password for the iPod Touch or the Windows Phone 7 devices we own.  Not going to happen.</p> <p>Our kids just don’t get unchecked access to our credit cards.  Period.</p> <p>While Mr. Kingsley-Hughes refers to it as ‘insanity’ and points blame to the companies in question, I refuse to be an enabler for parents who want to make stupid, unconditionally blameless children.</p> ChipOnehttp://www.blogger.com/profile/16709607564824798285noreply@blogger.com0tag:blogger.com,1999:blog-6443816021567857696.post-12368344607972982962011-02-07T21:29:00.000-06:002011-02-08T16:13:23.400-06:00Dedicated Back Button: Genius<p>My wife has an iPod Touch and we were running through some of the same apps that exist on iOS and Windows Phone 7.</p> <p>At several points we both accidentally clicked the wrong link/button/UI element etc. on our own device.  There was one glaring difference, however; the iOS versions often land you in a place where you have to navigate through the home screen and back into the app where you accidentally made the click.</p> <p>Not so, with Windows Phone 7: there’s a dedicated, hardware-based back button.  This makes it easy to back up through your screen progression to the last place you were at.</p> <p>It’s so simple that you think that it wouldn’t be necessary, and yet, there she is…my wife pushing the empty space on her iPod like there should actually be something useful there.</p> ChipOnehttp://www.blogger.com/profile/16709607564824798285noreply@blogger.com0tag:blogger.com,1999:blog-6443816021567857696.post-75615440453733989772011-01-31T22:51:00.001-06:002011-02-14T15:37:42.464-06:00Windows Phone 7 Wishlist #2<p>So I’ve been playing with the phone now for over two weeks now and having a great time showing it to my friends. They are shocked that it’s a Windows phone. I have two friends, in particular – one from Vancouver and one from Toronto – who were in town for this past weekend and are huge iPhone fans. <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-8mPIUDoO9LnFQGD0o_-UtyKAEMHUu4Rn9SrEPQUgqKWLkDpQyk3i4ZxyMJVdydZJEJhecuzT-wdeQsen7RgmVq9Dgu1Vl6Gp7LZJm4ywsfofjqh3a8VnPCQbFU-aBNL7M6g7-anu9V4/s1600-h/image%5B3%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhR4VEUWEe-o3DBy7khyVa2UDYySvxQHnd6qBFIaUrGCBojXAFZsNadtSkvyxCnus3yamofH1Mz60GOa6J1UbeVPhkZy0WvCw-vPAuWSg5EiNVqBO6bRBHvYNcriig0nr2azYGRMmaypfs/?imgmax=800" width="220" height="98" /></a> </p> <p>Between the two of them they’ve owned every iteration of the iPhone, including their now current iPhone 4. They put their phones down and were fighting over my Samsung Focus.</p> <p>The one was quite miffed that the Rogers rep at the mall didn’t demo it for him as he just picked up his iPhone 4 three weeks ago.</p> <h3>Things I’ve Noticed</h3> <ul> <li>When you give the home screen a little inertia to let it scroll, then repeatedly hit the Windows button, you can make the tiles skip and keep rolling from the start. This turned out to be a fun game for my kids, who have contests by pinning all the apps to the home screen and then seeing who can be the first to scroll-home-tap and give it enough momentum to get to the bottom of the list.</li> <li>I tend to hit the back or search buttons when I’m using the camera. I am so used to holding my other phone that had no buttons in that area that my fingers get in the way. This isn’t so much a WP7 problem as a Samsung Focus problem. It happens enough to be annoying but not so much that it’s a problem.</li> <li>Same thing with the volume and power, which are on exact opposite sides. You use the phone for leverage on the opposite side to push the button…with unintended results.</li> </ul> <h3>Things I’d (Still) Like to See</h3> <ul> <li>Video sharing</li> <li>Zune Pass and music in the Zune marketplace for Canadians (<a href="http://theycallmemrjames.blogspot.com/2010/07/dear-microsoft-give-us-zune.html" target="_blank">I’ve already mentioned this</a>, but it’s worth repeating)</li> <li>Updates to the Facebook app – (doesn’t really seem to do it’s work in the background)</li> <li>Some way to organize the apps list. I love the tiles, I love the way the other apps are off to the side, but what would really work is to carry forth the Metro metaphor and allow me to make a panorama out of the apps, with categories I can set. I wouldn’t even mind – at first – if I had to do it in Zune.</li> </ul>ChipOnehttp://www.blogger.com/profile/16709607564824798285noreply@blogger.com0tag:blogger.com,1999:blog-6443816021567857696.post-37228948116225662542011-01-20T19:34:00.000-06:002011-01-21T07:35:59.184-06:00ASP.NET, MVC 3, the Razor View Engine and Google Maps<p>With the release of MVC 3, the updated project templates and the Razor view engine we have several new features and tool improvements at our disposal.  I wanted to see how hard it would be to get a quick mash-up of some ASP.NET goodness and the Google Maps API.  For this project, I’m going to walkthrough creating a new project in ASP.NET using MVC 3 in Visual Studio 2010.  You’ll need to have the <a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=d2928bc1-f48c-4e95-a064-2a455a22c8f6&displaylang=en" target="_blank">RTM build of MVC 3</a> (which contains other ASP.NET enhancements, btw).</p> <h3>Getting Started</h3> <p>Once installed, it’s fairly easy to invoke the New Project dialog and select ASP.NET MVC 3 Web Application from the Web templates.  If you don’t see the project type listed, make sure that you are targeting the correct framework.</p> <p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhd6x_ehh97YIlWrYioxmo-UuMx2fan85U1ggFC4_mHhRMXMmGnzaA9dQCPUCqQMDGPp2PxdtQpLoRQd0mtw_wAbg-7Fuk5ZquEg3lMF0b-PNVnm0G_N8VuMI5DJrxN2HTI5a1X5bSqQIc/?imgmax=800" width="553" height="202" /></p> <p>I named my project RazorMaps.  When we click ok, we are then presented with a bit of a wizard to select our options for the project.  This is a simple but good improvement over the previous MVC bits because it rolls up the wizard, test project creation and multiple templates (empty versus the “internet application”) and lets us select the view engine.</p> <p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitW7CYw5uf04FpoDf5Q2qaozsljVYCfz2acbcKf-6F1l-aY4XLEfCcXyPquU1OS3maNfWxE9FU8QWQxlqnU2EgZzCC5rDUkW_f48aLAvwdWaTE7bCYhCuWeG7NXeX_zBXZVgAL7Cp5dL4/?imgmax=800" width="409" height="381" /></p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimzczUU14eh6E_ONTwjLflzVlx9NG-vshd5OOgtW-UxSMDFUd3fyalid3TOxFXvkf5nmBtH1Lk733e8PCgduG2fTyWBYqGN0Jtvi7ZOKDPIi5wbnANFTh_UA9kYOw3rVq-I1caljj09kI/s1600-h/image%5B12%5D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvRV-_JgkFuWLITMwAKybD8oCPJ9yO49SXvEH_jh_BCwEDjVDi6NHOGPJvNDT3l8upU36Gz55_O-sw09tC4j4EuOjH1Pfu2Ej0Ly2SVqlPIAsFJpKS1hSNXsoDTkp19XU-duEOEUTUi74/?imgmax=800" width="169" height="244" /></a>For simplicity sake here I’ve just selected an Empty template and no test project.  </p> <p>Most of the project pieces feel familiar, in fact, there’s no noticeable changes to the MVC project at a root level and all the expected folders are there.</p> <p>It’s nice to see that jQuery is added by default to the _layout.cshtml file, and to see that jQuery UI is included in the project.</p> <p>As at my writing this, it’s also the latest bits for the jQuery library, and they have the vsdoc file updated (AWESOME! No more renaming the old one and replacing the library!), and there are other libraries in the mix as well (enabling unobtrusive validation, etc.).</p> <h3 style="clear: both">A Simple Home Page</h3> <p>We need to get a view set up so that we have something to look at.  The base project doesn’t include the controller or the view we’re going to want, so we’ll start there.</p> <p>Right-click on controllers, Add > Controller and name it HomeController.  We get our basic controller up-and-running and the code for our first ActionResult (our home page) is free:</p> <p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvTfed-6D2r6knRH6zTkUB6z_PIzEN3UYqN6tV2YdHZf1D6MhZL51AaeNea9LU4PINUsWJ9uGdDdUG7XB593UbKb3fYPZe1Nbkb43vvFhNQoRht_dGs8W8PvjyigQepeCgeCScv3S7ATE/?imgmax=800" width="346" height="206" /></p> <p>Next, right-click anywhere in the Index method and select Add View from the context menu.  If the View Name is <strong>Index</strong> then you shouldn’t need to change anything else.  We’re using the Razor view engine and we already have our layout specified in _viewstart.</p> <p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTkT1z73DDjX5s2rlfvXcylQIRe6DMF67Dda57do187Vm0jAq6FaxiFSvXxZ2Y_pYAbpkx3Ubk7HRV4uikdn9d5Cqtzt9xglFi3I6s1evgHF_7MDNcSKH5qmjRvKjSV8vkf4QQkgQjB3k/?imgmax=800" width="361" height="362" /></p> <p>Press F5 to see your lovely work!</p> <h3>Hello, Google Maps</h3> <p>We have a couple of things that we need to do to get the basic, no-frills map up-and-running.  Though I worked from the simple tutorial on the <a href="http://code.google.com/apis/maps/documentation/javascript/tutorial.html" target="_blank">Google Maps Javascript API</a> page, I’m going to try to MVC this up as much as possible and look at some of the features of the Razor view engine.</p> <p>We know that we need to add the Google Maps script to our page, and we can see from the tutorial that you also need to have a couple of styles.  Because we are using layouts in Razor and don’t want these on every page we create, we’ll take advantage of Razor Sections in our layout.</p> <p>Open up _Layout.cshtml and add the following lines of code to the <head> portion of the document:</p> <blockquote> <p><font face="Lucida Console">@RenderSection("Scripts", false)</font></p> <p><font face="Lucida Console"><style type="text/css"> <br />    @RenderSection("Styles", false) <br /></style></font></p> </blockquote> <p>We’re adding two optional RenderSections here.  This is very similar to creating content sections when using master pages.</p> <p>Next, pop back into our index.cshtml file so that we can add the juicy bits to get the map loading.</p> <h3>Fleshing out the Page</h3> <p>Right at the top of the file, you’re going to want to add the following code:</p> <blockquote> <p><font face="Lucida Console">@{ <br />    ViewBag.Title = "MVC 3 and Google Maps"; <br />}</font></p> <p><font face="Lucida Console">@section Scripts { <br />    <script type="text/javascript"  src="</font><a href="http://maps.google.com/maps/api/js?sensor=false""><font face="Lucida Console">http://maps.google.com/maps/api/js?sensor=false"</font></a><font face="Lucida Console">></script> <br />}</font></p> <p><font face="Lucida Console">@section Styles { <br />    html { height: 100% } <br />    body { height: 100%; margin: 0px; padding: 0px } <br />    #map_canvas { height: 80% } <br />}</font></p> </blockquote> <p>The ViewBag is a dynamic expression and evaluated at runtime.  The “Title” property is filled into our layout template with the @ViewBag.Title expression.  </p> <p>Next, we have our two sections; the first adds the map script to our page, the second applies and specifies the styles we need to get the map rendering correctly.</p> <p>The rest of the page consists of:</p> <ul> <li>A div element (to host the map) </li> <li>An initialize function that sets up the map, and </li> <li>A jQuery shortcut to invoke the initialize function when the page is ready </li> </ul> <p>Here’s the code:</p> <blockquote> <p><font face="Lucida Console"><h2>Hello, Google Maps</h2></font></p> <p><font face="Lucida Console"><div id="map_canvas" style="width:80%; height:80%"></div></font></p> <p><font face="Lucida Console"><script type="text/javascript"></font></p> <p><font face="Lucida Console">    function initialize() { <br />        var latlng = new google.maps.LatLng(40.716948, -74.003563); <br />        var options = { zoom: 14, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP }; <br />        var map = new google.maps.Map(document.getElementById("map_canvas"), options); <br />    }</font></p> <p><font face="Lucida Console">    $(function () { <br />        initialize(); <br />    }); <br />    <br /></script></font></p> </blockquote> <p>And there you have it!  Press F5 again and the map loads.</p> <h3>Conclusion</h3> <p>If you have a good handle on ASP.NET MVC and you understood MasterPages, the switch to the Razor engine and templates is going to be easy and refreshing.  Integrating per-page code, via Razor section rendering, is straightforward and keeps our templates clean.</p> <p>Updated script libraries and improved templates and a ton of feature enhancements round out this release nicely.</p> ChipOnehttp://www.blogger.com/profile/16709607564824798285noreply@blogger.com7tag:blogger.com,1999:blog-6443816021567857696.post-12070165603955013752011-01-19T22:48:00.000-06:002011-01-19T22:48:00.615-06:00Built-In Authentication and Authorization Providers in ASP.NET with the MVC Framework<p>If you’re not already doing so, you should seriously be using the the built-in Auth & Auth in ASP.NET. While the subject is fairly well covered, I continue to get several questions and comments related to creating accounts, logging in and permissions and when talking with other developers. I am shocked at how many still roll their own authentication and authorization bits – often for no better reason than not knowing how great (and FREE!) the default providers are.</p> <h3>The Basics of Authentication and Authorization</h3> <p>There are two things you will need to do on most web sites with “account” functionality: identify existing users based on provided user names and passwords (authentication) and then express privileges to control access to protected resources (authorization).</p> <p>These two facilities allow us to do some creative things, like showing different content to users when they are logged in, or to restrict and redirect requests based on the logged in user’s set of privileges.</p> <h3>In ASP.NET, Auth & Auth are Free</h3> <p>The first official, for-a-customer e-commerce web site that I notched on my belt was back in 1997. I spent days creating a system to log users in, store cookies (that I do not care to discuss security about!), store user information, track log-ins and the like.  Each page that I wanted to protect with security meant checking cookies for certain keys, looking those keys up, then checking against a static set of rules for permissions.  I spent weeks fixing the broken parts.  Because most of it was wrapped up in per-page scripts, I had to essentially recreate the whole mess when the customer decided they wanted to self-administer the storefront.</p> <p>Today, so much of that mess is cleaned up for us.  I want to give you the steps to set up Authentication and Authorization in your next MVC web site.</p> <ol> <li>Open Visual Studio 2010 and create a new <strong>ASP.NET MVC 2 Web Application</strong>. </li> </ol> <p>Yeup.  We’re done.</p> <h3>Walking Through What’s There</h3> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1pTWTXd71aas9mHx8gsC8r4hJ2df70ubrXvJOn-IA0Br1_JWjHct28aRuhTMF1U7qBrFHo_s6PVj2pUmVugLUFUv97Al1uPlGeCiMeZs97Rsgkaqp3WRPiHiVLEFumZ4ixeLcNySrFcQ/s1600-h/image21.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFicagraosEIKWXVGjY4LSi_fVXX4j49YwN3qg3E_kp7-ZqBMPXUPvEOkFnPhoe8yUyt7dv0y8w3P31LItQN5EjA8jdSApCFKthBKkox3EoZPSzk_OnECVRc6iEQxCHosYd5gBssXhfGQ/?imgmax=800" width="187" height="320" /></a></p> <p>If you are familiar with the MVC pattern the default project is quite straightforward, but not entirely trivial.  There is no magic here, just convention and after working with the project for a few minutes you should be able to orient yourself.</p> <p>The three basic concepts of MVC – Model, View and Controller – are expressed as classes and .aspx pages (as well as .ascx for partial pages and templates).  As part of the convention, each part has it’s own directory, and in the View folder we have subfolders for each controller.</p> <h5>The Project Components</h5> <p>What is relevant to us today are the items related to user accounts. You can see that there is an AccountController for us as well as the classes we need to log a user on in AccountModels.  The Account subfolder in Views gives us four pages dealing with account creation, maintenance and sign on.  Finally, the Shared subfolder in Views has a LogOnUserControl that displays different content based on the authentication status of the user.</p> <p>At this point, we’re actually still missing a couple of pieces.  If you drill into your App_Data directory you would find that there is no database to hold your account data.  Thankfully, we don’t need to do much to create one; namely, we just use the site.</p> <h5>The Registration Process</h5> <p>Press F5 to start debugging the application.  When the site opens up you’ll see the default master page and index in action:</p> <p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0nGB_omdP6yYnhPxavC3oblqgWLfzMFs05XC80ZL-Fm4WXMIf5W5_dLivSDkkZGqZawz1l8HgswDyDGKtJmgvjmskcEVVj1J_VGV3FQQKWlHQp33LbXIHMqwvDbHsDmUMeh-PltwYsD0/?imgmax=800" width="691" height="356" /></p> <p>Follow the Log On link up in the top right corner of the page.  This will take you to a page with a form to log on, but also a link to the registration page. Follow that, and create an admin account.</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgM7Sp3MQNZotTL3Va_ZhvbyKqPmNL_BlhoxhaOvZFj8mjnoEzgSUiS3t6Wa9e77iS4gL4P-MEGKuomg_PDa43XO-c4b0i9de8hyjAxtRF6ve7YYq8DPrllZ1EL7hgX5T_J5Fg6v8veZ8Q/s1600-h/image34.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNN6ClKp5oLpcG_a-4kvtbpTqznVD5rZb_J2J-6c9xc6zXcvUhN3KeOXYHNcI_MXEo4-V5jh2zWaDLv8W1HPcQ58WO1w1NSkFRozIdlsMOB-TSwf2ci4caXK7mKHX-DywGH0zAfwd5Wsg/?imgmax=800" width="260" height="245" /></a>Once you’ve created your account you can return to the App_Data directory and see that the database has been created (you may need to click the show all button in the Solution Explorer). </p> <p>The show all button looks like this: <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1XKZTsbw4rmwe9mjbdjR8rBeFhnrp085YzXNT9h4gB-xcAuAnsGCNcmOq5oPYFzX2JL53q945_IdBrDZkWwtniRhicu8i26dqC6TfgKA-xh3uhohoW8Vm2awJpL04SBunFM2FrxvwHFc/?imgmax=800" width="22" height="23" /></p> <h3>Authorization In An Attribute</h3> <p>This is where the easy kicks in.</p> <p>To add authorization to your application you can make use of the attributes available to us in the ASP.NET MVC Framework.  It is as simple as adding one line of code to your controller.</p> <p>Let’s turn our about page into something that only authenticated users can view.</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJn9K0-5pRb0yHXY6VSf8RaN00XAnDRWFk51L8cRIzDuhQUXOICzrjyK1TLKW6TwgCwqwEX3z9pZ1vEQzK8__KhBOqCq-wi69ZQnD5rvu2m_MJq_btYKRYbJ7Q0yi9r-M0X8udRTQTddE/s1600-h/image%5B5%5D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaEScyf6Zl7xuf-Jlk3DJ8MkTXntPWUWP_Tyblx1wT0n3OiQtrunVXq0FxWPXYI3DQZ9uUa12_DpA440ct-v1gBMHAzgBej5AWAGEahCoo1zCb5j-SbB2CjNwMeGkRrn5L4s_xUdEehN4/?imgmax=800" width="317" height="111" /></a></p> <p>Perfect! The [Authorize] attribute describes the controller action as something that only users who have been authenticated can access.  And now, when we load up our site, if we try to navigate to the About page prior to logging in you will be redirected to the login page.  To prove this, start debugging the site and add /home/about to your URL.  You’ll see this:</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlOSTNSyPsH4cKSZspRLyE0OxVYTNPrk4DCBsGxGUz5c7V_HkYkI9dBB_4Ka8MeyCLtOmmXfDqgFm3x-TmUNm3QhsG3WB2pK8Cx4KUPxDRY2jTGobUMdFoJhQvI3BbHenTUMdbhqMPdTQ/s1600-h/image%5B12%5D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6MNkfCSf4Tlg0kiCScnl2syomfBBWcD73lgXe4ViDktS5zB4YabBkPwTWdwNyUrTvfyl5vk4JV81Tw6vT-OKJVIlKN2PC3t1nyDYYpD6ZqnjxkPD-BquiTh8bwK8ESTQikQH0MhRdtbA/?imgmax=800" width="407" height="335" /></a></p> <p>After logging in, you can see the About page in all its empty glory.  In fact, because your request was originally for the About page, the default AccountController pushes you through to that page once you’ve authenticated.</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWJZcAWhZeacj-eQxu3hKfI9334DuqVNZr94uCZ6u_teYm-b0C5fpU5u8hXgt2SJf5lV8nloElrO6geNNhkAHYyHeiIwmsaY2Iq-6LlYT7m-MDYqd2YLDZc8z8yq6XSF-VzWejbkJRvoA/s1600-h/image%5B20%5D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzWu1ZM2peTtTkF5QB0KcH7WROfCt3Vc91r_3bbUL40MUex6jn5UXCaslzwaU1eDANu2jzmxfZ9Z9M8MXUkAjl-NGlxwXlg4bMZBJ6FC4U1mp9nouc9YhfGLTKH70Vr4-ippb-NYIPtcs/?imgmax=800" width="405" height="214" /></a></p> <h3>Some MVC Sweetness</h3> <p>Views in ASP.NET MVC inherit from the System.Web.Mvc.ViewPage object and therefor expose some interesting objects for us that we don’t have to work for to use.  Taking advantage of this fact allows us to shortcut to some features right in our views.</p> <p>For example, the User object on our ViewPage allows us to test for authenticated users:</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3VfJlHkKJ2wGmvXyWSmXhqTv9gX5WF3eguJ1Rw7u8OGIffZlzQyAyReCxRgoryNUPBQ88_2LBLfXP4nfi5ouJAPPcFuYPZvUQjVQApdpaxFcKnhCG-ZUPXiCbRqw-4hB81ft4YHYfE1k/s1600-h/image%5B25%5D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhazRbl2dHRIji1IsDYzRlL8nOfhWZXSN9NJJcPjE7_du9kobAVipUqIokrhuT-6cQEZeCVJ0jGsHJhlhP_WOx6XN9_HF87nBeTGdKdCIYH06gH1dxg5cWK12JAdJA5Y2V1ehvFdMa-zWY/?imgmax=800" width="418" height="103" /></a></p> <p>Or, we can test to see if they belong to roles in the ASP.NET membership/role provider:</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3zB6aQdEhwnKMVGVmrZF-yT8BM_bbzWBG75YIKrC-dsdoj-XhzNzRX4Y7OsjQorN0d-Ba_I9y16CECA2Q1bEKHdQaNcfobNvyxO-wAYbY50TvBviySp4WTIYLOExIbmQr5qp2306w6U4/s1600-h/image%5B30%5D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJSJ2qWFEE6ceNaLEESC4nGhyphenhyphenR1-U-IwH5Xrc_Jvb_ZkmvWktZFQS_sjvj3TbheyXnWd-9udVp8_tDoFYbmy33AjYZcqVbd5doOSAoSHqWSiRFEHxNt0vFUg9_P6F-7QH-9jNL1A7B9S4/?imgmax=800" width="489" height="115" /></a></p> <p>While this can be super handy, it’s important to consider coding practices and whether or not your logic for such elements should be in your controller or your view.  This post will not enter that conversation, but it’s important to note that a similar roles-based approach is just as easy inside your controller:</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgliMfpcnc8QUTLMHfTK5Gf60Jof94W5GbRryJ9IJI16QZUsq48hq-c-648AG-Ihk2QjF06wToCuKRuRv_-XMlN7mS95PrGEGPJAVFA_s-MQTGBo12vj4sxvb22zLttZzFQuPsfUlbPIlU/s1600-h/image%5B40%5D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV_jN6lPozai2MwAmDhC3U8ucRwipGtdbvQuPF_7gKWL9jbjESCa79fLRkRp_hQL7KJh4ev9Jck9NFBZsx0AIKwrTumapteXhIUSlApj6xzIFXEYmrHluW9-SAjFtpxsuNdys77wQVPho/?imgmax=800" width="366" height="119" /></a></p> <h3>Oh Yeah, About Those Roles</h3> <p>The easiest way to get roles going would be to navigate to the ASP.NET Configuration site.  You can enable and define roles from there:</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh__3U8pXe-FD1il6veU9dbAHqrGmBct-xYcOUBYQmmszmPsP2aellLNhD48roR-w75fDjHgIAkBeXTtVa_FkcsZxVEbwo3F_e3pMQXlgyMjRJaO6L0k76DcUyROh67KOOLsMpB1tZsAf8/s1600-h/image%5B35%5D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjO4WR4NotY9h1PvyDoL7akEnvmYPy0EFeQ-UOMaKxSSVCq6G_0K0FRkr9HpiWRsIE1GTdqi4zpr1HcNsTHho_TxJljDzi90cHcIaEuyPhVB1mE1RsMPfsMz6KO4tCWLqJfCzUDwJSOxWg/?imgmax=800" width="210" height="68" /></a></p> <p>This built-in administration tool simplifies the process of enabling roles on your site, adding existing users to roles and/or creating roles and bringing in existing users.  It also allows you to add a role to a user as you create them.  It’s tidy and functional, but doesn’t have many bells and whistles.</p> <p>This isn’t the best for a production environment as the ASP.NET Configuration site is not deployed when you publish your app.  One solution would be to use a community-based console to help administer the site post-launch such as <a href="http://mywsat.codeplex.com/" target="_blank">this one</a>.</p> <h3>Some Reading Homework</h3> <iframe style="width: 120px; float: right; height: 240px" marginheight="0" src="http://rcm-ca.amazon.ca/e/cm?lt1=_blank&bc1=000000&IS2=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=chasthelist-20&o=15&p=8&l=as1&m=amazon&f=ifr&md=07AN74PQXHR1PJRCZ582&asins=0672331128" frameborder="0" marginwidth="0" scrolling="no"></iframe> <p>I recently had the privilege of working with one of the authors of this book (Stephen Walther) and I can attest to the fact that these guys know this stuff inside and out.</p> <p><a href="http://www.amazon.ca/gp/product/0672331128?ie=UTF8&tag=chasthelist-20&linkCode=as2&camp=15121&creative=390961&creativeASIN=0672331128">ASP.NET 4 Unleashed</a><img style="border-bottom-style: none !important; border-right-style: none !important; border-top-style: none !important; border-left-style: none !important" border="0" alt="" src="http://www.assoc-amazon.ca/e/ir?t=chasthelist-20&l=as2&o=15&a=0672331128" width="1" height="1" />contains a ton of great information on using and abusing the .NET Framework when working on web applications, including a section devoted to the membership framework.</p> <h3>Conclusion</h3> <p>We’ve come a long way in web development.  Tasks that used to require “rolling your own” and a day or a week of dedicated time can now be reduced to simply clicking on “New –> Project”.</p> <p>The beauty in that is that way that we can fully customize those bits, integrate them with our existing auth/auth stores and more.  We can choose our view engine (classic ASP.NET, MVC or now Razor).  We can integrate jazzy Ajax features through the fully supported jQuery libraries and its good-looking sister, jQuery UI.</p> <p>It’s a good time to be a web developer.</p> ChipOnehttp://www.blogger.com/profile/16709607564824798285noreply@blogger.com4tag:blogger.com,1999:blog-6443816021567857696.post-74933028528917787232011-01-18T18:42:00.000-06:002011-01-18T18:42:00.143-06:00Windows Phone 7 Wishlist<p>I have the <a href="http://www.amazon.ca/gp/redirect.html?ie=UTF8&location=http%3A%2F%2Fwww.amazon.ca%2Fs%3Fie%3DUTF8%26x%3D0%26ref_%3Dnb_sb_ss_i_4_13%26y%3D0%26field-keywords%3Dsamsung%2520focus%26url%3Dsearch-alias%253Daps%26sprefix%3Dsamsung%2520focus&tag=chasthelist-20&linkCode=ur2&camp=15121&creative=390961">Samsung Focus</a><img style="border-bottom-style: none !important; border-right-style: none !important; border-top-style: none !important; border-left-style: none !important" border="0" alt="" src="https://www.assoc-amazon.ca/e/ir?t=chasthelist-20&l=ur2&o=15" width="1" height="1" />and am <a href="http://theycallmemrjames.blogspot.com/2011/01/got-my-phonesamsung-focus.html" target="_blank">quite happy with the phone</a>.  I’ve been using it for just about a week.  The device <em>is the device</em> and can’t change; it’ll be what I use for the next two years or so unless WP8 comes out and I can get a hardware upgrade.</p> <p>However, this is still a first-generation iteration and there is room for improvement. Here are some things that I would like to see as far as changes to the platform go:</p> <ul> <li>Give Canadians Zune Music in the Marketplace, as well as Zune Pass. </li> <li>Build a way to keep the elegance of differentiation with email account notifications (on the lock screen) but unify the inbox. I am going to prototype what I would like to see here.  I want just one email tile on my home screen. </li> <li>Copy and paste, as well as better cursor placement. </li> <li>Let Canadian customers buy music in the Zune Marketplace, and let us purchase a Zune Pass. </li> <li>I want a first-party app for Live Messenger that runs in the background and runs as quickly as email and text messenging. </li> <li>Enable uploads for video to my Live account, Facebook and YouTube.  Give me an easy way to share (like, “Post to YouTube and Share on Facebook”).  Give me the option to only do this when I’m on WiFi (but to queue it when I’m not). </li> <li>Finally, make music from Zune available for purchase to Canadian customers (and enable Zune Passes in Canada, while you’re at it!). </li> </ul> <p>The first update to WP7 is rumored to be coming in the next few weeks.  I am looking forward to seeing what on my list makes the cut.</p> ChipOnehttp://www.blogger.com/profile/16709607564824798285noreply@blogger.com0tag:blogger.com,1999:blog-6443816021567857696.post-23902335695978455112011-01-17T23:28:00.000-06:002011-01-18T11:39:39.641-06:00Got My Phone–Samsung Focus<p>It took a bit of wheeling and dealing – I had three cell phone contracts for my wife and I – but I was able to lock down this little beast of a phone this weekend.</p> <p>I had a WinMo 6.5 phone with another carrier, and two flip phones with Rogers here in Canada.  I had to dump my other contract, which cost me $150, and then pay $99 to upgrade my flip phone to the snazzy little Windows Phone 7 number from Samsung.</p> <p>Though I am a software developer, I am writing this review as a user and trying not to pay attention to the elements I would normally focus on as someone in the development camp.</p> <h3>First Impressions</h3> <p>I have to admit: I’ve long been been a WinMo user, so I had really low expectations going into this phone.  When I picked it up and tried it at the booth in the mall I was looking for something not to like.</p> <p>I got locked into my last smart phone contract before the iPhone had any decent corporate email and calendaring support (and those who follow know my <a href="http://theycallmemrjames.blogspot.com/2009/11/apple-will-ruin-world.html" target="_blank">history with Apple</a> anyways) so my choices back then were quite limited.</p> <p>But I was refreshingly surprised.  The interface was speedy, swipey, flippy, crisp, and that really lured me in.  I entered into Operation Crapdump: getting rid of my old WinMo 6.5 device and jumping into the new now.</p> <h3><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMx_Irx3U3q2esMcKzRO8BisS0Ksd14TcjzBcFi-54dO9CrWcdry8s6w4tUiyulmALOdeITLRcqM649vTESwJojqr8EzQYY2eCTTYuaeLFF0N_qGcvo5JhdZIGM2iJkZ3MiQYi_Tdf48s/?imgmax=800" width="134" height="240" />The Device Itself</h3> <p>This is a lightweight phone, easy to hold.  I have big man-hands, and it is on the upper-end of wide when you’re holding it to talk, but it’s no wider than an iPhone.  I’ve only had it for a couple of days, but it has not been awkward to hold, use or store in my pockets.</p> <p>The battery judgement will have to come later, as I’ve only had the phone for a few days, but it’s lasted now almost 90 hours without much charging (I charged it when I got it, then had it plugged in a couple of hours while I was pooting around in Zune).</p> <p>The screen is great – big, sharp, contrasty, good colors.  My wife thinks her iPod Touch looks like a relic next to this.  When we pulled up the same photos on Facebook and held the devices side-by-each, the difference was startling.  Black is black, white is white and the colors POP off the screen.  I absolutely love how good this phone looks.</p> <p>The touch experience is different than iPhone/iPod.  I haven’t used it enough to say I have a preference either way, but I don’t mind it.  It’s less ‘pressy’ than iPhone and more ‘tappy’.  You also get a little vibration from the device to confirm button <strike>presses</strike> taps.</p> <p>The camera on the device takes reasonably good pics and I love having the video handy as well.  My HTC Touch Diamond took “okay” pictures, but the video the device captured wasn’t worth the boot time of the video camera on the device.  I already have a Grammy-winning prize video of my daughter off the Focus, and I’m about as un-biased as they come. ;o)  </p> <p>I’ve heard that on some other brands running WP7 that the camera and screen aren’t that great, but the Focus really shines well here for a 1st generation phone.</p> <p>My only complaint is more related to my previous phone, which trained me that the manufacturer logo is at the bottom of the screen.  Every time I pull the thing out of my pocket it’s upside down and I’m looking for the power button before I realize what I’m doing.</p> <h3>The Windows Phone 7 Platform</h3> <p>I have to say that I am really impressed with what I’ve seen, with a few caveats.  The minimum specs and the way the framerate is locked at 60fps will make any phone on the OS nice and snappy.  The very quick boot (though nearly irrelevant in my always-on world) is such a difference from the 1m30s + boot times I’m used to.</p> <p>Back to the camera quickly…I think it was a really good choice to make some vendor-level requirements and have the device respond quickly to a held-in camera button.  If you’re not familiar with this feature, basically, whatever state your device is in (locked, phone call, playing a game) if you press and hold the camera button for about 2 seconds the camera flips on.  Again, less than 4 days in, but I’ve used this feature half a dozen times already.  </p> <p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwCnKMAQOgr-8SRHDiVj3DxJ3xqh3V_RSqr7GfMiw2cFMPODk4zg-olvMZUEIsBAE1maellTvmHC7zn1tc1dHrGGECE9NVCNVB8jbo9Z34LoCpA8vyrS4OtB_-IWIMjldO3tsMmvNDPCw/?imgmax=800" width="240" height="157" />The look-and-feel of the phone is driven by the Metro UI and a custom font that is reportedly inspired by Verdana.  Everything is flippy and slick.  Things peel away in 3D and slide around nicely.  There are some great design elements here.</p> <p>Pinning is great and can’t really be explained without some video.  This is the feature that lets you put important people, apps or deep links onto the home screen.</p> <p>The home screen itself I’m a little mixed on.  At first it was great…there was enough there to be functional and show off push-enabled tiles and the likes, but as I pin more and more things, it’s getting a little long.  You can leave apps off the home screen and just in the apps page (a right-to-left swipe of the home screen) but with only the two options I think there is definitely room for some organizational improvements.  My hope in this regard is that they are able to maintain the truly awesome Metro interface.</p> <p>Finally, the apps.  They’re coming, but there’s not a lot there yet.  I’ve picked up a few and will post on those later.  The Marketplace is easy to navigate and uses the integrated search button on the phone, but I think it’ll also need some improvements when the volume of apps goes up. </p> <h3>The Ecosystem</h3> <p>I get it now.  Xbox changed.  Messenger changed.  Zune changed.  And now, they all look the same as Windows Phone 7.  Though I hadn’t really used Zune too much prior to getting the Focus, I knew exactly what to do just by loading it up.  </p> <p>It is very natural to move between these devices and applications and I think that Microsoft has done a better job at this than any other vendor.  Apple, for example, has their Apple TV, their iOS stuff and the Mac platform, and it doesn’t feel the same at all. iTunes feels nothing like the iPod touch or iPhone.  This is where the unified UI really works for Microsoft…Zune looks like it could run on the WP7 phones.  Apparently the other vendors have noticed, too, as Apple preps to overhaul Mac OS to look more like iOS.</p> <p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1e9UIRuXykZ50NcS1KGYHFkM-DY6FAegDDAjCTyZKBEw7WtWkHSdtZFvlLL-gyd3wtn7xnFR4FrW1AL-2GEgXL38IGugTunUhALojxCH0hPpt9q3GeEXbgo8k_LYk8DTM-3LzttbfaaQ/?imgmax=800" width="240" height="88" />The Zune software is slick and easy to use.  In a few minutes I had podcasts and playlists set up.  I burned several CDs and set up wireless syncing.  I also browsed through some movie rentals, was able to view my points balance and check out apps in the Marketplace.</p> <p>Using Windows Live ID for me worked really well as I’m an Xboxer and I use Live Messenger and Hotmail.  With Xbox live and Zune and the phone and everything synced to the cloud, I’m really liking the experience so far but have yet to push it to its edges.</p> <h3>Things I don’t Like</h3> <p>“Hello?  Microsoft?  Yeah, this is Canada calling.  Please give us the Zune Music Marketplace.  And Zune Pass. <strong><em>Please.</em></strong>”  And I’m <a href="http://theycallmemrjames.blogspot.com/2010/07/dear-microsoft-give-us-zune.html" target="_blank">very serious about this</a>.</p> <p>That’s right, fellow Canucks, no music store. Lamers to the max extreme.  </p> <p>Again, one thing I’m kind of torn on is messaging all in one place.  I would also like to see a unified inbox, though I do like the way I am able to differentiate between email accounts on the home screen.</p> <h3>Conclusion</h3> <p>This phone and platform is a different experience.  It doesn’t behave like an Android or an iPhone.  If you go into something expecting it to work like something else you know – as though the other one was better simply by definition of its creation – you will never be impressed with other items in the same commercial space.  You will also be labeled a fan boy.</p> <p>I am pleasantly surprised by this device.  I am happy to be a (relatively) early-adopter but I am looking forward to the updates and some of the features down the road.  My hope is that Microsoft rolls out features and updates early and often and continues to accept consumer feedback.</p> <p>I suspect that any non-smartphone user would be excited about this phone, as well as any of the early iPhone users.  My iPhone friends and non-smartphone users are all really impressed with the phone (especially the screen).</p> <p>If it is time to upgrade, you may wish to wait until later in the year, but if you pick up the Focus right now I don’t think you’d be disappointed.  If you use Hotmail, Live and have an Xbox, you’ll be geekin’ out.</p> ChipOnehttp://www.blogger.com/profile/16709607564824798285noreply@blogger.com0