Layouts O Rama–VS Extension

Wednesday, May 15 2013         No Comments

At work I’ve been trying out a standing desk set up.  The standing desk is made up a few items from IKEA and was very cheap to get started (the idea taken from a blog post a coworker passed on to me).

WP_20130409_001

As you can see I have one monitor currently for the stand up part and two monitors still lower.  At this point I’m still trying to get used to standing more and so I still use a chair most of the day.  Because I’m switching from two monitors to one from time to time the layout I use for Visual Studio also changes.  When I’m sitting VS tends to sprawl across both monitors with code windows on the left screen and supporting windows on the right.  When I’m standing everything is on a single monitor.  At first it took me a minute or two of moving the windows around where I wanted them as I switched positions, but then a quick search and I found the Layouts O Rama extension.

This handy extension allows you to save a windows layout and add a shortcut key for it.  I created a Standing layout and a Sitting layout and mapped them to hot keys.  Now it’s just stand up, push the chair away and hit the hot keys.  I was already using a wireless keyboard and mouse so it is easy to move from one position to another.  While the goal is to stand more and eventually I won’t need the utility as much, this is still very nice.

I’ve also had it come in handy when I’m in a conference room and remote into my machine to walk through some code.  I can quickly put the windows in a specific set up depending on the size of the screen I’m dealing with.

Recap: Node.js & Windows Azure Mobile Services Workshop and Hackathon

Thursday, March 28 2013         No Comments

CINNUG had an event this past weekend and from what I heard from feedback it was a resounding success.  Glenn Block, Senior Program Manager at Microsoft for the Windows Azure SDK and Command Line Tools, came all the way out from Washington to teach us the fundamentals of Node.js and Windows Azure Mobile Services.  I have to admit the topic of the event was somewhat selfish on my part.  I’ve been wanting to learn more about Node.js and how it can be used with Windows Azure, so why not invite one of the folks driving that to come teach me, err… I mean us?

Glenn teaching at Node EventI really liked the approach that Glenn took with the workshop.  I’ll definitely being stealing imitating the style with events in the future.  In the past at some of the “hands on” events we have done, as well as the Windows Azure Boot Camps I’ve given, the approach we have taken as been one of give a presentation, show a demo and then let people loose on a lab.  As the the presenter you’d walk around the room and help out where needed.  Glenn’s approach was all coding all the time (well, not quite that, but close enough!).  Glenn had set up some notes hosted at GitHub that everyone could use to follow along.  As we went through the fundamentals we used small snippets of code we pulled direct from the notes and pasted into our text editors to run.  As he talked through how the code worked, or pointed out finer points of what made it unique to Node.js the attendees were right there with him running the code.  From time to time he’d say, “take a few minutes and play with that code and try different things” which gave us a chance to understand the code by playing with it rather than just knowing what he had provided ran.

Glenn even had some challenges where we were asked to take 20-30 minutes and produce something with Node.js using what we had learned.  These were pretty straight forward in that all the code you needed was something we had worked on already, but you had to understand how you could put them together to get the result he was asking for.

A captivated audience

This approach was great because it kept the attendees really engaged in what was going on.  When we do eyes front stuff for 40-50 minutes, then break for labs you can lose people to email or Words with Friends, but if everyone is working along side each other I think you get a lot more out of the event.  Several attendees remarked that this was one of our best special events yet!

Glenn went through some of the fundamentals of Node.js, starting with getting it installed.  We moved on to creating a web server (like two lines of code) and continuing on to working with files, event emitters and more.  We learned about the basics of NPM and using Express.  All of these were meant to get us comfortable with playing with Node code and give us starting points to continue our knowledge gathering after the event.

Glenn then gave a demo of Windows Azure web sites and how you can use the Windows Azure Commandline tools to create and manage the websites, along with hooking up continuous integration and pushes to your Windows Azure Website by pushing to a Git repository.  At the end of the workshop Glenn gave a quick demo of Windows Azure Mobile Services and how it is using Node.js on the server to allow developers to create a quick backend to their client and mobile applications.

We ended the day with a hackathon.  A few teams stayed after the official end of the workshop to use what they had learned.  One team worked on incorporating Mobile Services into their existing application as a proof of concept and another team started a Node.js application that could track the winners of ping pong games.  A few other folks tried things like hooking up a stream for currency exchange information, adding a Mobile Services score history to their Android game and creating a tic tack toe game with Node.js.  All pretty cool stuff!

 

I’d like to thank the folks who helped with the event: Phil Japikse, Charlie Retzler, Ben Von Handorf, Michael Collier and Parag Joshi.  I’d also like to thank the annual sponsors of CINNUG who donate to us so that we can give these events: Telerik, Cardinal, Cohesion, and Centric Consulting.  This event GitHub sponsored an AR Parrott Drone for our raffle, which was awesome!  The images above were taking by Michael Levy.

I’d most like to thank Glenn for coming out.  I’d started talking to Glenn about a trip out to Cincinnati many years ago and it was great to get him here.  The attendees that I spoke to all loved the event, so, thanks Glenn!

CINNUG is always looking for other ideas for special events, so if you have an idea of a technology you’d like to learn more about, please contact the directors with your ideas.

My Article on “Planning for Failure”

Sunday, March 24 2013         No Comments

I wrote an article based on the half day workshop that Brent Stineman and I put together for CodeMash.  The article is entitled “Planning for Failure in Cloud Applications” and it’s posted over on the Cloud category for Simple Talk.

Brent and I collaborated on the content, and took a lot of it from our own experience as well as learning from others so it’s definitely more of a summary of prevalent practices.  One analogy I make in the article regarding the space shuttle and the number of computers on board actually came from one of the attendees of the workshop.  Every time I present or teach someone I also learn, which is why I love it.

Where Greatness Starts

Tuesday, March 05 2013         1 Comment

I remember in school learning about great people in history: Ben Franklin, Abraham Lincoln, Amelia Earhart and the list goes on.  One of the things that fascinated me for a while was just what was it about these individuals that really drove them to do the things they did.  What made them confident in their decisions, gave them the strength to make hard choices and see them through? 

Now that I’m older (I won’t say I’m necessarily more mature), I realize that most likely these great people dealt with the same doubt and concern about their actions as I do with mine.  They were people made great by their actions.  If I want to be more like these people, all I have to do is decide on my course of action the best I can, but most importantly, I have to take action.

In over 16 years of being in the programming industry it sometimes saddens me to see the number of folks that simply don’t care about what they are doing.  They just want to go, do some work, and go home.  While, yes, we all need to make a living and coding is certainly a good way to do that, I’ll risk sounding a little cliché in saying that life is certainly too short to do that.  You may not always be happy at your job as we all have bad days and projects, but you should at least enjoy it for the majority of the time. 

I don’t want to be one of the people who doesn’t care.  I want to do the best job I can at the career I enjoy being in.  This type of attitude can take a lot of effort to maintain, and that’s why events like the Kalamazoo X  conference are so important.  This is a conference where the goal is not to teach you what that next cool coding language is, or what platform you should be basing your next project on.  This event is focused on learning how to better communicate, give you ideas on how to improve you career and how to move forward in the technical job world.

The event is a single track with 30 minutes sessions.  Each time I’ve attended the event I’ve walked away energized.  If you enjoy watching TED talks then you’ll get a ton from this event. 

This year the event is held on Saturday, April 13th.  Registration is now open and the list of sessions have been posted.  You can even watch some videos of last years sessions.

Get registered because getting energized and learning from others is where greatness starts.

Using PowerShell to Remove Poisonous Messages

Thursday, February 28 2013         No Comments

 

At work we ran into an issue where a few messages that were being written from an app running our logging framework (which sits on top of Enterprise Library using MSMQ) was pointed at an incorrect queue.  When the process that reads off the queue and inserts into the database (the Logging Distributor) hit the first of these messages it failed attempting to case the log entry to the serialized object it was expecting, at which point it logged an error in the Event Log of the server and then shut down the service.  Messages that can’t be processed off a queue are referred to as Poisonous messages and we had a few of them in the queue.  It would have been nice if it had retried the operation once and then put it into a “dead letter” queue, but the service just isn’t written to do that (maybe I can find time to remedy that).

The only option we currently have to deal with these poisonous messages is either the purge the entire queue (and lose all the good messages as well), or identify and remove the poisonous messages.  Even though this happened in our development environment people are more likely looking in the logging database for these messages as they test and code their features, so just purging the queue could cause other developers to spend time trying to figure out where their logging messages went.  In production we most certainly would NOT want to just purge the queue.

To fix the issue we used a bit of PowerShell to run through the queue, identify the messages and then pull them off the queue.  Here is the code:

[Reflection.Assembly]::LoadWithPartialName("System.Messaging" ) 
$q = new-object -TypeName System.Messaging.MessageQueue -ArgumentList ".\sfglogging4.0" 
$q | ? { $_.Label -eq "Logging Unit Tests" } | % { $q.ReceiveById($_.Id) }


We ran this from the PowerShell prompt on the server hosting the queue.  In this case the label on the messages was “Logging Unit Tests”, which for the logging block from Enterprise Library translates to the Title of the app doing the logging.

If you are interested the code is doing the following:
1st Line: Loads the System.Messaging assembly into the PowerShell console so that it can be used.
2nd Line: Created a new MessageQueue object using the constructor parameter of the queue name.
3rd Line: This one is a little terse, but it is taking the queue ($q) and piping all of the messages on that queue through a filter (? translates to Where-Object) to get all of the messages that have a Label equal to what we are looking for, then finally it pipes the filtered messages to a for each (% translates to ForEach-Object) that calls ReceiveById off the queue using the ID of the message.  This effectively removes the message from the queue.

If we just wanted to remove the very first message in the queue (if we thought only it had an issue) you could replace line 3 above with:

$q.Receive()

That will pull the very first message.

This was pretty quick in that it went through 9,000 entries and removed the poison messages in just a few seconds.

Rainer on using Windows Azure Web Sites for Tenant Isolation

Wednesday, February 27 2013         No Comments

Last week at the MVP Summit Rainer Stropek gave a talk on using Windows Azure Web Sites as a way to create an isolation mechanism for running tenant specific code in your platform as a service (PaaS), multi-tenant solutions.  Allowing your customers to provide their own code to run in your hosted solution is always a challenge just due to security precautions, concern around processing performance and more.  This technique was very intriguing.

You can find Rainer’s slide deck and blog post on the subject at http://www.software-architects.com/devblog/2013/02/21/Using-WAWS-for-Tenant-Isolation.  Definitely worth a read.

Also, if you get a chance to listen to Rainer speak do so.  He’s an incredibly passionate and engaging speaker.

Two Updated Cloud Guidance References from P&P

Friday, December 07 2012         No Comments

The Patterns and Practices group at Microsoft have released some updates to their Cloud based guidance projects:

I was lucky enough to get some peaks at these as they were being developed.  If you are looking at migrating to Windows Azure these are well worth your time to look through.  They have been updated with some of the newer Windows Azure features and from feedback.

Game Night after Central Ohio Day of .NET!

Wednesday, December 05 2012         No Comments

CONOG (Central Ohio Night of Gaming)

After you fill your brain to capacity during Central Ohio Day of .NET come over to the Microsoft Office to unwind, get some snacks and play some games.  If you like board games, card games, dice games, or games played with small lettered tiles then this will be for you.  The event is family friendly, so you can bring your spouse and kids too. The event will be open from shortly after CODODN ends (say 30 minutes after, or as soon as organizers can reach the office) till about 10 PM.  There will be some amount of snackage provided; however, there are also a metric ton of restaurants nearby so you’ll have plenty to choose from. 

We will have a collection of games to choose from, but if you have games you enjoy playing, please bring them in to share.

Microsoft Office: 8800 Lyra Dr., Suite 400, Columbus, OH 43240

NOTE: This event is not sponsored or affiliated with the Central Oho Day of .NET in any way… well, we do know the people running that event, but you get the idea.

Dog Food Conference Success!

Thursday, November 08 2012         No Comments

The great folks that organize the Dog Food Conference in Columbus have done it again: they did a great job putting this year’s conference together.  There is still another day to the event, but alas, I’m leaving on vacation tomorrow and won’t be able to attend.

For those that came to my two talks today, or anyone interested, here are some links to my presentations:

Cloud: It’s More than Just Virtual Machines (SlideShare)

One of the aspects of Cloud Service providers to look at is the additional, value-add services that they provide beyond just virtual machines managed outside your data center. Windows Azure offers a cornucopia of options for services that can help you secure your applications, provide communication foundations and use in your solutions. The presentation will provide an overview of several of these options, including: Windows Azure Access Control Services (ACS), Service Bus Brokered Messaging, Service Bus Caching and Windows Azure Storage.

 

A Queue By Any Other Name Would Still Work The Same ... Or Would It? (SlideShare)

When Windows Azure was originally released a built in queuing feature was included. The Windows Azure Storage Queues were the suggested way for compute instances and applications to talk to each other. Flash forward to just a few months ago and another queue feature appears on the Windows Azure scene with Service Bus Queues and Topics. So, why are there two queue technologies? How do they differ? When should you choose one over the other? These are the questions we'll look to answer in this session.

 

More Resources:

Windows Azure Training Kit: http://bit.ly/waztrain

BUILD content on Windows Azure: http://bit.ly/wazbuild2012

CodeMash Precompiler on Azure Architecture

Saturday, October 20 2012         No Comments

If you aren’t familiar with the CodeMash conference, you should really check it out!  This is a conference not dedicated to one type of stack, but one that revels in mixing people from all stacks.  You’ll find some Ruby folks discussing patterns with .NET folks or PHP developers doing katas with Java developers.  The purpose of the conference is to share knowledge across stacks, but above all, be passionate and open-minded about our industry.

This year I’m honored to be selected to give a half day precompiler session (which is a fancy name for workshop at CodeMash) on architecture for Windows Azure solutions.  Brent Stineman (fellow Windows Azure MVP … well, not anymore since he now works for Microsoft) and I will be talking about things to think about when creating solid applications in the cloud.  The abstract s below.

We will give the workshop on both Tuesday and a repeat on Wednesday, so if you have an interest you’ll have two chances to catch it!

Cloud Architecture with Windows Azure

Felix Baumgartner jumped from over 128,000 feet to break a world record for sky diving.  An image was posted to a Facebook account after his landing and in 40 minutes it had logged over 216,000 likes, 10,000 comments, and 29,000 shares.
 
The Pottermore website, digital home to one of the world’s greatest known Wizards, saw a billion (with a “B”) page views just two weeks after it launched and was signing up new users at a rate of 25,000 per day.
 
Whether you need this level of instant scalability, or you are simply wanting to be ready for it when your own idea takes off the cloud allows you to create solutions that can scale easily and have high availability, however, these do not come automatically.  You need to know how best to leverage a cloud platform to achieve these capabilities successfully. This workshop focuses on architecture patterns by looking at how the Windows Azure platform and services actually work, then using that knowledge to design solid solutions.  We will start the workshop with an overview of many of the services and features of the Windows Azure Platform to understand what we have to work with, then we will touch on topics such as distributing your solution globally and handling failures (yes, they WILL happen).  Be ready to participate in groups to put your new knowledge to the test!