Somewhere in the overlap between software development, process improvement and psychology

web stuff

Serverless event feedback processing and analytics using #aws

I recently was involved in organising a techie conference. We wanted a feedback mechanism so I made a serverless event feedback system. Here’s how it works…

Have a bunch of ipads/tablets with a nice feedback form:


Collect up the feedback and sent it to a lambda function via API Gateway:

const APIurl = "";

//upload to AWS and start looking for results
function sendFeedback(){

    apiDelay = 500; //milliseconds - how long to wait before each check

    var learnedValue = $("input:radio[name ='learnedRadios']:checked").val();
    var awesomeValue = $("input:radio[name ='awesomeRadios']:checked").val();
    var commentsText = $('#mainInput').val();
    commentsText = encodeURIComponent(commentsText);
    var apiCall = APIurl + 'learned=' + learnedValue + '&awesome=' + awesomeValue + '&comments=' + commentsText;

    $.get(apiCall, function(data) {

        //Got some data
        console.log('server returned');                    


The lambda function does sentiment analysis, entity and keyword extraction on the text comments before sending it all off to ElasticSearch:

function detectSentiment(callback, responseObj) {

    var params = {
        LanguageCode: 'en',
    comprehend.detectSentiment(params, function(err, data) {
        if (err) {
            console.log(err, err.stack);
        else {
            responseObj.Sentiment = data;


(full code on github)

Then I configured a kibana dashboard to display the data, set it to auto-refresh and you’ve got serverless real-time event analytics.


Oh yeah, and the whole thing took less than 6 hours to build (with the help of the frankly brilliant AWS Amplify hosting service)


Can’t open links in Firefox on Ubuntu when it’s open – Fixed!

This is a little obscure but there’s a number of people with this problem and too many “simple” answers that just don’t work. There are a number of situations that cause Firefox to respond with an error message when you click on a link from outside of the browser (like Thunderbird or any other application that try to launch a url). You get an error message saying:

Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system

The normal reasons for this are things like locked profiles etc. which are well covered here. But some users get this error message even when Firefox is open and there aren’t locked profiles 😦 The solution is to edit the way that Ubuntu invokes Firefox.

Grab a terminal and go to ~/.local/share/applications this is Unity stores it’s information for launchers in the unity dock thingy. You should have a Firefox.desktop in here, you might have several in which case the one called “Firefox Web Browser.desktop” is probably the one that Ubuntu is using by default.

Edit the file and have a look at the “Exec=” line about 4 lines down. In my case the problem was caused because this line was referring to an old profile that I’d previously removed trying to fix the problem. If you’re not sure what it should look like set it to “Exec=firefox %u“, save, exit and click links once more 🙂

Wrote some REST code to access a site’s API and saw a job offer in the response

What an excellent way to advertise directly to your target audience 🙂

I was writing some code to get some info from a site from their REST api and saw an unusual header in the response from the API which said something along the lines of “if you’re reading this come and get a job” with a link. The clever thing about this is that it’s already only filtered in people who already have the right skills that the company is looking for and it was unusual enough for me to immediately follow the link. Excellent innovative recruitment!

And the site? although it’s changed now to “Oh, Awesome: Opossum”

I’m a big fan of for a number of reas0ns. First they host my blog, for free. Second the authoring experience is always awesome opossum.

A rose by any other name would smell as sweet

I’ve decided to rename my blog from “The MacDaddy” to the imaginatively titled “Mike MacDonagh’s Blog”.

When I first setup this blog I had no idea what direction it would go in and I’ve always been terrible at naming things. I decided on the MacDaddy as an ironic nod to Kriss Kross and because there’s a “Mac” in my name and I’m a Daddy. I don’t think anyone ever got the joke. Jump jump…

Anyway, I’ve known for a long time it was silly so I’ve finally  renamed it. I toyed with ideas such as “The Software Ninja” and “Software Kung Fu” in blatant references to mastery and the Kung Fu of Software Engineering but that’s a bit too software-y when many of my posts aren’t really about software. Putting “Business” in the title would make me want to give myself a good slap so I’ve ended up with an almost no-name name. Hopefully now I’ll get less confused visitors looking for a blog about Apple Macs.

If you’ve got a better idea for the name of this blog I’d love to hear it 🙂

What is cloud computing?

In any sentence including the word “cloud” if you substitute “network” the sentence still makes sense, and normally makes a lot more sense.*

I’ve recently been doing some stuff with cloud computing and thought I would offer the above insight. It’s slightly flippant however, in that there is a difference  (at least to me) between cloud services and network services and that is in their focus. “Cloud services” tend to be focuses towards consumers whereas “network services” are rendered by businesses to business, although as is normal in business they’re further obfuscated translated to b2b services or, if intended to portray an image of easy-consumption “b2b cloud services”.

You’re currently reading this blog on the cloud or syndicated by a cloud service (like google reader, netvibes (oh yes I see you), bloglines etc.) on a device of your choice.  I’m writing it on a cloud service and other cloud services (like google, bing, whatever) are providing search for curious folks to find this blog.

So what does all this mean? Is cloud pointless or the most important thing since 7 layered network protocols? Or all of the above?

Personally I’m leaning towards the third option. In many ways this is nothing new. I’ve been able to use network based search, hosting, virtual provisioning, remote servers, remote APIs for many years. In another way it’s totally new, I can provision a network based on a topology of my choice based on a collection of OSes for little or no money for whatever purpose suits me, storing data in a federated fashion and integrated with a number of web services after just a few clicks, both as a business or an individual.

There are many excellent cloud services out there, I personally use the Ubuntu One service to transfer files between my main desktop PC and my Android tablet, it’s actually more convenient than using a USB stick (and free) – this for me is the real distinction between “network” services and “cloudn” services (deliberately misspelt for those who do the copy/paste search/replace exercise). They’re so convenient and cheap (or free) you’d use them above anything else. Amazon is really trailblazing in terms of consumer and business cloud services.

I recently setup a website. I entered my credit card details and literally moments later had a linux server with the web server of my choice running. I was able to FTP and SSH to the box and do whatever I wanted as it appeared to be my box. Of course it’s not my box, it’s a virtual box hosted by a (probably virtual) hypervisor or similar on a bunch of racks distributed around a bunch of data centres in various places but that’s not relevant to me as a consumer, I just ask for a “box” and get a “box” in moments, in a convenient and cheap way.

That is what cloud computing is all about.

* Try this trick with this blog, copy and paste the blog to gedit/notepad/whatever and replace “cloud” for “network”

FireFox extension to view your blog stats

The MMD WordPress FireFox extension is finally publicly listed on the mozilla site. After battling problems with xul layouts on Mac’s (which was tricky because I don’t have a Mac) I’ve finally resolved the issues that were preventing my firefox stats toolbar from being fully reviewed on the main FireFox site.

If you’ve not seen it before, the MMD WordPress FireFox extension adds a tiny toolbar that shows you your current blog hits on your blog(s). You can then right click to get quick access to the full stats page, new post page and view your blob. Simple but quite useful. Download and install from mozilla

MMD WordPress Extension


Ngrams for nerds

Pictures that are worth 500 billion words!

Google Ngram Viewer shows graphs of how many times words or phrases have occurred in a set of 5 million books over the years. They’re a really interesting way of seeing trends in information and relative importance between words. It’s free and easy so check it out.

Here’s some I recently ran that I found interesting. I ran most of them from 1950 onwards and  the info only goes up to 2008.

Comparison of programming languages

Programming Languages

Ngram link – When looking at this you’ve got to mentally remove the baseline Java and Pascal references from the 1950 as they’re about coffee, islands and mathematicians. Interesting to see Java so dominant.

Programming paradigms

Programming Paradigms

Ngram link – I found this one really interesting. Compared to the others in my query “structured programming” had a lot more books written about it. I wonder how much this is a reflection of the rise of the internet… these days although there are lots of programming books the primary source for learning a language is online material?



Ngram link – I was a little surprised to see RUP so much more prevalent than agile but then I did have to add “software development” to the term to avoid including the bendy and stretchy. Also as with the previous one I suspect that there’s a difference here between a vendor driven process with supporting books and a more open source philosophy on agile as a generic umbrella for methodologies, and therefore more online sources. As Ivar Jacobson says: “No one reads process books

Shareware, Freeware and OSS

Shareware, Freeware and Open Source

Ngram link – This one speaks for itself 🙂 I wish I could have worked out how to add “expensive vendor products” to the query!

User Stories vs. Use Cases

User Story vs. Use Case

Ngram link – Ah yes, this argument again. Interestingly this dominance of use case over user story in written books correlates with query stats between user stories and use cases on by blog and the site. Personally I think they’re both great and complimentary, I often use them together on software projects.

Windows vs. Linux

Windows vs. Linux

Ngram link – Yep, Linux beats Windows at every turn.

More Ngrams!

For more fun with Ngrams watch this very funny video explaining this stuff