WPF-Blogger.com [Language: en] http://www.wpf-blogger.com All news and information about Windows Presentation Foundation and Silverlight at one place. Freitag, 18. Mai 2012 Programming Windows 6th Edition Preview Ebook Is Here! <p> The long-awaited 6th edition of <i>Programming Windows</i> is scheduled to be published by Microsoft Press in November 2012, but you can purchase the ebook direct from the O'Reilly website today: </p><p>... more ...</p> http://www.charlespetzold.com/blog/2012/05/Programming-Windows-6th-Edition-Preview-Ebook-Is-Here.html Charles Petzold 3759 2012-05-17T15:53:34 Listbox, Why Art Thou Blanking? <p>One of the biggest performance changes for developers using Silverlight in Mango (WP 7.5) is off-thread input for ListBox. In a nutshell this basically means that all any flick or pan a user makes on a ListBox is handled by a dedicated thread, the Direct Manipulation (DM) thread, instead of the UI thread. By connecting the DM thread to the Compositor thread (that’s the one that does all the drawing to the screen independent of the UI thread) we have a ListBox that moves smoothly even when the UI thread is completely blocked.</p> <p>Unfortunately this also comes with a price – the ListBox is now so responsive and moves so fast that the Listbox can run out of content to display to the user as the user is flicking, and blank – basically drawing nothing except for an updated ScrollBar (so the user knows he’s still moving in the ListBox, but it doesn’t help much) and the background while the UI thread scrambles to bring in new items to fill up the holes.</p> <p><b>My ListBox isn’t blanking, why do I care about this blog post?</b></p> <p>You care because you care about your users. You’re the kind of dev who knows that even though he’s got a great, powerful phone, not everyone does. You care because you are proud to call yourself a developer. You care because… ok, back to reality. </p> <p>With the release of Tango, Windows Phone is now supported on lower powered machines which often have slower hardware and less memory, so even though your device shows no blanking, others may see blanking, especially if they’re rocking a new, lower powered, Tango phone. This post will help give you the tools that let your app run smooth, with hardly any blanks, even on those phones.</p> <p><b>My ListBox is not blanking, but it’s really jerky during scroll</b></p> <p>Holy Smokes Batman! Jerky scrolling is all but eliminated in the new ListBox, even for WP7 apps – are you sure you’re using it? There’s a good chance you’re using the original LongListSelector (LLS) from the <a href="http://silverlight.codeplex.com/">toolkit</a>, which doesn’t auto-update when you move your project to Mango. To take full advantage of the new ListBox improvements you need to download the latest toolkit from <a href="http://silverlight.codeplex.com">http://silverlight.codeplex.com</a> and update to the new LLS which is based on the platform’s ListBox.</p> <p><b>Why does blanking occur: the nitty gritty</b></p> <p>There are a couple of common code / design reasons that cause a ListBox to blank, but in general it all boils down to the amount of time it takes to bring in a new item. The ListBox maintains a one screen buffer of items in each direction which moves with the user’s viewport as they scroll around. If the ListBox can’t fill that buffer in the direction of the scroll fast enough, you get blanking.</p> <p><a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/0333.clip_5F00_image002_5F00_7C463585.png"><img title="clip_image002" style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="clip_image002" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/3487.clip_5F00_image002_5F00_thumb_5F00_25BD0777.png" width="78" height="292" /></a></p> <p align="center"><b><i>Diagram 1: </i></b>In a stationary world, when there is no scrolling going on, the user will be looking at the center screen and there will be buffered items waiting to be shown in both directions</p> <p>Filling the buffer takes a few steps, namely creating an Item Container (if a suitable one from the excess buffer in the other direction doesn’t already exist) and Data Binding the new item’s content (which kicks off the Measure pass). All of these updates occur on the UI thread and they all happen at once (not item by item) so if a flick is fast and the ListBox realizes that it needs to draw a full screen worth’s of items it will block the UI thread while it does just that. </p> <p><a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/2313.clip_5F00_image004_5F00_6586EDFC.png"><img title="clip_image004" style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="clip_image004" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/2728.clip_5F00_image004_5F00_thumb_5F00_13080DC0.png" width="154" height="319" /></a></p> <p align="center"><b><i>Diagram 2:</i></b> As the user moves downwards we balance the buffers by transferring the excess buffer from the top buffer (red) to the bottom buffer and re-databind it to the new data, maintaining 1 screen of buffer in each direction.</p> <p>But if the user flicks again while the UI thread is blocked bringing in buffer items, we’ll get even more out of sync and move completely out of our buffer space – since there is nothing in the Control to draw (remember, the ListBox is still scrambling on the UI thread to bring the new items in, it’s just too slow) you just get the background, i.e blankness.</p> <p><b>If there’s nothing to draw, why is the ListBox still moving? Or, look at it from another angle:</b></p> <p>As we mentioned earlier, scrolling is now off-thread, so from the Compositor’s point of view it’s moving the ListBox and everything in it, the problem is that the UI thread hasn’t stuck anything in it (at that position) yet, so we blank.</p> <p><a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/5140.clip_5F00_image006_5F00_40892D83.png"><img title="clip_image006" style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="clip_image006" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/3326.clip_5F00_image006_5F00_thumb_5F00_02FBCFBA.png" width="144" height="356" /></a></p> <p align="center"><b><i>Diagram 3:</i></b> Fast flicking a few times get you into this situation, where we have excess buffer above which we are trying to move downwards, but because there is so much of it and the UI thread is blocked trying to bring these items in we don’t finish in time and the user sees blankness (black) until the items are ready, at which time they simply appear.</p> <p><b>So why is *my* ListBox blanking? And how do I fix it?</b></p> <p>Let’s run through a couple of common reasons why ListBoxes blank, with some proposed solutions to each one.</p> <p>1. <b>Using ValueConverters in your template <br /></b> <br />ValueConverters are great – they allow you to transform your data on the fly as they are being DataBound into your items. Unfortunately they incur a UI thread cost – we need to transition from Silverlight into User Code, run your converter and then return. If your converter is heavy or you’re using lots of them in your template, then this will introduce blanking. <br /> <br />Question to ask yourself: does this code look like it can run in a trivial amount of time across all of the elements being brought in for a given frame? If not, you probably should explore a different way of doing the DataBinding. For example,you can have the object translate the values on population / property get time instead of using a converter - even though this may break your Data Model this can significantly reduce the DataBinding cost (and you could always wrap your object in a ViewModel).</p> <p><b>2. </b><b>Complex DataTemplates</b></p> <p>When an item is moved from one buffer to another during a scroll, ListBox is usually smart enough to determine that this is the same kind of item and just update the data in the item. While this might sound cheap this dirties the item causing it to be remeasured. If your template is complex you will find that a lot of your time is wasted in Measure – remeasuring the layout of the control now that the data has been updated. <br /> <br />Fixing this is very per-scenario. Some general guidelines are to make sure to only use a container if you really need the options it provides – do you have a Grid within a Grid? Could you replace all of your Grids with a simple Canvas or maybe a StackPanel?</p> <p><b>3. </b><b>Decoding images on the UI thread</b></p> <p>By default all images are decoded synchronously on the UI thread, so if you have something like this:</p> <p><font face="Consolas">&lt;Image Source=”{Binding ImageUrl}”/&gt;</font></p> <p>you're going to block the UI thread for however long it takes to decode your image. Luckily there’s an easy fix for this, change your template to read as follows:</p> <p><font face="Consolas">&lt;Image&gt; <br />&#160; &lt;Image.Source&gt; <br />&#160;&#160;&#160; &lt;BitmapImage UriSource=&quot;{Binding ImgUrl}&quot; CreateOptions=&quot;BackgroundCreation&quot;/&gt; <br /></font><font face="Consolas">&#160; &lt;/Image.Source&gt; <br />&lt;/Image&gt;</font></p> <p>Note that this does come with some caveats – older images will still show up until the new ones are loaded and the user may see a visual pop-in of the image when it is done loading, but these can all be worked around and massaged into a nice user experience that is not harmed by excessive image decode.</p> <p>For further details see <a href="http://blogs.msdn.com/b/slmperf/archive/2011/06/13/off-thread-decoding-of-images-on-mango-how-it-impacts-you-application.aspx">this blog post</a>.</p> <p><b>4. </b><b>Using </b><a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.itemscontrol.preparecontainerforitemoverride(v=vs.95).aspx"><b>PrepareItemForContainerOverride</b></a><b> to dynamically select a template</b></p> <p>A simple list item is often times just not good enough – your app has an image item, a text item, a video item, a link item etc. etc. and you have a different template for each one of them. A common pattern is to use the ListBox’s PrepareItemForContainerOverride callback to dynamically change the container’s template based on what item is being databound. </p> <p>Unfortunately, doing this can completely throw off the ListBox’s buffering technique – the ListBox sees that the container that it had in its buffer is not the type that you need and junks it, wasting even more time on the march to blankness.</p> <p><strong>So how do I solve this?</strong> Surprisingly enough, it is often cheaper to have all of your template parts in one large template (yes, yes, I know about point 2 above – keep reading!) with each mini-template collapsed if it does not apply. Since collapsed template items incur next to no cost during layout, they have next to no impact on run time (though there is a slightly larger memory cost).</p> <p>And how do I get my different items to display on the different templates? Simple – databind to a new property on your classes which either has a type enumeration that runs through a value converter (ItemTypeToVisibility), these kinds of converters are often cheap, or wrap your class in a UI view model so that it has a property that returns the Visibility type directly. </p> <p><strong>5. Pulling data from [favorite heavy source] as part of your binding <br /></strong> <br />The properties you bind to should have simple getters (setters is a different story) – always. If you have logic like this: <br /></p> <p><font face="Consolas">public int Rating <br />{ <br />&#160; get <br />&#160; { <br />&#160;&#160;&#160; &lt;read from database&gt;&#160;&#160;&#160; <br />&#160;&#160;&#160; - or - <br />&#160;&#160;&#160; &lt;read from IsoStore&gt; <br />&#160;&#160;&#160; - or - <br />&#160;&#160;&#160; &lt;parse out some XML&gt; <br />&#160;&#160;&#160; - etc -&#160;&#160;&#160; <br />&#160; </font><font face="Consolas">} <br />}</font></p> <p> <br />then you’re doing something wrong. This kind of logic is fine for a property that you know is only read very rarely, if at all, but if it’s in a ListBox then it most likely is going to be seen and you should be initializing the data up front. <br /> <br />Don’t get me wrong – you don’t need to load everything as you are pulling in 1000 items to your list, but you can certainly do it on a background thread as a deferred task kicked off in the constructor of your object. If your objects are really heavy and memory is becoming an issue then you have a few possible routes:</p> <ul> <li>Implement a completely delayed load by hooking into the ListBox’s scroll amount or compression states and only loading more items when you get to the end of the list <br /></li> <li>Implement a DoubleLinkedObservableCollection, where each item in the collection knows about the next node (in each direction) and when it gets databound (based on one of the properties) it notifies X number of nodes on each side to make sure they all have their data ready to go. This should be done on a background thread, just don’t forget to Dispatch back to update any properties that raise a PropertyChanged event.</li> </ul> <p>6. <b>Cut down background work <br /></b> <br />With only one core any background thread can interfere with the smoothness of the UI thread. Although background threads get a much smaller time slice compared to the UI thread, enough of them vying for time will effectively starve the UI thread. <br /><a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/0118.clip_5F00_image008_5F00_1B8B6D0A.png"><img title="clip_image008" style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="clip_image008" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/8228.clip_5F00_image008_5F00_thumb_5F00_3010BC88.png" width="567" height="137" /></a></p> <p align="center"><em>Diagram 4:</em> Fictional time slice showing the effects of more background threads (not to scale)</p> <p><i></i></p> <p>Across any given slice of time, the UI thread will be allowed to run longer than any other thread, but is effectively running at the same priority, hence it is forced to yield to the background threads when its time is up. The more background threads, the longer it is before you get back to the UI thread so that it can complete its task.</p> <p><b>Moral of the story?</b> Be wise about the number of active background, especially in high stress scenarios. Stick to using a thread pool so that you can queue up your work without it all trying to run at the same time.</p> <p><b>I’ve tried all the above, it’s still blanking and I only have a couple of screens of data – help!</b></p> <p>If you find yourself blanking on a relative small set of data (approximately 3-5 screens), then it might be time for drastic measures. As mentioned above the cause for blanking is the amount of time it takes to bring in new items with new data as the user is scrolling, i.e. the virtualization overhead is the culprit. If you disable virtualization on your list, you’ll generate of all your items up front and scrolling will be blankless. To do this, add the following to your XAML:</p> <pre><code><font face="Consolas">&lt;ListBox.ItemsPanel&gt;<br /> &lt;ItemsPanelTemplate&gt;<br /> &lt;StackPanel&gt;<br /> &lt;/StackPanel&gt;<br /> &lt;/ItemsPanelTemplate&gt;<br />&lt;/ListBox.ItemsPanel&gt;</font></code></pre> <font size="2" face="Consolas"></font> <p>While making this change is relatively simple, the impact can be drastic – no more blanking, but it comes at a cost:</p> <ol> <li>Startup time for the Page increases – we now have to realize more items, so it’s going to take longer <br /></li> <li>Memory – same as above, more items hanging around, larger memory cost</li> </ol> <p>If you give it a try on a low end device and startup and memory look acceptable – then this is your magic bullet!</p> <p><b>So what are we left with?</b></p> <p>Hopefully at this point you have a non to minimally blanking list, which scrolls smoothly and generally delights your users! Have you run into any other pitfalls that you think others should be warned of? Let us know below!</p> <p>Running into other, unrelated performance issues? Drop us a line and we'll see if we can focus on them in a future blog post (stay tuned for a &quot;memory&quot; series coming soon).</p><div style="clear:both;"></div><img src="http://windowsteamblog.com/aggbug.aspx?PostID=581658" width="1" height="1"> http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/05/16/listbox-why-art-thou-blanking.aspx Windows Phone Dev Blog 3760 2012-05-17T02:53:58 MSDN Webcast series on building Metro style apps <p>A few colleague evangelists are doing a series on MSDN Webcasts on building Windows 8 Metro style apps..&#160;&#160; <br />Catch the whole series and get a very concise, yet comprehensive introduction to building Metro style apps..&#160;&#160; <br />See below for abstracts and presenter for each session, click on the title for each session to visit the registration page for that session <br />Each session is one hour.&#160; </p> <p>&#160;</p> <p><strong>Monday May 14th, 2012&#160; 8:30 AM PST <br /></strong><strong><font size="3"><a href="https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032513506&amp;Culture=en-US" target="_blank">Introduction to the Windows 8 platform and the Windows store</a> <br /></font><a href="http://blogs.msdn.com/b/jennifer/" target="_blank">Jennifer Marsman</a> <br /></strong>Windows 8 is Windows re-imagined!&#160; Join this session to learn about the new platform for building Metro-style applications.&#160; Get an understanding of the platform design tenets, the programming language choices, and the integration points with the operating system and across Metro-style apps.&#160; We will also discuss the enormous opportunity for developers to make crazy money with the Windows Store.&#160; You will walk away with the resources to begin writing Metro applications for Windows 8. <br /></p> <p><strong>Wednesday, May 16th, 2012&#160;&#160;&#160; 8:30 AM PST <br /><a href="https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032513509&amp;Culture=en-US" target="_blank"><font size="3">Designing apps with Metro style principles and the Windows personality</font></a> <br /><a href="http://21stcenturystory.com/" target="_blank">Chris Bernard</a> <br /></strong>Metro style design has a set of five guiding principles to help you make the best choices when designing your app. These principles are the foundation for building great Metro style apps. Consider these principles as you plan your app, and always ensure your design and development choices live up to these principles.</p> <p>&#160;</p> <p> <br>Monday, May 21, 2012&#160;&#160;&#160; 8:30 AM PSTJohn WieseMonday, May 21, 2012&#160;&#160;&#160; 8:30 AM PST</br> <strong>Monday, May 21, 2012&#160;&#160;&#160; 8:30 AM PST <br /></strong><a href="https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032513518&amp;Culture=en-US" target="_blank"><font size="3">Building Metro style apps with XAML: What .NET developers need to know</font></a><font size="3">&#160;&#160;&#160; <br /></font><strong>John Wiese</strong></p> <p>If you are experienced with .NET or Silverlight and are already familiar with XAML, this session will teach you everything you need to know to create a Metro style app for Windows 8. This session will cover updates to familiar features and explore concepts that are new for Windows 8. We’ll talk about building reusable Windows Runtime Components in C#, Async programming in Windows 8 and both the Visual Studio and Expression designers. This session will show you how to turn your XAML skills into money-making Metro style apps.</p> <p> <br /><strong>Wednesday May 23, 2012&#160;&#160;&#160; 8:30 AM PST <br /><a href="https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032513647&amp;Culture=en-US" target="_blank"><font size="3">What HTML developers need to know about coding Windows 8 Metro style apps</font></a> <br /><a href="http://palermo4.com/" target="_blank">Michael Palermo</a> <br /></strong>This session is perfect for any web developer wanting to leverage his/her skillset to develop Windows 8 Metro style apps. The session begins by proving how much web developers already know about building apps for Windows 8. The focus then turns to how to write JavaScript code with WinJS. Key points for Metro style app development will be highlighted by implementing popular feature requests using HTML5, CSS3, and JavaScript.</p> <p><strong>Thursday, May 31, 2012&#160;&#160;&#160; 8:30 AM PST <br /><a href="https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032513520&amp;Culture=en-US" target="_blank"><font size="3">Win as One: How Contracts in Windows 8 Help You Build a Killer Metro App</font></a> <br /><a href="http://www.devhammer.net/" target="_blank">G. Andrew Duthie</a> <br /></strong>Contracts are agreements between Windows and your Metro style app that allow you to integrate Windows 8 features into your app. For example, Windows 8 lets users share content from one application to another by using the Share contract. </p> <p>In this session, you'll learn how contracts work and how to implement the built-in contracts such as Search, Share, Settings, and More. With Contracts, you can help users get more out of your app, and in a way that is consistent and intuitive, and they will reward you by coming back to your app again and again. <br /></p> <p><strong>Monday, June 4th, 2012&#160;&#160;&#160;&#160; 8:30 AM PST <br /></strong><a href="https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032513524&amp;Culture=en-US" target="_blank"><font size="3">Bring Your Windows 8 Metro Style Apps to Life with Tiles and Notifications</font></a> <br /><strong><a href="http://blogs.msdn.com/b/cbowen/" target="_blank">Chris Bowen</a></strong></p> <p>Tiles and Notifications are important ways to draw attention to your app and improve your users' experiences.&#160; Tiles can draw users back into your app when your tile comes to life on Start screen.&#160; They can also let users personalize their Start screen by creating deep links to specific places within your app.&#160; Notifications, delivered through the Windows Push Notification Service, can inform and draw your users back into your app even when it's not running.&#160; <br />In this session, you will learn how to effectively implement Tiles and Notifications to help your apps shine.</p> <p>&#160;</p> <p><strong>Wednesday, June 6th, 2012&#160;&#160;&#160; 8:30:00 AM PST <br /></strong><a href="https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032513534&amp;Culture=en-US" target="_blank"><font size="3">Building Windows 8 Metro style casual games using HTML 5</font></a> <br /><a href="http://blogs.msdn.com/b/davedev/" target="_blank">David Isbitski</a></p> <p>The intent of this session is to help HTML5/JavaScript developers with writing their first Metro Style App in a fun, immersive way. We will cover the basics of HTML5 Canvas gaming and how we can easily bring it to Windows 8.&#160; We will then add additional game functionality as we introduce HTML5 Audio,&#160; CSS3 styling and web fonts, implementing a game loop with JavaScript, 3rd party frameworks, touch, camera, accelerometer, and WInJS controls.&#160; </p> <p>&#160;</p> <p>&#160;</p> <p>I will be watching. I hope you join us. </p> <p>Happy WIndows 8 coding! </p><div style="clear:both;"></div><img src="http://blogs.msdn.com/aggbug.aspx?PostID=10304119" width="1" height="1"> http://blogs.msdn.com/b/jaimer/archive/2012/05/10/msdn-webcast-series-on-building-metro-style-apps.aspx Jaime Rodriguez [MS] 3755 2012-05-11T08:50:11 Programming Windows 6th Edition Preview Ebook Coming! <p> If all goes according to plan, in one week, on May 17, 2012, you will be able to purchase a preview ebook of <i>Programming Windows</i>, 6th edition, for just $10. For that one-time payment of $10, you will also get the second preview ebook a couple months from now, and the final ebook later this fall. </p><p>... more ...</p> http://www.charlespetzold.com/blog/2012/05/Programming-Windows-6th-Edition-Preview-Ebook-Coming.html Charles Petzold 3754 2012-05-10T18:40:13 Memory Profiling - The Heap Summary View <p>In an <a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/19/memory-profiling-launching-graphs-and-markers.aspx">earlier post</a> we looked at how we can gain broad insight into an application scenario’s memory characteristics and how the graph and markers drew our attention to ranges of execution for further analyses. Recall that in the <a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/02/01/memory-profiling-for-application-performance.aspx">memory leak diagnosis case</a> we chose to analyze only the time range over which we observed the increase in memory usage. Indeed, that is a key first step to the analysis: filtering the memory activity data by a time range. The <b>Heap Summary </b>view is the result of such filtering, and represents the population of the heap during the chosen time range.</p> <h1>Heap Summary View</h1> <p>The Heap Summary view presents, in tabular form, a demographic analysis of the population of the heap.</p> <p>In human population demographics, data collection happens through a census as well as through a continuous update to registries that track births, deaths, migration of place of residence and the like. The data collection in the case of heap population demographics is no different. “Births” map to allocations, “deaths” map to objects’ memory collected by the GC, and “migration of place of residence” maps to the migration of objects between the Gen0 region of the heap and the Gen1 region. A census of the heap at the start of time range identifies all incumbent objects (i.e. that were in existence). Births, deaths, and migrations are updated continuously, and a final census at the end of the time range identifies all the objects that were retained. In order to have a consistent terminology, we refer to the incumbent objects at the start as objects that were “retained” at the start.</p> <p>Managed Silverlight Visual elements (i.e. objects that go into the Silverlight visual tree) are not just plain old managed objects. These might be facades with backing native-implementations holding native memory and during the course of execution might create and hold on to texture memory. Casual use of such elements in code can even lead to subtle leaks. From this perspective, subsequent analysis can be made easier if Silverlight Visual elements were tracked and reported separately from plain old managed objects. And this is precisely how they are tracked and reported through the Heap Summary view. Continuing with the demographic analogy, such classification has precedent in social demographics where human populations have been classified on ethnicity.</p> <p>Armed with this context, let us study the following Heap Summary view from the <a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/02/01/memory-profiling-for-application-performance.aspx">memory leak diagnosis case</a>:</p> <p><a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/1055.image_5F00_797B31D3.png"><img style="display: inline; background-image: none;" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/7536.image_5F00_thumb_5F00_086260EE.png" width="508" height="365" /></a></p> <p>The shaded region across the graph and markers indicates the time range used as the filer.</p> <p>The census at the start reports 5576 instances of managed type objects accounting for about 283 KB and 26 instances of Silverlight Visual elements accounting for about 13 KB. In terms of incumbency the plain old managed objects dominate.</p> <p>The churn happening within the selected time range is reported as 10615 instances allocated (births) and 11590 instances collected (deaths), accounting for about 23 MB each. The counts and sizes are somewhat balanced and cancel each other out to an extent. And this is borne out by the census at the end for the managed objects; the census at the end reports 4601 instances of managed type objects accounting for about 223 KB, which is just a little lower than what we had at the start. However, it also reports 69 instances of Silverlight Visual elements accounting for about 4 MB now (up from 13KB at the start).</p> <p>When we correlate this table with the graph, our suspicion is drawn towards the Silverlight visuals. Why did their count go up, and why are they accounting for so much more memory? Within the filtered time range, memory usage has been steadily increasing too. Could we be leaking memory? Could we be leaking some part of visual tree itself? And there even seem to be images being loaded along the way; might we be leaking their texture memory too? We wonder.</p> <p>Clearly, the next lead to follow is to get more visibility into what are those “Retained Silverlight Visuals at End”.</p> <h1>Summary</h1> <p>The Heap Summary view presents, in tabular form, a demographic analysis of the population of the heap. Interpreting the data in the table and correlating it with the graph and markers by itself can be used to make educated guesses at what could potentially be the problem, but equally importantly it serves to inform the next step in the performance investigation, as we shall see.</p><div style="clear:both;"></div><img src="http://windowsteamblog.com/aggbug.aspx?PostID=581472" width="1" height="1"> http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/05/10/memory-profiling-the-heap-summary-view.aspx Windows Phone Dev Blog 3753 2012-05-10T18:24:11 Silverlight 5.1.10411.0 Released Today <p>Today we released a minor update to Silverlight 5. The 32 and 64 bit update version number is 5.1.10411.0. (The documentation said 5.2 at first, but this has been fixed.)</p> <p><em>This will be rolled out to everyone. We throttle large updates of products at the start, so for some folks it was not automatically downloaded this morning.</em></p> <p>This is primarily an important security update addressing an <a href="http://technet.microsoft.com/en-us/security/bulletin/ms12-034" target="_blank">TrueType security issue that was reported across a large number of products</a>. Some folks (like me) have reported issues seeing the TechNet page which has the information about the security issue, so I've repeated it here:</p> <blockquote> <p>Executive Summary</p> <p>This security update resolves three publicly disclosed vulnerabilities and seven privately reported vulnerabilities in Microsoft Office, Microsoft Windows, the Microsoft .NET Framework, and Microsoft Silverlight. The most severe of these vulnerabilities could allow remote code execution if a user opens a specially crafted document or visits a malicious webpage that embeds TrueType font files. An attacker would have no way to force users to visit a malicious website. Instead, an attacker would have to convince users to visit the website, typically by getting them to click a link in an email message or Instant Messenger message that takes them to the attacker's website.</p> <p>This security update is rated Critical for all supported releases of Microsoft Windows; for Microsoft .NET Framework 4, except when installed on Itanium-based editions of Microsoft Windows; and for Microsoft Silverlight 4 and Microsoft Silverlight 5. This security update is rated Important for Microsoft Office 2003, Microsoft Office 2007, and Microsoft Office 2010. For more information, see the subsection, Affected and Non-Affected Software, in this section.</p> <p>The security update addresses the most severe of these vulnerabilities by correcting the manner in which affected components handle specially crafted TrueType font files and by correcting the manner in which GDI+ validates specially crafted EMF record types and specially crafted EMF images embedded within Microsoft Office files. For more information about the vulnerabilities, see the Frequently Asked Questions (FAQ) subsection for the specific vulnerability entry under the next section, Vulnerability Information.</p> <p>Recommendation. The majority of customers have automatic updating enabled and will not need to take any action because this security update will be downloaded and installed automatically. Customers who have not enabled automatic updating need to check for updates and install this update manually. For information about specific configuration options in automatic updating, see <a href="http://support.microsoft.com/kb/294871">Microsoft Knowledge Base Article 294871</a>.</p> <p>For administrators and enterprise installations, or end users who want to install this security update manually, Microsoft recommends that customers apply the update immediately using update management software, or by checking for updates using the <a href="http://go.microsoft.com/fwlink/?LinkID=40747">Microsoft Update</a> service.</p> <p>See also the section, Detection and Deployment Tools and Guidance, later in this bulletin.</p> </blockquote> <p>This is more of a GDR level release, but we needed to follow a new version number scheme. The version number doesn't indicate major functionality change or enhancement, but is actually a product of the build process. I'm reading the pages of discussion in our bug database covering this versioning numbering and the reasons why it went to 5.1. It really only makes sense if you're using our internal build tools :)</p> <p><strong>Note also, that as was the case in the Silverlight 4.0 to 4.1 updates, we reset the build number.</strong> This shouldn't be a problem unless you have code that is checking a build number without looking at the version number as a whole.</p> <p>Release history from <a href="http://www.microsoft.com/getsilverlight/locale/en-us/html/Microsoft%20Silverlight%20Release%20History.htm"> http://www.microsoft.com/getsilverlight/locale/en-us/html/Microsoft%20Silverlight%20Release%20History.htm</a></p> <blockquote> <p>Silverlight 5 Build 5.1.10411.0 Released May 8, 2012&nbsp;</p> <p>All updates to Microsoft Silverlight include functional, performance, reliability and security improvements and are backward compatible with web applications built using previous versions of Silverlight.</p> <ul> <li>Fixes Security issue described in the following Microsoft Knowledge Base article:&nbsp; <a href="http://support.microsoft.com/kb/2636927" target="_blank">2636927 MS12-034</a>: Description of the security update for Microsoft Silverlight: May 8, 2012</li> <li>Fixes an issue where "Best Effort" Silverlight Digital Rights Management Output Protection levels failed on some machines.</li> <li>Fixed a failure to update OOB applications that are configured to use elevated trust when in browser.</li> <li>Fixes an issue where persistent license acquisition would fail when a customer upgrades from Silverlight 4 to Silverlight 5.</li> <li>Fixes an issue where certain character combinations can cause Silverlight application to crash.</li> <li>Fixes an Access Violation described in the following Connect issue <a href="https://connect.microsoft.com/VisualStudio/feedback/details/719572"> https://connect.microsoft.com/VisualStudio/feedback/details/719572</a></li> <li>Fixes an issue where the SL5 plugin displays blank window after installing a font with a font name that starts with "&amp;".</li> <li>Fixes an issue where moving a focus to TextBox or RichTextBox after moving a focus to ItemsControl causes IME to be disabled.</li> <li>Fixes an issue where Silverlight would not play content which required Output Protection.</li> <li>Fixes a Silverlight DRM issue where some customers encounter hardware ID mismatch errors which can only be resolved by re-individualization.</li> </ul> </blockquote> <p>Be sure to let us know if you run into any issues with this release.</p> <p><a href="http://feedads.g.doubleclick.net/~a/AknP-TuPvWx30uIDlhwLgsS2NzM/0/da"><img src="http://feedads.g.doubleclick.net/~a/AknP-TuPvWx30uIDlhwLgsS2NzM/0/di" border="0" ismap="true"></img></a><br/> <a href="http://feedads.g.doubleclick.net/~a/AknP-TuPvWx30uIDlhwLgsS2NzM/1/da"><img src="http://feedads.g.doubleclick.net/~a/AknP-TuPvWx30uIDlhwLgsS2NzM/1/di" border="0" ismap="true"></img></a></p><div class="feedflare"> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=0daURBXmLgQ:u9dItO9xqxc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=0daURBXmLgQ:u9dItO9xqxc:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=0daURBXmLgQ:u9dItO9xqxc:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=0daURBXmLgQ:u9dItO9xqxc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=0daURBXmLgQ:u9dItO9xqxc:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=0daURBXmLgQ:u9dItO9xqxc:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=0daURBXmLgQ:u9dItO9xqxc:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=0daURBXmLgQ:u9dItO9xqxc:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=0daURBXmLgQ:u9dItO9xqxc:gIN9vFwOqvQ" border="0"></img></a> </div><img src="http://feeds.feedburner.com/~r/PeteBrown/~4/0daURBXmLgQ" height="1" width="1"/> http://feedproxy.google.com/~r/PeteBrown/~3/0daURBXmLgQ/silverlight-51104110-released-today Pete Brown 3752 2012-05-09T21:54:33 Building Metro style apps with C++ event is now a live webcast <p>Two weeks ago, we announced an <a href="http://blogs.msdn.com/b/jaimer/archive/2012/04/23/announcing-the-building-windows-8-apps-with-c-windows-camp.aspx">all day training for those Building metro style apps with C++</a>..</p> <p>Event sold out&nbsp;within a few days, and we got a lot of requests for it to be recorded (or broadcasted live)..&nbsp;&nbsp;</p> <p>I am happy to announce that the event will now be live.&nbsp; Please pencil us in in your calendar. Event will be live on Friday May 18th, from 9 AM PST to 5 PM PST. <br /><br />We will share details (the link) and the agenda later this week.&nbsp;&nbsp; <br />We will aim to have two live Q&amp;As (one around noon PST) and one around 4 PM PST, we will take your questions via twitter.. Just follow the <span style="text-decoration: line-through;">#win8C++Camp</span> <span style="color: #ff0000;">(Updated on 5/10) #ch9live</span> hash on the day of the event..</p> <p>&nbsp;</p> <p>Please help us spread the word!! Hope you can join us on the 18th.</p> <p>Happy Windows 8 coding!!</p> <p>&nbsp;</p><div style="clear:both;"></div><img src="http://blogs.msdn.com/aggbug.aspx?PostID=10301727" width="1" height="1"> http://blogs.msdn.com/b/jaimer/archive/2012/05/07/building-metro-style-apps-with-c-event-is-now-a-live-webcast.aspx Jaime Rodriguez [MS] 3750 2012-05-07T11:09:00 Teaching kids electronics, electricity, and logic using littleBits <p>We homeschool our two children. Ben, is kindergarten age, Abby is pre-school age. My wife does, by far, most of the work there, including trucking them to specialized classes (art, music, gymnastics, karate, our homeschool group single day school, etc.) plus all the playdates with the other kids, and special events. Melissa even teaches several of the classes at the home school group. I generally deal with reading, since I'm in charge of story time with my son. Lately, we've split our time between him reading stories to me (I'm proud to say he's at about a 2nd grade level - you have to love personal tutoring) and me reading The Hobbit to him in preparation for the movie this Christmas. (JRR Tolkien is far wordier than I remember.)</p> <p>Melissa and I also split science duties. I've brought Ben to the <a href="http://www.ccbcmd.edu/catonsvilleplanetarium/index.html" target="_blank">Banneker planetarium</a> for a customized class arranged for our homeschool group in concert with one of the astronomy professors. I often bring Ben to <a href="http://serc.si.edu/" target="_blank">SERC</a> (Smithsonian Environmental Research Center) for their bi-weekly homeschool science class. It's nice to leave close to centers like that. Even in the 5-7 year old group, they do serious science. They worked with Microscopes to analyze feathers to explain what holds them together, learned about the scientific method, dissected something (unfortunately we missed that one), searched through oysters shells on the bay looking for shrimp, jellies, and fish, and much more.</p> <p><a href="http://10rem.net/media/84934/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_2.png" target="_blank"><img src="http://10rem.net/media/84939/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_thumb.png" width="650" height="268" alt="image" border="0" 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"/></a></p> <p>There are certain things that I allow the kids pretty much as much as I can afford (within reason): decent books and LEGO. The educational value of them both is apparent the minute the child starts interacting with them. Unlike TV, the computer (the kids share my old netbook), or Leapster (or Nintendo DS in the case of Ben), we don't limit the children's time on either of these. In addition, we keep a cabinet full of paper, markers, glue, paints, stickers, and other craft supplies which the kids can play with pretty much whenever they want. We like to keep things around that encourage creativity. We're not perfect by any means, but we've found that making this stuff easily accessible encourages experimentation (and large paint and glue stains on our kitchen table, and random things stuck together that you may not actually want stuck together).</p> <p>I tell you all this just to give you an idea of where we are with education in my family, and how important I consider it.</p> <p><em>Of course, none of these things are exclusive to homeschooling or to us. I'm proud of what we've done so far, but we just happen to be fortunate enough to live in an area with lots of free museums and programs geared towards home school students. Many others take advantage of these museums and programs as well, they just have to do it on the crowded weekends :).</em></p> <p><em>Note also that we generally teach both children the same things, although they follow their own interests. I tend to focus on Ben in this article not because we're teaching only him electronics and science, but because his age makes these things more appropriate right now.</em></p> <h3>Electronics and programming</h3> <p>One thing I've been <strong>trying to find a good way to teach is electrical/electronics basics and boolean logic</strong>. Not only is this an area of interest for me, but boolean logic forms the foundation of everything you do on a computer. I want my kids to have an understanding of this to complement their ability to use the computer (yes, both kids can use a mouse or track pad, Ben can type, albeit not quickly, as well). I've also found boolean logic just about the simplest math/logic you can get. I have no idea why I wasn't exposed to it formally until college (the only math class I've ever aced, besides 10th grade Geometry).</p> <p>Programming is great, but I <a href="http://10rem.net/blog/2012/05/01/symposium-session-gadgeteering-and-the-net-micro-framework" target="_blank">know from my own experience</a>, that making something happen *outside* a computer is far more impactful and memorable.</p> <p>One day, I had Ben in my home office and together we stuck a resistor and an LED in a little breadboard. Ben then touched the wire leads to a 3v battery pack I had around. <strong>He thought it was awesome that he could make an LED blink (again with the <a href="http://10rem.net/blog/2010/09/02/first-experiences-with-netduino-and-the-net-micro-framework" target="_blank">blinking LED</a>, the gateway drug of electronics &lt;g&gt;).</strong> I thought this was great too. However, this type of approach won't go far with a 6yo or 3yo, as it's too easy to let out the magic blue smoke. <strong>It doesn't encourage experimentation at their level.</strong></p> <p>For my two kids, I found the snap circuits kits a little too fine grained in what they do. It's much easier to connect the components compared to discrete leaded components and a breadboard, but you can still connect them incorrectly. The snaps are also bit difficult for the kids to work with, and you're really working with just an easier form factor for discrete components. <strong>Getting from empty to blinking LED is just as much work as it is with discrete components.</strong> There's still lots of value to these, however, so the set Santa brought for Christmas will simply stay around for a few years until the kids grow into it.</p> <p>As much as the kids like LEGO, the engineering and programming involved in the Mindstorms kits is also well above them right now. It's marked "10+" as a recall, so we still have time :)</p> <p>I'm not trying to turn my kids into computer programmers, although <strong>I think basic programming is as necessary a skill as any other for their generation</strong>. Recently, I ran across a project that started on Kickstarter, and then became its own company.</p> <h3>littleBits</h3> <p><a href="http://littlebits.cc" target="_blank">littleBits</a> is a company and a collection of kid-friendly hardware modules ("bits", do a mental substitution ever time I say "modules") that can be connected together to form simple electrical circuits. The starter kit comes with a number of bits including a power module, button, potentiometer, LED bar graph, and more. Shown below is the little bits kit along with seven additional modules I purchased. I <a href="http://www.makershed.com/littleBits_Starter_Kit_V_2_p/mklb2.htm" target="_blank">ordered the kit from makershed</a>, and the additional bits directly from littleBits.</p> <p><a href="http://10rem.net/media/84944/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_10.png" target="_blank"><img src="http://10rem.net/media/84949/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_thumb_4.png" width="650" height="390" alt="image" border="0" 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"/></a></p> <p>The overall design is <a href="http://10rem.net/blog/2012/02/24/open-source-hardware-and-why-you-should-care" target="_blank">Open Source Hardware</a>, with the <a href="https://github.com/littlebitselectronics/eagle-files" target="_blank">schematics available on github</a>.</p> <p>The connectors are custom fabricated modules which each contain three pins (or three pads) and a set of magnets. The pins are the typical Ground, Voltage, and Signal trio, with +5V as the standard high level. The polarization of the magnets prevents the modules from being connected incorrectly. Modules can be easily pulled apart, but the magnets are generally strong enough to stay connected during use (more on the connectors after I describe a few more things).</p> <p><a href="http://10rem.net/media/84954/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_25.png" target="_blank"><img src="http://10rem.net/media/84959/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_thumb_11.png" width="650" height="256" alt="image" border="0" style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px"/></a></p> <p>Each module is classified as either Input, Output, Power or Wire, and color-coded by its type (input: pink, output: green, power: blue, wire (and logic gates/routing): orange). Each is also supplied with Ground, +5V and the signal through the pins on those colored connectors. Three wires may not seem like much in the way of control, but there's a <a href="https://community.littlebits.cc/" target="_blank">thriving community doing cool things</a> with this simple standard.</p> <p>With perhaps the exception of the buzzing motor module (which has the vibrating motor attached with a few thin wires), everything is extremely robust and able to stand up to the use of kids of various ages. Both my son and daughter enjoyed playing with them.</p> <p><a href="http://10rem.net/media/84964/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_12.png" target="_blank"><img src="http://10rem.net/media/84969/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_thumb_5.png" width="218" height="164" alt="image" border="0" 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"/></a> <a href="http://10rem.net/media/84974/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_14.png" target="_blank"><img src="http://10rem.net/media/84979/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_thumb_6.png" width="129" height="164" alt="image" border="0" 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"/></a> <a href="http://10rem.net/media/84984/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_32.png" target="_blank"><img src="http://10rem.net/media/84989/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_thumb_14.png" width="151" height="164" alt="image" border="0" 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"/></a> <a href="http://10rem.net/media/84994/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_18.png" target="_blank"><img src="http://10rem.net/media/84999/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_thumb_8.png" width="144" height="164" alt="image" border="0" 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"/></a></p> <p><em>(the photos aren't instagrammed, they just have poor lighting)</em></p> <p>Obviously the children each got something a little different from the process. Both enjoyed connecting them up and making something happen. Ben was able to understand the basic flow of electricity, and even a little about "AND" and "OR" logic gates. Abby enjoyed connecting all the pieces in a long chain, but also liked when she was able to test her strength against the pressure sensor (power + pressure sensor + LED bar graph == strength tester).</p> <p>Ben also liked trying to connect every possible module to make something giant. However, after playing with it a third time, <strong>he started to understand a very important aspect of software and hardware design: build in small steps and test after each step</strong>. I can think of a number of professional developers who could benefit from this :)</p> <p><a href="http://10rem.net/media/85004/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_8.png" target="_blank"><img src="http://10rem.net/media/85009/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_thumb_3.png" width="650" height="296" alt="image" border="0" 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"/></a></p> <p>My son's attention span is about the same as mine: 20 minutes. After that, he tends to get pretty antsy. (This is why you generally don't find me attending sessions by other speakers, or you see me sitting in the back and bailing when the session is half over. Nothing personal!) The littleBits did keep him engaged that entire time. <strong>More importantly, in the two days I've had these, he has played with them three times.</strong> Over time, they will likely only hold his attention if we add on newer modules that do different things. Kids are all about doing, not learning. The way to get them to learn is to get them to do, and the way to get them to do, is to find something that makes it dead simple to do something right off the bat. The littleBits definitely fit the bill here.</p> <p>During the third time playing with the bits, Ben really started to grasp the concept of the flow of electricity. He wanted to know what exactly it was. I found the water analogy good enough for our discussion here, especially since it helps explain the potentiometer and buttons very well. He even figured out, on his own, how the pressure sensor conceptually works.</p> <h4>Logic</h4> <p>Once you have the basics of electricity down, you can start messing with logic. I had ordered both an AND and an OR module. Each module takes two inputs and has a single output. As you would expect, both inputs must be powered for AND to produce output, and only one in the case of OR.</p> <p>Here's a simple AND gate made using: Power module, branch module, button and wire modules on top, button and wire modules on the bottom, and then the AND module and an LED module on the other ends of the wires. It demonstrates a logical "AND". That is, the LED will light only if both buttons are pressed.</p> <p><a href="http://10rem.net/media/85014/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_6.png" target="_blank"><img src="http://10rem.net/media/85019/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_thumb_2.png" width="650" height="263" alt="image" border="0" 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"/></a></p> <p>The other circuits shown have been built by Ben or Abby. In this case, I built this circuit for Ben to show logic. I wouldn't necessarily expect him to come up with it on his own, although he was able to grok the concept of AND very easily from this. <strong>This is far more interactive, visual, and intuitive when compared to a truth table</strong>.</p> <h3>One issue with littleBits</h3> <p>littleBits isn't without issues, however. <strong>There's one design issue which, to me, prevents this from being the perfect learning tool.</strong> Their pin design doesn't have much compensation for poorly aligned connectors. Sprung, semi-pointed pins on one side contact flat pads on another. The pins are sprung, but the tolerance for a good connection is still pretty tight, as I found that even a slight amount of deviation from square on multiple modules can lead to connection issues for the circuit.</p> <p>This very slight deviation from square, as shown here, is enough to cause those connection issues:</p> <p><a href="http://10rem.net/media/85024/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_22.png" target="_blank"><img src="http://10rem.net/media/85029/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_thumb_10.png" width="450" height="341" alt="image" border="0" 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"/></a></p> <p>Unfortunately, these connectors are rigidly connected to the boards, presumably in some sort of mass manufacturing process. As anyone who has <a href="http://10rem.net/blog/2012/03/31/midi-module-assembly-instructions" target="_blank">ever developed boards with connectors</a> knows, not all these connectors will be perpendicular to the boards once assembled. In the worst case (which happens to be in the set I have), you end up with a situation that looks like this:</p> <p><a href="http://10rem.net/media/85034/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_4.png" target="_blank"><img src="http://10rem.net/media/85039/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_thumb_1.png" width="650" height="358" alt="image" border="0" 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"/></a></p> <p>Notice how the boards sit off above the table, arched like a bridge. Right to left, there's the power module, a button module, the RGB LED module, another button module and (off picture) a regular LED module. If you press either of those two button modules, it causes the module to flatten to the table top, and disconnects the connection at the RGB module. Either I got a particularly bad batch, or this is a common issue. Like <a href="http://msgboard.snopes.com/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=80;t=000015;p=0" target="_blank">bank rounding errors famously making a crook rich</a>, the problem compounds based on the alignment of the modules in a given circuit and the number of modules with this problem.</p> <p><strong>Generally, the impact here is really only with the button modules, and a little with the potentiometer module, and only when you have a few offending modules in a chain. It's the downward pressure required for the button that causes the problem.</strong> You can still have lots of fun without the buttons, or perhaps even put a folded bit of paper under the high module. You can also, for smaller circuits, simply pick it up and squeeze the button between your thumb and finger.</p> <p>With modules this small size, the main issue isn't any warpage on the PCB itself, but the mounting of the plastic connector to the PCB base. The connectors aren't really deep enough to keep square during factory assembly.</p> <p>If these modules were some inexpensive chinese thing from ebay (they're not. They're designed and assembled in the USA), I'd have expected this. However, at the prices of these modules (I'm in about $230 right now), this is an unexpected and surprising flaw. My RGB module, in particular, is really sensitive to this.</p> <p><strong>For the ones that are particularly bad, I'm going to request replacements. It may be that some slipped through production in the batch I have. Or it could simply be early production issues from a startup company trying to meet higher than expected demand. I would expect littleBits to make it right for any that are like this; they seem like an upstanding type of company.</strong></p> <p>Note that the littleBits site seems to show this issue with what I assume is a prototype kit in the slide show on the main page:</p> <p><a href="http://littlebits.cc/" target="_blank"><img src="http://10rem.net/media/85044/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_28.png" width="594" height="239" alt="image" border="0" 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"/></a></p> <p>If you tried to connect something else downstream from that LED bargraph, you'd run into alignment issues. (In this case, the LED bargraph appears to have a connector incorrectly alignment, but leaning inward instead of outward as mine do).</p> <p><strong>Caveats of the connectors aside, I still think this is a great kit to get for you and your children, and I do not hesitate to recommend it as a way to teach the things I've mentioned here.</strong> My recommendation is to simply check alignment when you get the kit, and ask for replacement of any bits that are particularly out of tolerance. Sometimes you can only tell once you connect them up a few different ways and get the compounded issue of multiple misaligned parts.</p> <h3>Building your own bits</h3> <p>Little bits has been taking ideas on their <a href="http://littlebits.cc/dreambits" target="_blank">dreamBits page</a> for some time now. The list sometimes gets overtaken by joke entries (they seem to clean those up regularly), but there are also some good ideas there. But what do you do if you want to just build the bits yourself?</p> <p>littleBits has been saying for a bit (haha! I crack me up) that they will have their connectors available for sale soon. I have no idea how much they cost, but I'm pretty sure I'll pick up at least a few to try creating my own modules/bits. There are lots of interesting components you could build out, including interfaces to microcontrollers to kick things up to the next level, should you wish.</p> <p>Once they release the connectors, I'll probably give a few ideas a shot, and not just to show the kids how you can create your own stuff. Why not? <strong>The grown-ups can have fun (and learn) too :)</strong></p> <p><a href="http://feedads.g.doubleclick.net/~a/qeMle2aBJfKLUXZUsKjbaYrbsMc/0/da"><img src="http://feedads.g.doubleclick.net/~a/qeMle2aBJfKLUXZUsKjbaYrbsMc/0/di" border="0" ismap="true"></img></a><br/> <a href="http://feedads.g.doubleclick.net/~a/qeMle2aBJfKLUXZUsKjbaYrbsMc/1/da"><img src="http://feedads.g.doubleclick.net/~a/qeMle2aBJfKLUXZUsKjbaYrbsMc/1/di" border="0" ismap="true"></img></a></p><div class="feedflare"> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=_J1x-sP2UDw:fmL0OLpG5Dg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=_J1x-sP2UDw:fmL0OLpG5Dg:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=_J1x-sP2UDw:fmL0OLpG5Dg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=_J1x-sP2UDw:fmL0OLpG5Dg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=_J1x-sP2UDw:fmL0OLpG5Dg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=_J1x-sP2UDw:fmL0OLpG5Dg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=_J1x-sP2UDw:fmL0OLpG5Dg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=_J1x-sP2UDw:fmL0OLpG5Dg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=_J1x-sP2UDw:fmL0OLpG5Dg:gIN9vFwOqvQ" border="0"></img></a> </div><img src="http://feeds.feedburner.com/~r/PeteBrown/~4/_J1x-sP2UDw" height="1" width="1"/> http://feedproxy.google.com/~r/PeteBrown/~3/_J1x-sP2UDw/teaching-kids-electronics-electricity-and-logic-using-littlebits Pete Brown 3749 2012-05-06T02:57:39 Yet Another Podcast #64–John Papa & Javascript http://feedproxy.google.com/~r/JesseLiberty-SilverlightGeek/~3/9a90IWHY32k/ Jesse Liberty [MS] 3748 2012-05-03T19:44:03 Delivering Rich Mobile Web Experiences in Windows Phone 7.5 (ESPN.com Case Study) <p>The Windows Phone Browser team has a goal of delivering the best web browsing experience on a smartphone. This goal has many components within our team: from the <a href="http://windowsteamblog.com/windows_phone/b/windowsphone/archive/2011/09/22/designing-ie9-mobile-putting-sites-in-the-spotlight.aspx">UI of the browser</a>, compatibility with a wide array of website layouts, and of course buttery-smooth rendering performance. However, even if we execute flawlessly on our end, we are missing a crucial piece - delivering a great web experience is fundamentally a <i>partnership</i> between our team and web developers. Achieving this goal means working together to ensure that your content and services are delightful for users to consume on Windows Phone. </p> <p>We understand that web development resources are always limited as you keep up with the increasing traffic from mobile devices, and the elusive &quot;write once, run everywhere&quot; promise of web development has not perfectly materialized. However, with IE9 for Windows Phone 7.5, we took a big step in the direction of this promise. By sharing a codebase with IE9 for the PC, we achieved identical <a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2011/09/22/ie9-mobile-developer-overview.aspx">support for new web standards</a> and pushed the envelope on real-world performance with <a href="http://youtu.be/PfYeoR3Ug4E">industry-leading hardware acceleration</a>. We wanted to hear about developing for IE9 on WP7.5 from web developers directly, so we decided to collect some feedback and share it on the blog. </p> <p>ESPN.com recently deployed their premium web experience to Windows Phone, and we thought it would be great to hear what they had to say about developing for IE9 on Windows Phone. As a side note, ESPN started looking into supporting Windows Phone because of a simple request I made on their support page. Lots of folks on my team are sports fans and were asking me about the site's experience on WP7.5, so I just dropped ESPN a note like any user would. The message was quickly routed to the mobile site team; I have immense respect for ESPN’s responsiveness and the system they have place to address user feedback. Here's what Mike Marrone, technical lead, had to say about developing for IE9 on WP7.5:</p> <blockquote> <p>Overall, it was an easy process. We support only WP7.5 and IE9 thanks to its very good CSS3/HTML5 support. We are in a convenient position of having an existing legacy mobile site that older devices can fallback to. Honestly, development for WP7.5 boiled down to a fairly basic process - IE9 on the PC, being nearly the same browser, was a great dev tool to get most of the way there before final QA on actual devices.</p> </blockquote> <blockquote> <p>Some other more specific development notes:</p> <ul> <li>The &quot;display: box&quot; CSS style is not supported on WP7.5. We use this in carousel experiences to transition elements left or right 100% of the viewport without having to programmatically determine the viewport size (which means the browser automatically updates the positioning upon device rotation, etc.). On WP7.5, we actually used a better alternative thanks to it being the only browser that currently supports the CSS &quot;vw&quot; unit (VERY useful). <br /><i>[Amin] See </i><a href="http://www.w3.org/TR/css3-values/#viewport-relative-lengths"><i>here</i></a><i> and </i><a href="http://snook.ca/s/1000"><i>here</i></a><i> for more information on vw units.</i></li> <li>The bulk of our CSS differences between WP7.5 and other supported devices was with gradients. WP7.5 has an easy fallback with filters so it was not a big development issue. <br /><i>[Amin] See </i><a href="file://tkzaw-pro-19/MyDocs4/aminl/My Documents/MSFT/Blog posts/msdn.microsoft.com/en-us/library/ms532997(v=vs.85).aspx"><i>here</i></a><i> for information on using Gradient Filters in IE9.</i></li> <li>JavaScript touch events would be a nice addition. <br /><i>[Amin] We hear you, stay tuned!</i></li> </ul> <p>We look forward to your continued great progress in mobile.</p> </blockquote> <p>As you can imagine, this was music to our ears! We often use IE on the PC to investigate bugs, and it was great to hear that the tools work well for web development outside of our offices too. We appreciate the feedback (it will inform our plans for future releases) and welcome additional feedback through the comments below. </p> <p>IE9 on Windows Phone is set up to support rich web experiences with great performance, and often all it takes is <a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2011/08/29/introducing-the-ie9-on-windows-phone-mango-user-agent-string.aspx">updating user-agent logic</a> and using <a href="http://blogs.msdn.com/b/ie/archive/2010/03/19/the-css-corner-about-css-corners.aspx">standards based (as opposed to vendor prefixed) HTML &amp; CSS</a>. ESPN invested a reasonable level of resources to do that and delivered a delightful experience to its users. I've definitely started to see the site pinned to Start around here, and I wouldn't be surprised if our senior managers are secretly checking ESPN during meetings.</p> <p>Here's a before (left) and after (right) screenshot of the ESPN.com experience on Windows Phone 7.5. We want to say thanks to ESPN, and we look forward to seeing more rich experiences light up!</p> <p align="left"><a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/5504.image_5F00_1C927520.png"><img style="display: inline; background-image: none;" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/2110.image_5F00_thumb_5F00_6DCCBC7D.png" width="241" height="400" /></a>&#160;&#160;&#160;&#160; <a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/6232.image_5F00_780DBB10.png"><img style="display: inline; background-image: none;" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/3652.image_5F00_thumb_5F00_6C0BCADC.png" width="241" height="400" /></a></p> <p><i>Special thanks to Krys Krycinski, Mike Marrone, and James Ballow at ESPN.</i></p> <p>Amin Lakhani <br />Program Manager, Windows Phone</p><div style="clear:both;"></div><img src="http://windowsteamblog.com/aggbug.aspx?PostID=581178" width="1" height="1"> http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/05/02/delivering-rich-mobile-web-experiences-in-windows-phone-7-5-espn-com-case-study.aspx Windows Phone Dev Blog 3746 2012-05-02T18:09:42 Symposium Session: Gadgeteering and the .NET Micro Framework <p>On April 24th I helped run the patterns &amp; practices Symposium 2012 Online on Channel 9. All of the <a href="http://channel9.msdn.com/Events/Patterns-Practices-Symposium-Online/Patterns-Practices-Symposium-Online-2012" target="_blank">videos are currently up and viewable on-demand</a>.</p> <p>As part of the event, I gave a <a href="http://channel9.msdn.com/Events/Patterns-Practices-Symposium-Online/Patterns-Practices-Symposium-Online-2012/Gadgeteering-and-hte-NET-Micro-Framework" target="_blank">talk on the .NET Micro Framework</a>. I had a ton of fun doing it, and got to show off a lot of great gear. Take a look and let me know what you think.</p> <p><a href="http://channel9.msdn.com/Events/Patterns-Practices-Symposium-Online/Patterns-Practices-Symposium-Online-2012/Gadgeteering-and-hte-NET-Micro-Framework" target="_blank"><img src="http://10rem.net/media/84912/Windows-Live-Writer_ad92dec766e0_D378_image_3.png" width="650" height="368" alt="image" border="0" 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"/></a></p> <p>I'll have the demos and presentation pptx uploaded shortly.</p> <p><a href="http://feedads.g.doubleclick.net/~a/WmCBJMpR_-Yq-8zoSwOkfdxZ1Jk/0/da"><img src="http://feedads.g.doubleclick.net/~a/WmCBJMpR_-Yq-8zoSwOkfdxZ1Jk/0/di" border="0" ismap="true"></img></a><br/> <a href="http://feedads.g.doubleclick.net/~a/WmCBJMpR_-Yq-8zoSwOkfdxZ1Jk/1/da"><img src="http://feedads.g.doubleclick.net/~a/WmCBJMpR_-Yq-8zoSwOkfdxZ1Jk/1/di" border="0" ismap="true"></img></a></p><div class="feedflare"> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=aRcLL0_mK28:2WVF0P8ny38:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=aRcLL0_mK28:2WVF0P8ny38:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=aRcLL0_mK28:2WVF0P8ny38:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=aRcLL0_mK28:2WVF0P8ny38:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=aRcLL0_mK28:2WVF0P8ny38:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=aRcLL0_mK28:2WVF0P8ny38:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=aRcLL0_mK28:2WVF0P8ny38:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=aRcLL0_mK28:2WVF0P8ny38:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=aRcLL0_mK28:2WVF0P8ny38:gIN9vFwOqvQ" border="0"></img></a> </div><img src="http://feeds.feedburner.com/~r/PeteBrown/~4/aRcLL0_mK28" height="1" width="1"/> http://feedproxy.google.com/~r/PeteBrown/~3/aRcLL0_mK28/symposium-session-gadgeteering-and-the-net-micro-framework Pete Brown 3743 2012-05-01T21:12:13 Visual Studio Achievements For Windows Azure Buzz <p><img style="margin: 0px 5px 0px 0px; display: inline; float: left" align="left" src="http://mschannel9-ht2.dl.msecn.net/vsachievements/azureBadge.png" />Here’s some links to posts and stories about the 15 new Windows Azure achievements added to Visual Studio Achievements:</p> <p><a href="http://www.neowin.net/news/visual-studio-adds-windows-azure-achievements">Visual Studio Adds Windows Azure Achievements</a><strong> <br /></strong>Neowin</p> <p><u><a href="http://www.i-programmer.info/news/99-professional/4123-azure-gamified-more-badges.html">Azure Gamified - More Badges!</a> <br /></u>I Programmer</p> <p><a href="http://blogs.technet.com/b/microsoft_blog/archive/2012/04/26/visual-studio-brings-gamification-to-windows-azure-development.aspx" target="_blank">Visual Studio Achievements Brings Gamification to Windows Azure Development</a> <br />MSFT post</p> <p><a href="http://blogs.msdn.com/b/windowsazure/archive/2012/04/26/announcing-windows-azure-achievements-for-visual-studio.aspx" target="_blank">Announcing Windows Azure Achievements For Visual Studio</a> <br />Windows Azure Post</p> <p><a href="http://channel9.msdn.com/Shows/Cloud+Cover/Episode-78-Security-and-Compliance" target="_blank">Cloud Cover Video</a> <br />Channel9</p> <p><a href="http://channel9.msdn.com/Blogs/C9Team/Announcing-Visual-Studio-Achievements-For-Windows-Azure" target="_blank">Announcing Visual Studio Achievements For Windows Azure</a> <br />Channel9</p> http://rhizohm.net/irhetoric/post/2012/05/01/Visual-Studio-Achievements-For-Windows-Azure-Buzz.aspx Karsten Januszewski [MS] 3742 2012-05-01T19:31:37 Four ways we’re improving Marketplace <p>Today I’ll outline the latest steps we’re taking in our ongoing effort to keep the quality bar high in our rapidly growing Marketplace. I know most of you share our goal of a great shopping experience and already go out of your way to follow our policies and guidance. For others, I hope this insight into a few near-term changes we’re putting in place helps save you time and reduces your risk of having apps pulled from the Marketplace.</p> <p><b>Avoiding trademark trouble</b></p> <p>When a trademark or copyright owner contacts us about a suspected violation, we investigate and pull apps when the complaint is valid. Lately we’ve been doing more of this, especially for trademark misuse. Sometimes the requests come from the owners of big, well-known brands. Other times they come from new brands. Either way, we often find trademark violations are unintentional: some developers just aren’t clear on what constitutes a violation. But these investigations—and the time and money they can cost—can be avoided by doing a little homework before submitting or updating your app.</p> <p>If you’re developing an app, please consult our <a href="http://msdn.microsoft.com/en-us/library/hh184842(v=vs.92).aspx">content policy</a> covering trademarks and this related <a href="http://msdn.microsoft.com/en-us/library/hh347118(v=VS.92).aspx">Q&amp;A</a>. (The <a href="http://www.uspto.gov/trademarks/basics/trade_defin.jsp">U.S. Trademark and Patent Office</a> also has helpful background and a trademark search tool.) Our rules boil down to this: Your registered publisher name and everything about your app—name, logo, description, screenshots—must be unique and free of trademarked content unless (1) you own the trademark, (2) you’ve secured permission from the owner to use it, or (3) you’re using a trademarked name (<i>not</i> a logo) to describe your app’s features or functionality without suggesting that the app is actually published by the trademark owner. </p> <p>For example, using “Microsoft App Co.” as your publisher name would cause problems because “Microsoft” is a trademarked term. By the same logic, you couldn’t call your app “MSN” or “YouTube”. However, you may be able to make an app called “Reader for MSN,” as long as you don’t use the MSN logo or otherwise suggest that the app is published by Microsoft.</p> <p><b>Keeping the quality bar high </b></p> <p>I’ve <a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2011/09/29/taking-a-tougher-stance-on-bulk-app-publishing.aspx" target="_blank">posted before</a> about our efforts to help ensure that apps in Marketplace offer clear value. One of those efforts concerns bulk publishing—developers who send us hundreds of similar apps simultaneously. Today I want to mention two related issues on our radar that could affect developers working on app genres that lend themselves to bulk publishing. </p> <p>First, we’re seeing developers submit the same app to multiple Marketplace categories, a violation of our policies. Instead, you should pick a single category that best reflects the content and function of your app. This not only helps customers find your app but gives all developers an equal opportunity to have their app discovered where people expect. Developers who submit the same app across multiple categories will have it removed from the catalog.</p> <p>Second, when you create multiple closely-related apps—say, a series of quote apps that vary by theme—the Marketplace tile images must reflect the unique features of each individual app. They cannot be duplicates or near duplicates of each other. Your branding also shouldn’t dominate the tile. Here are a few examples of dos and don’ts:</p> <p><a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/2845.image_5F00_7B79CB49.png"><img style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/2705.image_5F00_thumb_5F00_39FF18F0.png" width="642" height="201" /></a></p> <p><a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/5047.image_5F00_671405BE.png"><img style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/0172.image_5F00_thumb_5F00_0D75E90A.png" width="641" height="209" /></a></p> <p>Creating unique, easily distinguishable app tiles helps customers see at a glance what’s different about the apps you’re publishing, improving the shopping experience and potential for downloads.</p> <p><b>Cleaning up keywords</b></p> <p>Some developers have been violating Marketplace policy by entering more than the five allowed keywords for an app. A keyword is a word or short phrase that describes your app. Entered during the App Hub submission process, these words or phrases are always separated by commas.</p> <p>Starting this week, we’re going to start enforcing the five keyword rule for all current and future Marketplace apps. Any app that exceeds this number will have <i>all</i> its keywords deleted. Affected developers will be notified and can then enter five new keywords in App Hub. We’re taking this action to help ensure that customers are able to find the most relevant set of apps for their search—including yours. </p> <p>We’re also starting to examine app keywords for relevancy. We’ve noticed some developers have been entering keywords that are popular search terms—“Justin Bieber,” “YouTube”—but are totally unrelated to their app and what it does. If we find a keyword that’s not relevant to your app’s function or content, we’ll delete that keyword. Additionally, if you suspect that other developers are using high-impact keywords unrelated to their app— “Skype” for a tic-tac-toe game, for example—email <a href="mailto:reportapp@microsoft.com">reportapp@microsoft.com</a> with the details and we’ll investigate.</p> <p><b>Refining our approach to content policy enforcement </b></p> <p>The final issue I want to discuss is one that affects all major app stores today: the treatment of apps that are “racy” or sexual in nature. We’re committed to offering a diverse selection of safe and quality apps that appeal to a wide range of customer interests. Items that some customers view as entertainment, others may consider inappropriate. This is a challenge for any big retailer, whether they operate online or down the street.</p> <p>We think the right solution is (a) to be transparent about what’s acceptable and (b) to show the right merchandise to the right customer in the right place. Our content policies are <a href="http://msdn.microsoft.com/en-us/library/hh184842(v=vs.92).aspx">clearly spelled out</a>: we don’t allow apps containing “sexually suggestive or provocative” images or content. What we do permit is the kind of content you occasionally see on prime-time TV or the pages of a magazine’s swimsuit issue.</p> <p>Admittedly, it’s tricky catering to such a wide range of people and markets. But we take this responsibility seriously and evaluate and discuss questionable cases. Recently we decided that we could improve the shopping experience for <i>all </i>our customers by a more stringent interpretation and enforcement of our existing content policy.</p> <p>Specifically, we will be paying more attention to the icons, titles, and content of these apps and expect them to be more subtle and modest in the imagery and terms used. Apps that don’t fit our standard will need to be updated to remain in the store. This is about presenting the right content to the right customer and ensuring that apps meet our standards. We will also monitor customer reaction to apps and reserve the right to remove ones that our customers find offensive</p> <p>While this change might require a little extra work on the part of a small number of developers, there are plenty of creative and appropriate ways to comply: showing male or female models in silhouette, for example, is one possible alternative. Here are a few other examples of app tiles that pass muster:</p> <p><a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/5481.image_5F00_05EA799D.png"><img style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/7633.image_5F00_thumb_5F00_175ADA75.png" width="483" height="97" /></a></p> <p>If you’re one of the handful of impacted developers, we will be reaching out to you within the next few days with more specific guidance on changes you need to make. If you don’t hear from us, there is no immediate action you need to take. </p> <p>I hope this post has provided some useful tips and helpful insight into our policies, and how they’re evolving to reflect both customer and developer feedback and the growing size and reach of the Windows Phone Marketplace. We’re committed to our developer community and appreciate your feedback on how we can make Marketplace better for you and your customers. I look forward to hearing your thoughts.</p><div style="clear:both;"></div><img src="http://windowsteamblog.com/aggbug.aspx?PostID=581070" width="1" height="1"> http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/30/four-ways-we-re-improving-marketplace.aspx Windows Phone Dev Blog 3741 2012-04-30T23:48:45 GridView Control in Windows 8 http://feedproxy.google.com/~r/JesseLiberty-SilverlightGeek/~3/_vemEh5ePZI/ Jesse Liberty [MS] 3738 2012-04-26T20:09:26 Two Marketplace changes; An update on 9 new markets <p>I wanted to make sure you saw the Windows Phone consumer blog today, because my colleague Mazhar <a href="http://windowsteamblog.com/windows_phone/b/windowsphone/archive/2012/04/24/two-marketplace-changes-and-how-they-affect-you.aspx">highlights</a> two changes to the Marketplace shopping experience that developers should be aware of.</p> <p>First, we’re removing the option to browse and buy Windows Phone apps from the Zune PC software, a change that started rolling out this afternoon. Second, in the coming weeks we’ll also start requiring that customers have Windows Phone 7.5 installed on their phone to buy, download, update, or review apps in Marketplace. </p> <p>Mazhar’s post has more details and background. But I want to highlight one important way the removal of the Windows Phone store from Zune impacts developers.</p> <p>It’s important to make sure you’re using the correct protocol for direct links to your app in Marketplace. This “deep link,” as it’s also called, makes it easy for customers to pull up your app in the phone and web stores. The correct format is: </p> <p align="center"><em>http://windowsphone.com/s?appId={GUID}</em></p> <p>You’ll find more details on deep links <a href="http://msdn.microsoft.com/en-us/library/ff967553(v=vs.92).aspx">here on MSDN</a>. If you use the older <em>zune://</em><strong> </strong>format for links, customers will see an error message. Just something to keep in mind.</p> <p>One final update for today: We just released the OS software required to bring Marketplace to customers in Bahrain, Israel, Iraq, Kazakhstan, Qatar, Saudi Arabia, Thailand, UAE and Vietnam. These nine markets—which are already open for app submissions—were part of the larger Marketplace&#160; expansion <a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/03/15/app-hub-accepting-submissions-for-new-markets-soon.aspx">I outlined</a> last month. Our hardware partners can now create phones for these markets and begin their final launch preparations. </p> <p>Mazhar will have more to say about these new storefronts in the weeks ahead.</p><div style="clear:both;"></div><img src="http://windowsteamblog.com/aggbug.aspx?PostID=580787" width="1" height="1"> http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/24/two-marketplace-changes-an-update-on-9-new-markets.aspx Windows Phone Dev Blog 3736 2012-04-25T00:49:34 Respond to User Input <p>The fourth of the four principles I mentioned in <a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/03/07/optimizing-apps-for-lower-cost-devices.aspx">Optimizing Apps for Lower Cost Devices</a> is Respond to User Input.</p> <p>A responsive UI is a basic expectation that users have of apps.&nbsp; Failing to respond to user input can frustrate users and can ultimately drive them away to other apps that are more responsive.</p> <p>The basic guidance here is to keep as much activity off of the UI thread as possible until absolutely necessary.&nbsp; The UI thread is what processes user input for you, so any code you execute on that thread will interfere with this processing.&nbsp; Unless you're updating elements of your UI, you generally should not be executing code on the UI thread.</p> <p>A quick way to check whether a block of code is running on the UI thread is to call <a href="http://msdn.microsoft.com/en-us/library/system.windows.threading.dispatcher.checkaccess(v=vs.95).aspx">Deployment.Current.Dispatcher.CheckAccess()</a> inside that block of code (Intellisense won't show this method but it is there and useful).&nbsp; This will return true if the code is executing on the UI thread, so if this returns true and you're not updating your UI, then you've found code that could be moved to background threads.</p> <p>An easy way to move code to background threads is to wrap it in a call to <a href="http://msdn.microsoft.com/en-us/library/kbf0f1ct(v=vs.95).aspx">ThreadPool.QueueUserWorkItem()</a>.</p> <pre><code>// Running on the UI thread.<br />...<br /></code></pre> <pre><code></code><code>// Running on a background thread.<br />ThreadPool.QueueUserWorkItem((o) =&gt;<br />{<br />&nbsp;&nbsp;&nbsp; ...<br />}</code></pre> <p>The <a href="http://msdn.microsoft.com/en-us/library/y5htx827(v=vs.95).aspx">ThreadPool</a> is (as its name suggests) a pool of background threads that are waiting to execute work items for you.&nbsp; <a href="http://msdn.microsoft.com/en-us/library/kbf0f1ct(v=vs.95).aspx">QueueUserWorkItem</a> enables you to register blocks of code that will execute on the next available background thread in the ThreadPool.&nbsp; Note that use of ThreadPools is common and encouraged across many platforms (including <a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.system.threading.aspx">Windows 8</a>) so familiarizing yourself with them will serve you well in future projects.</p> <p>When you are ready to update your UI, you will need to return to the UI thread.&nbsp; You can return to the UI thread at any time from a background thread by wrapping your code in a call to <a href="http://msdn.microsoft.com/en-us/library/system.windows.threading.dispatcher(v=vs.95).aspx">Deployment.Current.Dispatcher.BeginInvoke()</a>.</p> <pre><code>// Running on a background thread.<br />ThreadPool.QueueUserWorkItem((o) =&gt;<br />{<br />&nbsp;&nbsp;&nbsp; ...<br /><br />&nbsp;&nbsp;&nbsp; // Running on the UI thread.<br />&nbsp;&nbsp;&nbsp; Deployment.Current.Dispatcher.BeginInvoke(() =&gt;<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...<br />&nbsp;&nbsp;&nbsp; }<br />}</code></pre> <p>If you try to update your UI from a background thread, you will receive an UnauthorizedAccessException with the message "Invalid cross-thread access."&nbsp; In these cases, wrap the offending code in a call to <a href="http://msdn.microsoft.com/en-us/library/system.windows.threading.dispatcher(v=vs.95).aspx">Deployment.Current.Dispatcher.BeginInvoke()</a> as shown above to execute it on the UI thread as required.</p> <p>In addition to being able to control whether your code executes on the UI thread or on background threads, you also have options to do the same with framework code in several places.</p> <p>Image decoding is an expensive operation that can harm interactivity significantly if executed on the UI thread, particularly if you're loading many images at a time.&nbsp; The framework allows you to specify <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.bitmapcreateoptions(v=vs.95).aspx">BitmapCreateOptions</a> to control whether image decoding executes on the UI thread or on background threads.&nbsp; Be sure to use the <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.bitmapcreateoptions(v=vs.95).aspx">BackgroundCreation</a> option to move image decoding to background threads.</p> <p>The built-in ProgressBar control has <a href="http://www.jeff.wilcox.name/2010/08/performanceprogressbar/">known performance problems</a> that can harm UI performance as a result of its animations executing on the UI thread.&nbsp; Use the SystemTray <a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.shell.progressindicator(v=VS.92).aspx">ProgressIndicator</a> for the best performance as the <a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.shell.progressindicator(v=VS.92).aspx">ProgressIndicator</a> is a shell component that will not interfere with your UI thread.&nbsp; A bonus to using the <a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.shell.progressindicator(v=VS.92).aspx">ProgressIndicator</a> is that your UX will more closely match the UX of the built-in experiences.</p> <p>If you're using animations in your app, use <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.animation.storyboard(v=vs.95).aspx">Storyboards</a> wherever possible as these run on an important background thread known as the compositor thread and will not interfere with your UI thread.&nbsp; If you're familiar with <a href="http://msdn.microsoft.com/en-us/library/cc295346(v=expression.40).aspx">Expression Blend</a>, it can be particularly useful for generating Storyboards.</p> <p>With code now running off of the UI thread for a given page, you should also focus on optimizing navigation between pages.</p> <p>To keep page load times and in-app navigation responsive, defer loading activities until the first frame is rendered. The guidance for <a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/03/optimize-startup-time.aspx">optimizing startup time of your MainPage</a> applies to optimizing the startup time of subsequent page loads as well. Enabling the <a href="http://msdn.microsoft.com/en-us/library/ff941094(v=VS.92).aspx">TiltEffect</a> is a great way to acknowledge user input and indicate that navigation is in progress. This will make your app look and feel more like the first party experiences as well.</p> <p>Many apps add page transition animations to add style to in-app navigations. While this is a great practice to make your apps more dynamic, excessive use of transition animations can delay load times, particularly when the generation/execution of the animations result in spikes in memory/CPU usage.&nbsp; If transition animations are causing performance problems in your app, disabling them completely, or at least <a href="http://msdn.microsoft.com/en-us/library/hh855083(v=vs.92).aspx">on low-memory devices only</a>, can significantly improve in-app navigation performance.</p> <p>Maintaining a responsive UI is important regardless of the platform you are targeting.&nbsp; By offloading work to background threads and keeping in-app navigation fast, you'll provide the best possible experience to your users.</p><div style="clear:both;"></div><img src="http://windowsteamblog.com/aggbug.aspx?PostID=580771" width="1" height="1"> http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/24/respond-to-user-input.aspx Windows Phone Dev Blog 3735 2012-04-24T17:53:00 Insidious ByRef Legacy Code Issue The ByRef in the title should give you a hint that this is about legacy VB.NET code. One of my duties at my new job is to maintain our legacy VB.NET codebase until we deploy our WPF software. When I use the term legacy it should not be taken in a negative manner. Our legacy [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=karlshifflett.wordpress.com&#038;blog=1204518&#038;post=1786&#038;subd=karlshifflett&#038;ref=&#038;feed=1" width="1" height="1" /> http://karlshifflett.wordpress.com/2012/04/24/insidious-byref-legacy-code-issue/ Karl Shifflett [MS] 3734 2012-04-24T15:22:30 Announcing the Building Windows 8 apps with C++ Windows camp <p>Join the Microsoft Visual C++ and Windows teams <span style="color: #333333;" color="#333333"><strong>in Redmond on</strong></span> <strong>May 18, 2012</strong> for a free, all-day event focused on <strong>building Windows 8 Metro style apps with C++</strong>.</p> <p>&nbsp;</p> <p>Whether you are a new C++ developer ready to learn about the writing Metro style apps, an intermediate developer who wants to hone your code and skills, or an experienced C++ developer eager to squeeze every ounce of performance out of your Metro style app and/or push the boundaries of Windows 8, <em>then</em> <em>this event is for you</em>. <strong>We will have pragmatic advice for every developer writing Metro style apps and games with XAML or DirectX and C++.</strong></p> <h4>Agenda:</h4> <ul> <li>C++ for Windows 8, Keynote by Herb Sutter</li> <li>Building Windows 8 apps with XAML and C++</li> <li>Building Windows 8 games with DirectX and C++</li> <li>Introduction to the Windows Runtime Library (WRL)</li> <li>Writing Connected apps: Writing networking code with C++</li> <li>Combining XAML &amp; Direct X in a Metro style apps</li> <li>Writing WinRT components to be consumed from any language</li> <li>VC11 compiler flags for getting the most out of C++</li> </ul> <p><strong>Registration: <br /></strong><span style="color: #ff0000; font-size: small;" color="#ff0000" size="3">Register for this event </span><a href="https://win8.msregistration.com/default.aspx?ID=559a9ac4-96a6-46a1-b359-598e345d25be" target="_blank"><span style="color: #ff0000; font-size: small;" color="#ff0000" size="3">here</span></a><span style="color: #ff0000;" color="#ff0000">.&nbsp; </span>If is first-come, first-serve, and we are limited in space, so register soon. <br />If you want to learn more about other Windows 8 camps check the <a href="http://www.devcamps.ms/windows" target="_blank">camps site</a>.&nbsp;&nbsp;</p> <p><strong>Details: <br />Location: </strong>Redmond WA, Microsoft campus, bldg 92. <br /><strong>Date:&nbsp; </strong>May 18th, 2012 <br /><strong>Time:&nbsp; </strong>9 AM to 5 PM for sessions,&nbsp; Q&amp;A and a small social event afterwards. <br /><strong>Speakers:&nbsp; </strong>We will update the list of speakers early next week, we are still negotiating session times &amp; speakers to cram as much as we can into a single day.&nbsp; <br />Rest assured most of them are from the product team and yes, Herb Sutter will do the opening keynote and the first session. <br /><strong>Meals:&nbsp; </strong>We will have some light breakfast, lunch, snacks and appetizers + drinks at the end of the day.</p> <p><strong>My personal pitch on this event: <br /></strong>Even if you are already coding your Metro style app, you don&rsquo;t want to miss this event. All the speakers are product team people, and we will have a very strong pragmatic angle during our sessions; we are aiming to answer a lot of the questions and help you avoid the common pit-falls that we have seen our early partners building Metro style apps with C++ have ran into.&nbsp; There will also be ample Q&amp;A time through out the day. <br /> <br />Happy Windows 8 coding.&nbsp; Please help us spread the word on this event we are really excited to connect with C++ community.</p><div style="clear:both;"></div><img src="http://blogs.msdn.com/aggbug.aspx?PostID=10296762" width="1" height="1"> http://blogs.msdn.com/b/jaimer/archive/2012/04/23/announcing-the-building-windows-8-apps-with-c-windows-camp.aspx Jaime Rodriguez [MS] 3733 2012-04-23T21:13:00 2-4-6-8-10 <p> If you've been following my blog, you know that for the past few months I've been working on the 6th edition of <i>Programming Windows</i>, which focuses on writing Metro style applications for Windows 8 using C# and XAML. </p><p>... more ...</p> http://www.charlespetzold.com/blog/2012/04/2-4-6-8-10.html Charles Petzold 3731 2012-04-23T14:00:00 Maker Geek Roundup 011 for 4/21/2012 <p>The Maker Geek Roundup aggregates information of interest to makers everywhere. Topics include .NET Micro Framework, Arduino, AVR and other MCUs, CNC, 3d Printing, Robotics, Microsoft Robotics Studio, Electronics, General Maker stuff, and more. If you have something interesting you've done or have run across, or you blog regularly on the topics included here, please send me the URL and brief description via the <a href="http://10rem.net/contact">contact link</a>.</p> <h3>3d Printing, Laser Cutting, and CAD/CAM/CNC</h3> <ul> <li><a href="http://www.protoparadigm.com/2012/02/comparing-3d-printers/">Comparing Entry Level 3D Printers</a> (ProtoParadigm)</li> <li><a href="http://www.grassrootsengineering.com/blog/2012/04/21/damn-right/"> The third industrial revolution</a> (Grass Roots Engineering)</li> <li><a href="http://www.makerbot.com/blog/2012/04/17/makerbot-thing-o-matics-where-we-are-now/"> MakerBot Thing-O-Matics: Where We Are Now</a> (MakerBot Industries)</li> <li><a href="http://richrap.blogspot.com/2012/04/universal-paste-extruder-ceramic-food.html"> Universal Paste extruder - Ceramic, Food and Real Chocolate 3D Printing...</a> (Reprep dev and DIY 3d)</li> <li><a href="http://ifeelbeta.de/index.php/production/beta-casted-wallace-3d-printer"> Beta casted Wallace 3D printer</a> (2PrintBeta)</li> <li><a href="http://www.protoparadigm.com/2012/04/thing-o-matic-mk7-pla-set-up-and-troubleshooting-mk8/"> Thing-O-Matic MK7 PLA Set-Up and Troubleshooting (Likely MK8)</a> (ProtoParadigm)</li> <li><a href="http://blog.makezine.com/2012/04/21/costume-piece-molded-from-3d-printed-parts/"> Costume Piece Molded from 3D-Printed Parts</a> (Make)</li> </ul> <h3>.NET Gadgeteer and Netduino GO</h3> <ul> <li><a href="http://mikedodaro.net/2012/04/18/mind-control-of-net-gadgeteer-device-via-neurosky-eeg-sensor/"> Mind Control of .NET Gadgeteer Device via Neurosky EEG Sensor</a> (Michael Dodaro)</li> <li><a href="http://fabienroyer.wordpress.com/2012/04/04/nwazet-modules-for-netduino-go/"> [nwazet modules for Netduino GO!</a> (Fabien's Bit Bucket)</li> <li><a href="http://mikedodaro.net/2012/04/21/controlling-a-gadgeteer-device-using-bluetooth-module-and-32feet-net-library/"> Controlling a Gadgeteer device using Bluetooth Module and 32feet.NET library</a> (Marco Minerva)</li> <li><a href="http://forums.netduino.com/index.php?/topic/4003-gadgeteer-light/"> Gadgeteer Light</a> (Stefan - Netduino Forums)</li> <li><a href="http://blog.ianlee.info/2012/04/getting-started-with-hydra-basic-kit.html"> Software &amp; Sawdust: Getting Started With a FEZ Hydra Basic Kit</a> (Richard Ian Lee Sr)</li> <li><a href="http://fabienroyer.wordpress.com/2012/04/06/nwazet-go-modules-source-code-and-eagle-schematics-on-bitbucket/"> [nwazet GO! Modules Source Code and Eagle Schematics on BitBucket</a> (Fabien's Bit Bucket)</li> <li><a href="http://fabienroyer.wordpress.com/2012/04/08/netduino-go-hacking-breaking-out-sockets/"> Netduino GO! Hacking - Breaking out sockets</a> (Fabien's Bit Bucket)</li> <li><a href="http://forums.netduino.com/index.php?/topic/4048-netduino-go-rgb-umbrella/"> Netduino Go! RGB Umbrella</a> (Stefan - Netduino Forums)</li> </ul> <h3>Other .NET Micro Framework General (Netduino Classic, GHI FEZ, etc.)</h3> <ul> <li><a href="http://blogs.msdn.com/b/laurelle/archive/2012/04/07/using-netduino-and-net-microframework-to-pilot-any-lego-power-function-thru-infrared-part-1.aspx"> Using netduino and .NET Microframework to pilot any Lego Power Function thru Infrared (part 1)</a> (Laurent Ellerbach)</li> <li style="list-style: none"> <ul> <li><a href="http://blogs.msdn.com/b/laurelle/archive/2012/04/17/using-netduino-and-net-microframework-to-pilot-any-lego-power-function-thru-infrared-part-2.aspx"> Using netduino and .NET Microframework to pilot any Lego Power Function thru Infrared (part 2)</a></li> </ul> </li> <li><a href="http://forums.netduino.com/index.php?/topic/3924-netduino-plus-physical-gmail-notifier/"> Netduino Plus Physical Gmail Notifier</a> (smarcus3 - Netduino Forums)</li> </ul> <h3>Arduino</h3> <ul> <li><a href="http://www.howmuchsnow.com/arduino/airquality/">Monitoring your Air Quality</a> (Chris Nafis)</li> <li><a href="http://tronixstuff.wordpress.com/2012/04/09/arduino-and-tm1640-led-display-modules/"> Arduino and TM1640 LED Display Modules</a> (tronixstuff)</li> <li><a href="http://arduino.cc/blog/2012/04/18/arduino-flamethrower-guitarhero-rockstar/"> Arduino + Flamethrower + Guitarhero = Rockstar</a> (Arduino Blog)</li> <li><a href="http://dangerousprototypes.com/2012/04/20/arduino-lie-detector/"> Arduino lie detector</a> (Dangerous Prototypes)</li> <li><a href="http://arduino.cc/blog/2012/04/20/cubicle-fun-just-levelled-up-with-arduino/"> 'Cubicle fun' just levelled up with Arduino</a> (Arduino Blog)</li> <li><a href="http://tronixstuff.wordpress.com/2012/04/07/hewlett-packard-5082-7415-led-display-from-1976/"> Hewlett-Packard 5082-7415 LED Display from 1976</a> (tronixstuff)</li> </ul> <h3>Other Microcontrollers (PIC, AVR, ARM, BeagleBoard, and more)</h3> <ul> <li><a href="http://www.bot-thoughts.com/2012/04/road-testing-arm-lpc2101-part-2.html"> Bot Thoughts: Road Testing an ARM LPC2101</a> (Bot Thoughts)</li> </ul> <h3>General Electronics and Hardware Hacking</h3> <ul> <li><a href="http://blog.makezine.com/2012/04/20/converting-an-inkjet-printer-to-print-pcbs/"> Converting An Inkjet Printer To Print PCBs</a> (Make)</li> <li><a href="http://www.electronics-lab.com/blog/?p=18160">New Weller WX 2 Soldering Station</a> (Electronics-Lab.com)</li> <li><a href="http://circuit-zone.com/index.php?electronic_project=671">Hybrid Headphone Amplifier</a> (Circuit Zone)</li> <li><a href="http://this8bitlife.com/this-8-bit-life/2012/4/16/this-homemade-headphone-amplifier-is-a-work-of-art.html"> This Homemade Headphone Amplifier is a Work of Art</a> (this 8-bit life)</li> <li><a href="http://dangerousprototypes.com/2012/04/21/app-note-op-amp-based-diy-regulators/"> App note: Op-amp based DIY linear voltage regulators</a> (Dangerous Prototypes)</li> <li><a href="http://circuit-zone.com/index.php?electronic_project=670">Portable Headphone Amplifier</a> (Circuit Zone)</li> </ul> <h3>Robots and Robotics Studio and *Copters</h3> <ul> <li><a href="http://www.rcexplorer.se/files/CNCTricopterSale.html#unique-entry-id-342"> CNC cut Tricopter frames for sale</a> (RCExplorer)</li> <li><a href="http://www.rcexplorer.se/projects/550x/FPVMTri.html">Gaui 500X</a> (RCExplorer)</li> </ul> <h3>Synthesizers, Music, and MIDI</h3> <ul> <li><a href="http://mutable-instruments.net/shruthi1/build/4pm">Shruthi-1 4-pole mission filter board</a> (Mutable Instruments)</li> <li><a href="http://arduino.cc/blog/2012/04/18/beatbearing-using-arduino/"> Beatbearing using Arduino</a> (Arduino Blog)</li> <li style="list-style: none"> <ul> <li>also <a href="http://www.youtube.com/watch?v=MJe0nsLt1H4&amp;feature=relmfu"> BeatBearing 45-second demo</a></li> </ul> </li> <li><a href="http://m.matrixsynth.com/2012/04/folktek-impossible-box-preliminaria.html"> Folktek Impossible Box preliminaria</a> (Matrixsynth)</li> <li><a href="http://mutable-instruments.net/node/11713">MIDIpal kit, now with pre-programmed chips</a> (Mutable Instruments)</li> <li><a href="http://www.youtube.com/watch?v=EC402wIhqvc&amp;feature=player_embedded"> Zira Demonstration</a> (VacolocoSynth)</li> </ul> <h3>Photography</h3> <ul> <li><a href="http://www.diyphotography.net/sometimes-its-easier-to-flag-your-camera"> Sometimes It's Just Easier To Flag Your Camera</a> (DIY Photography)</li> <li><a href="http://www.diyphotography.net/vintage-color-cross-processing-in-lightroom-4"> Vintage Color Cross Processing in Lightroom 4</a> (Getting the Instagram look using an SLR) (DIY Photography) (DIY Photography)</li> </ul> <h3>General Maker</h3> <ul> <li><a href="http://hackaday.com/2012/04/21/an-easy-to-build-cat-feeder-driven-by-a-diy-linear-actuator/"> An easy to build cat feeder driven by a DIY linear actuator</a> (Hack a Day)</li> <li><a href="http://www.makermasters.com/diy-cnc-project-dust-deputy-cyclone-separator-cart"> Dust Deputy Cyclone Shop Vacuum Cart CNC</a> (Maker Masters)</li> </ul> <h3>Retro Computing and Commodore!</h3> <ul> <li><a href="http://www.mos6502.com/friday-commodore/happy-35th-birthday-commodore-pet/"> Happy 35th birthday, Commodore PET!</a> (MOS6502)</li> <li><a href="http://www.starryexpanse.com/2012/04/12/camera_matching/">Camera Matching</a> (The Starry Expanse - Rebuilding Riven)</li> <li><a href="http://this8bitlife.com/this-8-bit-life/2012/4/3/this-doctor-who-rpg-makes-me-wish-it-were-real.html"> This Doctor Who RPG Makes Me Wish it Were Real.</a> (this 8-bit life)</li> <li><a href="http://www.rgcd.co.uk/2012/04/soulless-preview-c64.html">Soulless (Preview) (C64)</a> (RGCD)</li> <li><a href="http://www.rgcd.co.uk/2012/04/c64-16kb-cartridge-game-development.html"> C64 16KB Cartridge Game Development Competition!</a> (RGCD)</li> <li><a href="http://www.jeffsgames.com/2012/04/20/site-31-of-lon-mcdonalds-joust-tour/"> Site 31 of Lon McDonald's Joust Tour</a> (Jeff's Classic Arcade)</li> <li><a href="http://www.mos6502.com/friday-commodore/hooking-an-ipod-to-a-c64/"> Hooking an iPod to a C64</a> (MOS6502)</li> <li><a href="http://www.retrothing.com/2012/04/kickstarter-a-brilliant-34-scale-arcade-machine.html"> Retro Thing: Kickstart A 3/4 Scale Arcade Machine Project!</a> (Retro Thing)</li> <li><a href="http://www.rgcd.co.uk/2012/04/knight-n-grail-c64-2009.html">Knight 'n' Grail (C64)</a> (RGCD)</li> <li><a href="http://www.mos6502.com/commodore-legends/a-small-tribute-to-a-great-man/"> A small tribute to a great man</a> (MOS6502)</li> </ul> <p><a href="http://feedads.g.doubleclick.net/~a/pdrvoaiUbiHwhiynjqSk1q48Xy4/0/da"><img src="http://feedads.g.doubleclick.net/~a/pdrvoaiUbiHwhiynjqSk1q48Xy4/0/di" border="0" ismap="true"></img></a><br/> <a href="http://feedads.g.doubleclick.net/~a/pdrvoaiUbiHwhiynjqSk1q48Xy4/1/da"><img src="http://feedads.g.doubleclick.net/~a/pdrvoaiUbiHwhiynjqSk1q48Xy4/1/di" border="0" ismap="true"></img></a></p><div class="feedflare"> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=L4_akVZrkTo:MUsB464jvS8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=L4_akVZrkTo:MUsB464jvS8:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=L4_akVZrkTo:MUsB464jvS8:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=L4_akVZrkTo:MUsB464jvS8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=L4_akVZrkTo:MUsB464jvS8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=L4_akVZrkTo:MUsB464jvS8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=L4_akVZrkTo:MUsB464jvS8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=L4_akVZrkTo:MUsB464jvS8:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=L4_akVZrkTo:MUsB464jvS8:gIN9vFwOqvQ" border="0"></img></a> </div><img src="http://feeds.feedburner.com/~r/PeteBrown/~4/L4_akVZrkTo" height="1" width="1"/> http://feedproxy.google.com/~r/PeteBrown/~3/L4_akVZrkTo/maker-geek-roundup-011-for-4-21-2012 Pete Brown 3729 2012-04-22T02:55:58 Wanted!! Great Windows 8 Metro style apps <p>Tuesday, the Windows Store blog <a href="http://blogs.msdn.com/b/windowsstore/archive/2012/04/18/windows-store-expanding-to-new-markets.aspx" target="_blank">announced</a> that in the next significant Windows 8 preview release they will be expanding <br />their global coverage with 33 additional app submission locales for developers.&nbsp; <a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-44-19-metablogapi/4745.AppHereTile_5F00_3BCCE249.png"><img width="185" height="272" title="AppHereTile" align="right" style="margin: 17px 12px 0px 28px; float: right; display: inline; background-image: none;" alt="AppHereTile" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-44-19-metablogapi/2766.AppHereTile_5F00_thumb_5F00_3037250A.png" border="0" /></a></p> <p>As Antoine Leblond alluded to in the post, our store services are ramping up as planned--and of course the plan includes ramping up developer registrations to enable app submissions to the Windows store. Today, you need an invite &ldquo;token&rdquo; to register. This begs the question&nbsp; - <strong>How can YOU get a token?</strong></p> <p>It&rsquo;s easy! If your app is ready and you want to be among those developers who get to submit to the store early, simply attend one of the 100s of free Application Excellence Labs that DPE and Windows are holding around the world.</p> <p>Follow these steps to get invited to an App Excellence lab:</p> <ol> <li>Create a really great Windows 8 Metro style app (or game) immediately.&nbsp; Get it as ready as if you were submitting to the store.</li> <li>If you know your local DPE evangelists (maybe because you attended a <a href="http://www.devcamps.ms/windows" target="_blank">Windows camp</a> training), get in touch with them and ask them to nominate your app for a lab.</li> <li>If you don&rsquo;t know your local evangelist, then email the following information to <a href="mailto:win8aefb@microsoft.com" target="_blank">win8aefb@microsoft.com</a>:<ol> <li>Your name</li> <li>City &amp; country where you are located</li> <li>Brief description for your app (no binary,&nbsp; screenshot is optional, but only send if the screenshot is public, non-confidential stuff )</li> <li>Your pledge that you&rsquo;ve spent at least 8 hours devouring all the great <a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh465424" target="_blank">UX guidelines</a> we have at the <a href="http://design.windows.com" target="_blank">design section in the Windows Dev Center</a><sup>1</sup>&nbsp;</li> <li>Wait for our response letting you know where the closest app excellence lab will be and how to get in touch with the right evangelist to nominate you.</li> </ol></li> </ol> <p>Hopefully, there will be a lab near you.&nbsp; Right now, we have labs in 40+ countries and we may be adding more.</p> <p>Of course, coming to the lab is not all you have to do.&nbsp; I have to go back to step #1: You need to have a compelling, functional app that follows our <a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh465424" target="_blank">UX guidelines</a>, our <a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh750312.aspx" target="_blank">performance best practices</a>, and our store <a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh694083.aspx" target="_top">certification requirements</a><sup>2</sup></p> <p>The lab is a 4-hour engagement with a trained Microsoft Services Engineer.&nbsp; This person will run your app through a series of tests based on a quality checklist to ensure your app is (or will be) in top-notch shape when you submit. You will also get a chance discuss ways to make your app even better and you will get answers to any questions you might have. <br />If your app meets the criteria, then booyah! You get a token to register your developer account and (once you have been verified and all that) you will be able to submit your app to the Windows store. <br />If your app does not meet the criteria, nothing is lost. You will still end up with a much better app<sup>3</sup> and you will be able to submit it when registration opens for all developers.</p> <p>Good luck. We are looking forward to seeing your apps and helping you to make them great!<br />Happy Windows 8 coding!! </p> <p>&nbsp;</p> <div> <p><sup>1</sup> Kidding about the pledge but not kidding about highly recommending you review the guidelines and get your app very polished.<br /><sup>2</sup> Note: The lab is not a replacement for certification process; that still happens when you submit to the store.<br /><sup>3</sup> Really, the lab preparation will be worth it, you will have a survey with questions, useful advice, links to guidelines, etc. The survey is (by far) not the only criteria we will use at the labs, but if you follow the preparation from the survey, you will likely have a great app.</p> </div><div style="clear:both;"></div><img src="http://blogs.msdn.com/aggbug.aspx?PostID=10295653" width="1" height="1"> http://blogs.msdn.com/b/jaimer/archive/2012/04/19/wanted-great-windows-8-metro-style-apps.aspx Jaime Rodriguez [MS] 3728 2012-04-20T07:46:00 Using a Style to Simulate TextTrimming on TextBox Synopsis:&#160; The WPF/Silverlight TextBox control lacks the TextTrimming property. Use a control template to add TextTrimming to TextBox. Want more Silverlight tips and tricks? Watch my Silverlight 5 Essential Training course We&#8217;ve all encountered the textbox that is too narrow to hold the text contents.&#160; Here&#8217;s an example from Visual Studio 2010 Figure 01: Visual [...]<!-- Easy AdSense V2.51 --> <!-- Post[count: 2] --> <div class="ezAdsense adsense adsense-leadout" style="float:left;margin:12px; border:#00FFFF solid 1px" onmouseover="this.style.border='#FF0000 solid 1px'" onmouseout="this.style.border='#00FFFF solid 1px'"><script type="text/javascript"><!-- google_ad_client = "pub-7194001785119580"; /* blog.wpfwonderland 300x250, created 6/16/09 */ google_ad_slot = "2567713628"; google_ad_width = 300; google_ad_height = 250; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script></div> http://blog.wpfwonderland.com/2012/04/19/using-a-style-to-simulate-texttrimming-on-textbox/ Walt Ritscher 3727 2012-04-20T01:06:59 Can this be true? MSDN subscribers ignoring $4K of free Azure services &#160; This statistic, seemed unbelievable. Only one out of ten MSDN subscribers is using their free Azure benefits. According to Microsoft, MSDN subscribers get a boatload of free services each year (~$3700.00 USD)&#160; I&#8217;m not talking about the free trial download.&#160; This is something different. If you have an MSDN subscription you get a lot [...] http://blog.wpfwonderland.com/2012/04/19/can-this-be-true-msdn-subscribers-ignoring-4k-of-free-azure-services/ Walt Ritscher 3726 2012-04-19T22:20:52 Memory Profiling - Launching, Graphs and Markers <p>It is said that “A point of view is worth 80 IQ points”;<i> </i>the meaning perhaps being that if we can look at things in different ways then we might understand them better. The Memory Profiler that ships with the <a href="http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;id=27570">Windows Phone SDK 7.1</a> provides, in its own way, multiple views into the memory usage of your application, and in an <a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/02/01/memory-profiling-for-application-performance.aspx">earlier post</a> we had seen how specific views helped us understand one particular issue with the application better. But even before we got to the specific views, there was a graph and a couple of rows of markers, remember? Let us discuss them briefly.</p> <h1>Launching the Memory Profiler</h1> <p>How do you even know that you need to run your application scenario through the Memory Profiler, especially since there might not be any obvious visual cue? The answer lies in an Execution Profiler warning message. The expectation is that you would run your application scenario through the Execution Profiler for evaluating visual and code performance, and if it suspects any memory related issues it will raise a warning message suggesting running the scenario through the Memory Profiler!</p> <p>Users of the Execution Profiler will find the interaction model of the Memory Profiler familiar. It launches from the same page, with the difference being that you select the <b>Memory (managed object allocations and texture usage)</b> option. The <b>Advanced Settings </b>option can be ignored for the purpose of this discussion. The following is the launch page for the Memory Profiler:</p> <p><a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/8507.image_5F00_3BE8B0AB.png"><img style="display: inline; background-image: none;" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/3124.image_5F00_thumb_5F00_4193A484.png" width="508" height="342" /></a></p> <p>A warning message is issued if the deployment target happens to be the Windows Phone Emulator. The emulator runs on the desktop, and the desktop has a different hardware architecture than the device, with different performance characteristics across the board. The warning therefore alerts you to this lack of performance fidelity. If you are doing Execution profiling beware! The emulator is still a suitable target for doing memory profiling since in that case we are dealing with (memory) allocation profiling. Clicking on the <b>Launch Application </b>link deploys the application to the target and commences the profiling session.</p> <h1>Stop Profiling</h1> <p>There are two ways to gracefully end the profiling session:</p> <ul> <li>By hitting the <b>Stop Profiling</b> link on the Profiler page.</li> <li>By hitting the back button on the target (device or emulator) until you exit the application.</li> </ul> <p><a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/4530.image_5F00_1DAACD2A.png"><img style="display: inline; background-image: none;" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/3264.image_5F00_thumb_5F00_0074FF53.png" width="508" height="342" /></a></p> <p>If the connection from Visual Studio to the target is broken for any reason (for example, if the emulator instance is closed, or the device is untethered, or the device shuts down, the connection is broken) the session is aborted.</p> <p>Once the session is gracefully ended, the data gathered during the run is processed and presented graphically for analyses, starting with a <b>Memory Usage</b> graph plotting memory usage over time, and two rows of markers indicating image loads and GC runs as shown below:</p> <p><a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/7701.image_5F00_0AE5ADA6.png"><img style="display: inline; background-image: none;" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/7282.image_5F00_thumb_5F00_390F8393.png" width="508" height="342" />&#160;</a></p> <h1>Memory usage graph</h1> <p>The memory usage reported is that of private bytes: exclusive bytes allocated by the process being profiled. Some variance in memory usage is normal and not indicative of a problem. However, memory usage that keeps rising bears examination.</p> <h1>Image load markers</h1> <p>A tooltip on the image load marker indicates the encoding format, the ID of the executing thread on which it got loaded, the point in time when it was loaded, and how long it took to load. A spike in memory usage corresponding to an image load marker might indicate a large sized image being loaded (larger than 2000 x 2000 pixels). Windows Phone imposes this limit, and larger images will be sampled at a lower resolution, and will take longer to load. If you must use large images consider displaying only a portion that meets this limit by loading the image into a <a href="http://go.microsoft.com/fwlink/?LinkID=203572">System.Windows.Media.Imaging.WriteableBitmap</a> and using the <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.extensions.loadjpeg(v=vs.92).aspx">LoadJpeg(WriteableBitmap, Stream)</a> extension method as shown below:</p> <p><font size="2" face="Consolas">&#160; int width = (int) this.image1.Width; <br />&#160; int height = (int) this.image1.Height; <br />&#160; Uri uri = new System.Uri(&quot;image.jpg&quot;, UriKind.Relative); <br />&#160; StreamResourceInfo sri = Application.GetResourceStream(uri); <br />&#160; WriteableBitmap wb = new WriteableBitmap(width, height); <br />&#160; System.Windows.Media.Imaging.Extensions.LoadJpeg(wb, sri.Stream); <br />&#160; this.image1.Source = wb;</font></p> <p>The ID of the executing thread can be used to check if the image load computation is happening on the UI thread (the UI thread’s ID can be got from the CPU Usage analysis from the earlier Execution Profiling session). To keep the UI responsive it is essential to keep the UI thread relatively free, and if you notice that the image load computation is indeed happening on the UI thread, consider moving it to a background thread using the <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.bitmapcreateoptions(v=vs.95).aspx">BackgroundCreation</a> option. From XAML, this can be done as shown below:</p> <p><font size="2" face="Consolas">&#160; &lt;Image Name=&quot;image1&quot;&gt; <br />&#160;&#160;&#160; &lt;Image.Source&gt; <br />&#160;&#160;&#160;&#160;&#160; &lt;BitmapImage UriSource=&quot;image.jpg&quot; CreateOptions=&quot;BackgroundCreation&quot;/&gt; <br />&#160;&#160;&#160; &lt;/Image.Source&gt; <br />&#160; &lt;/Image&gt;</font></p> <font size="2" face="Consolas"></font> <p>An exercise to try out at this point it to memory-profile an application that loads in a large image; do you see a spike in memory usage corresponding to the image load marker? What was the duration of the image load? On what thread was it getting loaded? Try using the BackgroundCreation option; now what was the thread on which the image got loaded? Did the duration of the image load change? Let us know your experience.</p> <h1>GC markers</h1> <p>Memory is a limited resource on the phone, and although you are programming in a managed environment where the GC takes care of collecting unused memory you still wield control over allocation and referencing, and must monitor them to trim working set. The GC mediates all allocation requests from your code, and operates on a heap that it has partitioned into 2 regions (generations), with allocations happen in the ephemeral “Gen0” region and objects surviving a GC collection possibly promoted to an older “Gen1” region. The GC markers correspond to collections and a tooltip indicates it’s kind (&quot;ephemeral&quot;, &quot;Full&quot;), the point in time when it started, and how long it took to run. An “ephemeral” GC collects only from Gen0 while a “Full” GC collects from both Gen0 and Gen1. Furthermore a “Full” GC can do a “compaction” of the heap if it happens to be significantly fragmented, and even go on to empty the system’s cache of JIT compiled code.</p> <p>A GC is triggered using several heuristics:</p> <ol> <li>When the amount of managed memory allocated since the last GC is deemed significant (1 MB). This is typically an “ephemeral” GC. However it can turn into a “Full” GC under the following circumstances:</li> </ol><ol> <li>When the managed memory held by objects promoted to Gen1 is deemed significant (5 MB).</li> <li>When the application’s total memory usage is deemed significant (i.e. close to the maximum allowed by the OS).</li> <li>When there is significant native-memory pressure - native-memory associated to managed objects (quite common in Silverlight) contributes to total memory usage!</li> </ol> <ul><li>When user code calls <a href="http://msdn.microsoft.com/en-us/library/xe0c2357(v=VS.95).aspx">System.GC.Collect()</a>. This is always a “Full” GC.</li> <li>After any resource allocation failure. This is always a “Full” GC.</li> <li>When the system as whole is running low on free memory. This is always a “Full” GC (that will go all way to emptying the cache of JIT compiled code).</li> </ul><p>The GC’s decision of deeming a threshold “significant” is based on internal heuristics and mentioned here for informational purposes only. The point to note though is that a “Full” GC is much more performance intensive than an “ephemeral” GC.</p> <h1>Insight</h1> <p>Armed with the graph, the markers and your own intuition, you can now get some insight into your scenario’s appetite for memory:</p> <ul> <li>Does memory usage cross the 90 MB <a href="http://msdn.microsoft.com/en-us/library/hh184840(v=VS.92).aspx">technical certification requirement</a> threshold?</li> <li>Is memory usage steadily growing?</li> <li>Do you see a spike in memory usage? Is there a corresponding image load marker? That could be the likely cause (are you using large sized images when a smaller sized image would do?)</li> <li>Are image loads taking long? (Again, this could be due to using large images).</li> <li>Are image loads happening on the UI thread (consider moving that to a background thread).</li> <li>Are there too many GCs? The GC on the Phone is a stop-the-world GC, and therefore the time taken by the GC to run is time taken away from your application! In general strive for little to no GC activity during application startup.</li> <li>The frequency distribution of the GC markers indicates the rate of memory allocation in the scenario, as well as the time ranges when most GC activity happened. If you are writing a game try to concentrate the GC activity during a level change.</li> <li>Are there multiple adjacent “ephemeral” GCs? That indicates short lived and/or temporary objects.</li> <li>Is memory usage not coming down even after one or more “Full” GCs? That is indicative of long lived objects.</li> <li>Are you explicitly causing “Full” GCs by calling <a href="http://msdn.microsoft.com/en-us/library/xe0c2357(v=VS.95).aspx">System.GC.Collect()</a>? That is rarely required, and often a bad idea.</li> </ul> <p>An exercise to try out at this point it to profile an application that has various memory allocations patterns; can you correlate the graph and markers with your own intuition? Let us know your experience.</p> <h1>Summary</h1> <p>The graph and markers provide basic information about your application’s memory usage and when combined with your own intuition of the application scenario, be used to infer several characteristics. Further drill down through the various Views can then be used to understand these characteristics better.</p> <p>Would you like to know more about the Views? Let us know.</p><div style="clear:both;"></div><img src="http://windowsteamblog.com/aggbug.aspx?PostID=580675" width="1" height="1"> http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/19/memory-profiling-launching-graphs-and-markers.aspx Windows Phone Dev Blog 3725 2012-04-19T20:25:04 Using Parallel.ForEach To Aggregate Results From JSON Files Stored in Windows Azure Blob Storage <p>I love NoSQL, except when it comes to reporting.&#160; Then I miss those handy SQL aggregation calls. I recently had a situation where I needed to look at a whole bunch of JSON files stored in Windows Azure Blob Storage and aggregate values from within those JSON files. The exact scenario was to get a count of how many people had achieved each achievement as part of the <a href="http://channel9.msdn.com/achievements/visualstudio" target="_blank">Visual Studio Achievements</a> project.</p> <p>Turned out to be an ideal use case for using some of the <a href="http://msdn.microsoft.com/en-us/concurrency/bb964701" target="_blank">parallel programming features in .NET 4.0</a>. Rather than download and process N JSON blobs linearly, I could throw the loop in a <strong>Parallel.ForEach</strong> block and gain speed from the multi-core machine I was using. The code was pretty straightforward, especially once I discovered the <strong>System.Collections.Concurrent</strong> namespace with its handy <strong>ConcurrentDictionary</strong>.</p> <p>And, most significantly, it increased performance by 400 percent!</p> <p>Below is the code in it’s entirety; I’ll walk through it here:</p> <p>For JSON deserialization, I’m using a library provided by the <a href="http://wcf.codeplex.com" target="_blank">WCF team up on CodePlex</a> which is now part of the ASP.NET Web API. It provides some nifty features for turning JSON into <strong>dynamic </strong>objects. </p> <p>The first thing I do is download a JSON file that has all the achievements, which is publically available (line 25).</p> <p>I then put all the achievements in a <strong>ConcurrentDictionary&lt;string, int&gt;</strong> which I’ll use to build my report (line 33).</p> <p>Then, I get the blobs and start my <strong>Parallel.ForEach </strong>loop (line 41). Inside the <strong>Action(TSource)</strong>, I walk the list of the user’s earned achievements, incrementing the count in the <strong>ConcurrentDictionary </strong>of each achievement (line 57).</p> <p>Finally, once I exit the loop, I turn the dictionary into an Excel spreadsheet (line 69) – folks tend to like that format. </p> <p>You’ll notice the remmed out code; that’s the old non-parallelized code if you’d like to compare. </p> <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:37481f70-5506-49eb-8ba6-098d236a09bc" class="wlWriterEditableSmartContent"><pre style=" width: 656px; height: 1671px;background-color:White;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;overflow: visible;"><div><!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --><span style="color: #008080;"> 1</span> <span style="color: #0000FF;">using</span><span style="color: #000000;"> System; </span><span style="color: #008080;"> 2</span> <span style="color: #000000;"></span><span style="color: #0000FF;">using</span><span style="color: #000000;"> System.Collections.Concurrent; </span><span style="color: #008080;"> 3</span> <span style="color: #000000;"></span><span style="color: #0000FF;">using</span><span style="color: #000000;"> System.IO; </span><span style="color: #008080;"> 4</span> <span style="color: #000000;"></span><span style="color: #0000FF;">using</span><span style="color: #000000;"> System.Json; </span><span style="color: #008080;"> 5</span> <span style="color: #000000;"></span><span style="color: #0000FF;">using</span><span style="color: #000000;"> System.Net; </span><span style="color: #008080;"> 6</span> <span style="color: #000000;"></span><span style="color: #0000FF;">using</span><span style="color: #000000;"> System.Threading.Tasks; </span><span style="color: #008080;"> 7</span> <span style="color: #000000;"></span><span style="color: #0000FF;">using</span><span style="color: #000000;"> Microsoft.WindowsAzure; </span><span style="color: #008080;"> 8</span> <span style="color: #000000;"></span><span style="color: #0000FF;">using</span><span style="color: #000000;"> Microsoft.WindowsAzure.StorageClient; </span><span style="color: #008080;"> 9</span> <span style="color: #000000;"> </span><span style="color: #008080;">10</span> <span style="color: #000000;"></span><span style="color: #0000FF;">namespace</span><span style="color: #000000;"> AchievementsReporting </span><span style="color: #008080;">11</span> <span style="color: #000000;">{ </span><span style="color: #008080;">12</span> <span style="color: #000000;"> </span><span style="color: #0000FF;">class</span><span style="color: #000000;"> Program </span><span style="color: #008080;">13</span> <span style="color: #000000;"> { </span><span style="color: #008080;">14</span> <span style="color: #000000;"> </span><span style="color: #008080;">15</span> <span style="color: #000000;"> </span><span style="color: #0000FF;">static</span><span style="color: #000000;"> </span><span style="color: #0000FF;">void</span><span style="color: #000000;"> Main(</span><span style="color: #0000FF;">string</span><span style="color: #000000;">[] args) </span><span style="color: #008080;">16</span> <span style="color: #000000;"> { </span><span style="color: #008080;">17</span> <span style="color: #000000;"> var cloudBlobClient </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> CloudBlobClient(</span><span style="color: #0000FF;">new</span><span style="color: #000000;"> Uri(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">https://---.blob.core.windows.net</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">, UriKind.Absolute), </span><span style="color: #008080;">18</span> <span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> StorageCredentialsAccountAndKey(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">---</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">, </span><span style="color: #008080;">19</span> <span style="color: #000000;"> </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">---</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">)); </span><span style="color: #008080;">20</span> <span style="color: #000000;"> var container </span><span style="color: #000000;">=</span><span style="color: #000000;"> cloudBlobClient.GetContainerReference(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">users</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">); </span><span style="color: #008080;">21</span> <span style="color: #000000;"> </span><span style="color: #008080;">22</span> <span style="color: #000000;"> </span><span style="color: #0000FF;">string</span><span style="color: #000000;"> masterJson </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">string</span><span style="color: #000000;">.Empty; </span><span style="color: #008080;">23</span> <span style="color: #000000;"> </span><span style="color: #0000FF;">using</span><span style="color: #000000;"> (var webClient </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> WebClient()) </span><span style="color: #008080;">24</span> <span style="color: #000000;"> { </span><span style="color: #008080;">25</span> <span style="color: #000000;"> masterJson </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #008080;">26</span> <span style="color: #000000;"> webClient.DownloadString(</span><span style="color: #0000FF;">new</span><span style="color: #000000;"> Uri(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">http://channel9.msdn.com/achievements/visualstudio?json=true</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">)); </span><span style="color: #008080;">27</span> <span style="color: #000000;"> } </span><span style="color: #008080;">28</span> <span style="color: #000000;"> dynamic masterList </span><span style="color: #000000;">=</span><span style="color: #000000;"> JsonValue.Parse(masterJson); </span><span style="color: #008080;">29</span> <span style="color: #000000;"> var statisticsDictionary </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> ConcurrentDictionary</span><span style="color: #000000;">&lt;</span><span style="color: #0000FF;">string</span><span style="color: #000000;">, </span><span style="color: #0000FF;">int</span><span style="color: #000000;">&gt;</span><span style="color: #000000;">(); </span><span style="color: #008080;">30</span> <span style="color: #000000;"> </span><span style="color: #008000;">//</span><span style="color: #008000;">var statisticsDictionary = new Dictionary&lt;string, int&gt;();</span><span style="color: #008000;"> </span><span style="color: #008080;">31</span> <span style="color: #008000;"></span><span style="color: #000000;"> </span><span style="color: #0000FF;">foreach</span><span style="color: #000000;"> (var achieve </span><span style="color: #0000FF;">in</span><span style="color: #000000;"> masterList.Achievements) </span><span style="color: #008080;">32</span> <span style="color: #000000;"> { </span><span style="color: #008080;">33</span> <span style="color: #000000;"> statisticsDictionary.GetOrAdd(achieve.Name.ToString(), </span><span style="color: #800080;">0</span><span style="color: #000000;">); </span><span style="color: #008080;">34</span> <span style="color: #000000;"> </span><span style="color: #008000;">//</span><span style="color: #008000;">statisticsDictionary.Add(achieve.Name.ToString(), 0);</span><span style="color: #008000;"> </span><span style="color: #008080;">35</span> <span style="color: #008000;"></span><span style="color: #000000;"> } </span><span style="color: #008080;">36</span> <span style="color: #000000;"> BlobRequestOptions options </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> BlobRequestOptions(); </span><span style="color: #008080;">37</span> <span style="color: #000000;"> options.UseFlatBlobListing </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">true</span><span style="color: #000000;">; </span><span style="color: #008080;">38</span> <span style="color: #000000;"> options.BlobListingDetails </span><span style="color: #000000;">=</span><span style="color: #000000;"> BlobListingDetails.Snapshots; </span><span style="color: #008080;">39</span> <span style="color: #000000;"> Console.WriteLine(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Starting...</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">); </span><span style="color: #008080;">40</span> <span style="color: #000000;"> DateTime start </span><span style="color: #000000;">=</span><span style="color: #000000;"> DateTime.Now; </span><span style="color: #008080;">41</span> <span style="color: #000000;"> Parallel.ForEach(container.ListBlobs(options), blobListItem </span><span style="color: #000000;">=&gt;</span><span style="color: #000000;"> </span><span style="color: #008080;">42</span> <span style="color: #000000;"> </span><span style="color: #008000;">//</span><span style="color: #008000;">foreach (var blobListItem in container.ListBlobs(options))</span><span style="color: #008000;"> </span><span style="color: #008080;">43</span> <span style="color: #008000;"></span><span style="color: #000000;"> { </span><span style="color: #008080;">44</span> <span style="color: #000000;"> CloudBlob blob </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #008080;">45</span> <span style="color: #000000;"> container.GetBlobReference( </span><span style="color: #008080;">46</span> <span style="color: #000000;"> blobListItem.Uri.AbsoluteUri); </span><span style="color: #008080;">47</span> <span style="color: #000000;"> </span><span style="color: #0000FF;">string</span><span style="color: #000000;"> json </span><span style="color: #000000;">=</span><span style="color: #000000;"> blob.DownloadText(); </span><span style="color: #008080;">48</span> <span style="color: #000000;"> </span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (</span><span style="color: #000000;">!</span><span style="color: #0000FF;">string</span><span style="color: #000000;">.IsNullOrEmpty(json)) </span><span style="color: #008080;">49</span> <span style="color: #000000;"> { </span><span style="color: #008080;">50</span> <span style="color: #000000;"> dynamic achievementsDynamic </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #008080;">51</span> <span style="color: #000000;"> JsonValue.Parse(json) </span><span style="color: #0000FF;">as</span><span style="color: #000000;"> dynamic; </span><span style="color: #008080;">52</span> <span style="color: #000000;"> </span><span style="color: #0000FF;">foreach</span><span style="color: #000000;"> ( </span><span style="color: #008080;">53</span> <span style="color: #000000;"> var achieve </span><span style="color: #0000FF;">in</span><span style="color: #000000;"> achievementsDynamic.Achievements) </span><span style="color: #008080;">54</span> <span style="color: #000000;"> { </span><span style="color: #008080;">55</span> <span style="color: #000000;"> </span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (achieve.DateEarned </span><span style="color: #000000;">!=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">null</span><span style="color: #000000;">) </span><span style="color: #008080;">56</span> <span style="color: #000000;"> { </span><span style="color: #008080;">57</span> <span style="color: #000000;"> statisticsDictionary[achieve.Name.ToString()] </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #008080;">58</span> <span style="color: #000000;"> statisticsDictionary[achieve.Name.ToString()] </span><span style="color: #000000;">+</span><span style="color: #000000;"> </span><span style="color: #800080;">1</span><span style="color: #000000;">; </span><span style="color: #008080;">59</span> <span style="color: #000000;"> } </span><span style="color: #008080;">60</span> <span style="color: #000000;"> } </span><span style="color: #008080;">61</span> <span style="color: #000000;"> } </span><span style="color: #008080;">62</span> <span style="color: #000000;"> } </span><span style="color: #008080;">63</span> <span style="color: #000000;"> ); </span><span style="color: #008080;">64</span> <span style="color: #000000;"> </span><span style="color: #008080;">65</span> <span style="color: #000000;"> </span><span style="color: #0000FF;">using</span><span style="color: #000000;"> (StreamWriter writer </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> StreamWriter(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">report.xls</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">)) </span><span style="color: #008080;">66</span> <span style="color: #000000;"> { </span><span style="color: #008080;">67</span> <span style="color: #000000;"> </span><span style="color: #0000FF;">foreach</span><span style="color: #000000;"> (var key </span><span style="color: #0000FF;">in</span><span style="color: #000000;"> statisticsDictionary.Keys) </span><span style="color: #008080;">68</span> <span style="color: #000000;"> { </span><span style="color: #008080;">69</span> <span style="color: #000000;"> writer.WriteLine(key </span><span style="color: #000000;">+</span><span style="color: #000000;"> </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">\t</span><span style="color: #800000;">&quot;</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> statisticsDictionary[key].ToString()); </span><span style="color: #008080;">70</span> <span style="color: #000000;"> } </span><span style="color: #008080;">71</span> <span style="color: #000000;"> } </span><span style="color: #008080;">72</span> <span style="color: #000000;"> TimeSpan diff </span><span style="color: #000000;">=</span><span style="color: #000000;"> DateTime.Now </span><span style="color: #000000;">-</span><span style="color: #000000;"> start; </span><span style="color: #008080;">73</span> <span style="color: #000000;"> Console.WriteLine(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">done - took: </span><span style="color: #800000;">&quot;</span><span style="color: #000000;">); </span><span style="color: #008080;">74</span> <span style="color: #000000;"> Console.WriteLine(diff.TotalMinutes); </span><span style="color: #008080;">75</span> <span style="color: #000000;"> } </span><span style="color: #008080;">76</span> <span style="color: #000000;"> } </span><span style="color: #008080;">77</span> <span style="color: #000000;">} </span><span style="color: #008080;">78</span> <span style="color: #000000;"></span></div></pre><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin. http://dunnhq.com --></div> http://rhizohm.net/irhetoric/post/2012/04/17/Using-ParallelForEach-To-Aggregate-Results-From-JSON-Files-Stored-in-Windows-Azure-Blob-Storage.aspx Karsten Januszewski [MS] 3722 2012-04-18T00:24:35 Workaround for CA0055 Error with Silverlight Projects in Visual Studio 2010 <p><a href="https://connect.microsoft.com/VisualStudio/feedback/details/713608/ca0055-silverlight5-business-application-project"> This connect bug</a> describes an issue with creating certain types of Silverlight projects in Visual Studio. If you're referencing Silverlight 4 DLLs from a Silverlight 5 project, you may run into this <a href="http://msdn.microsoft.com/en-us/library/y8hcsad3(v=vs.80).aspx"> code analysis/FXCop</a> issue yourself if code analysis is part of your process. The core of the problem is a versioning decision in Silverlight 5 which results in compile-time violation due to loading two different versions of mscorlib in the same project. It manifests as the following error:</p> <ul> <li>Error 2 CA0055 : Could not unify the platforms (mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, mscorlib, Version=5.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) for 'MyProject.Silverlight\obj\Debug\MyProject.dll'.</li> </ul> <p>More <a href="http://msdn.microsoft.com/en-us/library/ms244741.aspx">information on CA0055 may be found on MSDN</a>.</p> <h3>How to Reproduce the Issue … in theory</h3> <p>In theory, all you need to do to reproduce the issue is reference a SL4-targeted DLL from an SL5 application. However, in practice, there are other factors in play. For example, it may matter which mscorlib version gets loaded first.</p> <p><strong>These steps won't repro the problem on my installation, but I'm putting them out here in case they help you visualize the issue (and also because I had already written them up when I realized they don't repro here -- I don't want all these bits to go to waste).</strong></p> <p>Create a Silverlight 4 class library. Make sure you target Silverlight 4. I named mine SL4ClassLibrary. The actual code is unimportant, but I set it to the following:</p> <pre class="brush: csharp;"> namespace SL4ClassLibrary<br /> {<br /> public class Class1<br /> {<br /> public string Foo = "Bar";<br /> }<br /> }<br /> </pre> <p>Next, add a Silverlight 5 Application project. Make sure it targets Silverlight 5. Here's what my solution looks like:</p> <p><a href="http://10rem.net/media/84844/Windows-Live-Writer_3f6292c37abe_F3BC_image_2.png" target="_blank"><img src="http://10rem.net/media/84849/Windows-Live-Writer_3f6292c37abe_F3BC_image_thumb.png" width="308" height="335" alt="image" border="0" 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"/></a></p> <p>Build the solution.</p> <p>Next, add a File Reference (not a project reference) from the Silverlight 5 client app to the Silverlight 4 DLL.</p> <p><a href="http://10rem.net/media/84854/Windows-Live-Writer_3f6292c37abe_F3BC_image_4.png" target="_blank"><img src="http://10rem.net/media/84859/Windows-Live-Writer_3f6292c37abe_F3BC_image_thumb_1.png" width="500" height="269" alt="image" border="0" 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"/></a></p> <p>If you build it now, everything works fine. The key step here is to add code analysis. Many organizations have code analysis as a required part of their build process, using the compiler command-line arguments. If you don't, you can turn it on via the menu:</p> <p><a href="http://10rem.net/media/84864/Windows-Live-Writer_3f6292c37abe_F3BC_image_8.png" target="_blank"><img src="http://10rem.net/media/84869/Windows-Live-Writer_3f6292c37abe_F3BC_image_thumb_3.png" width="342" height="257" alt="image" border="0" 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"/></a></p> <p>Then check the "Enable Code Analysis on Build" checkbox.</p> <p><a href="http://10rem.net/media/84874/Windows-Live-Writer_3f6292c37abe_F3BC_image_6.png" target="_blank"><img src="http://10rem.net/media/84879/Windows-Live-Writer_3f6292c37abe_F3BC_image_thumb_2.png" width="500" height="339" alt="image" border="0" 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"/></a></p> <p>Now build the solution. In theory, you'll get a CA0055 error, but as I mentioned at the top, that doesn't happen on my install. Most of the people who have reported this issue on the connect bug have mentioned it in the context of the Business Application Template or third party controls.</p> <p><strong>Remember, this is a code analysis compile/build issue, not a runtime issue, so if you get past compiling your application, you're good.</strong></p> <h3>The Workaround</h3> <p>This is already planned to be fixed in Visual Studio 11 RC. However, we do have a manual workaround for this to help you continue working if you're running into this scenario today. This will unblock using FxCop in Visual Studio 2010.</p> <p>A high level walkthrough of how this works from the command line is:</p> <ul> <li>We will tell FxCop which version of the runtime it will be using by pointing it to Silverlight 5's installed mscorlib.dll using the /platform argument</li> <li>Tell FxCop where to find all of the referenced assemblies using /d (short for /directory) arguments: Use as many /d:&lt;folder&gt; arguments as necessary for FxCop to find all of the referenced assemblies.</li> <li>Use either /console to tell FxCop to output the results to the console window, or /out:&lt;file&gt; to tell FxCop to write the results to an .xml file</li> </ul> <p>To run FxCop from the command line for a default Business Application:</p> <ul> <li>Add the %Visual Studio Install Directory%\Team Tools\Static Analysis\FxCop folder to PATH</li> <li>Run "fxcopcmd.exe /file:&lt;SL Business Application binary&gt; /platform:&lt;SL5 Reference Assemblies Directory\mscorlib.dll&gt; /d:&lt;SL4 Reference Assemblies Directory&gt; /d:&lt;SL4 SDK Client Libraries Directory&gt;"</li> </ul> <p>An example of what this looks like on an x64 operating system with all of the default install directories is:</p> <ul> <li>SET PATH=%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop</li> <li>fxcopcmd /file:BusinessApplication1.dll /platform:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v5.0\mscorlib.dll" /d:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0" /d:"C:\Program Files (x86)\Microsoft SDKs\Silverlight\v4.0\Libraries\Client" /out:results.xml</li> <li>NOTE: If you receive a CA0001 error: "The following error was encountered while reading module 'XXXX.YYYYY' : Assembly reference cannot be resolved…" this means that you need to find where that assembly is installed to on your machine and add an additional /d:&lt;installed directory&gt; argument pointing FxCop to where those assemblies are installed.&nbsp;</li> </ul> <p>My thanks to the Silverlight Team and to Andrew Hall for the information on this workaround.</p> <p>Of course, the easiest and best solution, if you can do it, is to use libraries that specifically target Silverlight 5, and make sure all references from your Silverlight 5 project are to libraries targeting Silverlight 5.&nbsp; We know that's not possible in all cases, including the specific reported business application case, which is why we documented this workaround.</p> <p><a href="http://feedads.g.doubleclick.net/~a/WtwrpLLZaCF59esNJN0BeM4o43g/0/da"><img src="http://feedads.g.doubleclick.net/~a/WtwrpLLZaCF59esNJN0BeM4o43g/0/di" border="0" ismap="true"></img></a><br/> <a href="http://feedads.g.doubleclick.net/~a/WtwrpLLZaCF59esNJN0BeM4o43g/1/da"><img src="http://feedads.g.doubleclick.net/~a/WtwrpLLZaCF59esNJN0BeM4o43g/1/di" border="0" ismap="true"></img></a></p><div class="feedflare"> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=bU1_qm2GVuU:7SY3n3pJvYc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=bU1_qm2GVuU:7SY3n3pJvYc:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=bU1_qm2GVuU:7SY3n3pJvYc:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=bU1_qm2GVuU:7SY3n3pJvYc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=bU1_qm2GVuU:7SY3n3pJvYc:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=bU1_qm2GVuU:7SY3n3pJvYc:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=bU1_qm2GVuU:7SY3n3pJvYc:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=bU1_qm2GVuU:7SY3n3pJvYc:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=bU1_qm2GVuU:7SY3n3pJvYc:gIN9vFwOqvQ" border="0"></img></a> </div><img src="http://feeds.feedburner.com/~r/PeteBrown/~4/bU1_qm2GVuU" height="1" width="1"/> http://feedproxy.google.com/~r/PeteBrown/~3/bU1_qm2GVuU/workaround-for-ca0055-error-with-silverlight-projects-in-visual-studio-2010 Pete Brown 3720 2012-04-17T21:07:46 Handle Feature Reductions <p>The third of the four principles I mentioned in <a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/03/07/optimizing-apps-for-lower-cost-devices.aspx">Optimizing Apps for Lower Cost Devices</a> is Handle Feature Reductions.</p> <p>With the <a href="http://channel9.msdn.com/Shows/Inside+Windows+Phone/Inside-Windows-Phone-33--Windows-Phone-75-Refresh--60-more-Opportunity">Windows Phone 7.5 Refresh</a>, we refactored the OS in several areas to reduce memory usage and free up more RAM for apps. Part of this exercise included assessing the memory usage of features in the developer platform and assessing which, if any, we could afford to live without.</p> <p>To free up the most RAM while also being as minimally disruptive as possible, we disabled generic background agents (<a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.scheduler.periodictask(v=VS.92).aspx">PeriodicTasks</a>/<a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.scheduler.resourceintensivetask(v=vs.92).aspx">ResourceIntensiveTasks</a>).</p> <p>On today&rsquo;s devices, users can disable background agents for an app manually via the Settings control panel, and the system can disable background agents for an app if the maximum number of supported background agents is exceeded. These conditions are surfaced to the app via an <a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.scheduler.scheduledactionservice.add(v=VS.92).aspx">InvalidOperationException</a> which the app must handle. On 256MB devices, the app receives the same InvalidOperationException received in the maximum exceeded case above when trying to <a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.scheduler.scheduledactionservice.add(v=VS.92).aspx">schedule a background agent</a> (since the maximum number of supported background agents is 0). This means if an app is written today to <a href="http://msdn.microsoft.com/en-us/library/hh202944(v=VS.92).aspx">handle the maximum exceeded case</a>, it will continue to work on 256MB devices unchanged. Make sure your apps handle this exception path and degrade gracefully when these features are unavailable. This will benefit your app experience both on today&rsquo;s generation of devices as well as on new lower cost devices. The 256MB emulator introduced in the <a href="http://www.microsoft.com/download/en/details.aspx?id=29233">WPSDK 7.1.1</a> enables you to easily test this code path.</p> <p>If you're using PeriodicTasks today to power your live tiles, there are a few options available to you. The first option is to switch to <a href="http://msdn.microsoft.com/en-us/library/ff402558%28v=VS.92%29.aspx">push notifications</a>. A second option is to create <a href="http://msdn.microsoft.com/en-us/library/ff769548(v=vs.92).aspx">ShellTileSchedules</a> to update your tiles with remote images. A third option is to leverage the <a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.shell.shelltile(v=vs.92).aspx">ShellTile API's</a> from your foreground app to update your tiles whenever the app is launched. While technically the tiles wouldn't be live in this last case, the content would be refreshed, which can give the impression of live tiles. If you allow users to flag content, for instance, you could turn your tiles into a permanent reminder space and update them to reflect the most recently flagged content (or toggle through flagged content with every app launch). If these options aren't feasible for you, then you can still always take advantage of <a href="http://msdn.microsoft.com/en-us/library/hh202948(v=VS.92).aspx">secondary tiles</a> to provide convenient access to deeper experiences in your apps.</p> <p>In addition to PeriodicTasks and ResourceIntensiveTasks being disabled, the lower cost 7x27a chipset itself has reduced media playback capabilities that may impact playback of some of your content. Attempting to playback unsupported content on the device will result in either (1) a "Sorry, we can't play this file on your phone" error, if played via the <a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.tasks.mediaplayerlauncher(v=VS.92).aspx">MediaPlayerLauncher</a>, (2) a <a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.mediaelement.mediafailed(v=vs.95).aspx">MediaFailed</a> event if played via <a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.mediaelement(v=VS.95).aspx">MediaElement</a>, or (3) suboptimal video playback in some cases. While most apps in our testing during the <a href="http://channel9.msdn.com/Shows/Inside+Windows+Phone/Inside-Windows-Phone-33--Windows-Phone-75-Refresh--60-more-Opportunity">Windows Phone 7.5 Refresh</a> were not impacted by these reduced capabilities, you may be impacted if you do exceed them. Be sure to <a href="http://msdn.microsoft.com/en-us/library/ff462087(v=VS.92).aspx">understand the new baseline</a> and encode your content to work well across all Windows Phone devices. To conditionally offer higher quality vs. lower quality content depending on the device, leverage the <a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.info.mediacapabilities.ismultiresolutionvideosupported(v=vs.92).aspx#Y0">MediaCapabilities.IsMultiResolutionVideoSupported</a> flag. This flag will be false on devices with reduced media capabilities, so be sure to fall back to the <a href="http://msdn.microsoft.com/en-us/library/ff462087(v=VS.92).aspx">baseline specs</a> in this case.</p> <p>While feature reductions are never ideal, these reductions bring with them an opportunity to reach a large new audience with your apps. Be sure to account for these reductions when targeting lower cost devices to provide the best possible experience to your users.</p><div style="clear:both;"></div><img src="http://windowsteamblog.com/aggbug.aspx?PostID=580503" width="1" height="1"> http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/17/handle-feature-reductions.aspx Windows Phone Dev Blog 3719 2012-04-17T18:28:00 Free Microsoft Azure Trial for your application According to major vendors like Amazon and Microsoft, the cloud is our future. No matter what type of application, it could benefit from cloud storage, cloud DB or cloud services. I believe there is a lot of truth in these ideals. But no technology is perfect for every scenario. That&#8217;s why its cool that you [...] http://blog.wpfwonderland.com/2012/04/16/free-microsoft-azure-trial-for-you-application/ Walt Ritscher 3718 2012-04-17T00:02:00 XAML Snippets and Visual Studio Visual Studio has a long history of supporting Code Snippets on the Toolbox.&#160; You can drag a code chunk to the toolbox, and instantly have a reusable code resource.&#160; So easy. I&#8217;ve found that some XAML developers are not aware that this technique works with XAML blocks.&#160; It does.&#160; Select your XAML in the text [...] http://blog.wpfwonderland.com/2012/04/16/xaml-snippets-and-visual-studio/ Walt Ritscher 3717 2012-04-16T22:25:58 Where to get .NET Gadgeteer and Netduino GO compatible 10 pin IDC sockets, and how to solder them <p>When creating modules for the <a href="http://www.netmf.com/gadgeteer/">.NET Gadgeteer</a> or <a href="http://netduino.com/">Netduino GO</a>, one of the harder parts to source is the 10 pin IDC socket. This is the tiny 1.27mm pin pitch socket you see on the boards.</p> <p><a href="http://10rem.net/media/84703/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_4.png" target="_blank"><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://10rem.net/media/84708/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_thumb_1.png" width="650" height="133" /></a></p> <p>Manufacturers will get those by the reel in most cases, directly from China. There are several places the average hobbyist can get them from:</p> <ul> <li><a href="http://search.digikey.com/scripts/DkSearch/dksus.dll?lang=en&amp;site=us&amp;vendor=0&amp;WT.z_cid=ref_findchips0311_dkc_buynow&amp;mpart=20021521-00010T1LF" target="_blank">Digikey Part 609-4054-ND</a>. Quantities as low as 1.</li> <li><a href="http://www.samtec.com/ProductInformation/TechnicalSpecifications/Overview.aspx?series=SHF" target="_blank">Samtec Part SHF-105-01-L-D-SM</a> (you need to use their <a href="http://www.samtec.com/ProductInformation/TechnicalSpecifications/Build_Part.aspx?series=SHF" target="_blank">part builder tool</a> to specify this number). You can usually get them to ship you a 10pc sample order as well.</li> <li><a href="http://www.mouser.com/search/ProductDetail.aspx?qs=oJs1R%252bxK6kTNcJ8wnslDRg%3d%3d" target="_blank">Through-hole version</a> if you'd rather use it than the SMD version (large quantities only)</li> <li><a href="http://wiki.tinyclr.com/index.php?title=Community_Offers#Gadgeteer_Sockets_and_Cables" target="_blank">Community-provided parts</a> (including sockets and cables). Valentin ordered by the reel and is selling them cheap.</li> <li>GHI Electronics is <a href="http://www.ghielectronics.com/catalog/product/288" target="_blank">selling them individually</a>.</li> <li>GHI is also selling them <a href="http://www.ghielectronics.com/catalog/product/368" target="_blank">by the reel of 800</a>.</li> </ul> <p>All of these sockets are black. The Netduino blue sockets were a custom run by them, and so are not available to us mere mortals :)</p> <p>Sockets may come in tape, tube, or loose. In a section of cut tape, it looks like this (purchased from community member Valentin):</p> <p><a href="http://10rem.net/media/84713/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_24.png" target="_blank"><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://10rem.net/media/84718/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_thumb_11.png" width="650" height="213" /></a></p> <p>Samtec tends to ship in tubes, and most sellers selling individual sockets will ship them in bags or loose. It looks like Digikey ships in tubes as well. It takes a fair bit of effort to unzip these and sell them individually, so expect to pay quite a bit more for small quantities.</p> <h3>A comparison of socket implementations</h3> <p>Although they are completely compatible for our purposes, there are some physical differences between the Samtec sockets and the other widely available sockets. The Samtec parts are more expensive, but for hand-soldering, they're friendlier. Why? Because they have a slight undercut or bottom bevel which makes it easier to get a soldering iron in to heat the pad and pin.</p> <p>In the pictures below, the generic part is on the left, the Samtec part on the right.</p> <p><a href="http://10rem.net/media/84723/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_8.png" target="_blank"><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://10rem.net/media/84728/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_thumb_3.png" width="283" height="175" /></a><a href="http://10rem.net/media/84733/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_10.png" target="_blank"><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://10rem.net/media/84738/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_thumb_4.png" width="350" height="175" /></a></p> <p><a href="http://10rem.net/media/84743/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_14.png" target="_blank"><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="Look! A lens flare! I could edit the next Star Trek now" border="0" alt="Look! A lens flare! I could edit the next Star Trek now" src="http://10rem.net/media/84748/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_thumb_6.png" width="650" height="216" /></a></p> <p>You can clearly see the undercut on the Samtec part on the right. You can also see that the sides of the part extend down further than the body, enabling it to sit on the plastic and not just on the pin headers. This second feature is nice, but probably overkill for most modules. IOW, it's quality, but I'm not sure it's worth the price premium. The extra bump/key on the outside is helpful for positioning during assembly, but doesn't serve any mechanical purpose on an assembled Gadgeteer or Netduino GO board. All you need is the notch. Note that every commercial module and main board I've bought all use the more generic chinese parts.</p> <p>The undercut is helpful, though. Just look at how much more of the pin it exposes to your iron.</p> <p>So, if you are new to soldering, I recommend using the more expensive Samtec part. If you have a reasonable amount of soldering experience and/or can make the pad a little longer than the stock footprint (see next section), you can get the inexpensive sockets.</p> <h3>Techniques for designing and soldering the connector</h3> <p>For your own modules, I recommend making the size of the pads a bit longer than the specifications. This will take up a tiny bit more room on the board, but make it easier for you to get your iron. Below are the two profiles: default on left, my current one on the right. Note that I intend to adjust the hand-solder one a bit to make the pads longer so they come into the center a bit better. As they are right now, you can't get a <a href="http://en.wikipedia.org/wiki/Fillet_(mechanics)">fillet</a> on the heel of the pins. That's hard to do anyway, but I want as strong a connection as possible.</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="http://10rem.net/media/84753/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_33.png" width="342" height="231" /></p> <p>When hand-soldering, first apply flux to all the pads. You may also want to apply flux to the pin bases on the socket -- it certainly won't hurt, especially if the pins look a little dirty/oxidized.</p> <p><a href="http://10rem.net/media/84758/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_16.png" target="_blank"><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://10rem.net/media/84763/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_thumb_7.png" width="650" height="334" /></a></p> <h4>Step 1: Tin one pad</h4> <p>I recommend then tinning one pad in the corner with a little solder. You don't want a giant blob here. As long as you get the whole pad tinned, less is better.</p> <p><a href="http://10rem.net/media/84768/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_18.png" target="_blank"><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://10rem.net/media/84773/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_thumb_8.png" width="650" height="246" /></a></p> <h4>Step 2: Install the socket</h4> <p>Then, holding the socket in place with your fingers (by the plastic), melt the solder to wet the one pin and hold the socket in place while applying downward pressure to make sure it seats flat. I used to tin all the pads, but I've found it much easier to tin a single pad. <strong>You're not looking to make an electrically sound connection here, just something to hold the socket flat</strong>.</p> <p><strong>If you need to adjust the position of the socket, make sure you completely melt the solder on that pad</strong>. If it's only half-melted, the leverage you have with the socket will rip up the pad. I did this once. Not good!</p> <p>Look at the board edge-on and make sure the connector is seated flat and the pin is touching the pad, not suspended above it on a blob of solder.</p> <p><a href="http://10rem.net/media/84778/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_30.png" target="_blank"><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://10rem.net/media/84783/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_thumb_14.png" width="650" height="217" /></a></p> <h4>Step 3: Secure the socket at the opposite corner</h4> <p>Then, once the socket is in the correct position and all pins are centered on the pads (or close) and sitting completely flat, solder the opposite pin to firmly hold the connector in place. Don't apply too much pressure, or you'll move the socket and possibly tear up the first pad you soldered. Once you get past this part, all the tricky parts are done.</p> <p><a href="http://10rem.net/media/84788/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_28.png" target="_blank"><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://10rem.net/media/84793/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_thumb_13.png" width="650" height="181" /></a></p> <h4>Step 4: Solder the remaining pins (including the first one)</h4> <p>Then, solder each pin, including the first one you tinned. The pins are a bit chunky for <a href="http://www.youtube.com/watch?v=5uiroWBkdFY">drag soldering</a>, so you really need to do one pin at a time.</p> <p>I do this by using a relatively fine chisel tip on my iron. I touch the side of the pin along with the pad at the same time and then add enough solder to ensure a strong connection. Make sure you heat both the pad and the pin. You can see here how the larger pads really help with hand-soldering. If you have a larger tip, you will end up heating more than one pin at a time, but it will be more difficult to get the pads. In that case, apply a bit of downward pressure to try and transfer heat between the pin and the pad.</p> <p><a href="http://10rem.net/media/84798/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_26.png" target="_blank"><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://10rem.net/media/84803/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_thumb_12.png" width="650" height="238" /></a></p> <p>The sockets are pretty robust, but try not to touch the plastic with the iron. It's normal for flux to smoke a little, but you don't want that extra special kind of smoke that comes from burning plastic.</p> <h4>Step 5: Inspect and Check</h4> <p>I tend to use a little too much solder on these joints. You can use a bit less than what I have here. Getting a nice fillet with these sockets is hard, though. Even the commercial modules and main boards tend to have a bit too much solder here, so I wouldn't worry too much about it as long as the connection is sound and the solder isn't adhering to the plastic.</p> <p><a href="http://10rem.net/media/84808/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_22.png" target="_blank"><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://10rem.net/media/84813/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_thumb_10.png" width="650" height="213" /></a></p> <p><a href="http://10rem.net/media/84818/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_20.png" target="_blank"><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://10rem.net/media/84823/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_thumb_9.png" width="650" height="211" /></a></p> <p>That's it! Visually inspect the board from a number of angles to make sure everything is soldered correctly and that there are no bridges. Using a multimeter, you can check each pin against some other connected part of the board to ensure continuity.</p> <p><a href="http://feedads.g.doubleclick.net/~a/3HPWvloqtX6Hgq-Wm93CZGsZw-0/0/da"><img src="http://feedads.g.doubleclick.net/~a/3HPWvloqtX6Hgq-Wm93CZGsZw-0/0/di" border="0" ismap="true"></img></a><br/> <a href="http://feedads.g.doubleclick.net/~a/3HPWvloqtX6Hgq-Wm93CZGsZw-0/1/da"><img src="http://feedads.g.doubleclick.net/~a/3HPWvloqtX6Hgq-Wm93CZGsZw-0/1/di" border="0" ismap="true"></img></a></p><div class="feedflare"> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=DfDbgOYucZs:Nn5U2yl13aQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=DfDbgOYucZs:Nn5U2yl13aQ:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=DfDbgOYucZs:Nn5U2yl13aQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=DfDbgOYucZs:Nn5U2yl13aQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=DfDbgOYucZs:Nn5U2yl13aQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=DfDbgOYucZs:Nn5U2yl13aQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=DfDbgOYucZs:Nn5U2yl13aQ:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=DfDbgOYucZs:Nn5U2yl13aQ:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=DfDbgOYucZs:Nn5U2yl13aQ:gIN9vFwOqvQ" border="0"></img></a> </div><img src="http://feeds.feedburner.com/~r/PeteBrown/~4/DfDbgOYucZs" height="1" width="1"/> http://feedproxy.google.com/~r/PeteBrown/~3/DfDbgOYucZs/where-to-get-net-gadgeteer-and-netduino-go-compatible-10-pin-idc-sockets-and-how-to-solder-them Pete Brown 3715 2012-04-16T21:58:12 Coding Signing Internal Applications and a Gotcha This blog post explains one way to code sign your internal applications along with their installers. Code signing your applications and installers provide a UAC friendly user experience during installation, uninstall, and when your legacy applications may need to run with administrative privileges (more about admin privileges below). UAC Friendly Installation Experience The below image [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=karlshifflett.wordpress.com&#038;blog=1204518&#038;post=1783&#038;subd=karlshifflett&#038;ref=&#038;feed=1" width="1" height="1" /> http://karlshifflett.wordpress.com/2012/04/16/coding-signing-internal-applications-and-a-gotcha/ Karl Shifflett [MS] 3714 2012-04-16T21:25:42 Win 8 Page Navigation http://feedproxy.google.com/~r/JesseLiberty-SilverlightGeek/~3/XG3wBuwwElg/ Jesse Liberty [MS] 3712 2012-04-16T19:27:21 Turning Special Collection types (HttpCookieCollection) to Generic List I&#8217;m working on some new course material for ASP.NET MVC 3.&#160; I have the need to take some of the ASP.NET special collection properties and turn them into a generic list.&#160; For example, the Request.Cookies property is type as HttpCookieCollection which is based on the NameObjectCollectionBase type. This snippet does the trick. var cookieList = [...] http://blog.wpfwonderland.com/2012/04/13/turning-special-collection-types-httpcookiecollection-to-generic-list/ Walt Ritscher 3709 2012-04-14T07:49:32 Here comes Windows 8 http://feedproxy.google.com/~r/JesseLiberty-SilverlightGeek/~3/P0TCxYUg9sc/ Jesse Liberty [MS] 3708 2012-04-13T21:41:21 Adjusting to rapid Marketplace growth—and preparing for the future <p>Over the last several weeks some of you have reported slowdowns or delays in the app approval and publishing process. You’ve also said App Hub feels slower. We’ve been investigating, and today I want to explain why this is happening and more importantly what we’re doing about it. </p> <p>This is the first in a series on our evolving Marketplace service that I plan to write in the months ahead. </p> <p>It turns out App Hub had become less responsive. And our certification turnaround times have increased—by one business day, on average, from January through late March. Why? In short, growing pains. In three months the number of apps in Marketplace has grown by 60 percent, to nearly 80,000. During that period we’ve also nearly doubled the number of customer stores around the world, so there are now 54 markets to sell your apps. The addition of so many new markets and apps so quickly has slowed our backend systems.</p> <p>So what are we doing about it? There is a long-term and a short-term plan. We’re already in the process of developing a more robust and scalable Marketplace service that will address current problems and pave the way for the even more rapid growth we’re expecting in the years ahead. But engineering work this significant doesn’t happen overnight. Our plan is to have it complete by late summer. </p> <p>Until that work is done, we’ll be taking short-term measures to shore up the current service and relieve some of the strain on app certification and publishing. Some of these changes started rolling out about 10 days ago and include: </p> <ul> <li>Adding more server capacity to better handle the increased load.</li> <li>Streamlining our processes to accelerate the rate at which apps can be ingested, certified, and published.</li> </ul> <p>Unfortunately, you probably won’t see dramatic results until Marketplace’s next generation service is deployed later this summer. But the average app certification wait has now fallen to 2.6 business days, or about a half-day improvement over the last 10 days. (You might experience different wait times depending on the app you’re submitting.)</p> <p>We’ve also deployed some bug fixes that are helping to improve App Hub responsiveness.</p> <p>I’m well aware there’s more work to do. But I wanted you to know that we take your feedback and concerns seriously and are attacking the problem on multiple fronts. I’ll have more to say on short-term plumbing upgrades—and planned long-term improvements to Marketplace and App Hub—in future posts. In the meantime, please let me know what’s on your mind.</p><div style="clear:both;"></div><img src="http://windowsteamblog.com/aggbug.aspx?PostID=580202" width="1" height="1"> http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/12/adjusting-to-rapid-marketplace-growth-and-preparing-for-the-future.aspx Windows Phone Dev Blog 3707 2012-04-12T22:56:44 Disabling Google Instant Search in IE Permanently I&#8217;m not a fan of the Google Instant search feature.&#160; Not a problem, as Google provides a way to disable the feature[1].&#160; Except when it doesn&#8217;t work. Instant search re-enables itself constantly, it&#8217;s like the undead rising over and over again. Use this URL I found that if I use this URL http://www.google.com/webhp?complete=0&#38;hl=en I always [...] http://blog.wpfwonderland.com/2012/04/12/disabling-google-instant-search-in-ie-permanently/ Walt Ritscher 3706 2012-04-12T20:30:46 Browsing to website URL in a ViewModel During a WPF class last week I was asked a lot of questions about ViewModels.&#160; We were eating lunch, I was enjoying a smoky BBQ sandwich with all the fixings, when one of the guys at the table asked how to launch a webbrowser from the ViewModel.&#160; I had the code already, I&#8217;ve used it [...] http://blog.wpfwonderland.com/2012/04/11/browsing-to-website-url-in-a-viewmodel/ Walt Ritscher 3705 2012-04-12T08:13:48 Cover art for my HLSL book on O’Reilly Media When you write for the O&#8217;Reilly animal book series you get a book cover with animal artwork. For many years the most typical O&#8217;Reilly books, the &#34;animal books,&#34; have been designed as thorough guides for work with established technologies. The original animal design was developed by Edie Freedman because she thought that Unix program names [...] http://blog.wpfwonderland.com/2012/04/10/cover-art-for-my-hlsl-book-on-oreilly-media/ Walt Ritscher 3701 2012-04-10T23:05:58 Reduce Memory Usage <p>The second of the four principles I mentioned in <a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/03/07/optimizing-apps-for-lower-cost-devices.aspx">Optimizing Apps for Lower Cost Devices</a> is Reduce Memory Usage.</p> <p>Per <a href="http://msdn.microsoft.com/en-us/library/hh184840(v=VS.92).aspx">certification requirement 5.2.5</a>, apps should not exceed 90MB of memory usage on 256MB devices. When thinking about targeting 256MB devices, your first order of business should be to check whether your apps exceed 90MB today. If they don't, then reducing memory usage is less urgent (but still important as I'll mention later). If they do, then memory tuning will be required.</p> <p>Leverage the <a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/02/01/memory-profiling-for-application-performance.aspx">memory profiler</a> and <a href="http://msdn.microsoft.com/en-us/library/ff941122(v=vs.92).aspx">memory-related API's</a> to identify areas of opportunity to improve memory usage in your app. These tools can help you understand pretty quickly what the peak memory usage of your app is as well as what the breakdown of memory usage is across various states of your app.</p> <p>A general principle to keep in mind is that loading less will result in less memory usage. Loading less could mean loading less data at a time, loading less/smaller content, or fixing leaks which result in more objects residing in memory over the lifetime of your app.</p> <p>Many apps load and display lists of data (news articles, recipes, events, search results, etc.) often across several pivots on a page. If each of these pivots loads hundreds of list items (usually with images attached to each one), this can result in wasted memory usage particularly if (1) the user never views particular pivots or (2) the user never scrolls below 20 items in any given list. If several pages in your app display lists of data in this way, then memory usage can add up quickly as users navigate through your app. Wherever possible, load less data at a time. Defaulting to a small amount of items in each list and then loading more data as the user requests it can enable you to load the most relevant content in your UI at once (rather than potentially harm user interactivity by loading data in response to user input like pivot selection changes) while keeping your app's memory footprint at a reasonable level.</p> <p>Asset memory (for images, sound effects, etc.) can quickly add up if you're not careful about how you load assets. The more assets you load into memory at a time, the larger your memory footprint will become. Not only does the amount of content you load affect memory usage, but also does the size of the content. Memory usage of images, for instance, can be approximated by multiplying width * height * bpp (bits/pixel). Higher resolution images will naturally translate into higher memory usage. Loading a 1024x1024 image into memory only to scale it down to a 100x100 container will consume more memory than is necessary. If you're doing this for every image in a list or in a photo gallery feature, then you're using a lot more memory than you need to be. Load thumbnails where it makes sense, and load higher resolution content as the user requests it. If your content is preloaded in your app, make sure that the resolution of the content aligns with the sizes of the containers that will host the content. If you're loading images from a web service, check for options to load lower resolution images instead of higher resolution versions. <a href="http://msdn.microsoft.com/en-us/library/ff708027(v=vs.92).aspx" title="PictureDecoder.DecodeJpeg">PictureDecoder.DecodeJpeg</a> can generate thumbnails from high resolution image streams so use this to your advantage.&nbsp;&nbsp;If you're <a href="http://msdn.microsoft.com/en-us/library/hh855082(v=vs.92).aspx">building a game</a>, load assets for the on-screen experience only and flush those assets when they are no longer necessary. Hanging on to assets unnecessarily can result in OOM (out-of-memory) exceptions or general performance problems as the size of your game grows.</p> <p>Memory leaks can bloat your app footprint and should be identified and addressed. Common sources of memory leaks are building circular navigation loops and failing to deregister event handlers to long-lived objects. Apps that use a home button can result in circular navigation loops which can fill the back stack with redundant page instances. These page instances consume memory and could result in your app crashing due to an OOM (out-of-memory) exception while users navigate through your app. Avoid circular navigation loops by removing home button functionality or by leveraging the new <a href="http://msdn.microsoft.com/en-us/library/system.windows.navigation.navigationservice.removebackentry(v=vs.92).aspx">back stack manipulation API&rsquo;s</a> exposed in Windows Phone 7.5. Neglecting to deregister event handlers to static objects can prevent objects from being reclaimed by the garbage collector. Imagine a search results page where the user navigates back and forth between the details of a search result and the search results page itself. If the details pages hold on to references to long-lived objects, they could continue to reside in memory even after the user navigates back from them. Be sure to deregister event handlers to static objects when they are no longer needed to prevent such leaks. <a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.controls.phoneapplicationpage.onremovedfromjournal(v=vs.92).aspx">OnRemovedFromJournal</a> is the recommended place to perform this task since it handles page closure both via backward navigations as well as via the <a href="http://msdn.microsoft.com/en-us/library/system.windows.navigation.navigationservice.removebackentry(v=vs.92).aspx">back stack manipulation API&rsquo;s</a>.</p> <p>Additionally, you should be careful with the use of memory-intensive controls like the <a href="http://msdn.microsoft.com/en-us/library/ff431812(v=VS.92).aspx">WebBrowser</a> and <a href="http://msdn.microsoft.com/en-us/library/ff941096(v=VS.92).aspx">Maps</a> controls. IE can consume a lot of memory when rendering complex websites. This is true even today. The WebBrowser control essentially embeds IE in your app, so if you allow users to navigate to arbitrary complex websites in your app, the memory that IE uses will be attributed to your app. This could result in your app running out of memory if the sum of your app's memory usage plus IE's memory usage exceeds the recommended 90MB limit. If you'd like to use the WebBrowser control, just be mindful of the content that users are allowed to load. If the content isn't very complex, then performance/memory issues shouldn't be a concern. If users can load complex content in the control and your app footprint is already large, you may want to consider using the <a href="http://msdn.microsoft.com/en-us/library/hh394020(v=vs.92).aspx">WebBrowserTask</a> on 256MB devices to reduce the memory usage inside of your app. Similarly, for the Maps control, you may want to leverage the <a href="http://msdn.microsoft.com/en-us/library/hh394026(v=vs.92).aspx">BingMapsTask</a>/<a href="http://msdn.microsoft.com/en-us/library/hh394024(v=vs.92).aspx">BingMapsDirectionsTask</a> to offload map memory to a system process. If a customized map experience is critical to your app, then loading fewer overlays or otherwise simplifying your map experience can help save some memory as well.</p> <p>As I mentioned before, if you're exceeding 90MB today, then you're likely violating some of these principles and tuning will be required to target 256MB devices. If you're not exceeding 90MB, tuning the memory usage of your app is less urgent but still has its benefits.</p> <p>To enable apps to use up to 90MB on 256MB devices without jeopardizing the overall integrity of the system, we improved paging support in the OS with the <a href="http://channel9.msdn.com/Shows/Inside+Windows+Phone/Inside-Windows-Phone-33--Windows-Phone-75-Refresh--60-more-Opportunity">Windows Phone 7.5 Refresh</a> to better manage and distribute memory between background services/processes and the foreground app. While paging is generally abstracted from you, apps may perform slower or glitch occasionally if they push the device to its limits. Apps that use less than 60MB of memory will generally not be impacted by paging. Apps that use between 60MB and 90MB of memory will participate in paging, more so as you approach 90MB. Apps that fall in this range will be more likely to suffer from slower performance or glitches depending on the rest of the activity on the system. The smaller your app's memory footprint, the less likely it will be impacted by this variability.</p> <p>In addition to having better performance, apps that use less memory are more likely to <a href="http://msdn.microsoft.com/en-us/library/hh202866(v=VS.92).aspx">fast resume</a>. A precondition to fast resume is that the OS has enough free RAM available to keep apps dormant (in memory) in the back stack. On 256MB devices, free RAM is not as abundant as on 512MB devices, so an app that approaches 90MB of memory usage will be <a href="http://msdn.microsoft.com/en-us/library/ff817008(v=VS.92).aspx">tombstoned</a> immediately as it leaves the foreground to free up RAM for the incoming app. Apps that use less memory are more likely to be kept alive in the back stack. It should be noted that the Task Switcher (tap and hold Back to visualize the back stack and quickly navigate to a given app) will always be available on 256MB devices. What we're discussing here is merely the mechanism by which a 7.1 app will fast resume (the existing app instance is returned to the foreground from memory) vs. resume from tombstoning (where the app instance is torn down when it is placed in the back stack, and a new app instance is created when the app returns to the foreground). Apps that use less memory are more likely to benefit from fast resume.</p> <p>Tuning memory usage is a critical component of optimizing apps for 256MB devices. After becoming comfortable with these guidelines, it will become quite natural for you to build very efficient apps. It's a lot easier to build efficient apps from the beginning than to try and tack on efficiency after you've architected your app, so take comfort in knowing that the knowledge you gain tuning your existing apps (and seeing the results you achieve) will be directly applicable to your future Windows Phone projects. At the end of the day, your users will notice and appreciate the efficiency gains.</p><div style="clear:both;"></div><img src="http://windowsteamblog.com/aggbug.aspx?PostID=580053" width="1" height="1"> http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/10/reduce-memory-usage.aspx Windows Phone Dev Blog 3700 2012-04-10T19:16:00 The Passing of another home computer legend: Jack Tramiel dies at 83 <p>Jack Tramiel, the founder of Commodore International, and father of such beloved computers as the PET, VIC-20, C64, C128 and others, passed away this weekend at the age of 83.</p> <p>According to many of the books I've read, Jack was often considered a tough guy to work with, as he drove his employees and the rest of the industry, relentlessly. Some say he even used unfair tactics to get what he wanted.</p> <p>Commodore started with typewriters and calculators. To give you an idea of Tramiel's thriftiness and approach to business, he wanted their PET computer to use calculator buttons, instead of a real keyboard, because they had so many calculator buttons otherwise going to waste.</p> <p><strong>The end result, however, was the single best selling individual computer of all time:</strong> the <a href="http://en.wikipedia.org/wiki/Commodore_64" target="_blank">Commodore 64</a>. This computer, with any operating system, memory, or performance upgrades, was sold for almost 14 years. During that time, the C64 had better sound and graphics than almost any other computer available, and at a fraction of the cost. Imagine a single computer today (not an architecture or OS family) selling (and selling well) for that long, virtually untouched.</p> <p>Semi-historical movies like "Pirates of Silicon Valley" tend to focus only on Apple (Steve Jobs) and Microsoft (Bill Gates) when it was Commodore that introduced more kids and adults to computers during the 80s than just about anything else. In the middle of the 80s, Commodore had upwards of 30 to 40% of the entire home computer market.</p> <p>My Commodore 128 in the 80s:</p> <p><a href="http://www.flickr.com/photos/psychlist1972/sets/72157614855631104/" target="_blank"><img src="http://10rem.net/media/84669/Windows-Live-Writer_The-Passing-of-another-home-computer-leg_FAE4_image_6.png" width="450" height="357" alt="image" border="0" 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"/></a></p> <p>My current Commodore 128 (not the original one I owned, as my parents threw that in the bin) being played by my son 3 years ago:</p> <p><a href="http://www.flickr.com/photos/psychlist1972/3331263565/in/set-72157614855631104" title="http://www.flickr.com/photos/psychlist1972/3331263565/in/set-72157614855631104"> http://www.flickr.com/photos/psychlist1972/3331263565/in/set-72157614855631104</a></p> <p><a href="http://www.flickr.com/photos/psychlist1972/3331263565/in/set-72157614855631104" target="_blank"><img src="http://10rem.net/media/84674/Windows-Live-Writer_The-Passing-of-another-home-computer-leg_FAE4_image_5.png" width="450" height="338" alt="image" border="0" 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"/></a></p> <p><a href="http://feedads.g.doubleclick.net/~a/Hn8Oqx-cSzq4LSFNB2xqwhYTCWw/0/da"><img src="http://feedads.g.doubleclick.net/~a/Hn8Oqx-cSzq4LSFNB2xqwhYTCWw/0/di" border="0" ismap="true"></img></a><br/> <a href="http://feedads.g.doubleclick.net/~a/Hn8Oqx-cSzq4LSFNB2xqwhYTCWw/1/da"><img src="http://feedads.g.doubleclick.net/~a/Hn8Oqx-cSzq4LSFNB2xqwhYTCWw/1/di" border="0" ismap="true"></img></a></p><div class="feedflare"> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=ydZERy2dbbQ:0L5lNRWOh-8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=ydZERy2dbbQ:0L5lNRWOh-8:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=ydZERy2dbbQ:0L5lNRWOh-8:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=ydZERy2dbbQ:0L5lNRWOh-8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=ydZERy2dbbQ:0L5lNRWOh-8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=ydZERy2dbbQ:0L5lNRWOh-8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=ydZERy2dbbQ:0L5lNRWOh-8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=ydZERy2dbbQ:0L5lNRWOh-8:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=ydZERy2dbbQ:0L5lNRWOh-8:gIN9vFwOqvQ" border="0"></img></a> </div><img src="http://feeds.feedburner.com/~r/PeteBrown/~4/ydZERy2dbbQ" height="1" width="1"/> http://feedproxy.google.com/~r/PeteBrown/~3/ydZERy2dbbQ/the-passing-of-another-home-computer-legend-jack-tramiel-dies-at-83 Pete Brown 3698 2012-04-10T00:14:25 Yet Another Podcast #63–Windows 8 with Shawn Wildermuth http://feedproxy.google.com/~r/JesseLiberty-SilverlightGeek/~3/C92WgJfCSHU/ Jesse Liberty [MS] 3697 2012-04-09T20:52:27 The Hello World of genetic algorithms I just published an article on my iJoshSmith blog that explains how a simple genetic algorithm works. The article is titled &#8220;Simple Genetic Algorithm in Objective-C&#8221; and can be found here&#8230; http://ijoshsmith.com/2012/04/08/simple-genetic-algorithm-in-objective-c/ If you&#8217;re interested in expanding your mind today in some strange new ways, go check it out!<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joshsmithonwpf.wordpress.com&#038;blog=737883&#038;post=1275&#038;subd=joshsmithonwpf&#038;ref=&#038;feed=1" width="1" height="1" /> http://joshsmithonwpf.wordpress.com/2012/04/08/the-hello-world-of-genetic-algorithms/ Josh Smith [MVP] 3695 2012-04-08T18:23:09 First Experiences with the new Netduino GO, and how it relates to .NET Gadgeteer <p>I just received a bunch of packages from both Secret Labs and GHI Electronics. The Secret labs packages contained their brand new Netduino GO. The GHI package contained the FEZ Cerebus Starter kit I ordered.</p> <p>This post looks at the new Netduino GO and briefly compares it to the .NET Gadgeteer (Cerebus and others). I also build a couple simple example applications using the Netduino GO kit.</p> <h3>The Hardware</h3> <p>the hardware came in a number of classic Netduino Blue boxes, with each board and module inside packaged in quality ESD-proof bags. Secret Labs has always had a good unboxing experience. I've also really like these bags as they just seem to be quality.</p> <blockquote> <p><strong>Disclosure:</strong> These bits were provided to me free, from Secret labs. I also purchased $150 worth of GO modules from <a href="http://nwazet.com/">Nwazet</a> using my own money. You may remember them from the <a href="http://10rem.net/blog/2012/01/22/my-first-real-pix-6t4-game-sixty4racer">PIX-6T4 and my game: Sixty4Racer</a>. The Nwazet modules, including a touch screen, should arrive later this coming week.</p> <p>Also, keep in mind that although I work for Microsoft, Microsoft doesn't make a dime off any of these devices.&nbsp;It is all free and open source (Apache licensed). The .NET Micro Framework 4.2 is actually 40% community contributed as well.</p> </blockquote> <p>Here are some photos of the packaging and modules.</p> <p><a href="http://10rem.net/media/84544/Windows-Live-Writer_First-Experiences-with-the-new-Netduino-_1330A_image_5.png" target="_blank"><img src="http://10rem.net/media/84549/Windows-Live-Writer_First-Experiences-with-the-new-Netduino-_1330A_image_thumb_1.png" width="213" height="160" alt="image" border="0" 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"/></a>&nbsp;<a href="http://10rem.net/media/84554/Windows-Live-Writer_First-Experiences-with-the-new-Netduino-_1330A_image_7.png" target="_blank"><img src="http://10rem.net/media/84559/Windows-Live-Writer_First-Experiences-with-the-new-Netduino-_1330A_image_thumb_2.png" width="213" height="160" alt="image" border="0" 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"/></a>&nbsp;<a href="http://10rem.net/media/84564/Windows-Live-Writer_First-Experiences-with-the-new-Netduino-_1330A_image_9.png" target="_blank"><img src="http://10rem.net/media/84569/Windows-Live-Writer_First-Experiences-with-the-new-Netduino-_1330A_image_thumb_3.png" width="213" height="160" alt="image" border="0" 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"/></a></p> <p>The downside to the packaging is you end up with a lot of blue boxes hanging around. I haven't yet figured out a good use for those, although I employ one or two on my bench to hold loose screws and whatnot. I'm not sure how Secret Labs plans to package up kits, but it would probably be more environmentally friendly to put all the individually wrapped modules in a single box for shipping.</p> <p>The Netduino GO modules have their mounting holes on 5mm centers, just like the Gadgeteer. So, I was able to use a <a href="http://www.pololu.com/catalog/product/734">Tamiya 70172 Universal Plate (Large)</a> as a home for everything.</p> <p><a href="http://10rem.net/media/84574/Windows-Live-Writer_First-Experiences-with-the-new-Netduino-_1330A_image_11.png" target="_blank"><img src="http://10rem.net/media/84579/Windows-Live-Writer_First-Experiences-with-the-new-Netduino-_1330A_image_thumb_4.png" width="650" height="488" alt="image" border="0" 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"/></a></p> <p>Top to bottom, left to right:</p> <ul> <li>RGB LED Module</li> <li>Netduino GO main board</li> <li>Netduino Shield Base (for using arduino/netduino shields with the GO)</li> <li>Button module</li> <li>Button module</li> <li>Potentiometer module</li> </ul> <p>The Netduino GO board came with a couple 10 wire cables, but the modules themselves did not. The ribbon cables with the red stripes on them are extras from my Gadgeteer cables. I'm a bit torn in that I think each module should come with a cable, but at the same time, those cables tend to be expensive, and I do have an awful lot of extras lying around because each Gadgeteer module comes with a cable. I'd be interested in your thoughts and expectations here.</p> <p>In any case, make sure you order some extra cables if you plan to hook up more than a module or two at a time.</p> <p>If you look closely at the modules on my dev board, it looks suspiciously like Gadgeteer. In fact, here's a GHI Cerebus on the same type of mounting board:</p> <p><a href="http://10rem.net/media/84584/Windows-Live-Writer_First-Experiences-with-the-new-Netduino-_1330A_image_13.png" target="_blank"><img src="http://10rem.net/media/84589/Windows-Live-Writer_First-Experiences-with-the-new-Netduino-_1330A_image_thumb_5.png" width="650" height="488" alt="image" border="0" 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"/></a></p> <p>Also shown in this picture is my <a href="http://10rem.net/blog/2012/03/31/midi-module-assembly-instructions">MIDI module</a> (I plan to release a version for the Netduino GO as well)</p> <p>Superficially, they look almost identical. The connectors are the same 10 pin micro IDC connectors. On the Gadgeteer, they're black, on Netduino, they're blue, but otherwise they are identical parts. Orientation is also 180 degrees different, but that's not really a functional difference. Here's a side x side of the Cerebus and the GO in kit form. (the kits are not equivalent in price or functionality. I just used the photos the two vendors have on their sites)</p> <p><a href="http://10rem.net/media/84594/Windows-Live-Writer_First-Experiences-with-the-new-Netduino-_1330A_image_17.png" target="_blank"><img src="http://10rem.net/media/84599/Windows-Live-Writer_First-Experiences-with-the-new-Netduino-_1330A_image_thumb_7.png" width="396" height="220" alt="image" border="0" 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"/></a>&nbsp;<a href="http://10rem.net/media/84604/Windows-Live-Writer_First-Experiences-with-the-new-Netduino-_1330A_image_19.png" target="_blank"><img src="http://10rem.net/media/84609/Windows-Live-Writer_First-Experiences-with-the-new-Netduino-_1330A_image_thumb_8.png" width="227" height="220" alt="image" border="0" 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"/></a></p> <p>It's hard to really see it from this photo, but the Netduino GO main board is just a bit than the FEZ Cerebus main board. GHI also has <a href="http://www.ghielectronics.com/catalog/category/274/">several other Gadgeteer main boards and kits</a> (like the Spider and the Hydra). The Cerebus is just the latest offering. The Hydra and Cerebus are open source hardware and software, as is the Netduino GO.</p> <p>The Netduino currently has provision only for USB power (although I understand there may be an adapter coming), provided directly on the main board. The Gadgeteer always has the power provided by a separate module, always colored red. The source of that power can be an adapter, USB, batteries, or something else.</p> <p>Module-wise, the GO modules tend to be a bit larger as well. It appears there are a few reasons for this:</p> <ul> <li>GO modules (so far) always have their connector on the top. To save board size, many small Gadgeteer modules have the 10 pin connector on the bottom</li> <li>GO modules include a coprocessor chip (or module controller, or whatever you'd like to call it).</li> </ul> <p>The second item brings us to the main difference in the approaches. The architecture.</p> <h3>The Architecture</h3> <p>The real difference between .NET Gadgeteer and the Netduino GO is the way the modules communicate with the main board.</p> <blockquote> <p>Let me start by saying that I strongly believe there is merit in both approaches. I like the socket-type approach on Gadgeteer, and I also like the GO!bus approach used by the Netduino. I'm not picking sides here, just describing how they work. This is the kind of stuff holy wars are made from. Let's not go there.</p> </blockquote> <h4>Design Approach</h4> <p>The .NET Gadgeteer uses a socket identifier approach. Each main board surfaces a number of sockets, each of which is assigned a socket type. For example, socket type "U" is for UART (serial) communications. Socket type "A" supports analog communications. There's pin sharing and whatnot behind the scenes, all managed by the board code, but in essence, you are surfacing the MCU's different pins in the form of sockets. If a main board has, at most 6 analog inputs, you cannot get more than that without adding a co-processing board with its own MCU with its own analog inputs, communicating to the main board over serial, I2C, SPI, DaisyLink (more on that in a moment) or something else. This approach is a simplification and formalization of the pin-based approaches we've seen starting with Arduino and others.</p> <p>The Netduino uses the GO!bus protocol (discussed below). The main board only provides digital communications with modules. It doesn't surface any specific pin types, and all sockets are (to the best of my knowledge) equivalent. Therefore the modules own <strong>all</strong> capabilities and the main board serves only to run your code and communicate with the modules themselves.</p> <h4>Communications Protocols</h4> <p>On the Netduino, all modules communicate with the main board using the digital GO!bus protocol. This is a chip-to-chip SPI protocol (I believe it also can work over serial if you prefer) of varying speed. I've seen mentioned speeds up to 40MHz. The on-module chips that provide this functionality are pretty cheap ($0.30 each in quantity), but have a number of capabilities. I've ordered a bunch from Digikey to experiment with. They're small format surface-mount components, though, so not exactly breadboard-friendly without a breakout board. ( <a href="http://www.seeedstudio.com/depot/xqfp-breakout-board-08mm-p-757.html?cPath=175_177"> Appropriate breakout boards</a> can be ordered from Seeed and other places. Be sure the pin pitch matches the chip you're experimenting with). Secret labs is also looking to potentially expand the universe of supported (meaning they provide GO!bus code) chips to ones like AVR and more, making it easier for DIY folks to experiment.</p> <p>The .NET Gadgeteer also has an I2C-based module communication protocol called Daisylink. Its primary purpose is to allow chaining a number of modules together, but it is a digital protocol implemented by a few modules including the multicolor LED module. I haven't seen any vendor-provided Daisylink module code, but some folks in the community have been working on that. Daisylink is, by far, not the most common way to create modules for the Gadgeteer, however. Most use X/Y socket types, serial, SPI, or something else.</p> <blockquote> <p><strong>Aside: the on-module processor approach</strong></p> <p>Before the GO was introduces, I was looking at creating a number of modules for the .NET Gadgeteer (I still am). In each case, those modules requires an on-module processor to handle things like multiplexing many inputs, handling some logic specific to the board, or something else. The on-module processor approach is actually one of the best ways to scale out a solution whether you're using the Netduino or the .NET Gadgeteer. The Netduino GO approach simply formalized it and provides tested code you can use to get started.</p> <p>Using this approach, you can, for example, create a module that can be wired up to 64 buttons, or have 16 analog potentiometers, or which can control a large LED array, or a bunch of servos or anything else. It's a very valid (and sometimes necessary) approach regardless of which board you use.</p> <p>Another example is my MIDI module. At its heart, it's a very simple module. However, there are certain MIDI functions, like MIDI soft thru, clock/sync generation, active sense mode, message filtering, and more which would be best implemented in native C code on an on-module processor. I may create a version of the MIDI module which works with the GO, but also provide firmware options (either different firmware or an on-module jumper or something) to enable it to communicate with the Gadgeteer as well.</p> </blockquote> <p>Finally, the Netduino GO does allow you to use X, U, or S Gadgeteer modules in compatibility mode. Unfortunately, this ties up a number of sockets to make it work, so I suspect it will be good for emergency use only; you wouldn't want to design modules around it. You would need to create a special driver for the GO anyway, as all the Gadgeteer code infrastructure isn't there on the board firmware.</p> <p>Enough of the comparison. Let's take a look at the experience of building a simple Netduino GO demo application.</p> <h3>Netduino GO Installation</h3> <p>I previously had installed the .NET MicroFramework 4.2 SDK, so I didn't have to mess around with that. I won't cover much of installation here, as the full Netduino GO SDK wasn't yet ready when I got the hardware.</p> <p>Worth noting was that I didn't need a special driver for the GO. Instead, I plugged it into my machine, and it was recognized as a Netduino. It just worked.</p> <p><img src="http://10rem.net/media/84614/Windows-Live-Writer_First-Experiences-with-the-new-Netduino-_1330A_image_3.png" width="570" height="212" alt="image" border="0" 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"/></p> <h3>Hello World: Lighting up the RGB LED</h3> <p>As I mentioned, I didn't have an official SDK yet, instead, I created a regular Netduino project, changed its framework version to 4.2, and then added a reference to the Netduino GO libraries sent to me by Chris at Secret labs. Presumably, with the new SDK, the experience will be File-&gt;New-&gt;Netduino GO Application.</p> <pre class="brush: csharp;"> using System;<br /> using System.Threading;<br /> using Microsoft.SPOT;<br /> using Microsoft.SPOT.Hardware;<br /> using SecretLabs.NETMF.Hardware;<br /> using SecretLabs.NETMF.Hardware.NetduinoGo;<br /> using NetduinoGo;<br /> <br /> namespace NetduinoGoFirstApp<br /> {<br /> public class Program<br /> {<br /> public static void Main()<br /> {<br /> var led = new RgbLed((GoBus.GoSocket)8);<br /> led.SetColor(255, 40, 0);<br /> }<br /> <br /> }<br /> } </pre> <p>Plug the RGB LED into any socket on the main board. (Netduino GO doesn't require you to match socket IDs or letters or anything). I used socket 8 in the example here. If you choose a different socket, just indicate that in the code.</p> <p>Deploy and run that application, and you'll see a bright orange color from that LED. Those multicolor LEDs are very nice. They have excellent colors and are super bright, even at their default 33% brightness (100% would be insanely bright).</p> <p>Here's the same code showing the LED in blue.</p> <pre class="brush: csharp; highlight: [18];"> using System;<br /> using System.Threading;<br /> using Microsoft.SPOT;<br /> using Microsoft.SPOT.Hardware;<br /> using SecretLabs.NETMF.Hardware;<br /> using SecretLabs.NETMF.Hardware.NetduinoGo;<br /> using NetduinoGo;<br /> <br /> namespace NetduinoGoFirstApp<br /> {<br /> public class Program<br /> {<br /> public static void Main()<br /> {<br /> //var led = new RgbLed((GoBus.GoSocket)8);<br /> //led.SetColor(255, 40, 0);<br /> <br /> var led = new RgbLed();<br /> led.SetColor(0, 0, 255);<br /> }<br /> <br /> }<br /> } </pre> <p><strong>Note that in this case I didn't specify a socket ID.</strong> I only have one RGB LED module, so <strong>it identified itself to the main board using the GO!bus,</strong> and it just worked. I really do like that particular feature of the GO!bus as it means you can move modules around without changing code. This is great flexibility, especially if you're providing something that will go into an enclosure.</p> <p>Each socket has an LED next to it on the main board. The socket being used for communication glows blue when the module is used from code.</p> <p>If you have more than one identical module connected, it appears that the GO!bus just picks the first one it finds.</p> <h3>Varying the LED color with a potentiometer</h3> <p>Time to kick it up a notch. The kit I received has a potentiometer module and two buttons. I want to make it so the potentiometer can be used to change the color of the LED by varying the R, G, and B components independently. Ideally this would have three potentiometers, but as I have just the one, I decided to make it so the button cycles between R, G, and B, and the potentiometer changes one component at a time.</p> <p>Here's the code.</p> <pre class="brush: csharp;"> using System;<br /> using System.Threading;<br /> using Microsoft.SPOT;<br /> using Microsoft.SPOT.Hardware;<br /> using SecretLabs.NETMF.Hardware;<br /> using SecretLabs.NETMF.Hardware.NetduinoGo;<br /> <br /> namespace NetduinoGoFirstApp<br /> {<br /> public class Program<br /> {<br /> private static NetduinoGo.RgbLed _led;<br /> private static NetduinoGo.Button _button;<br /> private static NetduinoGo.Potentiometer _potentiometer;<br /> <br /> // r, g, b in an array<br /> private static byte[] _colorValues = new byte[3];<br /> private static int _colorIndex = 0;<br /> <br /> public static void Main()<br /> {<br /> _led = new NetduinoGo.RgbLed();<br /> _button = new NetduinoGo.Button();<br /> _potentiometer = new NetduinoGo.Potentiometer();<br /> <br /> _button.ButtonReleased += OnButtonReleased;<br /> <br /> _led.SetColor(0, 0, 0);<br /> <br /> while (true)<br /> {<br /> _colorValues[_colorIndex] = (byte)(255 * _potentiometer.GetValue());<br /> UpdateLedColor();<br /> <br /> Thread.Sleep(100);<br /> }<br /> <br /> }<br /> <br /> // switch between R, G, and B<br /> static void OnButtonReleased(object sender, bool buttonState)<br /> {<br /> _colorIndex = (_colorIndex + 1) % _colorValues.Length;<br /> }<br /> <br /> // set the LED color to the current selections<br /> private static void UpdateLedColor()<br /> {<br /> _led.SetColor(_colorValues[0], _colorValues[1], _colorValues[2]);<br /> }<br /> }<br /> } </pre> <p>That was pretty simple to develop. A polling loop checks the potentiometer value 10 times a second, and updates the LED at the same time. Press the button to cycle between R, G and B components.</p> <p><a href="http://10rem.net/media/84619/Windows-Live-Writer_First-Experiences-with-the-new-Netduino-_1330A_image_21.png" target="_blank"><img src="http://10rem.net/media/84624/Windows-Live-Writer_First-Experiences-with-the-new-Netduino-_1330A_image_thumb_9.png" width="650" height="488" alt="image" border="0" 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"/></a></p> <p>In this picture, note how the Netduino has blue LEDs lit next to each active socket. This helps you visually confirm which socket your drivers are using. The tiny blue LEDs aren't as bright as they appear in this photo, that's just my camera being annoying.</p> <h3>Conclusion</h3> <p>Secret Labs has come up with an interesting new platform here. I've only begin to scratch the surface, and haven't gotten into using the shield base for Arduino/Netduino classic shields, or described the process of creating a module from scratch. I'll write about those more in the future as I play with the devices more.</p> <p>Should you go with Netduino GO or Gadgeteer?</p> <p>That's a tough question for sure.</p> <p>Right now, the decision is going to come down to what you want to do with the devices. The .NET Gadgeteer has, by far, a <a href="http://www.ghielectronics.com/catalog/category/275/">much richer ecosystem of modules by GHI and Seeed</a>. Netduino may get there, but as it was just launched this week, it's not going to happen overnight. If you want the most immediate prototyping opportunities, using an existing set of plug-and-play modules, you'll probably do better with .NET Gadgeteer right now.</p> <p>The Netduino supports existing Arduino-style shields just as it always has, but just as you had to before, you'll need to write (or find code for) drivers to make those work.</p> <p>Long-term, I would expect the Netduino GO to also have a very rich ecosystem of modules. Plus, the potential of those individual modules is, in my opinion, greater, as the reall processing all happens on-module.</p> <p>I'm really impressed with what Secret Labs has come up with, and believe it has some real potential. I like the formalization of the on-module logic design, and the fact that Secret Labs standardized on inexpensive chipsets with free compilers, making it easier for DIY folks to create their own modules. You can count me among the people who will take a stab at creating modules or module kits for this device.</p> <p><strong>I'll show off the Netduino GO, along with the Gadgeteer main boards and modules, in my talk at the</strong> <a href="http://10rem.net/blog/2012/03/19/join-us-online-on-april-24-for-the-patterns--practices-symposium-2012"> <strong>free Online p&amp;p Symposium on April 24th</strong></a><strong>. Please register.</strong></p> <p><a href="http://feedads.g.doubleclick.net/~a/rwF9iu4a5O6O9KUqOtt00_QNeRU/0/da"><img src="http://feedads.g.doubleclick.net/~a/rwF9iu4a5O6O9KUqOtt00_QNeRU/0/di" border="0" ismap="true"></img></a><br/> <a href="http://feedads.g.doubleclick.net/~a/rwF9iu4a5O6O9KUqOtt00_QNeRU/1/da"><img src="http://feedads.g.doubleclick.net/~a/rwF9iu4a5O6O9KUqOtt00_QNeRU/1/di" border="0" ismap="true"></img></a></p><div class="feedflare"> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=CRpzqYvfu1I:_zBPRVtNY6E:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=CRpzqYvfu1I:_zBPRVtNY6E:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=CRpzqYvfu1I:_zBPRVtNY6E:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=CRpzqYvfu1I:_zBPRVtNY6E:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=CRpzqYvfu1I:_zBPRVtNY6E:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=CRpzqYvfu1I:_zBPRVtNY6E:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=CRpzqYvfu1I:_zBPRVtNY6E:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=CRpzqYvfu1I:_zBPRVtNY6E:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=CRpzqYvfu1I:_zBPRVtNY6E:gIN9vFwOqvQ" border="0"></img></a> </div><img src="http://feeds.feedburner.com/~r/PeteBrown/~4/CRpzqYvfu1I" height="1" width="1"/> http://feedproxy.google.com/~r/PeteBrown/~3/CRpzqYvfu1I/first-experiences-with-the-new-netduino-go-and-how-it-relates-to-net-gadgeteer Pete Brown 3694 2012-04-08T00:40:01 Windows 8 and the Windows Phone SDK, pt. 2 <p>Last month, I <a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/03/05/windows-8-and-the-windows-phone-sdk.aspx" target="_blank">posted</a> to let developers know that we were aware of some of the challenges that were present in running the Windows Phone SDK on the Consumer Preview of Windows 8. In that post I mentioned that we were working on addressing those problems. My colleague Cliff then followed up with the <a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/03/26/wpsdk-711-now-available.aspx" target="_blank">announcement</a> of the release of the Windows Phone SDK 7.1.1 update, which does unblock the use of our SDK on Win 8, (although not officially supported). </p> <p>Lots of people are digging into the new development platform opportunities provided by Windows 8, and we understand there are a lot of questions about what they may portend for Windows Phone developers. While we aren’t yet ready to talk about our future plans, we do believe there are certain things we can tell you. In fact, we’ve already talked quite a bit about this at the //BUILD conference last September (see our sessions recorded online at <a href="http://wpdev.ms/phoneatbuild" target="_blank">http://wpdev.ms/phoneatbuild</a>).</p> <p>With regard to existing applications:<strong> today’s Windows Phone applications and games will run on the next major version of Windows Phone</strong>. Driving application compatibility is a function of Microsoft’s commitment to its developers. Regardless of what we release in terms of new developer features and functionality, we have made a large investment in protecting your existing investments.</p> <p>We’ve also heard some developers express concern about the long term future of Silverlight for Windows Phone. Please don’t panic; XAML and C#/VB.NET development in Windows 8 can be viewed as a direct evolution from today’s Silverlight. All of your managed programming skills are transferrable to building applications for Windows 8, and in many cases, much of your code will be transferrable as well. Note that when targeting a tablet vs. a phone, you do of course, need to design user experiences that are appropriately tailored to each device.</p> <p>Microsoft is committed to creating an ecosystem that maximizes your investments. This is not an overnight endeavor, but we’re confident you’ll be pleased with where we’re going with the Windows Phone developer platform. As always, please let us know in the comments, or in our forums, if you have questions or concerns; we can’t answer every question just yet, but I hope we’ve dispelled some of your concerns.</p><div style="clear:both;"></div><img src="http://windowsteamblog.com/aggbug.aspx?PostID=579817" width="1" height="1"> http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/05/windows-8-and-the-windows-phone-sdk-pt-2.aspx Windows Phone Dev Blog 3692 2012-04-06T02:06:53 Yet Another Podcast #62–Joe Stagner http://feedproxy.google.com/~r/JesseLiberty-SilverlightGeek/~3/c_i_McKbK1Y/ Jesse Liberty [MS] 3691 2012-04-04T17:39:20 Optimize Startup Time <p>The first of the four principles I mentioned in <a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/03/07/optimizing-apps-for-lower-cost-devices.aspx">Optimizing Apps for Lower Cost Devices</a> is Optimize Startup Time.</p> <p>Fast startup is an essential component of any mobile application. It is the first impression a user has of your app and is the first chance you have to either impress or frustrate your users.</p> <p>If you're wondering just how fast your startup time can get on Windows Phone, use the VS Project Templates as a starting point. Create a new project, deploy it to the device, and experience how quickly the app starts up.</p> <p>A general principle to keep in mind is that any regressions in startup time from the VS Project Templates are the result of app code delaying the rendering of the first frame. The more app code you can remove or delay before the first frame is rendered, the closer your startup time will match the baseline startup time of the VS Project Templates.</p> <p>To fully understand the areas of opportunity for improving startup time, it's important to understand the workflow of a launching application.</p> <ol> <li>The App constructor is called in App.xaml.cs.</li> <li>XAML in App.xaml is parsed.</li> <li>Application_Launching is called in App.xaml.cs.</li> <li>The Page constructor of your MainPage is called.</li> <li>XAML in your MainPage is parsed.</li> <li>OnNavigatedTo is called in your MainPage.</li> </ol> <p>Once you understand this workflow, it is easy to conclude that any app code or XAML introduced in this workflow will result in startup time regressions from the VS Project Templates.</p> <p>To minimize the impact of app code in this startup path, you should either remove code from these events or <a href="http://msdn.microsoft.com/en-us/library/4yd16hza(v=vs.95).aspx">execute code on background threads</a> to unblock the UI thread. Only code executing on the UI thread will have a severe impact on startup performance. Deferring activity to background threads will allow your first frame to render quickly. Use <a href="http://msdn.microsoft.com/en-us/library/cc190259%28v=VS.95%29.aspx">Dispatcher.BeginInvoke</a> from background threads to return back to the UI thread when necessary.</p> <p>To minimize the impact of XAML parsing on startup time, you can simplify and remove unnecessary XAML from both your MainPage and from App.xaml.</p> <ol> <li>Remove unnecessary namespaces declared in &lt;phone:PhoneApplicationPage&gt;. <ol> <li>If your XAML elements aren't prefixed by a declared namespace, then the namespace declaration can be safely removed.</li> </ol></li> <li>Avoid explicit declarations of default attribute values. <ol> <li>Grid.Row="0", for instance, is the default value if Grid.Row is not declared, so just don't declare it.</li> <li>SupportedOrientations="Portrait" and Orientation="Portrait" can be removed as well for portrait only pages since this is the default.</li> <li>Understand default values and remove redundant XAML.</li> </ol></li> <li>Avoid retemplating controls in App.xaml. <ol> <li>Retemplating controls can require complex XAML which is expensive to parse.</li> <li>For Metro-style apps that are theme-aware, this is less of a concern. If you need to retemplate controls to support a branded experience, for instance, then understand what is necessary to override and what can be omitted.</li> <li>If templates are only needed for particular pages, consider moving the custom templates <a href="http://msdn.microsoft.com/en-us/library/system.windows.frameworkelement.resources(v=vs.95).aspx">to the pages that need them</a>. This will delay the cost of parsing the XAML until the necessary page is loaded rather than require the cost to be paid at startup.</li> </ol></li> <li>Normalize Style declarations. <ol> <li>If you are consistently setting FontFamily, FontSize, and Foreground in a similar way on several TextBoxes, for instance, then consider <a href="http://msdn.microsoft.com/en-us/library/system.windows.style(v=VS.95).aspx">using Styles instead</a>.</li> </ol></li> <li>Simplify page layouts. <ol> <li>Don't use nested Grids and StackPanels when one root container would be sufficient to <a href="http://msdn.microsoft.com/en-us/library/cc645025%28v=VS.95%29.aspx#LayoutSystem_PanelsCustom">layout your page</a>.</li> </ol></li> <li>Declare your app bar in code. <ol> <li>This will be faster to process than parsing the XAML and is actually the only way to <a href="http://msdn.microsoft.com/en-us/library/ff637520(v=vs.92).aspx" title="localize your app bar components">localize your app bar components</a>.</li> </ol></li> </ol> <p>With your first frame rendered quickly, you can then turn your attention to indicating progress to the user while the rest of your content loads. Perceived startup time can go a long way to minimize the amount of frustration content load times can impose on users. The first frame of your app should always include the chrome of your application (system tray, app title, page title, pivot titles, app bar, etc.) as well as a <a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.shell.progressindicator(v=VS.92).aspx">ProgressIndicator</a> to indicate that your content is loading. You'll want to use the <a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.shell.progressindicator(v=VS.92).aspx">ProgressIndicator</a> over other progress bars as (1) the ProgressBar control has <a href="http://www.jeff.wilcox.name/2010/08/performanceprogressbar/">known performance issues</a> and (2) the <a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.shell.progressindicator(v=VS.92).aspx">ProgressIndicator</a> will provide the most consistent experience with the rest of the built-in experiences on the phone.</p> <p>Note that the system tray and app bar are shell components and so will render more quickly than the content in your PhoneApplicationPage. You can take advantage of this to improve perceived startup time even further. You'll notice in <a href="http://blogs.msdn.com/b/mikebattista/archive/2012/03/11/weather-v2-0.aspx">the Weather app</a> that the system tray and app bar appear first followed by the rest of the page content. If you're using the system tray <a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.shell.progressindicator(v=VS.92).aspx">ProgressIndicator</a> as recommended above to indicate progress, it will appear as well immediately when the system tray is rendered.</p> <p>A bonus to using both the system tray and app bar is that these components render together and provide a recognizable chrome for your app while it loads. Many apps hide the system tray and use only an app bar. If you've used these apps, you'll notice often that the app bar renders first before the rest of the content loads. The lack of symmetry in this case introduced by not showing the system tray actually contributes to the perception of lag that the user experiences. By adding the system tray, you can eliminate this perception while also providing a consistent chrome that is recognizable across apps. If you don't want to show the system tray but want to take advantage of it for the reasons mentioned above, show the system tray on launch with an <a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.shell.systemtray.opacity(v=vs.92).aspx">opacity of 0</a>. Using an opacity of 0 means the system tray won't affect your page layout at all. Once the rest of your content loads, you can then <a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.shell.systemtray.isvisible(v=VS.92).aspx">hide the system tray</a> if you'd like.</p> <p>Many apps <a href="http://msdn.microsoft.com/en-us/library/ff769511(v=VS.92).aspx">use a splash screen</a> to solve the perceived startup problem as it is cheap to implement and can promote the brand of the app. While this is a great practice, you may find that after following the guidance above, the splash screen will actually slow down your startup time. Adding a splash screen to <a href="http://blogs.msdn.com/b/mikebattista/archive/2012/03/11/weather-v2-0.aspx">the Weather app</a>, for instance, would actually harm its startup performance. With your startup time optimized, assess whether a splash screen is really necessary. Your apps will actually feel more like integrated experiences if they don't use a splash screen, so don't be afraid to leave it off completely. The combination of fast startup time, no splash screen, and extensibility points like <a href="http://msdn.microsoft.com/en-us/library/hh202948(v=VS.92).aspx">secondary tiles</a> will really make your apps shine on Windows Phone.</p><div style="clear:both;"></div><img src="http://windowsteamblog.com/aggbug.aspx?PostID=579689" width="1" height="1"> http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/03/optimize-startup-time.aspx Windows Phone Dev Blog 3690 2012-04-03T18:48:00 The Internet is Not a Democracy (or: how not to gain customer confidence) <p><strong>Warning: this is as much a rant as anything remotely useful. Oh, and don't comment without reading the whole thing :)</strong></p> <p>The Internet is not a democracy. More specifically, blog commenting systems aren't a democracy. <strong>Blog authors and administrators get to decide which comments show up on their blog</strong>, and which do not. On my own blog, I remove spam messages (or I let Akismet do it in most cases), and the one or two truly offensive troll comments I get every once in a while -- usually only if a post hits reddit or /. . Other than that, I like to keep the spectrum of comments, good and bad, on my blog. I don't pre-moderate as that's just exudes untrustworthiness, and it's a pain to do.</p> <p>Not everyone agrees with that approach.</p> <h3>The DIY 3d Printer Blog</h3> <p>When you see a <a href="http://3dhomemade.blogspot.com/2012/03/kit-update.html">blog post like this one</a>, and see the overwhelmingly positive response, <strong>you're only seeing part of the picture</strong>. See, in this case, Junior moderates his comments and only lets through the ones which meet the goals of his business and his agenda. <strong>It's not a democracy, the blog owner gets to decide what shows up. Silencing opposition is a pretty big and powerful hammer.</strong> As a blog owner, I'm all for keeping this level of control with the blog owner. But also, as a citizen of the Internet, I try to be very fair and reasoned in how I wield it.</p> <p>I've been looking forward to the release of his 3d Printer for quite some time. What Junior finally announced was a bit of a let down, but something I would still consider, as the resolution on the printer is spectacular. <strong>These two paragraphs in that post, however, set off a few alarms:</strong></p> <blockquote> <p>Because of this, we think would make more sense to move for only a basic kit, where we would provide all documentation needed to build the Printer, as well the Resin formula and just sell the software and the controller board. The documentation would have the detail technical specification, BOM and Suppliers.</p> <p>This basic kit (Document + Software + Controller Board) would be sold around $600 USD, but even for that we would need a good volume to be able to produce it.<br /> For this reason we're creating a Pre-order list for both Kits (full and basic), so we can decide the best way to move forward.</p> </blockquote> <p>The controller board is fairly inexpensive. There are tons of multi-axis boards out there, including many <a href="http://10rem.net/blog/2012/02/24/open-source-hardware-and-why-you-should-care"> OSH (Open Source Hardware)</a> ones. Almost all are under $150. While I'm sure his controller board offers some additional things, it's probably nothing out of the ordinary. So the real value here is the software. This was further corroborated by his <a href="http://3dhomemade.blogspot.com/2012/04/hi-guys-we-are-extremely-excited-with.html"> "Wow!!! Thanks for all the emails!!!" blog post</a> where he enumerated several of the pricing tiers:</p> <blockquote> <p><strong>Software + Complete CD (399 USD - including shipping):</strong><br /> The CD above + full license of our software (features of the software will be in the FAQ)<br /> Software price after Indiegogo: (549 USD)</p> <p><strong>Basic Kit I (Software + Controler board + Complete CD) (599 USD - shipping not included):</strong><br /> All items above + 1 controller board (able to control the entire printer).<br /> (This basic kit does not include motors or linear guides or projector)<br /> Price After Indiegogo: (849 USD)</p> <p>...</p> <p>Unfortunately we will be able to deliver only 250 full kits this year for this Indiegogo campaign, because of production limitation and we will probably just take new orders next year once we deliver all Indiegogo perks.</p> </blockquote> <p>So Junior isn't *really* selling a printer. He's selling software. That's ok, just not quite what I had expected. As a business, it makes sense, as the software is where the margin is. In contrast, most other 3d printers sales are about selling the hardware, but the software is all free and open source, constantly improved by an active community of developers.</p> <p>Anyway, $400 to $549 for CAD/CNC software <strong>from an individual or small business</strong> is a bit scary. So, I wrote a comment to Junior on the previous blog (before the pricing post, back when the alarms first went off), asking what his plans were for support and escrow of his software and code. When someone offers to sell me software multiple hundreds of dollars, <strong>and they're just an individual, and the software is proprietary, I want to know what the support policy is going to be</strong>. I wanted to know what guarantees he had in place, and if he's putting the source in escrow.</p> <h3>Why Escrow and Support are Important</h3> <p>Why is this important? His software is not OSS, and I don't want to get something proprietary and have him jump ship, leaving me holding something that can never be upgraded. This originally came to mind because Junior never answers questions on his blog or on twitter. Communication is strictly one-way. Back when I worked in the IT department of a company in MA, I helped develop a bit of very cool (but small) software we sold to hospitals. Because hospitals are huge multi-million dollar institutions, and we were not, <strong>they required the software and its source to be placed in escrow</strong>. That meant that if the company I worked for folded or otherwise failed to uphold its end of the escrow contract, the hospital would get the source code, data, and binaries for the application. <strong>This is important protection for any company or individual.</strong></p> <p>In another example: I bought some CNC software and hardware some time ago. <strong>Shortly after I bought that, the person/company who sold it went slightly psycho and shut down his support forums</strong>. Before that, if someone questioned him, he'd rip them a new one and kick them off his forums. He also tried to make the support forums a for-fee item after the fact. It was…strange. I stayed on his good side, but <strong>support by fear isn't exactly my cup of tea</strong>. Unfortunately, the hardware was proprietary and the software was also proprietary. That meant that he was the sole source of support if I wanted to stick with his products. I'm still stuck with a hardware/software pairing that can't be broken, and there's been almost no real innovation in the software. Ugh.</p> <p><strong>In any case, Junior didn't let my first question through on his blog</strong>. I was equal parts surprised and disappointed, as the comment was not a troll comment and also wasn't rude, or spammy or anything.</p> <p>So, I wrote again (at 4/1 5pm eastern time), on the <a href="http://3dhomemade.blogspot.com/2012/04/hi-guys-we-are-extremely-excited-with.html"> "Thanks for all the emails" post</a>. Here's the exact post (I saved it this time):</p> <blockquote> <p>Once again, I need to ask about the software.</p> <p>You are an individual, selling custom proprietary (non OSS) software for a non-trivial price. What's the guarantee that you'll be around and will support your product? Are you putting the software and its source in 3rd party escrow? What's your support policy/plan? Bug fixes? Supported operating systems?</p> <p>I know blogs are not a democracy, but please post the question this time. This is important stuff.</p> <p>Thanks.</p> <p>Pete</p> </blockquote> <p><strong>Unsurprisingly, that comment was also not posted on the 3d Printer DIY Blog.</strong> Comments posted before and after mine showed up in his nightly moderation batches. Both of mine were both posted using Google IDs with a photo -- they wouldn't have tripped a spam filter or anything. Junior also never answered any of my early queries over Twitter.</p> <p>He could have answered it over email if he didn't want it publicly posted on his blog. Instead, the queries were just ignored. At the time of this writing, his FAQ doesn't address any of these concerns.</p> <p>I was tempted to go to <a href="http://www.indiegogo.com/veloso3dprinter">his new indiegogo campaign</a> and post the question there, as I don't believe he can moderate posts. However, at that point, it would just be a vendetta, as <strong>he has clearly proven to me that he is not the kind of person I'm comfortable dealing with</strong>. $600 is not nothing. But hey. I see his indiegogo campaign is doing well, and there are lots of people for whom this isn't a concern. <strong>I do (seriously) wish him the best of luck with it</strong>, and I really do hope he does something to ensure that folks aren't left in the cold.</p> <h3>Contrast</h3> <p>This is in contrast to other products I've seen developed openly on the web. <a href="http://www.shapeoko.com/">Shapeoko</a>, for example, was developed in the open, had a successful Kickstarter campaign, a wiki with help, a free support forum, and Edward Ford went way above and beyond in answering questions. He was answering questions long before he had actual bits in people's hands.</p> <p>Here's another one I've dealt with. John at <a href="http://www.microcarve.com/">Microcarve</a> was happy to help me out when I bought a Z-axis mount from him. He answered all my questions and delivered above and beyond. He's also quite active in the CNC zone community. He didn't pop out of nowhere: he has a reputation and is trusted. He also has a Yahoo group for support of his products, Q&amp;A etc.</p> <p>Other more established examples include Chris Walker at <a href="http://netduino.com/">Secret Labs</a> (Netduino, Plus and Mini) and Gus Issa at <a href="http://ghielectronics.com">GHI Electronics</a> (Gadgeteer Hydra/Spider/Cerebus + Panda). Both of these guys are active in supporting their communities. Both make real money developing products that are, to various extents, open source software and hardware. Both are people I'm comfortable sending money to.</p> <h3>Lessons Learned</h3> <p>What are the lessons to be learned here?</p> <ul> <li>If you're selling software, you need to be prepared to support it, and for the questions from people who want a few answers before shelling out. The people asking the hard questions could very well be your best customers and advocates. That's just good business.</li> <li>You can make money selling software, but unless you're trying to build a big business out of it, <strong>you may find it easier to simply develop it in the open, as OSS</strong>. If your whole business is built around selling the software (which is what it appears Junior was working towards all this time - the printer itself is just ancillary), this may not work for you.</li> <li>When you see overwhelmingly one-sided comments on a blog, and <strong>no one is asking the hard questions, ask yourself if you're really seeing the whole picture</strong>.</li> <li>Indie campaigns that aren't OSS/OSH just feel old-fashioned.</li> <li>Simply being reasonable in your feedback doesn't mean the blog author/business owner will post it or answer it. Blogs aren't a democracy. Ok, I take it back. <strong>They are a democracy, and I'm voting with my feet and my wallet.</strong></li> </ul> <p><a href="http://feedads.g.doubleclick.net/~a/sq0R8OI6m-pvsk_3BNrYzJ-DioY/0/da"><img src="http://feedads.g.doubleclick.net/~a/sq0R8OI6m-pvsk_3BNrYzJ-DioY/0/di" border="0" ismap="true"></img></a><br/> <a href="http://feedads.g.doubleclick.net/~a/sq0R8OI6m-pvsk_3BNrYzJ-DioY/1/da"><img src="http://feedads.g.doubleclick.net/~a/sq0R8OI6m-pvsk_3BNrYzJ-DioY/1/di" border="0" ismap="true"></img></a></p><div class="feedflare"> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=WLNL3AC_grw:cGN0oYpI2MI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=WLNL3AC_grw:cGN0oYpI2MI:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=WLNL3AC_grw:cGN0oYpI2MI:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=WLNL3AC_grw:cGN0oYpI2MI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=WLNL3AC_grw:cGN0oYpI2MI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=WLNL3AC_grw:cGN0oYpI2MI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=WLNL3AC_grw:cGN0oYpI2MI:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=WLNL3AC_grw:cGN0oYpI2MI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=WLNL3AC_grw:cGN0oYpI2MI:gIN9vFwOqvQ" border="0"></img></a> </div><img src="http://feeds.feedburner.com/~r/PeteBrown/~4/WLNL3AC_grw" height="1" width="1"/> http://feedproxy.google.com/~r/PeteBrown/~3/WLNL3AC_grw/the-internet-is-not-a-democracy-or-how-not-to-gain-customer-confidence Pete Brown 3689 2012-04-03T10:01:21 Globalizing and Localizing a Windows Phone App <p>With Marketplace <a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/03/28/marketplace-now-open-in-13-new-markets-are-your-apps-available.aspx">recently launching in 13 new markets</a>, it's more important than ever to have a globalized, localized app that can reach as many of your customers as possible – but doing so can seem daunting. This blog post seeks to demystify the process and help enable you to write a truly global app.</p> <p><b><font color="#4f81bd" size="4">What is a globalized app?</font></b></p> <p>A <i>globalized </i>app displays things like dates and money in a way that's familiar to a user. If you have a calculator app, some people will expect to see a dollar sign, and others will expect a euro. Or even more important, consider a financial app where a difference between a period in one country/region and a comma in another can change the currency amount by a factor of ten! Dates also differ by country/region – sometimes the month comes before the day, sometimes after. By <i>globalizing</i> your app, it'll feel natural to your customers, no matter where they are. </p> <p>Globalizing your app is fairly straightforward, and can be done using the CultureInfo class. Check out <a href="http://msdn.microsoft.com/en-us/library/ff637519(v=vs.92).aspx">How to: Build a Globalized Application for Windows Phone</a> for a code example of how to use it. </p> <p>This blog post will mostly focus on <i>localizing </i>your app – a meaty topic that can be tricky to understand. </p> <p><b><font color="#4f81bd" size="4">What is a localized app?</font></b></p> <p>You can think of a <i>localized </i>app as one that's been translated into one or more languages. There's a few things you can <i>localize </i>in your app:</p> <ol> <li><b>App Text</b> - menu headings, help text, etc.</li> <li><b>App Description -</b> seen in the marketplace</li> <li><strong>App Title -</strong> appears in the application list and on the app title</li> <li><b>Application Bar text</b> - if you include an Application Bar</li> </ol> <p><b><font color="#4f81bd" size="4">Do I have to localize my app to publish in multiple markets?</font></b></p> <p><strong>No – the two actions are separate.</strong> When you submit your app to App Hub, you'll eventually reach a Pricing page where you can choose where your app will be published. You can either select specific markets or 'Worldwide distribution' to include them all. </p> <p>It's important to understand that this is the <strong>only way </strong>you can choose where your app is published. Localizing your app is a separate process, and has no impact on where your app ships. </p> <p>As a note, there are certain countries/regions that have stricter than usual content guidelines. If you decide to publish your app in these marketplaces, make sure you've read requirement 3.10 listed at <a href="http://msdn.microsoft.com/en-us/library/hh184842(v=vs.92).aspx">Content Policies</a>. Also keep in mind that your app must pass certification for all markets you choose – this means that if you choose 'Worldwide distribution', your app must pass certification for all of the supported markets. If you have trouble passing certification for certain markets, an option is to unselect those markets on the Pricing page. </p> <p><b><font color="#4f81bd" size="4">If that's the case, why should I localize my app?</font></b></p> <p>Because you want customers around the world to enjoy – and use – your app. </p> <p>Let's say you write an app in English, and publish it worldwide. Even if they can physically see your app in their marketplace, someone who can speak and read only Spanish won't be able to understand your app description, and your app likely wont be useful to them. By localizing your app into the Spanish language, that customer would be able to use and understand your app.</p> <p><b><font color="#4f81bd" size="4">When would I <i>not </i>want to localize my app?</font></b></p> <p>There are a couple of cases where it might not make sense to localize: </p> <p><b>App Title</b></p> <p>Localizing your app title is often a good thing. Say you've created a calculator app, and the title is something obvious like 'Calculator'. By localizing your app title into French (France) and calling it 'Calculatrice', someone in the French marketplace will easily know what your app is. </p> <p>On the other hand, what if your app title is your company name, such as 'Contoso App'? In this case your name is your branding – you don't necessarily want to localize that into other languages, because you're promoting your app under, and as, your company name. </p> <p><b>Language-specific apps</b></p> <p>Usually, you'll want to localize your app into multiple languages so you can reach the most customers. But what if, for whatever reason, you decide you only want to ever target a certain group of customers in a certain market? For example, you've written a Spanish news app that you want to market only to Spanish-speaking customers in Spain. In this case, you can save time and energy by not localizing your app into other languages.</p> <p>That being said, even if your app only supports one language, it's still a good idea to structure your app so that it can be easily localized into other languages in the future. </p> <p><b><font color="#4f81bd" size="4">I'm sold – how do I localize my app?</font></b></p> <p>Localization includes multiple tasks – there are primarily four areas to consider, but we'll mostly focus on localizing app text. </p> <p><b><font size="3">App Title</font></b></p> <p>The app title appears in the application list on the app tile. You can localize your app title by creating a resource-only DLL file for each language. <a href="http://msdn.microsoft.com/en-us/library/ff967550(v=VS.92).aspx">How to: Localize an Application Title for Windows Phone</a> has a full write-up of how to do this. </p> <p><b><font size="3">App Description</font></b></p> <p>You've created an app, you've localized your app text into multiple languages, and you're ready to submit to App Hub. During the ingestion process, App Hub detects which languages you support and will prompt you to enter a language-specific description (and some other metadata) <i>for each language you support</i>. <b></b></p> <p>Be sure that each description matches the language in question, as otherwise you'll fail certification. For example:</p> <p><a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/3225.locblog_5F00_eachdescrip_5F00_final_5F00_57CA2893.png"><img style="display: inline; background-image: none;" title="locblog_eachdescrip_final" border="0" alt="locblog_eachdescrip_final" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/3302.locblog_5F00_eachdescrip_5F00_final_5F00_thumb_5F00_2251666E.png" width="654" height="180" /></a></p> <p><b><font size="3">Application Bar</font></b></p> <p>When it comes to localization, the Application Bar is handled differently than other controls in your app. If you include an Application Bar in your app, you can localize the text labels on each button. <a href="http://msdn.microsoft.com/en-us/library/ff637520(v=vs.92).aspx">How to: Build a Localized Application for Windows Phone</a> has a code example at the bottom of the page that you can use to do this. Also check out <a href="http://bindableapplicationb.codeplex.com/">BindableApplicationBar</a> on CodePlex for a third party solution. But before dealing with your Application Bar, you'll need to understand how to localize your app text, which brings us to…</p> <p><b><font size="3">App Text</font></b></p> <p>App text is essentially any text that appears in your app except for the app title or Application Bar text. </p> <p><b><font color="#4f81bd" size="4">How to I localize my app text?</font></b></p> <p>Let's start with the most common case, and then move on to some edge cases. Basically, rather than hard-coding your text into a specific language in XAML, we'll localize your app text by using data binding to obtain the localized values of a word or string from a resource file. </p> <p>To localize your app text, you'd do the following: </p> <p><b><font size="3">Specify the Neutral Language</font></b></p> <p>Decide the language you want to be the 'default' for your app. This language in Visual Studio is known as the <i>neutral language</i>.</p> <p>By default, Visual Studio sets the neutral language to the language you choose when installing the SDK. </p> <p><a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/3817.locblog_5F00_downloadlangs_5F00_01CA26BC.png"><img style="display: inline; background-image: none;" title="locblog_downloadlangs" border="0" alt="locblog_downloadlangs" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/2656.locblog_5F00_downloadlangs_5F00_thumb_5F00_015DF3C7.png" width="639" height="229" /></a></p> <p>This is important to understand because <strong>App Hub assumes that your neutral language is your default language</strong>. If you install the SDK with language set to English, unless you change the neutral language, any app you create will have its neutral language set to English. You need to make sure you change the neutral language to whatever your default language actually is. </p> <p>This language has to be supported by Windows Phone, meaning it's listed in the <b>Display languages</b> table at <a href="http://msdn.microsoft.com/en-us/library/hh202918(v=vs.92).aspx">Culture and Language Support for Windows Phone</a>. If you choose something else that's not listed at the Culture and Language Support topic, you'll fail certification. </p> <p>To set the neutral language in Visual Studio, open the project properties, click the Application tab, and then click Assembly Information.</p> <p><a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/0636.locblog_5F00_assembly_5F00_27BFD712.png"><img style="display: inline; background-image: none;" title="locblog_assembly" border="0" alt="locblog_assembly" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/4265.locblog_5F00_assembly_5F00_thumb_5F00_4E21BA5D.png" width="449" height="430" /></a></p> <p>For in-depth coverage on how to change the neutral language, see <a href="http://msdn.microsoft.com/en-us/library/ff637520(v=vs.92).aspx">How to: Build a Localized Application for Windows Phone</a>. </p> <p><b><font size="3">Create Resource Files for Each Language</font></b></p> <p>Create a resource file for each language that you plan on supporting. </p> <ol> <li>You'll first set up your default resource file, AppResources.resx. Your strings in this file have to be the same language of what you chose for your neutral language in step 1, or you'll fail certification. </li> <li>Every other language besides your default is set up in its own file, labeled with the correct &quot;culture name&quot;. For example, if you plan on supporting Spanish (Spain), you'd name your AppResources file 'AppResources.es-ES.resx'. For a full list of culture names you can use, see <a href="http://msdn.microsoft.com/en-us/library/hh202918(v=vs.92).aspx">Culture and Language Support for Windows Phone</a>. To learn more about how culture names are constructed, see the <a href="http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo.aspx">CultureInfo class</a>. Put your language strings into each resource file, translated into that language. </li> </ol> <p><b><font size="3">Replace Hard-coded Text with Data Binding</font></b></p> <p>Replace hard-coded text in your app and use data binding to reference values from your resource files. </p> <p><font face="Consolas"><font color="#0000ff">&lt;</font><font color="#c0504d">TextBlock</font> <font color="#ff0000">x</font><font color="#0000ff">:</font><font color="#ff0000">Name</font><font color="#0000ff">=</font><font color="#0000ff">&quot;PageTitle&quot;</font> <font color="#ff0000">Text</font><font color="#0000ff">=&quot;{</font><font color="#c0504d">Binding</font> <font color="#ff0000">Path</font><font color="#0000ff">=AppResources.String1,</font> <font color="#ff0000">Source</font><font color="#0000ff">={</font><font color="#c0504d">StaticResource</font> <font color="#ff0000">LocalizedStrings</font><font color="#0000ff">}}&quot; </font><font color="#ff0000">Margin</font><font color="#0000ff">=&quot;9,-7,0,0&quot;</font> <font color="#ff0000">Style</font><font color="#0000ff">=&quot;{</font><font color="#c0504d">StaticResource</font> <font color="#ff0000">PhoneTextTitle1Style</font><font color="#0000ff">}&quot;/&gt;</font></font></p> <p>For in-depth coverage on how to create these resource files, see <a href="http://msdn.microsoft.com/en-us/library/ff637520(v=vs.92).aspx">How to: Build a Localized Application for Windows Phone</a>. </p> <p><b><font size="3">What happens if I don't localize in some languages? Can those users read my app?</font></b></p> <p><b>Yes.</b> For example, let's say you've written an app in French (France). You want all of your text to be in French most of the time, but there's one or two strings you want to be different just for people with the Spanish (Spain) display language set.</p> <p>You'd do the following:</p> <ol> <li>Set your neutral language to 'French (France)'</li> <li>Create a default AppResources.resx file and put your strings, in French, in the file</li> <li>Create a AppResources.es-ES.resx file (es-ES is the culture name of Spanish (Spain))</li> <li>Put only the selective strings in there that you want to be different for people with the Spanish (Spain) display language setting</li> </ol> <p>So, what happens if someone with the Spanish (Spain) display language setting opens up your app? What about someone who is using English (United States) or any other display language?</p> <p>Windows Phone uses the following algorithm to determine what text to display: </p> <ol> <li>What display language is set on the device?</li> <li>Is there a resource file in the app that matches that display languages?</li> </ol> <p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; a.&#160; If yes:</p> <p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; A.&#160; Is the string in the app located in the resource file?</p> <p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; i.&#160; If yes: </p> <p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; I. Show the translated string</p> <p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ii.&#160; If no: </p> <blockquote> <p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; I. 'Fall back' to the default language, in this example, 'French (France)', and show that string instead. In our example, this means that someone with English (United States) set will see the <b>French (France) </b>string, because there is no AppResources.en-US.resx file with a corresponding string. </p> <p>&#160;&#160;&#160;&#160;&#160; a.&#160; If no: </p> <p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; A.&#160; 'Fall back' to the default language, in this example, 'French (France)', and show that string instead.</p> </blockquote> <p>Notice that the same fall back behavior happens if either the resource file is missing entirely, or if the string isn't found in the file. </p> <p>Based on the above algorithm, someone with the Spanish (Spain) display language set will only see a Spanish string if you've set that string up in the AppResources.es-ES.resx file. If not, you'll see the default (French) equivalent since it's set as the neutral language.</p> <p>Likewise, if someone has English (United States) or any other display language set, they will only ever see the French strings, since there are no resource files or strings set up for those display languages.</p> <p><b><font color="#4f81bd" size="4">How do I localize for specific regions?</font> </b></p> <p>Most languages have multiple <i>regions </i>associated with them. For example, there's the Spanish language, but there's different versions of it depending on region, such as Spain and Mexico. Each display language supported on Windows Phone is a specific combination of language and region, such as Spanish (Spain) or French (France). Where it gets tricky is that a user can control both their display language and the 'Region format' – and Region format shows far more options than <a href="http://msdn.microsoft.com/en-us/library/hh202918(v=vs.92).aspx">the supported display languages</a>.</p> <p><a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/0552.locblog_5F00_regionformat_5F00_788DEB7A.png"><img style="display: inline; background-image: none;" title="locblog_regionformat" border="0" alt="locblog_regionformat" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/5857.locblog_5F00_regionformat_5F00_thumb_5F00_3F0ADB83.png" width="292" height="269" /></a></p> <p>Since not all strings are the same between language regions, what if you have an app that you want to localize for both the supported display language Spanish (Spain), and the unsupported Spanish (Mexico)? </p> <p>Technically, you can do this by following steps similar to what you did in the previous example: </p> <ol> <li>Choose Spanish (Spain) for your neutral language since it's the supported display language of the two, and add those strings in your default AppResources.resx file</li> <li>Create a new resource file for Spanish (Mexico), which has a culture code of es-MX. You'd create AppResources.es-MX.resx, and put your Spanish (Mexico) strings in there. </li> </ol> <p>Note: You can find a large list of culture codes at the <a href="http://msdn.microsoft.com/en-us/goglobal/bb896001.aspx">National Language Support (NLS) API Reference</a> page. </p> <p>Seems like it would work, right? The problem is, even if the user has set their Region format to Spanish (Mexico), <b>your AppResources.es-MX.resx file will not load</b>. This is because Windows Phone will look for a resource file that matches whatever the user has selected for their <i>display language</i>, it will <i>not </i>look for a file based on the Region format. </p> <p>There's a workaround that lets you get around this, you'll just need to add one line of code to the Application_Launching method of App.xaml.cs: </p> <p><font face="Consolas"><font color="#4bacc6">AppResources</font>.Culture = <font color="#4bacc6">CultureInfo</font>.CurrentCulture;</font></p> <p>By using this code, your app will show text from the resource file matching the <i>Region format</i> of the phone, not the display language. Like always, if you don't have a resource file that matches, the fall back process happens. </p> <p>You can use this workaround to target any language region, as long as a user is able to select it on the settings page. </p> <p><b><font size="3">Make sure you choose the right neutral language!</font> </b></p> <p>Even with this workaround, for certification reasons, you need to make sure that the neutral language you choose is a <b>supported</b> display language. </p> <p><b><font size="3">Are regional descriptions supported on App Hub?</font></b></p> <p>Let's say you submit the Spanish app we've been talking about to App Hub – you have Spanish (Spain) set up as your neutral language, you've created a regional file for Spanish (Mexico), and you have the right code in your app so the regional strings will display. </p> <p>App Hub will only detect <i>one </i>language – Spanish. It maps this language to the display language we support, in this case, Spanish (Spain). You'll notice on App Hub that on the Pricing page, you'll be prompted to add a description and metadata for 'Spanish (Spain)', with no option to input different info for Spanish (Mexico). </p> <p><b><font color="#4f81bd" size="4">How do I localize for a language that isn't supported?</font></b></p> <p>We've talked through localizing for a region that a user can select on the phone, using Region format. But what about cases where you can't select the language or region at all? </p> <p>For example, you decide to write an Icelandic news reader app. Even though Icelandic isn't officially supported on Windows Phone, the text would display in Icelandic to the user, <a href="http://msdn.microsoft.com/en-us/library/hh202920(v=vs.92).aspx">because the phone supports the right fonts</a>. But your app will fail certification because it must be localized in at least one supported display language. What to do?</p> <p>There's a workaround for this, too. If you plan on shipping an app that is written in a language we don't support, and it's not available in Region format, you can do the following:</p> <p>1.&#160; <strong>Hard code your app to be written in the unsupported language</strong>, if you don't plan on supporting more languages in the future. <b>OR</b>, create your default AppResources.resx file and put your unsupported language strings in there, if you plan on supporting more languages in the future or will support additional languages in your submission.</p> <p>2.&#160; <strong>Set your neutral language to </strong><a href="http://msdn.microsoft.com/en-us/library/hh202918(v=vs.92).aspx"><strong>one of the supported display languages</strong></a>. For example, 'English (United States)'. </p> <p>3.&#160; <strong>On App Hub, you will be prompted to input metadata and a description</strong> for the neutral language you chose (for the above example, you'll be prompted for English). You must include the following three items in the 'Detailed description' field to pass certification: </p> <ul> <li>A note, such as ‘The language of this application is [unsupported language name]’. This note must be written in the same language as the neutral language. For example, if you chose 'English (United States)' as your neutral language, the note must be written in English (United States). <b>This note must be the first item</b> in the ‘Detailed description’ field.</li> <li>Your app description, in the same language as the neutral language.</li> <li>Your app description, in the unsupported language.&#160; </li> </ul> <p>At the risk of making things sound even more complicated, you can technically do this one other way. Let's say you already have a news reader app that's localized into many languages, and you want to add support for Icelandic (an unsupported language). You can still do this, you'll just need to set up an additional resource file, using any one of the supported display languages you don't plan on localizing for, and go through the same metadata/description steps on App Hub. </p> <p><b><font color="#4f81bd" size="4">Other localization resources</font></b></p> <ul> <li>If you're porting an app from Windows Phone OS 7.0, take a look at <a href="http://blogs.msdn.com/b/wpukcoe/archive/2012/01/20/common-marketplace-ingestion-errors-and-how-to-avoid-them.aspx">this blog post by Mike Francis</a>. He calls out some common errors you might run into when submitting your app to App Hub.</li> <li>If you're localizing for any English variant, be aware that App Hub refers to them by different names than what's listed in the supported display languages table. <a href="http://forums.create.msdn.com/forums/t/87638.aspx">See this Support post</a> for more info. </li> <li>And of course, <a href="http://msdn.microsoft.com/en-us/library/ff637522(v=vs.92).aspx">there are also the MSDN docs</a>. </li> </ul><div style="clear:both;"></div><img src="http://windowsteamblog.com/aggbug.aspx?PostID=579641" width="1" height="1"> http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/02/globalizing-and-localizing-a-windows-phone-app.aspx Windows Phone Dev Blog 3688 2012-04-02T18:05:00 A Million Little Programs <p> My programming tutorials tend to have lots of little programs to illustrate particular techniques, so as I've been working on the first several chapters of <i>Programming Windows</i>, 6th edition, here's what the far end of the Windows 8 Start screen soon became: </p><p>... more ...</p> http://www.charlespetzold.com/blog/2012/04/A-Million-Little-Programs.html Charles Petzold 3687 2012-04-02T14:00:00 Maker Geek Roundup 010 for 4/1/2012 <p>The Maker Geek Roundup aggregates information of interest to makers everywhere. Topics include .NET Micro Framework, Arduino, AVR and other MCUs, CNC, 3d Printing, Robotics, Microsoft Robotics Studio, Electronics, General Maker stuff, and more. If you have something interesting you've done or have run across, or you blog regularly on the topics included here, please send me the URL and brief description via the <a href="http://10rem.net/contact">contact link</a>.</p> <h3>3d Printing, Laser Cutting, and CAD/CAM/CNC</h3> <ul> <li><a href="http://3dhomemade.blogspot.com/2012/04/hi-guys-we-are-extremely-excited-with.html"> Unbelievable! Thanks for all emails!</a> (3d Printer DIY) (Junior announces pricing and a Indiegogo campaign)</li> <li><a href="http://www.makerbot.com/blog/2012/03/29/prototyping-a-lunar-mining-robot-on-a-makerbot/"> Prototyping A Lunar Mining Robot On A MakerBot</a> (MakerBot)</li> <li><a href="http://www.keegan.org/reprapblog/archives/2609">Four, no, Fourteen months.. part 5 of ?</a> (Just Another RepRap)</li> <li><a href="http://www.brisbanetimes.com.au/technology/click-print-and-wear-a-glimpse-into-3d-future-20120330-1w2q9.html"> Click, print and wear: a glimpse into 3D future</a> (Brisbane Times)</li> <li><a href="http://richrap.blogspot.com/2012/03/mendelmax-quick-fit-x-and-quick-fit.html"> MENDELMAX - Quick-fit X and Quick-fit Extruder/s</a> (RichRap)</li> </ul> <h3>.NET Gadgeteer</h3> <ul> <li><a href="http://www.jedibowler.com/2012/03/14/net-gadgeteer-pomodoro-timer/"> .Net Gadgeteer Pomodoro Timer</a> (jedibowler)</li> <li><a href="http://mikedodaro.net/2012/03/19/net-gadgeteer-motor-control-with-potentiometer/"> .NET Gadgeteer Motor Control with Potentiometer</a> (Michael Dodaro)</li> <li style="list-style: none"> <ul> <li>also <a href="http://mikedodaro.net/2012/03/21/net-gadgeteer-motor-driver-with-two-motors-and-potentiometer/"> .NET Gadgeteer Motor Driver with Two Motors and Potentiometer</a></li> </ul> </li> <li><a href="http://mikedodaro.net/2012/03/25/saving-settings-to-xml-configuration-files/"> Saving settings to XML Configuration Files</a> (Marco Minerva)</li> <li><a href="http://mikedodaro.net/2012/03/15/saving-sensor-data-as-comma-separated-values-csv-on-the-sd-card/"> Saving Sensor Data as Comma Separated Values (csv) on the SD Card</a> (Michael Dodaro)</li> <li><a href="http://mikedodaro.net/2012/03/23/net-gadgeteer-relay-actuator-via-rest-web-service/"> .NET Gadgeteer Relay Actuator via REST Web Service</a> (Michael Dodaro)</li> </ul> <h3>Other .NET Micro Framework General (Netduino, GHI FEZ, etc.)</h3> <ul> <li><a href="http://blog.timmattison.com/archives/2012/03/29/how-to-write-a-netduino-driver-for-the-grove-chainable-rgb-led/"> How-To: Write a Netduino driver for the Grove chainable RGB LED</a> (Tim Mattison)</li> <li><a href="http://highfieldtales.wordpress.com/2012/03/31/modbus-tcp-library-for-netduino/"> Modbus-TCP library for Netduino</a> (Highfield Tales)</li> <li><a href="http://blogs.msdn.com/b/netmfteam/archive/2012/03/19/latest-msdn-article.aspx"> Latest MSDN Article</a> (Colin Miller)</li> </ul> <h3>Arduino</h3> <ul> <li><a href="http://www.youtube.com/watch?feature=player_embedded&amp;v=1diFaa5OsFg"> Getting Started with the Fingerprint Sensor</a> (Adafruit)</li> <li><a href="http://marctan.com/blog/controlling-micro-servo/">Controlling a Micro-Servo | Android + Arduino</a> (Marc Tan)</li> <li><a href="http://hackaday.com/2012/03/29/rain-barrel-irrigation-system-keeps-your-plants-fed-when-youre-too-busy/"> Rain barrel irrigation system keeps your plants fed when you're too busy</a> (Hack a Day)</li> <li><a href="http://blog.makezine.com/2012/03/29/drummerbot-makes-beats-with-arduino/"> Drummerbot Makes Beats with Arduino</a> (Make)</li> <li><a href="http://www.electronics-lab.com/blog/?p=17867">RTC and port expander for an Arduino nixie clock</a> (Electronics-Lab.com)</li> </ul> <h3>Other Microcontrollers (PIC, AVR, ARM, BeagleBoard, and more)</h3> <ul> <li><a href="http://www.bot-thoughts.com/2012/03/road-testing-arm-lpc2101-part-1a.html"> Road Testing an ARM LPC2101: Part 1a</a> (Bot Thoughts)</li> <li><a href="http://blogs.msdn.com/b/laurelle/archive/2012/03/31/using-2-identical-i2c-device-on-the-same-i2c-bus-solution-working-better.aspx"> Using 2 identical I2C device on the same I2C bus (solution working better)</a> (Laurent Ellerbach)</li> </ul> <h3>General Electronics and Hardware Hacking</h3> <ul> <li><a href="http://circuit-zone.com/index.php?electronic_project=665">Coil-less FM Transmitter</a> (Circuit-Zone.com)</li> <li><a href="http://www.electronics-lab.com/blog/?p=17792">4-Channel Pt100 Thermometer</a> (Electronics-Lab.com)</li> <li><a href="http://jumptuck.com/2012/03/18/soldering-binary-burst-clock-pcb/"> Soldering the Binary Burst Clock PCB</a> (Jumptuck)</li> <li><a href="http://www.electronics-lab.com/blog/?p=17870">Comparing digital and mechanical potentiometers</a> (Electronics-Lab.com)</li> </ul> <h3>Robots and Robotics Studio and *Copters</h3> <ul> <li><a href="http://spectrum.ieee.org/automaton/robotics/military-robots/boston-dynamics-sand-flea-demonstrates-astonishing-jumping-skills"> Boston Dynamics Sand Flea Robot Demonstrates Astonishing Jumping Skills</a> (IEEE Spectrum) (be sure to watch the video)</li> <li><a href="http://priithansen.com/makibot/">Makibot</a> (Telepresence robot with Skype, controlled via PHP) (Priithansen.com)</li> </ul> <h3>Synthesizers, Music, and MIDI</h3> <ul> <li><a href="http://vimeo.com/38796545">NOISY JELLY on Vimeo</a> (vimeo)</li> <li><a href="http://www.retrothing.com/2012/03/bare-naked-floppy-drives-make-beautiful-music.html"> "What Is Love" - Bare Floppy Drives Make Beautiful Music</a> (Retro Thing) (better than most similar things)</li> </ul> <h3>Photography</h3> <ul> <li><a href="http://www.diyphotography.net/build-a-cfl-based-continuous-light-source"> Build A CFL Based Continuous Light Source</a> (DIY Photography)</li> </ul> <h3>General Maker</h3> <ul> <li><a href="http://www.techthefuture.com/technology/redditor-builds-solar-powered-wikipedia-server/"> Redditor Builds Solar Powered Wikipedia Server</a> (Tech the Future)</li> <li><a href="http://hackaday.com/2012/04/01/soccer-simulator-rules-a-childs-birthday-party/"> Soccer simulator rules a child's birthday party</a> (Hack a Day)</li> <li><a href="http://hackaday.com/2012/04/01/build-an-elevator-controller-gain-a-friend-for-life/"> Build an elevator controller, gain a friend for life</a> (Hack a Day)</li> </ul> <h3>Retro Computing and Commodore!</h3> <ul> <li><a href="http://hackaday.com/2012/03/31/floppy-autoloader-takes-the-pain-out-of-archiving-5000-amiga-disks/"> Floppy autoloader takes the pain out of archiving 5000 Amiga disks</a> (Hack a Day)</li> <li><a href="http://www.mos6502.com/general-blogness/the-best-april-fool/"> The best April fool!</a> (MOS6502)</li> <li><a href="http://www.mos6502.com/friday-commodore/an-unexpected-link/">An unexpected link</a> (MOS6502)</li> <li><a href="http://www.rgcd.co.uk/2012/03/m-tanks-msx.html">M-Tanks (MSX)</a> (RGCD)</li> <li><a href="http://www.mos6502.com/friday-commodore/genlock-on-the-c64/">Genlock on the C64</a> (MOS6502)</li> </ul> <p><a href="http://feedads.g.doubleclick.net/~a/646dlruSsG8TOA-cD4QwnRabA5Y/0/da"><img src="http://feedads.g.doubleclick.net/~a/646dlruSsG8TOA-cD4QwnRabA5Y/0/di" border="0" ismap="true"></img></a><br/> <a href="http://feedads.g.doubleclick.net/~a/646dlruSsG8TOA-cD4QwnRabA5Y/1/da"><img src="http://feedads.g.doubleclick.net/~a/646dlruSsG8TOA-cD4QwnRabA5Y/1/di" border="0" ismap="true"></img></a></p><div class="feedflare"> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=IBefPAbg36U:yfABFRKNH9U:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=IBefPAbg36U:yfABFRKNH9U:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=IBefPAbg36U:yfABFRKNH9U:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=IBefPAbg36U:yfABFRKNH9U:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=IBefPAbg36U:yfABFRKNH9U:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=IBefPAbg36U:yfABFRKNH9U:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=IBefPAbg36U:yfABFRKNH9U:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=IBefPAbg36U:yfABFRKNH9U:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=IBefPAbg36U:yfABFRKNH9U:gIN9vFwOqvQ" border="0"></img></a> </div><img src="http://feeds.feedburner.com/~r/PeteBrown/~4/IBefPAbg36U" height="1" width="1"/> http://feedproxy.google.com/~r/PeteBrown/~3/IBefPAbg36U/maker-geek-roundup-010-for-4-1-2012 Pete Brown 3686 2012-04-02T04:42:40