Showing posts with label Microsoft. Show all posts
Showing posts with label Microsoft. Show all posts

Test Availability and Inspect Web Pages using Powershell


Have you ever wanted to test the availability of a URL or web page?  or check for the presence of content or links on a page?  even clicking through a flow of web pages automatically?

Well, these things are not necessarily new concepts or challenges.  In fact, in the Application Testing space this is the type of thing we do day in and out.

I have recently been messing around with Selenium and Python web test scripts, and just for kicks wondered if similar things could be achieved using Powershell.  Funnily enough, the answer is yes, and quite easily too for anyone familiar with Powershell scripting.

So here are some basics just for fun, to get things going...   the magic sauce is in the Invoke-WebRequest cmdlet.  Let's check up on this blog's main page as follows by feeding the URL we want to check to the Invoke-WebRequest cmdlet, and assigning the resulting object to a variable called $webpage:

$webpage = Invoke-WebRequest https://blazingtm.com

Nice.  Exciting. Maybe not 😃

What can we do with this thing called $webpage you might ask.  Well, first let's see what type this object actually is.  You can do this calling

$webpage.GetType()

It's a thing called HtmlWebResponseObject.  Ok, so not just a simple "webpage", but an object.  Well, so it may have associated member properties we can inspect, maybe that could be interesting.  We can do this using the following cmdlet

$webpageGet-Member

The result should look something like follows, listing all member properties and methods for the webpage:

Name MemberType Definition
---- ---------- ----------
Dispose Method void Dispose(), void IDisposable.Dispose()
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
ToString Method string ToString()
AllElements Property Microsoft.PowerShell.Commands.WebCmdletElementCollection
BaseResponse Property System.Net.WebResponse BaseResponse {get;set;}
Content Property string Content {get;}
Forms Property Microsoft.PowerShell.Commands.FormObjectCollection Forms
Headers Property System.Collections.Generic.Dictionary[string,string] Hea
Images Property Microsoft.PowerShell.Commands.WebCmdletElementCollection
InputFields Property Microsoft.PowerShell.Commands.WebCmdletElementCollection
Links Property Microsoft.PowerShell.Commands.WebCmdletElementCollection
ParsedHtml Property mshtml.IHTMLDocument2 ParsedHtml {get;}
RawContent Property string RawContent {get;set;}
RawContentLength Property long RawContentLength {get;}
RawContentStream Property System.IO.MemoryStream RawContentStream {get;}
Scripts Property Microsoft.PowerShell.Commands.WebCmdletElementCollection
StatusCode Property int StatusCode {get;}
StatusDescription Property string StatusDescription {get;}

Let's have a little look at that StatusCode property.  To see what it is, use

$statuscode = $webpage.StatusCode

You would have guessed, if we look at the value of $statuscode we will see it's 200.  Provided the webpage was available earlier of course. 200 is good when it comes to web page availability.

We can test for this using something along the lines of

if ($statuscode -eq 200) {Write-Output("Brilliant, this page is available :)")}
else {Write-Output("Well, that did not work :(")}

Equally, we might want to make sure the page is not only available (ie a Status Code 200), but that it has a certain content on the page.  That is often useful to know to ensure a page has rendered the right results.

This is where the Content property comes in handy.  Let's say we wanted to check that the page contains the phrase "Late night musings".  Too easy, do this

$webpage.Content.Contains("Late night musings")

Now this will simply return True, or False, depending on whether the phrase is found.  Of course you can have further logic on the back of this, but you can see the basics of some interesting web tests evolving here.

That's all for tonight, but following on from this wouldn't it be great if we could script up a whole user flow navigating web pages to test availability of a web site, not just a page.  That's however a topic for another time.

Enjoy.

MB


AdSenseAccountStats App Reborn As AdsAccountStats - Finally

Is there a Windows app that can quickly show you the key metrics for your Google AdSense account?



Ah yes, wait a minute, there was this app called AdSenseAccountStats...  what happened to it again?Just kidding, check this post from a while back for an explanation why I had to pull it from the Microsoft Store.

AdSenseAccountStats Is Back - With A New Name


As mentioned in the previous post, I ended up simply renaming the app.  There is a bit of a process to step through, but luckily one can always find decent Microsoft knowledge articles on the interweb. If you are interested, check this blog post from the Windows App Consult Team.

In simple terms, follow these high level steps:

  1. Reserve new app name in the developer dashboard
  2. Update your manifest and app package, logos etc
  3. Create new store packages
  4. Create new submission and upload new packages
  5. Update your store listing details in the new submission
  6. Submit to store
  7. When approved and published, delete old app name
Refer to the above mentioned blog post for exact steps.  They all worked as described, although the 3rd step - creating new store packages - gave me some grief.   I experienced errors when building the release packages, complaining about the Display Name in the appxmanifest file.

The solution in the end was to re-create the package.xml file and re-associate the app with the Store, picking the new name (it eventually was visible and selectable in Visual Studio).  It did take a few attempts to get this right, but eventually came good.

Goodbye AdSenseAccountStats - Hello AdsAccountStats


Following this process should ensure that you don't lose the linkage of your app/packages and your app install base.  It is important to increment your version so that older packages will be deleted and apps updated to reflect the name name.

What next?  Go and get the app from the Microsoft Store of course 😀 if you don't have it already.  For now, there is no new or additional functionality, but when time permits there are a couple of improvements I would like to make and features to add.

Until then, enjoy the app once again as it stands.

MB.

Instagram Microphone Access Fix For Windows Phone Lumia 950


Hey fellow die-hard Windows Phone aficionados... If you are reading this you are most likely still using a Microsoft Windows Phone, such as the Lumia 950 or similar running Windows 10 and the Instagram app, correct? Me too 😁

Now, I thought I'd share the solution to a small but annoying issue with the latest version of the Instagram app on Windows 10 mobile. Whenever you start the app, Instagram asks for access to the camera and microphone of your phone. Sure, hey to get the most out of Insta these things are required so why not.

The Issue - Prompt for Microphone Access


The problem is that the screen pops with a couple of text links, which when tapped should change the relevant settings for camera and microphone access permissions. While the camera one works fine, the one for the microphone does not. Calamity. And here is the annoying part, the screen pops every time on start up, driving you crazy just a little bit...


The Solution - Grant Permissions Manually


Do not despair, the solution is very simple.  You can just add the required app permissions manually the old fashioned way.  Go into Settings - tap Microphone - find Instagram and flick the toggle switch to On



Voila.  Try and start the Instagram app and you will no longer see the annoying screen above prompting you for Microphone access.  Enjoy, and feel free to comment if this little gem has helped you.

#SaveWindowsPhone #Microsoft 😜

AdSense Account Stats App Temporarily Unavailable in Microsoft Store


What happened to the AdSense Account Stats App in the Microsoft Store?


A couple of weeks ago I was notified by Microsoft that a third party agent working on behalf of Google has lodged a claim that the title of my AdSense Account Stats App in the Microsoft Store is infringing on a Google owned trademark.

The actual app title is AdSenseAccountStats, and I guess that has the word AdSense in it.  AdSense of course is indeed a Google owned trademark registered in the US, and quite possibly in many other countries.  Doing the right thing, I immediately removed the app from the store listing and download.

Now, I am neither a lawyer nor an expert with regard to trademarks, but one of the main aspects when it comes to trademark infringements is about potential consumer confusion.  Meaning that consumers might reasonably but incorrectly assume that a product or service is provided by the trademark owner when in reality that is not the case. Another aspect is about commerciality of the product or services infringing on a trademark.

You be the judge - is AdSenseAccountStats confusing?


Certainly a very interesting situation.  My app is of course available for free so there is no commercial benefit.  Additionally, Google do not have their own app in the Microsoft Store that one could use to access one's AdSense account.  On Android and Apple iOS such an official Google AdSense app exists, but not for Windows mobiles. Which incidentally was the key reason I put together the app in the first place.  I wanted an easy way to access my AdSense account from my Windows mobile.

As far as trademark infringement defenses go, there may be three interesting aspects here:
  • No real confusion of customers - title is simply describing what the app's purpose is
  • No commercial gain - the app is available free of charge and currently not ad supported
  • Abandonment of the Windows mobile platform - Google not providing its own app

Either way - Stand by for re-launch


Never mind, I have neither the time nor inclination to have an argument with the third party agent, so I guess I'll just rename the app and re-publish it with a more generic name.  In some ways, it is almost flattering that there is this much interest in an app I created.  It makes for a good story at the pub 😀

It is going to take a little while to relaunch the app however, so don't hold your breath.  There is a specific process to step through before the app can be re-enabled in the store.  Legal forms to submit, authorisation to be obtained, repackaging of the app with a new title (how does AdsAccountStats sound - generic enough?), submission update to the store and ultimately making the app available for download again.

Now if only I had a little spare time to do all the above...   I'll post again once the app is back and available.

'til then, have a great day.

MB

Heads Or Tails UWP App Update 1.2.2 Released



Just a quick post tonight to spruik 😀 the latest release of this handy little app.  In this release I have added a feature to track lifetime stats for heads and tails, as well as the longest streaks for both options.

As silly as it sounds, it is actually quite intriguing to keep tossing that virtual coin and see how over time the numbers for heads and tails even out as they should.  While at other times you can get really long streaks of just heads or just tails, skewing the total number one way or the other.

I can't post with just useless information though, so I will share one tidbit I recently observed that may be of interest to anyone looking to monetize their apps using the Microsoft Advertising Framework.

Low ad fill rates?  There may be a reason...

When I created the new Lifetime Stats page in the app and added a new ad unit, I accidentally selected a COPPA (Children's Online Privacy Protection Act) compliance rating that indicated the app was directed at children under 13 years of age.  This of course is not the case - it is for general consumption for young and old.

However, the learning is that the COPPA compliance rating for the one ad actually applies to all ads for the one app.  This then changes the ad serving algorithms that Microsoft applies for the app and all its ad units. In return, my ad fill rate went south...

By way of explanation Microsoft will only serve non-targeted ads to apps that are directed at Children under 13 years of age.

At this point I need to stress that you absolutely must select the appropriate COPPA compliance setting for your app.  At no point should ad fill rate considerations influence your declaration.  Just do the right thing, okay?

What's next for this app?

It was initially just a learning piece for myself as to how the Microsoft Advertising Framework actually works.  See this recent post if you want to read about it a bit more.

But now I'm actually thinking of putting in a feature that will aggregate data from all users across the world, by country, and then display it back in the app as a sort of "World Cup of Coin Toss" ladder.  Why, you ask?  Just for fun really.  And it could be an interesting learning on how to create the web APIs and database backend required for such a feature.

Anyway, feel free to comment if you like the idea.  Not much spare time at the moment but with enough encouragement it might just happen one day 😀

Get it from Microsoft

Hope you enjoyed the post

MB



Heads Or Tails UWP App - Sample For Using Microsoft Advertising AdUnits To Monetize Your Apps

A Quick Sample App For Monetizing Apps With Microsoft Advertising AdUnits


Just a quick post in case anyone is wondering how to monetize their UWP apps using Microsoft's Advertising framework.

The good news? I found it to be very simple and straight forward, although there are a couple of caveats to be aware of.

It's Easy - Let's get started


First, log into your Windows Dev Center account. On the left hand navigation bar click on Monetize - In-app ads.  Then click on the Create ad unit button.  Fill in a handful of self explanatory parameters for your new ad unit, and click the Create ad unit button to save.  Congratulation, you have just created your first live AdUnit.



Download and install the Microsoft Advertising SDK for XAML


Grab the SDK from the Microsoft web site, and run the installer.  Once done, open up your app's project in Visual Studio and add a Reference to the Microsoft Advertising SDK for XAML. To do this right click References - Add Reference - Universal Windows - Extensions.  Tick the box for the SDK and click OK.

Bake your shiny new ad unit into your UWP XAML App


This step is easy.  But don't be tempted to embed your live ad unit while still developing/debugging your app.  It is against Microsoft policy to run live ad units in the debugger and I am pretty sure they would not be pleased - so just don't do it.

Instead, use a test ad unit. Microsoft thankfully provide such a test ad unit with generic IDs.  So the XAML will look something like this:

  xmlns:UI="using:Microsoft.Advertising.WinRT.UI"

  <!-- Test AdControl -->
  <UI:AdControl
      ApplicationId="3f83fe91-d6be-434d-a0ae-7351c5a997f1"
      AdUnitId="test"
      Height="50"
      Width="320"
      Margin="0,20,0,20"/>

The key pieces here are the using: statement referencing Microsoft.Advertising.WinRT.UI, and the ApplicationId and AdUnitId tags. The values here are the generic test ones which you can use exactly as they are. These will tell the Microsoft Advertising framework to serve up test ads so you can ensure it all works.

For mobile apps, there are a couple of banner sizes that are recommended specifically, as they work best.  I am relatively sure you can use any of the approved sizes, but maybe best stick to the recommended ones for Windows Phone apps.

Voila, you are ready to earn money with your App - Almost, anyway


Pretty close...   A couple of extra steps are required first. Once you are happy with your app and you are ready to submit it to the Microsoft Store, change the XAML for your AdControl to use live ApplicationID and AdUnitId tags.  Where do you get these from you might ask?  Aha, since you paid attention to this post, you know that you can get the live Id tags from your Windows Dev Center, right?

Put the live Id tags into your app, and then follow the standard processes to package and submit the app to the Microsoft Store.  Visual Studio makes this very easy, and there is excellent documentation available from Microsoft on the whole end to end process.

Once your submission is fully approved, your app will be available to customers for download, ready for you to start making money.

Wrapping Up - Grab Heads-Or-Tails app from the Microsoft Store


Hope you enjoyed this post.  Any questions just leave a comment or send me an email.

Oh, and if you feel like it, go grab the app from the Store and use it to help you make those tricky decisions in life - after all, it's a tricky, age old question:   Heads Or Tails?

Cheers

MB


Further Information


Monetize your App with Ads - Windows Developer Documentation




To Splunk or not to Splunk - Either Way Listen to Your Machine Data


Listen to your Machine Data. Yes, Do.

Machine data and log analytics is all the rage these days, but should it be, and why should you invest to gather, centralise and analyse something as boring and mundane as machine data and logs?

Structured, Semi-Structured and Unstructured

We are used to structured data, and storing such in relational databases and more recently in file and blob based data stores. This kind of data has always been interesting, and used in a business and application context. However, today we are starting to latch on to the power inherent in semi-structured and unstructured data. There are a number of innovative things we can do if we index, store, correlate and analyse all kinds of machine generated data. This will only get more interesting with the proliferation of IoT devices gathering telemetry data.

So what can you do with Machine Data and Logs?

Well, there is no definitive list, and really it's quite open to imagination. Data rules the world. Data driven businesses with new business models are popping up everywhere. In short, data has currency.

For the purpose of this post, let's focus on a common and popular use case in Digital/IT making use of machine and log data in an IT Operations context. Leveraging and mining data to improve IT service delivery, availability and performance makes sense, and adds to an IT department's capability and service offering.

Drivers for IT Ops Analytics

Through correlation and analysis of all our machine data we may be able to
  • proactively identify issues
  • predict time and point of potential future failures
  • pinpoint root cause and reduce mean time to restore
  • reduce cost through smarter delivery of services
  • gain insights into environments in new ways to drive digital innovation
to name just a few key points.

So this sounds good, right? We want a piece of that for sure. But how do we go about it, and what kind of tools would we need to deliver such new capabilities for IT Operations Management?

Tools that can help us meet the IT Operations Analytics challenge

The good news is that there are a number of mature products and solutions out there. There are both commercial and open source options readily available. The following table lists a few popular options that are worth looking into in my opinion. It is in no particular order nor an exhaustive list.


Products
Commercial / Open Source
On Premise / Cloud
Commercial
Both
Commercial
Cloud
Commercial
Cloud
Open Source
On Premise
Commercial
Both
Commercial
On Premise


On Premise vs Cloud

Depending on what is important to you and/or your organisation, there is no definite answer on what is the best delivery model for a log analytics solution - on premise or cloud.

Some of the reasons as to why you would go on premise are:
  • Retain full control of your data
  • Flexibility of customisation
  • Data sovereignty, data security and backup concerns
  • Unreliable or low bandwidth links to cloud providers
  • Frequent need to bring back data on premise, egress costs
On the other hand, most of the above cloud log analytics providers are pretty mature, highly available and secure by design these days. In other words, they are Enterprise ready. And of course there is the promise of infinite capacity, so you can ingest data to your heart's content and not have to worry about investing into costly, capital intensive on premise infrastructure.

So unless you are facing major regulatory or compliance hurdles, I'd suggest to give the cloud a go. But do your homework on your projected data volumes and associated costs to avoid bill shock and make sure going into the cloud is indeed the most cost effective path for your business. Major organisations may be able to build their own infrastructure and run at lesser cost than cloud providers.

The Wrap

Hopefully the above thoughts have provided some hints and pointers to get you started on your log analytics journey. Personally, I think the potential is significant, and investing in this space is the right thing to do.

Make sure you have people who are interested in using the technology creatively. Define your use cases, then actively get answers to your burning questions by driving value through analysis and visualisation of your existing log and machine data.

Ah yes, to Splunk or not to Splunk…


Cheers

MB

AdSense Account Stats UWP App Released

Introducing AdSenseAccountStats App

For all those AdSense account owners with Windows mobiles or tablets out there, I recently released a new UWP app that may come in handy. This simple app will allow you to quickly and easily check up on your AdSense performance.

Watch your monetization efforts pay off and your earnings grow

After logging in with your AdSense account and authorising the app for read-only access, you can easily see metrics such as:
  • Earnings Clicks, Cost Per Click
  • Page Views, Click Through Rate and RPM
  • Coverage

Code components that make it work

The app simply leverages Google APIs, specifically the AdSense Management API v1.4, and Google OAuth v2 for authentication of the user.  Basically, all calls to the AdSense APIs have to be authenticated or else they won't work.

So the first problem was to tackle Google OAuth v2 for a UWP app.  There are complexities around the Google provided libraries and support for UWP, and I have touched on these in another blog post.

OAuth v2 Authentication

The following code snippet deals with authentication successfully:

            UserCredential credential;
            try
            {
                using (var stream = new FileStream("client_secret.json", FileMode.Open, FileAccess.Read))
                {
                    credential = await GoogleWebAuthorizationBroker.AuthorizeAsync(
                        GoogleClientSecrets.Load(stream).Secrets,
                        new[] { AdSenseService.Scope.AdsenseReadonly },
                        "user",
                        CancellationToken.None,
                        new PasswordVaultDataStore()
                        );
                }
            }
            catch (UwpCodeReceiver.AuthenticateException ex)
            {
                // Login failed or authorisation not granted
                credential = null;
                await LoginFailed(ex);
            }
            catch (Exception ex)
            {
                credential = null;
                await SomethingWrong(ex);
            }

Creating a client service for your API calls

Once the user has logged on and authenticated their AdSense account, and granted permissions to the app so it can access the user's AdSense details, you then create a client service to use for your API calls.  Pass the credential object created by the code above to the http initializer.

            var adSenseService = new AdSenseService(new BaseClientService.Initializer()
            {
                HttpClientInitializer = credential,
                ApplicationName = "AdSense Accounts Stats",
            });

Setting up and executing an API request

After the user has logged on and allowed access for the app, the next piece is to construct a valid API request, execute it and handle the response in a meaningful way.  This can be achieved along the following lines:

            var earningsRequest = adSenseService.Reports.Generate(startString, endString);
            earningsRequest.Dimension = dimensionString;
            earningsRequest.UseTimezoneReporting = true;
            earningsRequest.Metric = new List<string>{ "earnings","page_views","individual_ad_impressions","clicks",
                                                "page_views_ctr","individual_ad_impressions_ctr",
                                                "page_views_rpm","individual_ad_impressions_rpm","cost_per_click",
                                                "ad_requests_coverage" };

            var earningsResponse = await earningsRequest.ExecuteAsync();

Once you have that response object, you can use it in any way you see fit, for example use its member items as a list source etc.

Hope you enjoyed this post and if you like go grab the app from the Microsoft Store.

Cheers

MB



Google OAuth2 for UWP C# XAML Apps Example

I have previously posted on consuming Google YouTube APIs in UWP C# XAML apps, showing how to consume Google APIs using the API key technique for authentication.

That technique works well, but has its drawbacks.  Mainly, you can't access any of the non-public user specific information that the APIs expose.  In other words, to get to the juicy bits you need to make authenticated Google API calls.  To do that, you need to work out Google OAuth2 authorisation flows.

Now, that's easier said than done if you are a part time hack like myself, and not a serious developer.  Through lack of skill I need to rely on the dotnet API libraries that Google kindly provides.  There are a good number of blog posts out there that detail the API key method, but not many that have a working example for using Google OAuth2 as per Google's developers API reference samples..

This is where this post kicks in.  But it also comes with a disclaimer (see below).  The following code snippet is an actual working example for a Google API OAuth2 authentication flow.  It uses the Google provided libraries which can readily be downloaded from Nuget and implemented in your project in Visual Studio.  Just use the Nuget Package Manager and search available packages for Google.Apis.

The magic sauce here is that the good folk at Google have fixed the OAuth flow for UWP C# only in a beta release of their dotnet libraries.  Specifically version 1.31.0 beta 01.  In the package manager, make sure to tick the box to include pre-releases, or else you won't get the beta on the list of available packages.


And here is the disclaimer... the mainstream release - currently up to 1.32.0 - does NOT work.  The code will build but fail at run time.

Enough said.  Following is the example code that will manage your Google OAuth2 authentication flow for you.  It prompts the user to log in with a Google account, authorise our example App, access the user's AdSense account, grab a list of payments for the account and finally display the results as the items source on a XAML ListView. Sounds tough?  Not really, just a few lines of code 😃

Of course, instead of accessing the AdSense Management API we could access the YouTube Data API or any of the other Google APIs presumably. I have only tested AdSense and YouTube, though.

     private async void PopulateAdsenseList()
     {
         UserCredential credential;
         using (var stream = new FileStream("client_secret.json", FileMode.Open, FileAccess.Read))
         {
             credential = await GoogleWebAuthorizationBroker.AuthorizeAsync(
                 GoogleClientSecrets.Load(stream).Secrets,
                 new[] { AdSenseService.Scope.AdsenseReadonly },
                 "user",
                 CancellationToken.None
                 );
         }
         var adSenseService = new AdSenseService(new BaseClientService.Initializer()
         {
             HttpClientInitializer = credential,
             ApplicationName = "Your App Name",
         });
         var myPayments = adSenseService.Payments.List().Execute();
         MyList.ItemsSource = myPayments.Items;
     }

Of course you will have to have a XAML page with a ListView (in this case called "MyList") to display the retrieved list of payments.

Just remember, don't be tempted to upgrade your Google.Api Nuget packages.  Stick with the 1.31.0. beta 01 release, or your code will break!  We'll have to wait until the devs at Google fix the libraries properly for UWP support.

Hopefully the above makes sense and you enjoyed reading this post.  If you have any questions or comments, why not drop me a line via email or comment below.

Cheers

MB


YouTube Channel Stats UWP App Update 1.3.3 Released

Release 1.3.3 for YouTube Channel Stats UWP App


Just a quick update on the progress of the app.  It has been in the Microsoft Store now for around five months, and has had two additional releases since its inception.

In November I added channel search functionality which made it much easier to obtain the channel ID for your YouTube channel that you wanted to get stats for.  While it all worked pretty well, the app was in dire need of a bit of a UI style makeover 😃

Well, the December release was aimed at exactly addressing this shortcoming.  The search page results list is now styled with channel thumbnails and a more appealing list item layout.  I'll show how this was done in a separate post shortly.  The main page got a makeover as well and now works better in portrait layout on smaller mobile phone screens. It also sports the addition of a channel thumbnail.

You might wonder how the app is tracking.  Here are a few current stats:
  • 5 months in the Microsoft Store
  • Over 1200 acquisitions
  • Over 1800 installations
  • Retention approx. 5% (Daily Active Users / Monthly Active Users)
All pretty interesting for something that started out as a learning exercise.  But what is next for the app?  Some interesting functionality I think would be to get some of the available analytics data into graphical views and charts, and possibly also some revenue metrics as many users of the app are likely to be content creators with monetized videos.  All in good time...

Best of all, the app is still available completely free of charge, with no annoying ads or in-app purchases.

If you are a Windows phone user who has a YouTube channel, this app is for you.  Grab it from the Microsoft Store and enjoy.

Wishing everyone a Merry Christmas 🎄

MB

Visual Studio Team Services - 5 Good Reasons that make it a Great DevOps Toolkit for Everyone

Microsoft Visual Studio Team Services - A great DevOps Toolkit for Agile Teams

Really, I hear you ask? Why is that? Are there not more established players with better tools in the market? Well, let's give it a bit of context...

Traditionally we would run projects at work the old fashioned way, employing a traditional waterfall delivery model. Like everyone else however, we were wondering what all the hype of Agile, Lean, Scrum and goodness-knows-what was all about. You know, all this new age rage that promises to be so much more effective in delivering projects.

Not wanting to miss out, we grabbed the opportunity as soon as a software development centric project rolled along. We decided to challenge ourselves and deliver this one using Agile. But where do you start with all that? Luckily, some of us had some formal yet basic Agile training and with a bit of research and chatting to like minded folk we felt we had a good basis to get going.

We quickly decided that an Agile wall with sticky notes, cards and blutack was not for us, even though I am of the firm opinion that you can effectively manage projects in that fashion. We wanted a tool to help us, as we set out to manage our work items like Epics, Features, Stories and Tasks, needed a Git based repository for our code, and a visual way of reporting our progress.

Looking around for tools, we quickly zeroed in on the Atlassian kit as they are certainly setting the trend in a fragmented DevOps space and appear to have mature offerings that get good reviews. However, we remembered that Microsoft are playing in this space these days with their Visual Studio Team Services (VSTS) product. In fact, Gartner recognises Microsoft as a Leader in their 2017 Magic Quadrant for Enterprise Agile Planning Tools.

So we decided to have a closer look, and here is where it got interesting. VSTS has a freemium pricing model, where small DevOps teams of up to five people can join a VSTS subscription/workspace, and use this for work item management, Git repositories, load tests and other things for free. Continuous Integration and Delivery pipelines can be set up and appear to work well particularly when used in context of Microsoft's Azure cloud services.

But I digress. The purpose of this post was to outline the key reasons why I think it is worthwhile looking at VSTS if you are a small team wanting to get in on the Agile act and you are looking for a tool to help.  So here we go, in no particular order...

Five Good Reasons that make VSTS a great DevOps toolkit

1. Ease of setup and onboarding - get going fast

Just head over the visualstudio.com/team-services and sign up for free to create your workspace. Then simply create a New Project, give it a Name and Description, select your Version Control format as Git, and your Work Item Process methodology as Agile.


Voila, this will give you a new project shell, with a dashboard for visualisation, a git repository to manage your code, and a work item management area with initial iterations configure.  There is a bit more setting up to do, but it is all very intuitive and within an hour or two you will have everything exactly as you need it to start managing your project

2. It's free for up to 5 people

Yes, free.  Free private Git repos, work tracking, load testing (to a degree), CI and CD pipelines.  And if you have a MSDN subscription by chance, you don't count against the limit of 5 free people but can access it in addition.  Free stakeholder access also included

3. Seamless Git integration with Visual Studio

If you develop in Visual Studio, VSTS will seamlessly integrate.  Push and pull / synch your code to the Git repo online.  Never leave your IDE.

4. Collaborative work item management

Easily manage your backlog, plan your sprints and work collaboratively using mentions to easily keep team members up to date on progress

5. Visually track progress

Sprint burn down, cumulative flow and team velocity charts come out of the box and together with your backlog and task board views allow you to keep track of what is happening at any point during your project


VSTS really served us well and was simple and intuitive to use.  We delivered the full scope of the project right on time and budget.  Reporting and tracking was a breeze thanks to the built in charts that came right out of the box.  And did I mention it did not cost us a cent to get the tool? \

I have to admit I am a bit of a fan - not often you get a useful solution like this for free.  Give it a shot if you are out there wondering about Agile DevOps tooling to use in your next project, and let me know how you went.

Cheers

MB


Some further reading:

Visual Studio Team Services
Atlassian






Load Test Your Web App in 5 Minutes

Recently I have been exploring the capabilities and merits of Microsoft Azure and Application Insights, and have stumbled onto another rather interesting and useful piece of functionality.

Application Insights can easily be combined with Visual Studio Team Services to quickly set up a load test for your web application.

Why Bother with Load Tests?

But why bother with load tests, you might ask?  Is it not good enough that a web application functions as designed with no errors when you do your user acceptance testing?  Surely that's all that matters, right?

Not necessarily.  There have been many recent examples of rather embarrassing failures of high profile web applications due to the sheer number of people trying to access it at the same time.  Who could forget the first Click Frenzy event, or more recently the Australian Census.

Digital businesses rely on web app performance and reliability

It becomes very real if you are a modern digital business, relying on the availability and performance of your web application for revenue, customer satisfaction and brand loyalty.  Your next big online promotion is coming up and you are hoping to drive sales and revenue hard.  But if your promo turns out to be a cracker, is your web application ready for the onslaught of your customers?

The answer is that you absolutely should test and push your application to its limits, so you can understand the capacity of compute you need to sustain the targeted number of concurrent visitors.  Of course you could just use the power of the cloud and automatically scale your application horizontally. But that would make for a whole other post another time.

Visual Studio Team Services to the rescue

Enter Visual Studio Team Services.  If your web app happens to run in Azure, most likely you have already set up an Application Insights workspace to gain visibility on your application's performance and availability. Right from the portal you can also set up a Load Test.  If you haven't already linked a VSTS account, you can do so by creating one on the fly.



Next simply configure the parameters of your load test, give it a name,  what URL to test, duration, how many concurrent users, and from what location to test.  Then sit back and let Azure App Insights and VSTS do the heavy lifting for you.


It will only take a little while to acquire the required resources to run the test but soon enough your test will kick in and the user load is generated.

Are there alternatives?

Of course there are many other testing and load generator tools available in the market.  Some of the more traditional options in this space that I am aware of and know reasonably well are HP LoadRunner and IBM Rational. These don't just do web applications but can also deal with legacy and LOB application testing. Add to this many newer generation web application centric testing tools and you can take your pick for what suits your circumstances best.

In Summary

Application Insights and VSTS are interesting, capable and low cost options and are worth a look if you are a developer in the Microsoft space and/or your applications already run on Azure.  I found the quick and easy setup for simple URL based load tests valuable.  Knowing ahead of time what loads your web application can handle will mean you are always well prepared for the next online sales drive or promotional event.


Watch This Quick Demo



Links

Microsoft Application Insights
HP LoadRunner
IBM Rational Functional Tester

Set Up Web Site Availability Monitoring Using Azure Application Insights In 5 Minutes

Have you got a website where availability matters?  Do you know what the user experience is like for people browsing your site?  Is your online store open for business 24/7?  Why would you even care?

Well, as soon as we are talking "business" and revenue generating web sites I guess the answer becomes obvious.  Customers won't put up with slow performing sites, with errors or unavailability when they want to shop with you.  They will simply move on to the next online store, and most likely not come back.

Of course there are many different ways, tools and services that allow you to monitor your web sites for availability and performance. However, since I'm looking into Azure Application Insights at the moment I was wondering what that would look like and whether this Microsoft option is capable and fit for purpose.

So I guess here goes...  for the purposes of this post let's use this sample raffle ticket sales promo site, which is already hosted in Azure. That's not a pre-requisite, but it is handy. So is it possible to get some web availability monitoring set up in under 5 minutes?  We'll give it a go.

Log into the Azure Portal. If you haven't already, set up an Application Insights workspace for your web application by selecting your web application, select Application Insights, give this new resource a name, and click OK.

How to create a new Application Insights resource in Azure Portal

Within a few seconds, you will get a confirmation in the portal stating that the resource has been created.  With a few clicks you can also instrument your Azure Web App for deeper monitoring, but for the purposes of this post we'll focus on web availability tests.

Select the Application Insights workspace linked to your web app, in our case the QLDNSWFundraising one.  As this app has already got some availability monitoring running, we actually have an Availability percentage straight on the Overview screen.  This is driven by a web test for the home page of this sample web site.

Let's click on Availability on the left and set up another web test monitor. This could be for a shopping cart page, a catalogue item search or any such thing.  You could even set up a multi step web test to simulate an actual customer transaction through your site.  That is however a topic for another post, and in fact Microsoft charges for these multi step web tests separately.


 You will see this following screen


Click Add test, give your new test a easily identifiable name - in our case Fundraising About - enter the actual URL of the page.  Leave the test frequency at default 5 minutes or change as desired.

You could at this point simply click Create and you would be done.  Pretty quick, hey?  But wait, there are a couple of neat advanced settings worth considering.

First, you may be interested in how availability and performance of your site differs from various geographic locations.  Why is that important?  Well, depending on where your site is hosted, performance and response times can vary greatly.  Of course there are mitigating options available such as content distribution/caching networks etc but that's another story.  Or it could be that local carrier outages prevent customers in some geographies from accessing your site but not others.  Good info for your customer service team.

Second, you may want to check the server response a little more in depth rather than just for a 200 response code (page served up okay).  This could be useful for a catalogue item search or the like, where you want to make sure the page returned has a specific word present.  This allows you to test dynamic pages that might be making database calls, which indirectly tests the health and availability of your full application stack.  Pretty neat trick, right?

Click on the Test locations and Success criteria sections respectively and configure these two blades with the desired settings.  Should look something like the following:



Finally click on Create and you have a working smart web availability test.  Within a few minutes, your new test will start running, and you will get the results back in the portal.  You can drill down on each test, check which locations may have failures or slow performance etc.



As a nice added bonus, you will also get a weekly digest email which will clearly show this week's performance and availability as compared to last week.  This can give you piece of mind that the site's performance is not deteriorating over time, or can highlight service level target issues etc.

In Summary

I'm actually quite impressed with the ease of setup, and the ease of accessing and consuming the availability and performance data.  Combine these web availability test with the full Application Insights instrumentation of your apps, and they will add significant value to your full stack monitoring.


Watch a Quick Demo

Are Microsoft Lumia Windows Phones Any Good?

Windows based Microsoft/Nokia Lumia phones are out there, but nowhere near as popular as Apple's iPhones or Android based mobile phones.

Even the hallowed Nokia brand did not help Microsoft to gain any traction in the mobile market, and neither did the Windows 10 release, the advent of Univeral Applications or new high powered flagship models such as the Nokia 950.

But are these phones worth a second look?  Could they be a decent choice for some of us that are heavily invested in the Microsoft eco-system and are maybe not as app hungry as some?

So let's see why you might bother spending your hard earned money on a Microsoft Lumia instead of an iPhone or an Android device.

Well, for starters the flagship Lumia 950 has a price advantage.  As a flagship model, it literally costs half of what an iPhone will set you back, with similar or better specs.

The camera on the 950 is sensational, with 20 megapixels a real treat for photo enthusiasts. Battery life is pretty good but probably no real differentiator.

Personally, I simply like the usability of the Windows phone better. I use an iPhone for work but have a Lumia 930 to muck around with for some app development. The fluid Windows user experience appeals to me.  Combine that with Microsoft Continuum and you have a decent productivity solution in your pocket.

I'll admit I am biased in the sense that I am a consumer of all sorts of Microsoft services, and therefore the Windows phone actually works better for me than the Apple products. Integration with Office, OneDrive, OneNote and Outlook is tight, and exactly what I need.  Cortana works well these days, and the voice guided navigation is solid.

Of course all of that is available on iPhones and Android as well, and for some - even most - those other options are more attractive.  Ask anyone and it usually boils down to style and app availability for iPhone and Android.  It is much better than Windows apps for certain.  So if you are app hungry be sure to choose Apple or Android.

The few non-productivity apps I use - some of the standard socials like Facebook, Twitter and Instagram - are all available and work well on Windows.  Using eBay and YouTube through the browser works well enough.  Most of the Aussie banks have a Windows version of their banking app.

But can you even buy the Lumia 950 any more?  It's largely gone missing from the Microsoft online stores, and retailers in Australia don't seem to carry any stock any more.  Some carriers still have the handsets available on post-paid plans, but that's about it.  I guess everyone's waiting on the rumored "Surface Phone"... but that's a whole other discussion.

The good news is that you can grab yourself a bargain getting a Lumia 950 second hand from eBay at a really good price.  Of course it's buyer beware.  Check the seller ratings, ask questions about the history.  Buying mobile phones second hand can be a lottery as there are plenty of "seller refurbished" units that are not worth buying.

In Summary

If you must have all sorts of apps for all sorts of things in your daily life, the Windows phones are probably not for you at this point.

However, if you are already part of the Microsoft eco-system and you are looking for a well-spec'd phone and productivity tool at an affordable price, excellent usability, with an awesome 20MP camera to boot, then the Microsoft Lumia 950 (or even it's predecessor the Lumia 930) are worth your consideration.

Links

Microsoft Lumia 950 Product Page
Lumia 650 on Optus
HP Elite x3 in Microsoft Store

Is Microsoft Azure Application Insights Worth a Look?


The market for application performance monitoring products is pretty crowded these days. On one hand we have the traditional players with their at times old school APM solutions, and on the other hand we have new entrants who have disrupted the market with modern, web centric product offerings.

Traditional heavyweights such as IBM, HP, CA, Compuware and others are facing off with new kids on the block such as New Relic, AppDynamics and many others.  Conspicuously absent from this battleground was Microsoft.

While Microsoft acquired Avicode - a dotnet APM and diagnostic product - and subsequently baked it into its System Center Operations Manager - or SCOM in short - it never was given much love and development, at least it was not obvious.

Enter Azure Application Insights.  This has recently gone GA and it would appear that it is a key plank in Microsoft's APM strategy.  With hooks in Visual Studio, Application Insights would seem to be geared for the developer and is available at design time to Visual Studio developers to help troubleshoot their code.

Initially not sure why you would give it a second thought over the likes of AppDynamics or New Relic, I must say I find the product interesting and the depth of information, ease of access and consumption and the free tier pricing actually quite compelling.

It could not be simpler to actually instrument your application in Visual Studio.  A single checkbox allows to bake the SDK into your application code, and a couple of further configuration settings will send application telemetry straight to the Azure Portal based Application Insights service.

Of course you can also instrument your existing applications at run time without changing any code.  However, the level of insights and data you get is slightly different.  Do this for Azure Web Apps through a few clicks in the portal.

Certainly if you are a dotnet developer already on the Microsoft stack, developing in Visual Studio, running your applications on Azure either on IaaS or PaaS services, Application Insights seems a logical choice.  It seamlessly integrates with Microsoft's Azure based Log Analytics offering, which is a very interesting product in itself and worthy of its own post down the track.

Application Insights does not just work for dotnet applications and IIS in Azure, but also works for J2EE / Java applications, and on premise workloads.  To instrument on-premise servers, you can download an agent that will configure your IIS server to send telemetry back to Azure Application Insights.

In Summary

As a whole, Application Insights has got me curious, and I am keen to explore whether it actually has any merit in a commercial/enterprise context.

Its integration with log analytics, automatic graphical application and dependency mapping, code diagnostics capability, ability to combine with single or multi step web tests provide a pretty neat package for all-round availability and performance monitoring.

Related links for this post

Microsoft Azure Application Insights
Documentation for Application Insights - Get Started
New Relic
AppDynamics

Acronyms

APM = Application Performance Management
IIS = Internet Information Server
IaaS = Infrastructure as a Service
PaaS = Platform as a Service
GA = General Availability





Most Popular Posts