Skip to main content


Showing posts from May, 2015

Revert Your Mistaken Git Commits

Today one of my development teams had a merge problem. We use GitFlow, and it was time to merge from the develop branch to the release branch. If things are done correctly, this should always be a clean, simple merge. It is especially true in this case, because it was our first release for this project, so the release branch should be empty. Except that it wasn’t. Huh?
As it turned out, a well-meaning developer on the team knew we were pushing our code into release, so that’s what he did. The output of `git log --oneline` on the release branch showed something like this:
      1852291ablah blah blah       2f575c87blah blah       383d855dblah blah       49fa11dfblah blah blah blah       5111b003blah blah       62b3a530blah blah blah       7a4c5f54blah blah blah blah blah blah       8b2a62fablah blah blah blah blah blah blah blah blah       95fb67b9blah blah blah      104d1a5fcblah blah blah      11ed40aecInitial commit
No, we really don’t use “blah blah” as commit messages. The problem was tha…

How We Learn

Have you ever stopped to think about how we learn things?

My 15-year old is learning to drive, and I have the unenviable job of teaching him. While watching him tonight, I noticed that he has to think about every little detail of what he's doing. He needs to be reminded to check his mirrors, signal his lane changes, look behind him when backing up. Learning to drive requires his absolute and complete attention. He doesn't even have the spare mental capacity to listen to music.

Watching him struggle reminded me of something I learned many years ago about how we learn new things. Regardless of what we are learning -- whether it's driving, putting up drywall, or learning a new programming language -- we all go through four stages of learning. You could think of them as the four steps of mastery. They are:

Unconscious incompetence: You don't know what you don't knowConscious incompetence: You understand what you don't know and want to learnConscious competence: You …

Owin Startup Class

It seems that every time I start a new ASP.NET WebAPI project, I have to go out to the web to "remember" what I want in my OWIN Startup class. Not anymore. I added a GitHub Gist that I can copy (and add to) whenever I start a new project.

There should never be anything in that file that is proprietary, so I figured I'd open it up to the world, for comments, edits, etc.

What's in it so far:

Attribute RoutingError DetailsJSON as the default in the browserUsing camelCase with the default JSON serializer.Comments to remind me which NuGet packages to install to make it all work. Feel free to comment, fork, issue pull requests, etc. I'd like this to grow over time to become useful for anyone creating a new WebAPI application.

How I Finally Got AdMob and Ionic Framework to Play Nice Together

Note: Some of the plugins referenced in this article have had their names, and possibly their APIs, changed. The information contained herein may no longer work. Please don't rely on it until I have had a chance to review and update it. -Mike Callaghan
TLDRThis is a summary of how to display ads in my MDCL (1650) mobile application, which was written using the Ionic Framework. If you want to see the sample project that displays both banner and interstitial ads, you can look at my AdMob Demo app on GitHub.

The first thing that's necessary is to get an AdMob account, which you can create at Ionic Starter App
If you don't already have an ionic app, you can create one with the following command, which will create a folder named myApp in your current folder, and initialize it with an empty application.
ionic start myApp blank

Next, you'll need to install the ngCordova bower package and include that in your project. This script does m…