Why Healthcare Companies Should Consider the Cloud

I recently wrote a post for my company’s blog about why healthcare facilities like Ambulatory Surgical Centers should consider cloud based solutions.

http://blog.sourcemed.net/virtual-and-vital-why-ascs-should-move-to-the-cloud

 

Advertisements

How to receive events from an Microsoft Azure Event Hub on a Raspberry Pi

I received a question on my “How to send events from a Raspberry Pi to Microsoft Azure Event Hub” post:

“I want to ask about do you know “how to receive events from azure event hub to raspberry pi””

After a little research I found an article outlining how to do so , via the AMQP protocol using Proton C.  However, I found myself wondering about the use case.

Typically, we are sending events from our IoT devices to some cloud application for analytics, machine learning, or the like.  Event Hubs are great for those high volume cases.

However, if you need it for a messaging scenario, queues or topics might be more appropriate, and they are directly supported by the Azure Python SDK.  In my own case, I elected to use a simple long-polling strategy to have my raspberry pi listen to my cloud app for instructions.

So, can it be done?  Yes, here’s how.  But it may not be the right tool.

How to change the name of an Azure Subscription

A colleague and I both have Visual Studio Ultimate MSDN subscriptions, with corresponding Azure subscriptions, and have given one another access for various little things as we’ve explored Azure.

Unfortunately, this got confusing with our subscriptions having the same name, and has occasionally resulted in us creating things under the wrong subscriptions.  In the Azure portal it’s not too bad because you are also filtered by directory, but in Visual Studio and other places it can be tough to figure out.

For example, Get-AzureSubscription returns two subscriptions with the same name!  Which one is mine, and which one is Jack’s?

subscriptions

Thankfully, you can change the name of a subscription:

  1. Login to https://account.windowsazure.com/Subscriptions
  2. Click on the Subscription you’d like to renameportal-before
  3. On the right side of the page, click “Edit subscription details”edit
  4. Choose your new name & savemakeityours

Voila!  Subscription names are now much more clear:

Subscriptions

Getting Robogaia Raspberry Pi Temperature Controller to work

I recently got a Robogaia Raspberry Pi Temperature Controller and tried to fire it up.  Their website has the configuration steps as well as sample code.

However, after running through the install steps and attempting to run the samples, I received the following error:

Traceback (most recent call last):
File "test.py", line 9, in
bus = smbus.SMBus(0)
IOError: [Errno 2] No such file or directory

Thankfully, the answer was found on the raspberry pi forums, though about a different device. you simply need to enable i2c via raspi-config -> Advanced

After a reboot, it works great!

Thanks to the Robogaia guys for saving me some work with their handy plate!

Using Amazon Echo to add stuff to Trello

At my wife’s request I have integrated my Amazon Echo with Trello.  We have a shared “Home” board in Trello that we use for grocery lists, things we need to get done, etc.  Now, she can say “Alexa, we need to buy milk” and voila, a new card with “Milk” appears on our “Things to buy” Trello list!

The source code is in github: https://github.com/brentonc/echo2trello

Thanks to greencoder for his project at https://github.com/greencoder/amazon-echo-cheddar which gave me a start on the Amazon side of things!

Resharper ‘test’ Template

When writing automated tests I get tired of typing this over and over again:

[Test]
public void when_foo_happens_then_bar() {
      //Arrange

      //Act

      //Assert
}

So I made a ReSharper Live Template:

	[Test]
	public void $NAME$() {
		//Arrange

		//Act

		//Assert
		Assert.Fail();
	}

Now getting test definitions into the test class goes more like this:

“hmm, what should I test?  How about,

testwhen_x_then_y
testwhen_i_then_j …”

With this template I found that not only do I saving typing time, but its also helped me brainstorm a bunch of tests quickly without distracting myself with the format.

You can type it yourself, or download it from github and import.

To Import:  Resharper -> Tools -> Template Explorer -> Live Templates Tab -> Import button

UPDATE 6/6/2015:  I have updated the template so that there is one for NUnit and another for the .NET Test Framework.  Get the import file here: https://github.com/brentonc/bcutils/tree/master/ReSharper

Updating from TFS 2012 Update 1 to TFS 2012 Update 4 – Problem with Upgrade Warehouse

My team recently needed to update from TFS 2012 Update 1 to TFS 2012 Update 4, but ran into a problem during the upgrade:

Upgrade Error

Looking closer at the log file, it had this information:

XML parsing failed at line 1, column 0: A document must contain exactly one root element.
.
Errors in the metadata manager. An error occurred when instantiating a metadata object from the file, ‘\\?\d:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Data\Tfs_Analysis.0.db\Team System.8676.cub.xml’.

[Info @22:20:14.393] Microsoft.AnalysisServices.OperationException: XML parsing failed at line 1, column 0: A document must contain exactly one root element.
.
Errors in the metadata manager. An error occurred when instantiating a metadata object from the file, ‘\\?\d:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Data\Tfs_Analysis.0.db\Team System.8676.cub.xml’.

To get around this we:

  1. Restored the TFS_Configuration and TFS_[Collections] databases to their pre-upgrade state
  2. Re-ran the upgrade wizard, but this time unchecked the Reporting portion of the upgrade. This causes the installer to ignore the warehouse and analysis services part of the install
  3. After the install completed, we deleted the tfs_warehouse and tfs_analysis databases
  4. Following instructions from this TFS Setup Support blog post, rebuilt the warehouse and analysis databases

Upgrade complete!