New IBM Composer Feature - Additional Action Logging

A pretty cool update landed in IBM Composer today, and I want to thank IBM engineer Kerry Chang for letting me know about it. When visualizing compositions, Composer will return information about the output of your actions, but do not provide that level of output for inine functions. Now typically these are very small bits of logic and you probably aren't too concerned about their output, but it can be something you miss if you're having trouble chasing down a bug.

Read more

Adding Referrer Protection to OpenWhisk Actions

Today I was thinking about what it would take to add referrer-style protection to an OpenWhisk API. What I mean by that is the ability to say that a particular API can only be called from certain domains. To be clear, this is not secure in any "real" fashion. This Stack Overflow question does a great job of addressing why not: "Does referrer header checking offer any real world security improvement?

Read more

An Example of Form Validation with Vue.js

I was a bit torn about today's blog post. When it comes to form validation, I'm a huge fan of validating via HTML attributes. In fact, I just ran across a great post today on the subject by Dave Rupert, "Happier HTML5 Form Validation". However, I know folks have issues with HTML validation, and it doesn't cover every use case, and finally, I thought it would just be plain good practice for me to write up a few quick examples.

Read more

Quick Example of Apache Cordova and Vue.js

Normally when building Cordova apps, I either use no JavaScript framework at all, or I use Angular with Ionic. But as you can tell by my recent posts, I've become infactuated with Vue.js lately. While the Ionic folks are working on making it easy to use Vue instead of Angular, I thought I'd demonstrate a quick example of how simple it is to use Vue with Cordova. I'm not going to worry about UI for this post, but rather show how to wait for the deviceready event in your Vue app.

Read more

Building Related Selects with Vue.js

My buddy Nic Raboy has been posting some great "how to do X" style posts on Vue.js lately and it's inspired me to do the same. With that in mind, I decided to work on what I thought would be a simple demo of "related selects" - this is a common UI interface where one drop down drives the content of another. While working on the demos though I ran into some interesting edge cases that helped me learn, so I hope what follows is useful.

Read more

Advent of Code 2017

I'm a few days late, but this is just a quick reminder that Advent of Code has returned. This is a daily coding challenge where you are tasked to solve certain problems. No particular language is required, and heck, if you want to do it on paper you could give that a shot as well. This is my third year participating and it quickly goes from simple to "woah, how in the heck do I solve that?

Read more

Thank You!

For those of you outside America, today is Thanksgiving which is traditionally a day when we are extra thankful for the good things we have in life. I've got a lot to be thankful for in my life. I also want to share a quick thank you to all my readers who provide great feedback, awesome questions, and just make this worthwhile. Have a great day, love your friends and family, and please accept my thanks again!

Read more

Serverless Try/Catch/Finally with IBM Composer

It's been a few weeks since I blogged about IBM Composer, sorry about that, flying to China and getting a kid will put a kink into your blogging schedule. ;) Today I want to share a simple demo of how to wrap serverless functions with try/catch and try/catch/finally logic. Let's start off with a simple function. function main(args) { if(!args.input) args.input = 0; if(args.input === 0) { throw new Error("Can't divide by zero and maintain the Universe.

Read more