Posts

Showing posts with the label microsoft

OSS @Microsoft - Docs

Open source software (OSS) at Microsoft allows everyone to see, comment, and contribute to the products, services, documentation, sample code, and SDKs they use. I work at Microsoft and my opinions are my own. The Microsoft documentation set is not a single GitHub repository. It is many repositories, all with active writers, support engineers, and SLAs. When you see an issue in the docs or you think a concept or technique is unclear, GitHub repositories allow you to: Add an issue, via an Edit button , that is sent directly to the Product group or Content Developer.  Create a pull request (PR), that is sent directly to the Product group or Content Developer.  Is this open source though? Absolutely. You can immediately impact all users of the docs in a positive way. 2 things you can do when logging an issue against the docs: Be specific. Your comment is attached to the entire doc. Be specific where in the doc the issue is and what wording, image, or sample cod...

Paperspace.com for Windows 10 Desktops in the cloud

I recently needed a clean Windows 10 desktop for testing purposes. I couldn't use Docker, Vagrant, VirtualBox or any of the other local-to-my-computer VM solutions. I tried the Amazon Workspaces solution but it had the typical UX of 30 questions I don't know the answer to. I just wanted a desktop that could download from the Internet. Paperspace.com to the rescue! Within 5 minutes I had a Windows 10 desktop in a browser and the hardest questions where how much CPU and ram I wanted. The cost was incredibly inexpensive too. The test only took 10 minutes and I destroyed the cloud machine after that. This was the easiest, fastest, and cheapest solution to the problem.

Background tasks (continuous code) in the Cloud: Cloud Foundry beats AWS and Azure

Introduction I have a background task collection I need run, continuously, but with different timer intervals for each task. It is a critical part of my web services and provides the data gathering and transformations the make the web service valuable. How should I package the code and where should I deploy it? Only in the cloud.   As the cloud space is moving faster than I can write this, any of this could be outdated by the time you reader it. Consider Time, Money, and Ease of Deployment In struggling with where to deploy the code, I considered the cloud cost, the time to learn and build the solution as well as any cloud gothchas. I’m now on my sixth cloud provider trying to determine if they are the best at background tasks. Why? Because background tasks are where the heavy lifting happens. I want to spend my time getting that heavy lifting correct and not fighting with the cloud environment. Background Task Defined Just to be clear, I consider a background task an...

Post-Ruby High with BDD in .Net

I mentioned in my last post how much I enjoyed Ruby and wanted to continue to use it in my project. That is easier said than done.   In order to leverage all the great Ruby ( RoR ) tools and methodologies I learned, I’m attempting to find .Net equivalents. This started with finding a Behavior Driven Development ( BDD ) tool. There are several that come up but they are a hybrid to a BDD (I picked SpecFlow ) tool siting on top of a TDD tool ( NUnit or MSTest).  I also needed a web driver to make calls to a browser and verify results. I looked at WatiN but went with Selenium .   The next two tools I need to add are a mocking tool ( Moq ) and an injection tool (probably NInject ).   Since the class used GitHub and Heroku , I’ll also stick with that. My GitHub account is DFBerry .  All my example code is posted up their in public repositories.

Results of .Net Developer’s 5 weeks with Ruby (RoR) and SaaS

Introduction Several things happened in a short period of time to influence my decision to take a Ruby/SaaS class. I’m a lifer on .Net or more specifically Asp.Net and it’s precursor, Asp. First, the MVC .Net book I was reading at the time said programmers either use .Net or Ruby for MVC development but not both. Second, an online UC Berkeley class was free and gave me both a new language ( Ruby ) and backfilled any software-as-a-service (SaaS) holes in my knowledge. Third, the class used the Agile methodology which I had bits and pieces of. I wanted to see someone else’s interpretation put into practice.   Ruby on Rails (RoR)/MVC I knew MVC , web protocols, and web development so the learning curve was all Ruby. The class had a quick pace where I knew how to do it in .Net but not Ruby. Ruby, fortunately, is a very easy language to pick up. It feels very much like a script kiddie toy but  more powerful.   Interpreted versus Compiled Ruby is interpreted w...

Combining Multiple Azure Worker Roles into an Azure Web Role

Image
Introduction While working on apps.berryintl.com ’s web service, it appeared from the Windows Azure project templates that I might need several worker roles because they cycle at different times. One worker needed to cycle every day. The other needed to cycle every five minutes. Since the work and the cycle rate were very different, it felt “right” to isolate each role. In this post, I’ll show you how I combined multiple worker roles into a single, underutilized Azure web role thereby keeping the concept and design of worker roles while not having to pay extra for them. In order to verify the solution, the project uses Azure Diagnostics Trace statements. The solution file is available for download . Combining Multiple Azure Worker Roles into an Azure Web Role Currently, I use a small Azure instance and there isn’t enough traffic to justify a separate worker role. I implemented Wayne ’s process for combining one worker role with a web role a while back. Now I needed to add anot...

Unit Test Initialization and Cleanup for Windows Azure Storage Emulator

My unit tests add and delete entities from local Windows Azure dev storage,  at their most basic. If the Azure Storage emulator isn’t started, the tests don’t fail quickly – they just sit there acting like the test framework is hung. In order to ensure that the tests proceed, I needed to make sure the emulator was started before the tests ran.   I started with code found in this thread on StackOverflow . I needed to make sure the Storage Emulator is started before the test classes are called and that the emulator is shut down when the tests are done. I wrote this class and added it as a separate file to my test assembly.   More information about CSRun.exe and the Process class are available in MSDN .   // ----------------------------------------------------------------------- // <copyright file="AssemblySpecific.cs" company="BerryIntl"> // Berry International 2011 // </copyright> // ----------------------------------...

Simple Azure Web and Worker Roles–Running the code

Image
This is a continuation of the simple series. Links for other posts in the series are at the bottom of this post. Download Visual Studio Solution here .   This series explains the Windows Phone 7 requesting data from a Windows Azure web service. The phone tile and toast are supported by a background agent on the phone while the web service is supported by a continuous worker role on Windows Azure. The phone calls the WebRole REST API from both the phone app and the phone app’s background agent. Each request is different though. The App’s request is fetching a list of items to show in the app while the background agent is fetching the count of items since the last fetch and the very last item. This information will be displayed in the popup toast and the app’s start screen pinned tile.   Azure Only This post will cover the Azure web  and worker roles only. The Windows Phone 7 app-to-Azure communication will be covered in a separate post. Grab the Visual Studi...

Simple WP7 Mango App for Background Tasks, Toast, and Tiles: Code Explanation

Image
This is a continuation of this post , explaining how the sample app works. Caution : This sample isn’t meant as an example of best patterns and practices. If you see something in the code you would never do, then don’t. Solution File Organization The app has three Visual Studio Projects: the app, the agent, and the shared code library between them. One of the great things about Mango is that now the built-in Visual Studio Unit test functionality is available. By separating out the meat of the work into the SampleShared project, I can also focus my unit testing there. SampleApp1 The app has a MainPage, a ViewModel, and the WMAppManifest.xml file modified to note my ExtendedTask of BackgroundServiceAgent. The Agent is extremely simple with a call to the shared library, an update to the Tile, and a call to pop up Toast. The meat of the work is in the SampleShared library. The AgentMgr manages the background agent : add, remove, find, run now. It is only called f...

Windows Phone 7 and Windows Azure

Introduction This post will explain how Windows Phone 7 and Windows Azure relate to each other. This is in response to an email question I received over on my apps site. The person, apparently, had been assigned the task of “putting his rewards app on Azure.”   This post is a 100 level (introductory) explanation.   Client/Server Twenty years ago the client/server conversation was obvious with a physical client machine (perhaps a Windows version) connecting through a wire to a physical server. Usually these were in the same location or in some sort of private wide area network.  But they were just a client and a server.   Ten years ago the client/server conversation was a physical client machine connecting through a wire to a physical server that was not in the same building, probably not in the same state or country. But they were just a client and a server.   Since then, until Windows Phone and Azure, nothing really changed except the conne...

Using Elmah with Azure Table Storage

Image
Article Summary This article will explain how to extend Elmah to log to and view errors from Windows Azure Table Storage.  Introduction Elmah is an exception handling and logging tool that plugs into ASP.NET and ASP.NET MVC applications. When an error is thrown, Elmah grabs all the information including the stack trace, server variables, and query string. Then this information is entered into the data container of your choice. When you want to review these exceptions, the tool provides a web interface to display the errors. Your Windows Azure Usage This article assumes you already have a Windows Azure account and know how to manage data in Azure Table Storage. I use either the Visual Studio Server Explorer or the Azure Storage Explorer ( codeplex ) to look at the tables. A longer list of Storage Viewer applications is referenced at the bottom of this article. Visual Studio Server Explorer Azure Storage Explorer Steps to Connect Elmah to Windows Azure Table Storag...