Just One More Week To Enter The Rock Paper Azure Fall Sweepstakes!

by Brian Hitney 12. December 2011 09:40

Week #3 of the Rock Paper Azure Challenge ended at 6pm EST on 12/9/2011. That means another five contestants just won $50 Best Buy gift cards! Congratulations to the following players for having the Top 5 bots for Week #3:

  1. AmpaT
  2. choi
  3. Protist
  4. RockMeister
  5. porterhouse

Just a reminder to folks in the contest, be sure to catch Scott Guthrie, Dave Campbell, and Mark Russinovich live online next Tuesday, 12/13/2011, for the Learn Windows Azure event!

RPAChallenge5

Does your bot have what it takes to win? There is one more week to try and find out, now through December 16th, 2011. Visit the Rock Paper Azure Challenge site to learn more about the contest and get started.

Remember, there are two ways to win:

Sweepstakes

To enter the sweepstakes all you have to do is enter a bot, any bot – even the pre-coded ones we provide – into the game between now and 6 p.m. ET on Dec. 16th. No ninja coding skills need – heck, you don’t even need Visual Studio or a Windows machine to participate!

RPACancun7

At 6 pm ET on Friday, December 16, 2011 the "Fall Sweepstakes" round will be closed and no new entries will be accepted. Shortly thereafter, four bots will be drawn at random for the Grand Prize (trip to Cancun, Mexico), First Prize (Acer Aspire S3 laptop), Second Prize (Windows Phone), and Third Prize (XBox w/Kinect bundle).

RPAPrizesThumbnailsTopHomePage5

Competition

BestBuyGiftCardIcon3For the type-A folks, we’re keen on making this a competitive effort as well, so each week - beginning Nov. 25th and ending Dec. 16th - the top FIVE bots on the leaderboard will win a $50 Best Buy Gift card. If your bot is good enough to be in the top five on successive weeks, you’ll take home a gift card each of those weeks too. Of course, since you’ve entered a bot, you’re automatically in the sweepstakes as well!

Note: As with past iterations of the challenge, even though you can iterate and upload updated bots for the competition, you will only be entered into the sweepstakes one time.

You know what they say… you gotta be in it to win it! Good luck to all players in week #4!

Tags: , , ,

Azure | Events | Microsoft | RPA | USCloud

Azure Camps Coming Soon!

by Brian Hitney 26. November 2011 13:55

Jim, Peter, and I are gearing up for another road trip to spread the goodness that is Windows Azure! The Windows Azure DevCamp series launched recently with a two-day event in Silicon Valley, and we’re jumping on the bandwagon for the East Region.

309b14f7-2f41-49c0-9a50-2c979d9bc97a

We have five stops planned in December, and we’re doing things a bit differently this go-round. Most of the events will begin at 2 p.m. and end at 9 p.m. – with dinner in between of course. The first part will be a traditional presentation format and then we’re bringing back RockPaperAzure for some “hands-on” time during the second half of the event. We’re hoping you can join us the whole time, but if classes or your work schedule get in the way, definitely stop by for the evening hackathon (or vice versa). By the way it wouldn’t be RockPaperAzure without some loot to give away, so stay “Kinected” to our blogs for further details on what’s at stake!

Here’s the event schedule, be sure to register quickly as some venues are very constrained on space. You’ll want to have your very own account to participate, so no time like the present to sign up for the Trial Offer, which will give you plenty of FREE usage of Windows Azure services for the event as well as beyond.

 

Registration Link Date Time
NCSU, Raleigh NC Mon, Dec. 5th, 2011 2 – 9 p.m.
Microsoft, Farmington CT Wed., Dec. 7th, 2011 2 – 9 p.m.
Microsoft, New York City Thur., Dec. 8th, 2011 9 a.m. – 5 p.m.
Microsoft, Malvern PA Mon., Dec. 12th, 2011 2 – 9 p.m.
Microsoft, Chevy Chase MD Wed., Dec. 14th, 2011 2 – 9 p.m.

Tags: , , ,

Azure | USCloud | Technology | Development | Events

CodeMastery This Weekend in Atlanta

by Brian Hitney 5. October 2011 10:55

Chris Williams just let me know about an event happening in Atlanta this Saturday, Oct 8 … and it’s free!  Free is good.   Check it out here:

http://codemastery.eventbrite.com/

Sessions:

1. CSLA .NET intro - Rocky Lhotka

Topic will give attendees a high level overview of CSLA as an application framework. Key moving parts of CSLA will be covered, along with answering the most important question: Why use CSLA? Roles of business objects, data portal, rules, authentication and authorization will be covered in principal.

2. Business object design - Eric Blackwell

Session will concentrate of best practices for designing business objects. Single responsibility principal and maintainability will be covered in light of using CSLA. Key aspects of good CSLA business layer will be covered in detail, including properties, rules, data portal, data access, business method and validation. Particular attention will be paid to structuring classes and relationship between classes. Designing based on use cases will be an important aspect of the session.

3. Business, validation, and authorization rules - Tim Price-Williams

This session will be a deep dive into the world or rules. Topics such as validation rules, user authentication and authorization will be covered. Distinction between validation and business rules be drawn. Important key scenarios will be covered, such as synchronous and asynchronous rules, client / server rules, object creation and save scenario from rules perspective. Custom and built-in rules be covered in detail. A pattern for typical business rule/methods will be illuminated.

4. Data portal and n-tier architecture - Rocky Lhotka

This topic will cover in details all possibilities that CSLA provides when abstracting communication channels between client and server components. Difference between local and remote data portal will be discussed. Various configuration patterns will be highlighted along with usage scenarios for each one. Multi-tier deployment as it relates to data portals will be covered, as well as using external data sources instead of CSLA data portal in client only scenarios.

5. Data access - Travis Brown

This session is all about data access technologies and how they relate to CSLA data portal access. The topic will include patterns for abstracting data access for business objects to promote maintainability. Discussion of Microsoft technologies for data access will take place as well.

6. XAML and MVVM - Sergey Barskiy

This session will concentrate on using CSLA as business layer in XAML based user interfaces. Taking Silverlight as an example, session will highlight how CSLA base classes can be used to facilitate communication between UI and business objects. Adaptability of CSLA business layer to seamlessly alter user interface based on rules be will covered. Patterns for wiring business objects for Silverlight environment will be part of the discussion.

7. ASP.NET MVC - Mitch Gordon

This session will concentrate on using CSLA as business layer in ASP.NET MVC based user interfaces. The discussion will include CSLA provided base classes that will allow developers write less code. The session will illuminate patters for maintaining authentication and authorization rules between server calls. Patterns for adapting UI based on user rights will be discussed.

Tags: ,

Events | Development

Azure and Phone … Better Together

by Brian Hitney 21. September 2011 17:58

We had an excellent time presenting today’s Windows Phone Camp in Charlotte. Thank you to everyone who attended. Here are some resources and major points of today’s “To the cloud…” session.

First, here is the slide deck for the presentation. 

Next, download the Windows Azure Toolkit for Windows Phone. This contains both the sending notifications sample, and the Babelcam application. Note that there are quite a few setup steps – using the Web Platform Installer is a great way to make all of this easier.

The key takeaway that I really wanted to convey: while the cloud is most often demonstrating massive scale scenarios, it’s also incredibly efficient at micro scale. The first scenario we looked at was using Azure Blob Storage as a simple (yet robust) way to host assets. Think of Blob Storage as a scalable file system with optional built in CDN support. Regardless of where your applications of hosted (shared host, dedicated hosting, or your own datacenter), and regardless of the type of application (client, phone, web, etc.) the CDN offers a tremendously valuable way to distribute those resources.

For MSDN subscribers, you already have access so there’s no excuse to not use this benefit. But even if you had to go out of pocket, hosting assets in Azure is $0.15/GB per month, + $0.01/10,000 transactions, + $0.15/GB outbound bandwidth (inbound is free). For small applications, it’s almost free. Obviously you need to do the math for your app, but consider hosting 200MB in assets (images, JS files, XAPs, etc.), a million transactions a month with several GB of data transfers: it’s very economical at the cost of a few dollars / month.

In the second demo, we looked at using Azure Queues to enhance the push notification service on the phone. The idea being that we’ll queue failed notifications, and retry them for some specified period of time. For the demo, I only modified the raw notifications. In PushNotificationsController.cs (in toolkit demo above), I modified SendMicrosoftRaw slightly:

[HttpPost]
public ActionResult SendMicrosoftRaw(string userId, string message)
{
if (string.IsNullOrWhiteSpace(message))
{
return this.Json("The notification message cannot be null, empty nor white space.",
JsonRequestBehavior.AllowGet);
}

var resultList = new List<MessageSendResultLight>();
var uris = this.pushUserEndpointsRepository.GetPushUsersByName(userId).Select(u => u.ChannelUri);
var pushUserEndpoint = this.pushUserEndpointsRepository.GetPushUsersByName(userId).FirstOrDefault();

var raw = new RawPushNotificationMessage
{
SendPriority = MessageSendPriority.High,
RawData = Encoding.UTF8.GetBytes(message)
};

foreach (var uri in uris)
{
var messageResult = raw.SendAndHandleErrors(new Uri(uri));
resultList.Add(messageResult);

if (messageResult.Status.Equals(MessageSendResultLight.Error))
{
this.QueueError(pushUserEndpoint, message);
}
}

return this.Json(resultList, JsonRequestBehavior.AllowGet);
}

Really the only major change is that if the messageResult comes back with an error, we’ll log the error. QueueError looks like this:

private void QueueError(PushUserEndpoint pushUser, string message)
{
var queue = this.cloudQueueClient.GetQueueReference("notificationerror");

queue.CreateIfNotExist();
queue.AddMessage(new CloudQueueMessage(
string.Format("{0}|{1}", pushUser.ChannelUri.ToString(), message)
));
}

We’re simply placing the message on the queue with the data we want: you need to get used to string parsing with queues. In this case, we’ll delimit the data (which is the channel URI and the message of the notification) with a pipe character. While the channel URI is not likely to change, it’s a better approach to store the username and not the URI in the message, and instead do a lookup of the current URI before sending (much like the top of SendMicrosoftRaw does), but for the purposes of the demo is fine.

When we try sending a raw notification when the application isn’t running, we’ll get the following error:

image_thumb3

Typically, without a queue, you’re stuck. Using a tool like Cloud Storage Studio, we can see the notification is written to the failure queue, including the channel URI and the message:

image_thumb5

So, now we need a simple mechanism to poll for messages in the queue, and try to send them again. Because this is an Azure webrole, there’s a way to get a “free” thread to do some processing. I say free because it’s invoked by the Azure runtime automatically, so it’s a perfect place to do some background processing outside of the main site. In Webrole.cs, you’ll see there is no Run() method. The base WebRole Run() method does nothing (it does an indefinite sleep), but we can override that. The caveat is, we never want to exit this method. If an exception bubbles out of this method, or we forget to loop, the role will recycle when the method exits:

public override void Run()
{
this.cloudQueueClient = cloudQueueClient ??
GetStorageAccountFromConfigurationSetting().CreateCloudQueueClient();
var queue = this.cloudQueueClient.GetQueueReference("notificationerror");
queue.CreateIfNotExist();

while (true)
{
Thread.Sleep(200);

CloudQueueMessage message = queue.GetMessage(TimeSpan.FromSeconds(60));

if (message == null) continue;

if (message.DequeueCount > 60)
{
queue.DeleteMessage(message);
continue;
}

string[] messageParameters = message.AsString.Split('|');

var raw = new RawPushNotificationMessage
{
SendPriority = MessageSendPriority.High,
RawData = Encoding.UTF8.GetBytes(messageParameters[1])
};

var messageResult = raw.SendAndHandleErrors(new Uri(messageParameters[0]));

if (messageResult.Status.Equals(MessageSendResultLight.Success))
{
queue.DeleteMessage(message);
}
}
}

What this code is doing, every 200 milliseconds, is looking for a message on the failure queue. Messages are marked with a 60 second timeout – this will act as our “retry” window. Also, if we’ve tried to send the message more than 60 times, we’ll quit trying. Got to stop somewhere, right?
 
We’ll then grab the message from the queue, and parse it based on the pipe character we put in there. We’ll then send another raw notification to that channel URI. If the message was sent successfully, we’ll delete the message. Otherwise, do nothing and it will reappear in 60 seconds.
 
While this code is running in an Azure Web Role, it’s just as easy to run in a client app, service app, or anything else. Pretty straightforward, right? No database calls, stored procedures, locking or flags to update. Download the completed project (which is the base solution in the toolkit plus these changes) here (note: you’ll still need the toolkit): 

The final demo was putting it all together using the Babelcam demo – Azure queues, tables, notifications, and ACS.

Questions or comments? Let me know.

Tags: , , ,

Azure | Windows Phone 7 | USCloud | Events

Windows PhoneCamps

by Brian Hitney 1. September 2011 12:05

From MSDN events, to roadshows, to firestarters …

Now on to Camps … and just got word about the upcoming Windows Phone camps…

mango-iheart

What’s a Windows Phone Camp?

For those who went to our "Windows Phone Garage" series last year, its one of those. For those new to the scene, its a free, full day event chocked full of everything you need to know to develop a Windows Phone application. Whether you’re a seasoned veteran or just getting started with phone app development this full-day event is for you.

Interested in profit? We’ll also lead discussions on how to monetize your applications and generate profits with your apps.

Don’t miss the new Windows Phone 7.5 (codename "Mango") features as well - with detailed sessions in the afternoon around Fast Application Switching, Multitasking, Live Tiles, Push Notifications, and more.

The day will be capped with an open lab hands-on session and prizes for apps completed. This is the perfect opportunity to begin work on your dream application, or finish that app you’ve already started, with Windows Phone experts there to guide you every step of the way. Bring your own laptop to join in the fun and show off your killer app!

 

Agenda
9:00 AM Welcome Campers
9:15 AM How to make money with your Windows Phone App
10:00 AM Frameworks for fun and profit > Silverlight and XNA
noon-ish Canteen > Install Fest
1:00 PM Hands-on lab
3:00 PM Cool stuff your app can do
4:00 PM To the Cloud
4:45 PM Be What's Next > Peoples Choice Awards

Not only is the content great, but we've got a ton of locations coming up. Note that we are not only hitting the traditional Microsoft facilities, we are hitting a ton of campus locations as well. Students can attend Microsoft facilitiy events, and professionals / entrepreneurs are more than welcome to drop in on the on-campus locations as well. Mix, mingle, network.

Don't see your geography in the list? Located in the East Coast USA? Reach out to us and let's see if we can line up a Windows PhoneCamp "community edition".

 

Schedule
9/20/2011 Charlotte, NC Registration
9/22/2011 Atlanta GA Registration
9/27/2011 Malvern PA Registration
9/29/2011 Reston VA Registration
10/12/2011 Cambridge MA National Event - Two day - Registration URL pending
10/18/2011 Chevy Chase MD Registration
10/19/2011 New York City, NY Registration
10/25/2011 Tampa FL Registration
10/27/2011 Champlain College, Burlington VT Registration
11/2/2011 NCSU, Raleigh NC Registration
11/4/2011 Fort Lauderdale, FL Registration
11/8/2011 UCF, Orlando FL Registration
11/10/2011 Univ of Miami, Coral Gables FL Registration
11/10/2011 SUNY (New Paltz), New York Registration
11/15/2011 Virginia Tech Registration
11/17/2011 Howard University, Washington DC Registration
11/29/2011 Pittsburg, PA Registration
12/1/2011 Hofstra, Long Island NY Registration
11/29/2011 Georgia Tech, Atlanta GA Registration

Prerequisites:
Bring a notebook computer and identification. Also check out the APP HUB where you can get developer tools, learn about application features, understand common task for Apps and register and load your APP.

Notes:
This event is brought to you by Microsoft and is free of charge. However, you are responsible for booking and paying for your own travel and accommodations.

Tags: , ,

Events | Microsoft

Windows Phone Garage Events

by Brian Hitney 9. June 2011 15:03

By way of Glen Gordon:  Two great community guys – Chris Eargle and Chris Williams - are setting up community led Windows Phone Garage events next week in Columbia and Greenville.

Remember, at a Windows Phone Garage you get instruction on the basics of creating Windows Phone apps, but also you get a lot of time to build your app, with help from onsite experts.

In addition, one attendee who showcases his app (in development or complete) at the event will win a free Windows Phone device!

Register ASAP and make plans to attend this free event.

Columbia, SC – Thursday, June 16 at Midlands Tech

Greenville, SC – Friday, June 17 at Immedion

Unfortunately I won’t be there as we’ll be in Florida doing our Azure Tech Jam events, but the events are in great hands with Chris2.

Tags: , ,

Events | Development | Windows Phone 7

Azure Tech Jam

by Brian Hitney 18. May 2011 15:06

You’ve heard about cloud computing and already know it’s the greatest thing since sliced bread – and maybe you’ve already attended a Microsoft Azure Boot Camp or other event introducing you to the cloud and detailing the various parts of the Windows Azure platform.  Well we’ll do that too… in the first half hour!  The rest of the time we’ll have a bit of fun with Azure by taking a look at some cool demos and poking under the hood.  We’ll then take a look at some of the innovative uses of cloud computing that Windows Azure customers have already produced. 

After lunch, we’ll introduce the genesis and creation of the Rock Paper Azure Challenge… AND run our very own Challenge on-site, exclusive to attendees only, complete with prizes like an Xbox 360/Kinect bundle, a stand-alone Kinect, and a $50 gift certificate. This is an interactive way to learn about developing and deploying to the cloud, with a little friendly competition thrown in for fun.

So bring your laptop, Windows Azure account credentials and a sense of adventure and join us for this FREE, full-day event as Peter, Jim, and I take you “to the cloud!”

Prerequisites:

· Windows Azure Account – don’t have one? We’re offering a free Windows Azure 30-day pass for all attendees. Apply for yours now as it can take 3 days to receive. Use code AZEVENT

· Laptop with Azure Tooks and SDK installed

Want a leg up on the competition? Visit the Rock Paper Azure Challenge web site and begin coding your winning bot today.

Location

Date

Charlotte, NC

June 2

Malvern, PA

June 7

Pittsburgh, PA

June 9

Ft. Lauderdale, FL

June 14

Tampa, FL

June 16

Due to the hands-on nature of this event seating is limited. Reserve your spot by registering today!

Tags: , ,

Azure | Events | RPA | USCloud

Windows Phone 7 Garage Event Coming!

by Brian Hitney 29. April 2011 08:24

In a few weeks, my colleagues Glen and Joe will be in Charlotte (and a few other locations around that time) holding their successful Windows Phone garage events.  The latest event is coming to Charlotte on May 24th!  Here’s the breakdown:

9 – 10 am

Introduction to Windows Phone Development

No experience with Windows Phone 7 development? No problem. During this optional session at the start of the day we will cover the fundamentals of Windows Phone Silverlight and XNA Development. We'll explore the various core components and tools available, and leave you with some resources to take you to the next level.

10 – 10:30 am

What’s new for Windows Phone Developers

This session will highlight some of the new developer features coming for Windows Phone Developers. We’ll also take a look at AppMaker, a new dynamic new tool that enables you to generate a simple Windows Phone application from one or more online data feeds.

10:45 – 12:30 pm

Windows Phone Application Jumpstart

To give you a jumpstart on app development, we’ll walk through in detail building an app, styling it, and adding advanced capabilities. We’ll also cover submitting it to the marketplace and monetizing your app.

12:30 – 1:00 pm

Lunch

1:00 – 5:00 pm

Windows Phone Garage Open Lab

Bring your laptop fully loaded with Visual Studio 2010 and the latest version of the Windows Phone Tools. Get some help with an app you are working on, or use the information from the Jumpstart to build an app around your favorite data feed. No ideas? No worries – we’ll have a few starter templates that you can build on.

Other dates:

Tags: , ,

Microsoft | Events | Windows Phone 7

RPA Winners, Losers, and Eligibility

by Brian Hitney 14. April 2011 14:53

Over the past few weeks, we (the dev team of Rock, Paper, Azure) have gotten to be best friends with our internal legal department.  It’s been an educational experience, and this is where things stand with Rock, Paper, Azure.

When one player wins a round, he or she is ineligible to win a future round.  If you don’t win, you are eligible to keep playing in subsequent weeks to try to win.  We’ve received a number of very good questions and concerns, so, I’ll try to summarize them here.

1. What if I win second or third place, and I want to keep playing to try to in the first place prize?  Can I do that?

Players do have the option to refuse their prize.  If you come in second or third, you may reject it, forfeit your place, and continue playing.   Please note though that you assume the risk for doing this and the decision is final.  As weeks go by, I would expect the competition to get more difficult, so you may do worse and not win any prize at all, and also give up your place should there be a change in eligibility (see next paragraph).

In addition to a player purposefully choosing to remove him or herself from claiming the prize, a player may also be found ineligible.   In either case, the prize goes to the next person in line.  So, hypothetically speaking, if the first place player was found ineligible, the second/third/fourth players become first/second/third.  Had player 2 already decided to refuse his place … yep, that’s right – the top three are now third/fourth/fifth from the leaderboard.

It’s a bit confusing, but as you can imagine there are legalities involved here.

2. Why are previous winners still playing?  I thought they were ineligible!?

Past winners are ineligible to win a prize again.  We’ll remove ineligible players as we can – as you might imagine, there’s a little delay because we’re sorting out the winners from week 1.   But rest assured, before we run the final round on Fridays, we vet all players and then rerun the entire round.  Remember that during the week, the “continuous integration” of your bot is primarily for fun and strategy – it’s only the final round that counts!

3. So, who won week 1?

We had no idea it would be this volatile, but it turns out players 2 and 3 (Serplat and marsh) have been removed – one for his choice to keep playing, the other because of, unfortunately, eligibility.  (I wish that wasn’t the case, but laws are laws.) 

That means that players 4 and 5 slide up to 2 and 3 – s7orm and AttnSystem now become 2nd and 3rd place, unless they too decide to keep playing and give up their place. 

So just remember – you’re never out of it!

Tags: , ,

Azure | RPA | Events | USCloud

RockPaperAzure Coding Challenge

by Brian Hitney 30. March 2011 00:55

I’m pleased to announce that we’re finally launching our Rock, Paper, Azure Challenge!

header_image

For the past couple of months, I’ve been working with Jim O’Neil and Peter Laudati on a new Azure event/game called Rock, Paper, Azure.  The concept is this:  you (hopefully) code a “bot” that plays rock, paper, scissors against the other players in the game.  Simple, right?

Here’s where it gets interesting.  Rock, paper, scissors by itself isn’t all that interesting (after all, you can’t really beat random in a computer game – assuming you can figure out a good random generator!), so there are two additional moves in the game.  The first is dynamite, which beats rock, paper, and scissors.   Sounds very powerful – and it is – however, you only have a few per match so you need to decide when to use them.   The other move is a water balloon.  The water balloon beats dynamite, but it loses to everything else.   You have unlimited water balloons.

Now, with the additional rules, it becomes a challenge to craft an effective strategy.   We do what we call “continuous integration” on the leaderboard – as soon as your bot enters, it’s an all out slugfest and you see where you are in near real time.   In fact, just a few minutes ago, a few of us playing a test round were constantly tweaking our bots to defeat each other – it was a lot of fun trying to outthink each other.

Starting next week, we’ve got some great prizes on the line – including Xbox systems, Kinect, and gift cards – so be sure to check it out!   The project homepage is here:

http://www.rockpaperazure.com

See you in the game!

Tags: , , ,

Azure | Events | USCloud | RPA

your host...

Brian Hitney
Developer Evangelist
Microsoft Corp.

About Me

My Worldmap