Hi,

One sec...

Enter

If you’ve ever written a skateboard or rode an application, you’re well aware how the tiniest mistake can cause everything to crash. Unlike that last sentence where the error is benign, coding and skateboarding involve humorously similar trial & error attempts to prevent unexpected outcomes.

The video below highlights this rewarding and frustrating process and ends with the most common solution to programming problems 🙂


Why skateboarding is good for your child

If you’re a parent worrying your child starts skateboarding, she’ll be rolling with the wrong crowd (that’s a pun) she probably will. But that’s not because she skateboards and more likely a proclivity for defiant behavior.

The benefits she will gain, besides supernatural balance and jumping ability(I can easily reach rim on a basketball hoop and I’m 5′ 9″), are the following:

Series of presentations I’ve given to CEOs, upper management and colleagues. Although the goal of most of these presentations was to improve existing company operations, the same format has been followed when I’ve given demos to clients – leading with the solution in mind while keeping content concise and engaging with a sprinkle of personality.

“Voltron” – Company Reimbursement Initiative

Problem: Company felt it was a waste of money to pay for learning subscriptions like Pluralsight because no one was using them.

Solution: A partnership between colleague and company to achieve bidirectional growth where the employee gets learning resources reimbursed but must write up a review of resource or create marketing material.

Outcome: Company cut costs on learning resources by 28% first year and 63% second year. Employees felt supported in their learning growths.


 


Architectural Review Process

Problem: Bugs were repeatedly appearing despite use of unit tests due to developers working in silos.

Solution: An architectural review process where developers must create an Entity Relationship Diagram (ERD) of their proposed architecture that must be approved by a two different senior devs prior to writing code.

Outcome: Applications became more scalable; Poor architecture was caught before code reviews saving heavy refactoring time; A precedent  was set to document all new applications.

 

 

 

Ice Cream Business Pitch

A presentation I created to help my friend pitch her ice-cream business to a national food service corporation (Aramark).

Code 4 Baltimore Weekly Meeting

Weekly presentation we gave to kickoff our meetings with a clear agenda, past accomplishments and meeting goals.

 

I started my career as a middle school teacher.

 

It was a fulfilling three years trying to create bilingual, compassionate global citizens.

One day as I was watching the copy machine eject grammar worksheets, the mechanical sound of scanned paper entranced me into a dark realization – these stacks of perforated paper are a metaphor for the monotony of my life.

I knew in that moment I needed to make a change.

At the time I was wrapping up a Masters in English and seeking employment abroad.  I figured if I couldn’t figure out what to do with my life here, I may as well seek guidance elsewhere.

So I moved to china

And hated it

I obtained a faculty writing position at Missouri State University.   It was a miserable first month and that had nothing to do with the language barrier, smog filled streets, oily food, and the fact the closest beach was in North Korea.

The issue was I never had to figure out what I wanted my life’s work to be. I always knew teaching would be temporary but I never gave enough thought to what a permanent career could look like.  Suddenly my attitude of “I’ll just do this job for now”, finally caught up to me.

Back home I never addressed this issue because there were always distractions keeping me from thoroughly giving it some thought. Between the daily intensity of middle school teaching to the general busyness of life, there was always something occupying my attention.

Now there was nothing…except the overwhelming feeling of purposelessness. Despite the melodrama I knew this opportunity was unique in that I had no distractions thus could focus all my energy on my next move.
人山人海 ren shan ren hai (People Mountain People Sea)

A chinese proverb referring to the huge population
and how I felt about my current predicament.


During my pity party I sought resolution by interviewing my friends who seemed content with their careers. One of them suggested coding…

I started studying coding tutorials online and loved it.

I adored the critical-thinking, logic and multiple ways to solve a problem. I began soaking up content and getting badges like a boy scout with too much time on his hands.

Tutorials are cute, but to truly career-change I would need to sacrifice more to make it in programming. I figured few employers would hire someone without experience and no formal educational background. Therefore, I needed something to prove I was willing do whatever necessary to excel so they would trust me enough for an internship.

How could I convince an employer to risk an internship on a self-taught coder?


Should I go back to school and get a computer science degree?
It sounded like overkill and a few people told me software employers care less about where you went to school and more about what you could do.
Should I attend a coding bootcamp?
I went as far as interviewing for one but once I saw their curriculum, I realized I had already taught myself half of it. I rationalized keeping up with technology is an on-going process hence I should get used to teaching myself and not having a “school” environment readily available.
Is teaching yourself really a good idea?
Once I decided attending a bootcamp was not ideal, I contacted all my friends in the industry and got their advice on what content to learn. The back-end content seemed most difficult so I relied on my software network of friends. I would contact them when questions came up that Stackoverflow couldn’t answer. To avoid my friends feeling exploited, I made sure to rotate who I was asking frequently 😉
As featured in the Mind Over Machines company blog

Prior to 70-535: Architecting Microsoft Azure Solutions, I’d never taken a Microsoft Certification exam, nor did I have much experience with Azure. I was definitely out of my wheelhouse. Then I had a senior architect, who works in Azure daily, tell me it took him three tries to pass. Not the most encouraging pep talk.So how did an admitted Azure novice pass on the first go-around? I think it’s because the exam is looking for a wide and general understanding of Azure solutions, rather than a deep knowledge about or ability to implement those solutions.Because this exam can fool the seasoned developer and pass the novice, I’ve outlined my study strategy and flagged some pitfalls to watch out for when attempting to conquer 70-535.

Here is a link to a comprehensive list of items to focus on.

How to study

Since the exam requires breadth over depth, I would get a textbook and start creating flashcards of all the concepts.  If you’re unfamiliar with something, open up the Azure Portal and follow a tutorial online.  Microservices and Azure Service Fabric were particularly new for me hence I built a few Hello World APIs in Visual Studio and deployed them using the given tools until I understood the concepts.

Beyond knowing what the technology does, it’s equally important to know what it does NOT do.  Many Azure tools offer similar services hence it’s key to know which solution is best in a given scenario.  Therefore, knowing Queue Storage is a cost-effective queue tool isn’t enough.  You need to know it doesn’t store data following the first in first out (FIFO) rule and has a 64kb limit.  You don’t need to open the Azure Portal and tinker with it if you understand its purpose.

This exam is trying to pass those who can walk into a client meeting and recommend the proper Azure solution, regardless of if they can actually implement it.

They’ll ask you to demonstrate your understanding by prompting a client scenario where they want a queue tool to store Tweets and it doesn’t matter the message order.  The other option they may give is Azure Service Bus, which does offer FIFO and messages > 64kb, but it would be overkill for storing Tweets especially when order doesn’t matter and even worse if price is a factor.

How they quiz you

Unfortunately, most prep material gives you simple questions like “How many update domains do you get by default in an availability set?” whereas the actual exam gives you verbose real-world scenarios.  Some questions feel like a page long narrative:

Contoso currently has 3 applications  on-premise that listen for triggers based on X while continually sending data to Y, and they would like to migrate them to Azure.  However, their databases need to remain on-premise and their applications need to go to the cloud because of blah blah blah.  The businesses users have this giant list of expectations while the developers want yadda yadda yadda.

After reading a bunch of fluff they ask you an ambiguous question like, “Would Events Hub be an appropriate solution for Contoso?”.  You would have to know the Events Hub is for receiving data and not sending it, therefore the ideal solution is the IoT Hub.  

Thankfully since I used flashcards and knew the purposes and limitations of each technology, it was easy to eliminate certain answer choices.

How NOT to study

I never took the exam’s predecessor 70-534 but some tutorials like ACloud Guru seemed to cut corners on their 535 material by taking their existing 534 material and appending 535 items.  The focus of 534 seemed to be infrastructure related, which I did not see on the exam.  Concepts like setting up VMs, networks, load balancers, gateways, or availability sets had at best one question.  All my efforts into understanding these concepts did not help me.  If you’re pressed for time, I’d focus on studying the purpose and limitation of each Azure service as indicated in the Word doc and not stress the networking concepts.  I hear 70-532 requires implementational understanding of these infrastructure solutions so your efforts will be rewarded eventually.

Go for it!

It took me 3 weeks of daily cramming to feel prepared for an exam in a technology I rarely work in, so you can definitely pass it.  I’d suggest the replay option so if you bomb the first time, you get a second chance. My score was 734 (minimal passing is 700), which I consider a triumph because the closer you get to a perfect score, the more you’ve failed in other ways – such as saving your free time 😉

I couldn’t find many tutorials for creating a simple .NET listener for receiving Webhooks.  The out-of-the-box options in .Net support services for Github, Azure and others but if the API you’re searching for isn’t offered, it’s hard to find documentation that walks you through the process.

Required Skills

This tutorial assumes familiarity with Visual Studio and REST based API calls.  It was originally adapted from this this post and tweaked to incorporate Postman and Emma.  The solution below is only for receiving API calls from JSON requests.

Required Software

Project Setup

Begin by creating a blank Web API project in Visual Studio:

Add the following line to your WebAPI Config class.

public static class WebApiConfig
{
    public static void Register(HttpConfiguration config)
    {
        // Web API routes
        config.MapHttpAttributeRoutes();
        config.Routes.MapHttpRoute(
            name: "DefaultApi",
            routeTemplate: "api/{controller}/{id}",
            defaults: new { id = RouteParameter.Optional }
        );
 
        // Initialize Generic JSON WebHook receiver
        config.InitializeReceiveGenericJsonWebHooks();
    }
}

Install the following nuget package using the package manager console to obtain the necessary Webhook classes:

Install-Package Microsoft.AspNet.WebHooks.Receivers.Generic

Add the following line of code to aid in routing the requests.  The keys below can be anything you want but must be 32 characters.

<configuration>
<appSettings>
<add key="MS_WebHookReceiverSecret_GenericJson" value="i=1388a6b0d05eca2237f10e4a4641260b0a08f3a5,z=80ad19e357b01a04fe767067df7cd31b96a844e1" />
</appSettings>
<system.web>

The WebHookHandler base class is required to receive Webhook requests.   Paste in this template code:

using Microsoft.AspNet.WebHooks;
using Newtonsoft.Json.Linq;
using System.Threading.Tasks;

namespace MyWebhook
{
      public class GenericJsonWebHookHandler : WebHookHandler
     {
        public GenericJsonWebHookHandler()
        {
           this.Receiver = "genericjson";
        }

        public override Task ExecuteAsync(string generator,                     WebHookHandlerContext context)
        {
          // Get JSON from WebHook
          JObject data = context.GetDataOrDefault<JObject>();

           if (context.Id == "i")
           {
              //You can use the passed in Id to route differently depending on source.
           }
           else if (context.Id == "z")
           {
           }

           return Task.FromResult(true);
         }
   }
}

Let’s test to see if the handler works by building the solution and copying the URL from the output.

(There won’t be a landing page cause the server doesn’t return anything).

localhost (1)

Paste this URL into Postman and append the following:

Localhost:{Your Port}/api/webhooks/incoming/genericjson/z?code=80ad19e357b01a04fe767067df7cd31b96a844e1

URL format for .Net Webhook            URL endpoint from your webconfig

Enter anything you want into the Body.  Note: You need to include something in the Body or the GenericJson config will error out.

bodyinput

Set a breakpoint and  send the request and make sure it comes through.

postman-local

Connecting to Emma

To connect to Emma you need a public facing API.  Right click the solution and select “Publish” to send the solution to Azure for hosting.  Prior to clicking “Create Profile”, click the Advanced link to set the configuration to Debug to be able to debug from the server.

publish

Attach your application to the remote server for debugging:

View ->  Cloud Explorer ->  Find your application ->  “Attach to Debugger”

Replace localhost with your new URL and add HTTPS at the beginning or it won’t work.

https://{The Azure URL youre given}/api/webhooks/incoming/genericjson/z?code=80ad19e357b01a04fe767067df7cd31b96a844e1

You can test the listener again via Postman if you like by pasting in the URL above. 

Log into your Emma account and retrieve your public API key and Account number into Postman and create your first Webhook with your credentials from above.

emma-1

The example below sends a request each time a contact record is updated within Emma.  For a full list of available Webhooks visit the Emma API documentation.

postman-webhook

Authenticate via the Authorization tab and enter your Emma credentials.

authenticate

Send the request via Postman and it should return to you the ID of your Webhook.

Go back to your application in Visual Studio and attach to the debugger.

Test the Webhook by logging into your Emma platform and updating a contact. If you’re connected to the remote server, your breakpoint should be hit within a minute or so.

In order to use the JSON object you received from Emma you need Newtonsoft and a way to deserialize the Emma request.

using Newtonsoft.Json;

public override Task ExecuteAsync(string generator,, WebHookHandlerContext context)
{     

  JObject data = context.GetDataOrDefault<JObject>();

EmmaWebhook request = JsonConvert.DeserializeObject<EmmaWebhook>(data.Root.ToString());

You need a class to map the deserialization

        public class EmmaWebhook

        {

            public string event_name { get; set; }

            public Data data { get; set; }

        }

        public class Data

        {

            public string member_id { get; set; }

            public string account_id { get; set; }
            //The Emma result can also come with a TimeStamp
            //but I didn't want to deal with a DateTime property.

        }

Update a contact in Emma.  If you’ve entered everything correctly, you should see your result in the debugger 😉

debugger

Troubleshooting

If you experience issues where Emma is not sending the request, make sure your webhook is registered.  You can see registered webhooks with the following GET request in Postman:

https://api.e2ma.net/{Your Account Id}/webhooks.

If that doesn’t help connect your Emma account to Zapier and see if Zapier is able to receive the request.  If you’re still unable to receive the request, go back into the article and make sure you did not miss any details such as using the proper key length or HTTPS.