Category Archives: Microsoft

What Is: Microsoft Cognitive Services

Lately I’ve taken an interest in Microsoft’s Cognitive Services suite, and given some talks about Cognitive Services around the country. Since it makes sense to take some notes on this process, I’m going to write a couple of blog entries going through some of the services available and some sample code for people who want to try it out. Before I start doing that, I’ll just write a brief intro about what Cognitive Services are and why they’re pretty cool.

Cognitive Services used to be called Microsoft Project Oxford. Since its debut it’s expanded to include more features. This is a suite of intelligent APIs that work cross-platform to provide intelligent data such as facial recognition in images, voice recognition of speakers, and video stabilization. There’s a variety of APIs to explore here. You can access the APIs from any kind of app that you want to interface with them, though I have been coding in C# the most lately so that’s what I’ll use in examples.

You might already be familiar with Cognitive Services already if you tried out the How-Old.Net website back in May of last year. (I recall this going viral, then a big scare about if Microsoft was saving your images and violating privacy, but… the site doesn’t save your images, so don’t worry if you want to play around with it.) There’s also another favorite, the Fetch app, which is at https://www.what-dog.net/. It can recognize breeds of dog, or tell you what dog it thinks you are…

mepoodle

It thinks I’m a poodle.

You should check out all the APIs that are available and just play around. I particularly have fun with the Image Analysis. It’s pretty smart, though it’s not always a hundred percent right which is why it gives off a confidence rating whenever it analyzes a picture. What impresses me as well is it recognizes a pretty amazing variety of celebrities, including people from television and Broadway. Also, I will stealthily point out to you that it judges pictures on their Adult Content and Raciness Rating, which has lots of practical and impractical applications.

As an Interactive Fiction fan, I’m also really excited about the possibilities in the natural language understanding API. With my background, I think of it as a potential for a much better text parser for a conversational IF. I’m going to be approaching a new project from that angle.

If you want to do more than just play and use these in an app, you’ll need a Microsoft account to log in and get API keys. (It’s the “My Account” button in the top corner.) I’ll post step by step later, but if you can’t wait, you may also see me at Philly Code Camp this Saturday discussing them! Maybe see you this weekend!

Fixing A Frowny Face on the Raspberry Pi

This post is to document a weird error for posterity. But first, some background:

We’ve been working for a while on a device that uses the Raspberry Pi 2 running Windows 10. It’s neat! If you want more information about how to install Windows 10 on a Raspberry Pi 2 or 3, go here:

Windows IoT
Basically, the steps are:

  1. Get Pi
  2. Get an SD Card for the Pi
  3. Download and install Windows 10 on that SD Card
  4. Slip that card into the Pi and boot
  5. Connect your board to a network (I used wired at first, but a wireless gadget can work too)
  6. Deploy code to the board

The first few steps of getting Windows up and running are really straightforward!

But:  I encountered a problem sometimes. Folks told me it’s worth it to write this entry in case other people run into that same problem.

Windows 10 worked great for me when my Pi was plugged into the wall. However, I’m creating a device that I want to be portable, so I’m powering the Pi, and the Pi’s tiny screen, with these portable power supplies that run on AA batteries. They work great! Mostly!

RPi-battery-power-supply

However, the battery drain on the device from running an entire computer and a small monitor was more than I initially imagined. And batteries don’t die evenly. When the battery power is low, but not entirely dead, the Pi might give the impression that it’s working even if it doesn’t actually have enough juice to work. When that happens, it will start dropping off the network, not allow you to push code, and then, finally, it will lose Windows.

When that happens, you might get the dreaded Frowny Face error.

This error is very mysterious. A frowny face definitely tells you something is wrong, but it really doesn’t help you understand what.

I did find the frowny face hilarious though. My Pi is currently in a 3D printed case that has a small window, so the frowny face made it look just like Game Boy from the Captain N cartoon…

th

Sorry, I’m showing my age. I think this is also a character on Adventure Time?

adventureBMO

It’s the same character, people; it’s amazing! Only mine was, as I mentioned, frowning.

Anyway, I discovered that the problem, essentially, was that the Pi had some power, but not enough power. When it didn’t have enough juice, it wasn’t able to boot up Windows 10 after all. All it could do about this was be sad! The problem was fixed when I simply replaced the batteries in my portable power supply. I rebooted Windows, and I was able to push code again. But since it seemed like it was sort of working, I’m ashamed to admit it took me quite a while to figure out that the problem was the power supply, rather than Windows or the SD card. This is especially true because it doesn’t all fail at once. First pushing code stops working, then Windows stops working, as the power gets lower and lower. So if you do get the frowny face, don’t despair! Try getting more power and the Pi will work again.

Happy hacking!

Fragments: Design for Mixed Reality

Anyone who knows me knows how extremely excited I was for the HoloLens, the Mixed Reality device being developed by Microsoft. When I saw the live demonstrations of the device, I knew I had to have it.

All that being said, as excited as I was about the HoloLens, I was excited about it for reasons beyond my usual. HoloLens has  tremendous potential in the fields of science, medicine, construction, education, and engineering. I was not really sure how it would fare as a gaming device, however. It seemed likely that casual games could find a home there, but could a device that overlays holograms onto the real world be home to a deep narrative experience?

Well, now I’ve played the game Fragments on HoloLens, and I am convinced.

Continue reading

Raw Tech on Channel 9

Since this summer, Microsoft Evangelists have been working hard to put more content on Channel 9, Microsoft’s home for tutorial and video blogs.

Today, I uploaded a short video, a ten-minute summary of the hour-long talk I gave at CodeMash about mobile game design! I hit the highlights and go over some tips about mobile design I’ve learned from years of observation. Check it out here:

Channel 9: Design Tips for Mobile Games

The Raw Tech blog series is a series uploaded by Evangelists like myself. There’s been so many new videos uploaded it would take days to watch them all now, but some stuff that might be of particular interest to people who read my blog:

Dave Voyles talking about making a digital games portfolio

Sarah Sexton discussing Unity and Visual Studio

Stacey Mulcahy on using a Breadboard (important stuff for beginning Makers!)

There’s also some great podcasts for your listening pleasure like Tobiah’s Be Indie Now and Dave’s Indie Dev Podcast. I like podcasts when I’m cranking on work on the second screen.

This year, I’m going to help contribute to more game content on Channel 9, and Livi Erickson’s awesome AR/VR show!

 

How to Make your First Windows 10 App

Because Windows has been slowly transitioning from one app model to another, I found it tricky at first to find Windows 10 specific resources. I started playing around with the Windows 10 specific universal app creation tools recently. Now I’m creating this quick guide to help you make your very first simple Hello World app targeting Windows 10. Hopefully you’ll find this quickstart useful, and then you can move on to using some more complex samples to create more complex apps.

1. Open up Visual Studio 2015. (Community 2015 here is free.)

2. In the file menu, choose New Project – > BlankApp Universal Windows.

3. Name the new project HelloWin10. At least, that’s what I did. What you name things initially in XAML is important because references use exact names and if you can’t keep track of names things will be broken. So be sure that whatever you call it you’re comfortable with still using it throughout the project. If you choose to call it something else, make sure that you replace any references to HelloWin10 in the code below.

4. In your MainPage.xaml.cs have this code:

using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation;


namespace HelloWin10
{
public sealed partial class MainPage : Page
{
public MainPage()
{
InitializeComponent();
}


private void HelloButton_Click(object sender, RoutedEventArgs e)
{
DisplayText.Text = "Hello, world";
}
}
}

5. In your MainPage.xaml have this code:

<Page x:Class=”HelloWin10.MainPage”
xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation”
xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml”
xmlns:local=”using:HelloWin10″
xmlns:d=”http://schemas.microsoft.com/expression/blend/2008″
xmlns:mc=”http://schemas.openxmlformats.org/markup-compatibility/2006″
mc:Ignorable=”d”>

<Grid Background=”{StaticResource ApplicationPageBackgroundThemeBrush}”>

<StackPanel>

<Button Content=”Click Me” Click=”HelloButton_Click” />

<TextBlock x:Name=”DisplayText” FontSize=”48″ />

</StackPanel>

</Grid>

</Page>

6. Test your app by clicking the green arrow or going to Debug. An app screen should appear (if you are on Windows 10). Here the Click Me button calls HelloButton_Click so it displays the text Hello World.

Yeah, so it’s not much of an app, but you gotta start somewhere. In the future I’ll make some more robust apps using data from the web and from Azure and show you those processes too. I’m working out of these files on GitHub and I’ll create a few branches. If you see that the code on GitHub has a little more in it than just Hello World, that’s because I’ve also integrated Template 10 by Jerry Nixon which has a few additional features. It’s not necessary to get started, though!

For learning more about C#/XAML, check out Virtual Academy.

Best of Build and Windows 10

Now some important news from Microsoft for developers out there:

Build sold out in record time this year, so a lot of people may have missed out. If you’re one of those unlucky few, there’s a few ways to catch up on news…

Microsoft Virtual Academy has a “Best of Build and Windows 10” video series you can check out! It goes into the new app model, news for game developers, info about the new Edge browser, IoT, open-source, and more.

And for more in depth Windows 10 development content, a free live-streamed event will be held on the same web site starting tomorrow! Register now for A Developer’s Guide to Windows 10.

Or, if you’re near a major city and want to venture outside, check out the Build Tour. Day-long live events may be coming to your country/area! We have Atlanta coming up on May 20, and Chicago on June 10, and lots more. These events are international so one may be closer to home than you think! Look it up at https://www.build15.com/

HoloLens and GameDev News at Build

Some highlights from the Build keynotes today and the announcements from Microsoft:

News: HoloLens apps, for Microsoft’s AR HoloLens device, are Windows 10 apps. Windows 10 apps that run in windows will be able to snap to your actual walls. For examples, see some pictures here or check out the link to the video: HoloLens on the Walls

Unity 3D will work to create apps and games for HoloLens! I’ve heard really great things about this integration. Imagine making a game character that could run right out into the real world and jump around on all your furniture… More info released from Unity today here: Unity Blog

Unity announced deeper integration with Visual Studio recently. So not to leave Mac or Linux developers behind, Visual Studio Code is a new cross-platform Visual Studio family member. You can get it here, free: Visual Studio Code

Full Unity support for this is still pending, but it has some features that Mac and Linux developers should find useful!

Also, for game devs who have been holding off on Windows support for their games, Build also announced support to easily retarget Windows with your Java or C++ apps from Android and Objective C apps from iOS. Here’s some details at TechCrunch.