You are here

Feed aggregator

Small Basic - WebCam Motion Detection

MSDN Blogs - 44 min 55 sec ago
WebCam Extension

There has been a webcam object in the LitDev extension (LDWebCam) for a while, and I recently updated it so it works on WIndows 8 as well as earlier versions of Windows.

There are some effects like grayscale, snow, gamma, contrast, pixelate, fisheye, swirl etc.  The effects can also be applied to an image held in ImageList.

This is a basic sample of the webcam and effects (webcam/

GraphicsWindow.Width = 400 GraphicsWindow.Height = 400 GraphicsWindow.BackgroundColor = LDColours.DarkGray   picture = Controls.AddButton("Take Picture", 20,350) pause = Controls.AddButton("Pause", 125,350) resume = Controls.AddButton("Resume", 190,350) effect = Controls.AddButton("Effect", 270,350) end = Controls.AddButton("Exit", 335,350) setDefault = Controls.AddButton("Set Default", 20,320) Controls.ButtonClicked = OnButtonClicked   combo = LDControls.AddComboBox(LDImage.GetEffects(), 100,200) LDControls.ComboBoxItemChanged = OnComboBoxItemChanged Shapes.Move(combo,270,320) default = Controls.AddTextBox(125,320) Controls.SetSize(default,125,24) defaults = LDImage.EffectDefaults   webcam = LDWebCam.Start(320,240) Shapes.Move(webcam,40,40)   Sub OnButtonClicked   If (Controls.LastClickedButton = picture) Then     LDWebCam.Snapshot()   ElseIf (Controls.LastClickedButton = pause) Then     LDWebCam.Pause()   ElseIf (Controls.LastClickedButton = resume) Then     LDWebCam.Resume()   ElseIf (Controls.LastClickedButton = end) Then     LDWebCam.End()     Program.End()   ElseIf (Controls.LastClickedButton = effect) Then     LDWebCam.Effect = Math.GetRandomNumber(21)-1     LDControls.ComboBoxSelect(combo,LDWebCam.Effect)     Controls.SetTextBoxText(default,defaults[LDWebCam.Effect])   ElseIf (Controls.LastClickedButton = setDefault) Then     defaults[LDWebCam.Effect] = Controls.GetTextBoxText(default)     LDImage.EffectDefaults = defaults   EndIf EndSub   Sub OnComboBoxItemChanged   LDWebCam.Effect = LDControls.LastComboBoxIndex   Controls.SetTextBoxText(default,defaults[LDWebCam.Effect]) EndSub


Motion Detection

A webcam image can be 'grabbed' at any point in time and stored as an ImageList image.  With the static 'grabbed' image we can do further image processing using methods in LDImage.

One of the more interesting options is LDImage.DifferenceImages which creates a new image with each pixel value equal to the modulus of the difference of the two input images.  In other words it is an image of 'what has changed'.  We can then further process this image to identify motion detection and even where something is or how it is moving.

This is the source code and a screenshot of a sample motion detection program that also shows a histogram distribution of the image colours (webcam/

GraphicsWindow.Width = 980 GraphicsWindow.Height = 280 GraphicsWindow.Title = "Motion Detection" movement = Controls.AddTextBox(360,260) sensitivity = 20 img1 = "" img2 = "" working = 0   graph = LDGraph.AddGraph(700,0,280,280,"Histogram","Value","Frequency") webcam = LDWebCam.Start(320,240) Shapes.Move(webcam,20,20)   Timer.Interval = 1000 Timer.Tick = OnTick   Sub OnTick   If (working = 0) Then     working = 1     img1 = LDWebCam.SnapshotToImageList()     hist = LDImage.Histogram(img1)     LDUtilities.PauseUpdates()     LDGraph.DeleteSeries(graph,"Red")     LDGraph.AddSeriesLine(graph,"Red",hist[1],"Red")     LDGraph.DeleteSeries(graph,"Green")     LDGraph.AddSeriesLine(graph,"Green",hist[2],"Green")     LDGraph.DeleteSeries(graph,"Blue")     LDGraph.AddSeriesLine(graph,"Blue",hist[3],"Blue")     LDUtilities.ResumeUpdates()     If (img2 <> "") Then       img = LDImage.DifferenceImages(img1,img2)       stats = LDImage.Statistics(img)       'TextWindow.WriteLine(stats["STD"][1]+" , "+stats["STD"][2]+" , "+stats["STD"][3])       LDImage.Multiply(img,10,10,10)       GraphicsWindow.DrawResizedImage(img,360,20,320,240)       Total = Math.Floor(stats["Mean"][1]+stats["Mean"][2]+stats["Mean"][3])       Controls.SetTextBoxText(movement,Total)       If (Total > sensitivity) Then         LDImage.Save(img1,Program.Directory+"\movement.jpg")         Sound.PlayClickAndWait()       EndIf     EndIf     LDImage.Remove(img2)     img2 = img1     LDImage.Remove(img)     working = 0   EndIf EndSub


Working Example

A recent example using this technique was provided by Zock77 to identify movement and control a turret to aim a gun.  He used a very low resolution webcam image 16*16 pixels to simplify the calculation and identification of a moving target's position. 

The image on the right is the current webcam 'grabbed' image with 16*16 resolution expanded to fill a larger area.  The image on the left is the 'difference' image showing movement since the initial image was reset (also expanded from 16*16 resolution), and the 'cross hairs' are the calculated center of the movement, which is used to control the turret using PPM (Pulse Position Moduation sound pulses and another extension).

The following 2 threads in the small Basic forum follow this development and there is also a YouTube video by Zock of it all working.

Pixelating an image?

Auto aiming sentry turret with Small Basic!!

Disponibilité du cours sur les nouveautés Dynamics NAV 2015

MSDN Blogs - Fri, 10/24/2014 - 23:39


Le nouveau cours "Les nouveautés fonctionnelles Dynamics NAV 2015" est disponible dans la nouvelle plateforme elearning DLP (Dynamics Learning Portal)

Ce cours couvre les sujets suivants :
- Les nouveautés rapprochement bancaire et Cash Management
- Les nouveautés RapidStart : les codes manquants et le mappage des données
- Les rapports Word Documents
- Planification des rapports
- Simplification de l'interface utilisateur : Tableau de bord Small Business, modèles de données, champs obligatoires, article de type service, ...
- Les nouveaux indicateurs de performance (les piles)
- Les clauses TVA, validation des N° Interacomm. via service web, …

Je viens de le suivre, il est super bien détaillé et de très bonne qualité.

Pop Quiz … which Rangers solution enjoys the highest downloads?

MSDN Blogs - Fri, 10/24/2014 - 21:54

Looking at Visual Studio ALM Ranger Solutions Catalogue (, do you have any idea which solution has had the (1)  most downloads and the (2) highest average daily downloads since January 1, 2010?

Add your candidates and a quick “why” as a comment below and watch the space for the solution.

AX for Retail 2012 R3 Receipt Printing Enhancements: Print Multiple Logos and Select Images in AX Client

MSDN Blogs - Fri, 10/24/2014 - 20:35

Credit to Brian Storie (Microsoft) for authoring this article

AX for Retail 2012 R3 introduced a new feature on the Receipt Format Designer that allows you to select a specific image for your Receipt Logo.   In previous versions of AX for Retail you had to place a specific logo file on each terminal, either as a local bitmap on the file system or directly into the printer’s memory.  This made for a lot of effort if you ever wanted to change the logo on your printed receipt.  The new functionality now allows you to centrally manage your receipt images directly from Headquarters, and even provides the ability to have multiple logos on the same receipt.

Importing the Images

To use the new method of printing logos you first need to import the images you want to print into the RetailImages table in Headquarters.  Loading the Image into AX is pretty straightforward;  simply go to Retail > Setup >  POS  > Images:

Click New to create a new image and enter a value for Image ID.  Once the ID is set click the Select Image button and load the image from your file system.  This will then insert the image into the RetailImages table in the AX Database.   You will also see a preview of the logo:


Close the window after uploading the image file.


Adding the Logo to the Receipt

Once the image has been added to the table you will be able to add it to your receipt using the receipt designer.  Go to Retail > POS > Receipt Formats and select the receipt you want to modify.  Click the Designer button.


Adding a logo to the layout is the same as previous versions:  simply drag the Logo field from the field list onto either the Header or Footer section.  For this example I'm going to stick with the demo data example of having the logo at the top of the header:


Note that the field just says “Logo” when you drop it on the form. If you leave it as-is, EPOS will look for look for the file RetailPOSLogo.bmp in your POS folder and use that when printing (just like previous versions).  However, the new feature allows you to change any logo field to print a specific image. 

Make sure the Logo field is selected and click on the new Select Image button at the bottom of the window:



This will bring up the Select Image form.  Select the ID of the logo you want to use on this receipt and click Select Image.  For this example select the image that was uploaded earlier (10001):


If you look closely at the Logo field on the form you will see that it now shows the specific logo ID: 


If you want multiple logos, simply drag new logo fields anywhere you want into the Receipt Layout and repeat the process to select a different image.  Note that you can have as many different images on as many different receipts as you want.


Testing the Logo

Hopefully you remembered to click the Save button before you closed the designer form.  In order to test the receipt all you need to do is push your changes to the channel database.  EPOS will automatically use the new receipt layout and images you stored to the RetailImages table.  All of the tables you need to replicate are in the 1090 job.

If everything works correctly you should see your (multiple!) images on your printed receipt:


Here are a few things to keep in mind with this new feature:

  1. In R2 and previous versions EPOS used to scale the image to exactly 250 pixels wide.   In R3 the image is sent to the printer as is (it literally sends an OPOS constant called “PTR_BM_ASIS”).  If your image is larger than the OPOS printer can handle it will not print your logo.  Due to differences in Printer hardware you may need experiment different image widths in order to print your logo.
  2. Depending on your Receipt Printer you may be able to print color bitmaps.  However we typically get the best results using a monochrome bmp file.
  3. With the new method EPOS loads the images from the channel database every time a receipt is printed.   If you are having network or SQL Server limitations you may want to use the default logo to reduce network congestion.  Logo bitmaps tend to be rather small in size, though, so this may not be a problem.

Two Presentations This Weekend at #SQLSaturday349 in Salt Lake City

MSDN Blogs - Fri, 10/24/2014 - 18:09

I have the privilege of being selected to fill two slots this weekend at #SQLSaturday349 in Salt Lake City.  The venue is simultaneously hosting the Big Mountain Data event.

My talks are:

To the Cloud, Infinity, & Beyond: Top 10 Lessons Learned at MSIT


Columnstore Indexes in SQL Server 2014: Flippnig the DW /faster Bit

The latter is one of my staples.  The former is a new presentation, a preview of my forthcoming delivery for PASS Summit14.

Register, see the schedule, or see the event home page on the SQL Saturday site.  I’ll look forward to seeing you here:

Spencer Fox Eccles Business Building
1768 Campus Center Drive
Salt Lake City, UT 84112

Kudos to Pat Wright (blog | @sqlasylum) & crew for their crazy efforts (pardon the pun) in coordinating the event.

TJay Belt (@tjaybelt), Andrea Alred (@RoyalSQL), & Ben Miller (@DBADuck), keep your peepers peeled—I’m on the way!

Issues with MSDN Sign-in -10/24 - Mitigated

MSDN Blogs - Fri, 10/24/2014 - 17:43

Final Update Wednesday, Oct  24 2014 12:59 PM UTC

There was a widespread issue with live id authentication affecting multiple sites and the same has been resolved at 5:35 PM Pacific time by Live ID support. MSDN subscribers will not be facing any issues with signing in to their account and access their subscription benefits

We appreciate your patience.

-MSDN Service Delivery Team


Initial Update: Wednesday, Oct  24 2014 12:38 PM UTC

We are currently investigating issues with MSDN page where users may face issues signing-in intermittently .Our DevOps are engaged and investigating the issues

We apologize for the inconvenience and appreciate your patience

-MSDN Service Delivery Team

Issues with connecting VSO - 10/24 - Mitigated

MSDN Blogs - Fri, 10/24/2014 - 16:56

Final Update:  10/25/2014 1:00:00 AM (UTC)

The issue is mitigated and was root caused to be due to a recent change in Customers should not experience login failures anymore. 

We apologize for the inconvenience this may have caused and appreciate your patience while the issue was resolved

- Visual Studio Online Team


Update: 10/25/2014 12:30 UTC

We confirm this a issue. Customers using live id accounts to log into VSO accounts will experience login issues. However, if the customer is already logged in to the service should not experience any issues. During this impacted window, if the customer signs out and tries to login back will experience login issues. Our DevOps team working with to mitigate the issue as soon as possible.   

We apologize for the inconvenience this may have caused and appreciate your patience while working on resolving the issue.


Initial Update: 10/24/2014 11:56 PM (UTC) 

We are currently experiencing issues with VSO logins. Live id accounts might see login failures intermittently while logging into VSO Services. Our DevOps are engaged and investigating the issues.

We apologize for the inconvenience this may have caused and appreciate your patience while working on resolving the issue.

- Visual Studio Online Team


Introducing the Visual Studio ALM Rangers – Marcelo Silva

MSDN Blogs - Fri, 10/24/2014 - 16:38

This post is part of an ongoing series of Rangers introductions. See Ranger Index (Who is Who?) for more details.

Who you are?

I’m originally from Rio de Janeiro, Brazil, now an American citizen. I have lived in the US for the past 15 years, having worked in Wall Street for most of that time as a Lead Developer in the .Net / Java space. I’ve joined Microsoft in 2011 as a Premier Field Engineer in the ALM space and just recently moved to an Application Development Manager position in the Public Sector.

My passions, besides Application Development, Architecture and Project Management and my family include flying, snowboarding and snorkeling.

What makes you “tick”?

Technology and how we can use it to make the world better around us. One of my passions is to solve problems, make processes and organizations better by applying technology the right way.

Where you live?

I live in Frisco, TX which is 25 miles NE of the Microsoft Office in Las Colinas. This is in the Dallas metro area.

Why are you active in the Rangers program?

I just wanted to contribute more to the community and be more involved in the team that is the leader in the ALM space.

What is the best Rangers project you worked in and why?

I just joined, so I haven’t had a chance to work on any of the projects yet, but definitely looking forward to do so.

Lifecycle Services Maintenance - Thursday October 30th, 2014

MSDN Blogs - Fri, 10/24/2014 - 16:25

Dynamics AX Lifecycle Services will perform our scheduled infrastructure maintenance (detailed timeline below)


We appreciate your patience as we work to improve the site for you.

LCS will be down during this period




10:00   -  18:00 

17:00 -01:00 (Next Day)


Kanban, MMFs and the Goldilocks Principle

MSDN Blogs - Fri, 10/24/2014 - 15:03 really resonates with me.

The article explores Kanban and how it differs from other agile approaches such as Scrum.

My experience with scrum was as follows. You peel off a set of stories from the backlog to deliver in that sprint. Because you have a fixed-timebox there is pressure to make the stories quite fine-grained so you can be sure that they’ll fit in the time box, and you don’t have fractions of stories assigned to the sprint. You try and identify a theme to provide a common goal, but that can be a bit artificial, and some of the stories don’t really fit with it. Inevitably you are too greedy and as the end of the sprint draws near everyone feels under pressure to complete stuff, quality goes down, and then there’s a long tale of testing that ends up being done in the next sprint. Often the testing can’t be done anyway because you’ve got to wait for other stories to be completed before you have enough of an e2e experience to test (there’s only so much that can be achieved through unit testing). You try to write stories that are customer facing, but as they are quite fine-grained, this can be a bit of a struggle – stories creep in for backend and engineering work. You have trouble explaining the backlog to your stakeholders because the stories are too fine-grained to see the wood from the trees, and they are also not all customer-facing.

In order to cure these problems, we started evolving towards a Kanban approach, beginning by adopting the notion of Minimal Marketable Feature or MMF. An MMF is in the Goldilocks zone of granularity – neither too big nor too small, just right. There is a beautiful tension between making the feature marketable yet keeping it minimal, and a lot of hard work goes into designing the backlog and getting this right, as it should. We still have stories – they are used to break down the work to deliver an MMF, and we still try to make them customer-facing to keep the team thinking that way but don’t force it.

MMFs are marketable, so it became easier to communicate with stakeholders about the functionality being delivered and how it contributes to the business.

Execution focus turned away from the sprint to the MMF. When is the MMF expected to ship? Is the burndown of stories/tasks for that MMF tracking to that expected date? If not, what’s blocking, can the block be removed? Or is it that it’s just taking longer and expectations need to be reset with stakeholders? Do we need to shift effort from another MMF being done in parallel to one MMF to ensure that at least one gets completed ready for the next release? How is a release (= set of MMFs) tracking? Will all the MMFs make it (not too much of a disaster if they don’t, because all MMFs are designed to be self-contained, marketable in their own right)?

We found that a Kanban board of MMFs is quite an effective way of tracking progress. Focus shifts towards pushing an MMF across the board as quickly as possible, and lining up MMFs in the queue to feed the continuous delivery pipeline. There is no pressure to finish it against some arbitrary deadline (end of sprint); instead the team pushes itself to get MMFs through the system as fast as possible, though without skimping on quality and in a way that is sustainable long-term: late nights and productivity-sapping long hours are avoided as much as possible.

We have continued using sprints, but they’ve been demoted to useful planning checkpoints where an engineering team can re-evaluate it’s capacity, communicate with stakeholders about MMFs that have been completed since the last checkpoint, update expectations about when MMFs in flight are likely to finish, and raise awareness of what’s coming next in the queue. There is no longer a need to identify a theme for a group of stories in a sprint, because the MMF is the theme – all stories required to build it are naturally grouped.

I wouldn’t go back to Scrum.

Sample chapter: Using XAML Styles

MSDN Blogs - Fri, 10/24/2014 - 14:52

This chapter from Microsoft Visual Basic 2013 Step by Step investigates how XAML styles are used to format controls with a consistent and attractive appearance across the user interface.

After completing this chapter, you will be able to

  • Understand how XAML styles are used to build attractive-looking user interfaces.

  • Define reusable styles in the App.xaml project file.

  • Reference new styles by using the Style property for controls on the page

  • Build new styles from existing styles using inheritance and the BasedOn property

Find the complete chapter here:

Interested in more free sample chapters? Check out our growing collection here:

Azure Sample App: Vehicle Real-Time Status Tracking, Statistics and Analysis

MSDN Blogs - Fri, 10/24/2014 - 14:48


This sample app demonstrates how an Azure hosted application, using Storm, a distributed real-time computation system, and Apache Kafka, a publish-subscribe messaging system, keeps track of vehicle data in real time,  from Vehicle’s speed to temperature, RPM and gear usage rate.

Text from the sample app:

Storm is a distributed real-time computation system. Similar to how Hadoop provides a set of general primitives for doing batch processing, Storm provides a set of general primitives for doing real-time computation. Storm is simple, can be used with any programming language, is used by many companies.

Kafka is a distributed, partitioned, replicated commit log service. It provides the functionality of a messaging system, but with a unique design.

This example shows how to deploy a Storm topology that reads data from the Kafka messaging system. You can use the Kafka client application to send vehicle real-time information from anywhere to the Kafka cluster. The Storm topology will translate those coordinates into JSON objects, use GeoJSON to identify the coordinates on the Bing map, and then keep a running record of Vehicle’s speed, temperature, RPM and gear usage rate. For persistence, the real-time data is stored in Microsoft Azure Table Storage service. The topology also writes data to Redis, which is how this web application gets the data. This web app is written in Node.js, uses Socket.IO and the express web application framework to read the data from Redis and display it via d3js.

Upcoming Microsoft Conferences in 2015

MSDN Blogs - Fri, 10/24/2014 - 14:26


Microsoft announced at the Official Microsoft blog site a number of upcoming Microsoft conferences in 2015.

  • Convergence 2015 in Atlanta, March 16-19, the place where business leaders gather to explore solutions.
  • //Build in San Francisco, April 29-May 1, is where developers will hear the latest about our platform strategy, technologies and opportunities.
  • Microsoft Ignite in Chicago IL, May 4-8, 2015, a unified Microsoft enterprise tech conference.
  • Worldwide Partner Conference in Orlando, July 12-16, for our enormous partner community.

Build Conference, April 29 – May 1, 2014, San Francisco, CA

Build is a Microsoft's premier developer conference. If you want to find out what was covered in 2014, check out the keynote and breakout sessions at

Microsoft Ignite, May 4–8, 2015, Chicago, IL


Nice to tweet you

MSDN Blogs - Fri, 10/24/2014 - 13:56

I’ve been on twitter for a while, but only recently started to use it actively. Enjoying the experience. You can tweet me @sjhkent.

Direction and changes for Architecture and Design Tools in Visual Studio

MSDN Blogs - Fri, 10/24/2014 - 13:40

We’ve just posted in this topic over on the VS ALM blog. Please send us your feedback.

Upcoming Changes in Visual Studio Architecture and Design Tools

Inside KinectKannon – The Semi-autonomous Robotic T-Shirt Cannon

MSDN Blogs - Fri, 10/24/2014 - 13:07

Today a I finally had some free time to write up a detailed overview on the KinectKannon. Enjoy!

(The Github repository for this is

The Kinect Kannon is a semi-autonomous robotic T-Shirt that is augmented by Kinect for Windows which fires by opening a valve releasing approximately 100 PSI of CO2.


...Continue reading here.

Upcoming Changes in Visual Studio Architecture and Design Tools

MSDN Blogs - Fri, 10/24/2014 - 12:52

This post explains some of our plans for evolving our architecture and design tools in Visual Studio, including new capabilities and changes to existing capabilities that we will be delivering in the next major release and subsequent updates.

Although these plans have already been informed by an analysis of usage data and talking extensively with customers, with this post we hope to spread the net even further and ask that you send us feedback on the overall direction and specific changes we are making so that we can affirm (or not) the direction we are taking and figure out how to solve any unmet need. You can comment on the blog post in the usual way, or send email to Sending email will allow us to follow up and dig into any specific concerns you have without divulging information in a public forum.

  • We are focusing our efforts on the problem of extracting architecture and design information direct from code and validating code against architectural rules;
  • Within that, we want a single, integrated and streamlined experience, visualizing and exploring the architecture and design of code, and will focus that around the code map and familiar code explorers (solution explorer, object browser and class view);
  • Layer designer and validation remains unchanged initially, but we are actively looking at how we can improve the overall experience for architectural validation including better integration with code map and the Visual Studio code analysis experience;
  • In order not to spread our investment too thinly, we are removing the ability to create UML class and sequence diagrams from code, instead of rewriting them to use the new Roslyn code model;
  • For the same reason, we are not carrying forward the architecture explorer, which is also impacted by Roslyn;
  • We are NOT removing the UML designers themselves; they can still be used to create UML models and existing models should still open and work as before.

Our plans are driven from a renewed focus on the problem of extracting architecture and design information direct from code, using that to specify what the architecture should look like, and then validating code against that specification. Having an understanding of the architecture and design of your code helps in a number of ways: developers can quickly orient themselves in an unfamiliar code base, they can understand how their code fits within the overall design, for example when assessing the potential impact of a change, they can communicate understanding with others, for example during a design or code review, they can use their understanding to figure out how to improve overall architectural health, for example by minimizing dependencies and ensuring a properly layered architecture. By extracting the information directly from code, rather than documenting it by hand, they can be safe in the knowledge that what they are looking at is a true and accurate representation of what they actually have, as well as not having to expend resource and time creating architecture and design documents manually. Building on that understanding, developers can then specify rules of how the architecture should be, validate existing code against those rules to find technical debt caused by poor architecture, and then run rules against new code changes to prevent accrual of further debt.

With this focus, our goal is to provide a single, integrated and streamlined experience for visualizing and exploring the architecture and design of code, defining architectural rules and then validating code against them. Initially this will be focused around the existing code map functionality. Our current plan includes:

  • Improved performance, specifically issues stemming from the aggressive way code map forces solution rebuild and re-indexing of binaries
  • Improved integration of code map with existing explorers (class view and object browser)
  • New experiences to filter out clutter and unwanted information, without having to manually delete individual nodes and links
  • An the option to see members of a class as a list rather than individual nodes, making maps more compact and look more like standard class diagrams
  • A single-click experience to produce useful maps
  • Ability to refresh a map to account for changes in the code, so that you don't have to recreate it from scratch
  • Improved "top down" maps that help you orient yourself in a solution or API surface that you haven't seen before
  • Improved experience for drilling into high-level dependencies to understand what is causing them
  • Better integration of architectural validation with code map and the code analysis experience in Visual Studio

The next release of Visual Studio also sees a complete replacement of the underlying code model with Roslyn, which requires significant rework of many of the architecture and design capabilities. We have conducted a cost/benefit analysis of which existing capabilities it is worth converting to the new code model and which we should just remove in favor of focusing on improvements.

As a result of this analysis we have identified two capabilities that will become redundant through our improvements, so are being removed, and one where we think the benefit is not worth the cost of conversion.

The two capabilities that will become redundant, so are being removed, are:

  • The Architecture explorer, which is primarily used for exploring code in the solution or an arbitrary set of binaries as well as being a convenient entry point for creating new diagrams. Customers have told us that this is complicated to use, and many of its capabilities are already subsumed by the solution explorer, class view and object browser. Instead we are adding the ability to create code maps from elements in the object browser and class view (Figure 1) and entries to the Architecture menu to access the class view and object browser from the Architecture menu and to create a new, empty code map with one click (Figure 2). Combined with the existing support for adding elements from the Solution Explorer, and the capability to drop DLLs from the Windows File Explorer (added in Visual Studio 2013 Update 3) we are able to streamline the whole experience of exploring the structure of code and visualizing it, whether that is code in the solution, code from Microsoft frameworks or code from arbitrary DLLs.

Figure 1 - Creating code maps from the object browser (Visual Studio “14”)

Figure 2 - New menu items in the architecture menu (Visual Studio “14”)

  • Create UML Class Diagrams from Code. Customers have told us that this is not very useful in its current form and would require significant improvement to make it so. By improving code map notation to be more class diagram-like, combined with the other planned improvements, we'll be able to deliver a much better solution for visualizing and understanding code than we could if we split our investment. Note that we are NOT removing the UML designers themselves, just the existing limited capability to create UML diagrams from code.

The capability that we have decided to cut altogether is:

  • Visualize code on sequence diagrams. No direct replacement for this is planned at this time, though we note that since this feature was originally shipped, a new capability has been added to map methods on the call stack whilst debugging, which targets a similar scenario by allowing users to visualize flow through the code whilst debugging, or from recordings of execution taken through IntelliTrace. We have already made some enhancements to the debugger map in updates to Visual Studio 2013, and the planned improvements to code map summarized above will also benefit this scenario.

Thank you for reading this far, and please remember to send us your feedback by commenting on the blog post in the usual way, or sending email to

Architecture and Design Tools team, Visual Studio, Microsoft

Reach a bigger audience with your Unity game

MSDN Blogs - Fri, 10/24/2014 - 12:30


Now of days most game developers have started to realize how important it is to release on multiple platforms. By targeting as many platforms as possible with your game you can diversify and expand your audience. This is absolutely crucial for any indie game developer to succeed in todays crowded markets.

In the spirit of helping you expand your games audience I am happy to share my recent Microsoft Virtual Academy (MVA) course on Porting Unity Games to the Windows Phone and Windows Store. In this course @jaimerodriguez and I cover all the in’s and out’s of the porting process. We walk you through the steps from end to end while sharing some of our own porting experiences along the way. Below is a little break down of some of the key points we touch on.

Getting Started

In the first module we start with a look at prerequisites. We give a quick list of what’s needed to get started,. Then we do a nice walk through of the tools and a review of the project structure. We round this module out with a discussion on how to handle ongoing iterations when exporting Unity projects to the Windows platforms.

Porting Your Unity Game

With this module we explain the importance of feature detection for hardware and discuss design patterns for optimal UX. We talk about the run-time differences you might encounter and how to best setup your code for reuse.  This module is where we walk through the actual process of creating a Universal App project for your Unity game. 

Native Integration

In this module we discuss all the options available to you to include great platform features. We explain how to use features like Live Tiles and Toast notifications to light up your game and engage your audience. Including native platform features is an awesome way of making your game stand out from the masses.


Optimizing your game is a key step in the development process. This becomes even more important when targeting mobile devices. In this module we talk about patterns and share tips to help squeeze out more performance from your code. We also explore ways to debug and analyze your project to see how well it is performing.

Monetization & Packaging

In order to keep building games full time at some point you need to make some money from your creations. So in this module we go through the options for monetizing your game, such as trials, ads, and in-app purchases. We share our views on selecting a monetization model based on hard data, that we share. Finally we end this module by touching on the review submission and certification procedures for the Windows stores.

Hopefully this MVA course will help get you started with porting your Unity game to the Windows platforms. Ultimately building a strong audience and fan base is key to the success of any game studio or developer. Bringing your game to new platforms is a great way for indies to accomplish this and the Windows Platforms with their growing numbers is a great place to start!

#GameDev w/ @ScruffyFurn

If you are interested in game development and are looking for a good place for info and advice check out my new web series #GameDev w/ @Scruffyfurn . In these monthly videos my goal is to share tips and tricks to help game developers find success in the game industry. Each month I rant about topics that plague us developers. Special guests join me to share the knowledge gained from their experiences in the game development trenches. So please check it out and join the conversation!

Small Basic for Kids - Featured Small Basic Book! - Ages 10-12

MSDN Blogs - Fri, 10/24/2014 - 12:11

We're featuring another Small Basic book from Philip Conrod and Lou Tylee!

Learn more about the book here.


SMALL BASIC FOR KIDS​ In the 1980's, there was a series of books aimed at teaching kids how to use the Basic programming language.  Titles like "Kids and the Apple II", "Kids and the Commodore 64," and  "Kids and the IBM-PC" were sold everywhere. These books sold over 700,000 copies!  With p​ermission and editorial help from the original author, we have adapted these classic books to the Microsoft Small Basic language - a language aimed at encouraging kids to learn programming.

SMALL BASIC FOR KIDS (Table of Contents)  is an illustrated introduction to computer programming that provides an interactive, self-paced tutorial to the new Small Basic programming environment.  The book (using many of the original cartoon drawings) consists of 30 short lessons that explain how to create and run a Small Basic program. Students learn about program design and many elements of the Small Basic language. Numerous examples are used to demonstrate every step in the building process. The tutorial also includes two complete games for students to build and try - a text-based Hangman game and a simple video game (Sample Screen Shots​). SMALL BASIC FOR KIDS should be understandable to kids aged 10 to 12 and is suitable for both home and classroom use.  Notes for both the instructor ( or parent) and the students are provided.  Assignments are given to test student knowledge.  No programming experience is necessary, but familiarity with doing common tasks using Windows is expected.

Learn more about the book here.


So far, this book is the youngest book we have for Small Basic yet (going down to age 10)! We hope to even reach a little younger as well with future books. Stay tuned in here!

   - Ninja Ed

The Multi-Device Hybrid Apps extension for Visual Studio Kinda Rocks

MSDN Blogs - Fri, 10/24/2014 - 12:07

I have been messing around with creating Cordova (PhoneGap) apps, mostly ones that are derived from the Mobile Services quickstart project for PhoneGap. However, I have just been using the standard tools of text editor (Notepad++), command prompt, Android or iOS emulator, and/or my physical Windows Phone 8.1 device (for some reason I can’t get the WP8.1 emulator VM to run on my machine) for building and testing my Cordova apps.

After running into a missing bit of API for Windows Phone (hey Cordova folks, let’s get this fixed for Windows Phone), I tried to flip quickly over to build and test my app using the Android emulator and Eclipse. After spending nearly a day trying to get the Android/Java stuff setup correctly, and then getting fed-up with the ponderously slow Android emulator, I decided to give the Multi-Device Hybrid Apps extension for Visual Studio a try. (Let’s shorten Multi-Device Hybrid Apps to MDA, which saves precious characters, and the name of the node.js module is vs-mda.)

Since I already had Visual Studio 2013 with Update 3 installed (so that I could have all the goodness of all the latest Azure Mobile Services tooling), all I needed to do was install the Multi-Device Hybrid Apps extension for Visual Studio CTP2.0. The install completed without errors (always a plus for a CTP—especially one installing lots of non-MS bits). After messing around for a bit, I got so excited about this new VS tooling for non-MS platforms, that I wanted to share what I found; first…..

Visual Studio is actually a pretty good JS editor

My past experiences working with JavaScript in Visual Studio were only so-so, such that I was primarily using Notepad++ and web browsers to write and debug my JS code. I’m not sure if it’s just a matter of having the right metadata files on hand, but the debugging experience of my JS code was actually surprisingly good using VS. Breakpoints were hit correctly, current variable values were displayed in intellisense, and exceptions opened-up in VS, just as I would have expected from a C# app. Plus all of the pretty colors of a code page in VS (and you get to debug in the non-minimized version).

Hides the “crazy” of Cordova

For those of you who haven’t played with Cordova (or PhoneGap), it’s lots of command-prompts…to add plugins, to build and run apps on specific platforms. For every command, Cordova is downloading and installing npm modules from the Cordova Git repo, running complex build commands that generate and merge platform-specific builds—the command window just flies by. I must admit that many times, I have had failures in Cordova trying to build and run from the command line (especially for Android), and have resorted to manually starting the app in a specific platform’s IDE. Not only does MDA hide most of these myriad commands, but it just seems to build and execute a bit more consistently than the Cordova commands. JavaScript purists (and iOS devs) will probably really miss watching the commands churn by—but I really didn’t miss it, plus how much more magical when it just runs.

Let me just add that I’ve found it to often be a challenge just getting Eclipse to start on my Windows laptop (Java is in the wrong place…wrong Java is installed). For me, the MDA installation had no trouble finding my Java installation, and it installed the Android SDK somewhere where Visual Studio knew where to find it (in \AppData\Local\Android for my installation). In fact, the MDA extension installed a lot of non-MS tooling that I already had elsewhere on my machine (npm, node.js, Git, Android SDK, Chrome, iTunes) plus some new stuff (Java JDK, Apache Ant, SQLLite). The only problem that I had was MDA couldn’t find the Git (that I assumed it installed), but it provided a clear warning, and I was able to easily set the path in the GIT_HOME environment. variable. With that one manual fix, MDA seems to build and run just fine. Then I went and removed the extra Android SDK (which is huge).

Check a box to turn plugins on and off

Cordova uses plugins, which are external (often third-party) modules that implement some device-native functionality, like camera capture or file system access. You usually add them from the Cordova Git repo, with a command like this:

cordova plugin add

Executing this command again fills the window with installation results and the installed plugin gets added to the master config.xml file for the project. Based on this experience, just imagine how surprise I was to discover that when I accidentally opened my Cordova project’s config.xml file in Visual Studio I found a VS project-style UI, with a Plugins tab:

Need to add or remove a plugin, just check the box! Sweet!

Ripple web-based emulator

If you have ever tried to test and debug Cordova apps (or any Android app) using the emulator that ships with the Android SDK; wow, it’s slow. I think even slower than the Windows Phone VM-based emulator (last time I was able to run it). MDA ships with Apache’s Ripple emulator

This thing runs in Chrome, is pretty fast, which makes it a great way to smoke test your app during development and before you move to the full emulator or device. You can mock Geo and acceleration, and there’s even supposed to be some camera magic, which I will be looking for soon. There are other bells and whistles that I have to still investigate—but overall this seems like a big win to have in the MDA.

Easily deploy to multiple platforms

I’d been focused on Android when I came across MDA, but you can deploy and run an MDA app on any of the supported platforms Android, Windows Phone, Windows and iOS (remotely), and just by changing the platform dropdown:

I haven’t yet tried remote deploying to the iOS simulator running on my borrowed MacBook Pro, but I will be trying it soon (you can debug as an iOS device in Ripple). Debugging on the remote iOS simulator is apparently not yet supported. (Keep in mind that push notifications require a physical device, Apple Dev account, etc…)

Built-in support for Azure Mobile Services

I was excited to see that one of the check boxes in the Plugins config page was for the Azure Mobile Services SDK. This installs the Cordova plugin for Azure Mobile Services, which (I assume) is based on the API of the Mobile Services client library for JavaScript (but for now I think without the recently added push notifications registration support). Once you add this plugin, one line of code gets you going with Mobile Services in your MDA app:

var client = new WindowsAzure.MobileServiceClient('', 'XXXXXXXXXXXXXXXXXXXXXX'), todoItemTable = client.getTable('TodoItem');

I added the PhoneGap/HTML quickstart code files to my project, and it ran great (as you can see in an earlier screenshot). (Hey MS Open Tech guys….please add push notifications functionality to your excellent Mobile Services client so that I don’t have to download and install the one from the Azure web site.)


So far, the MDA extension for VS has worked surprisingly well for a preview, and it’s really great to be able to easily add plugins, debug in VS, and deploy and work the kinks out of my app in Ripple before having to fire-up the full (but integrated) Android emulator. I can’t wait to try and remotely debug my Cordova app on iOS (I’ll have to borrow the team MacBook Pro), when this promised feature finally shows up. I’ve read about this remote deploy/debug functionality for Cordova, but I’ve never tried it from the command-prompt.

I can’t wait for the next release of the Multi-Device Hybrid Apps extension for Visual Studio 2013. If I find out any more cool stuff, I will let you know here.


Glenn Gailey


Subscribe to Randy Riness @ SPSCC aggregator
Drupal 7 Appliance - Powered by TurnKey Linux