PHPNews

React to Database Changes with OpenWhisk Actions

One of the best features of CouchDB is its change feed which allows us to get a feed of the changes happening on our database. It's also possible to have a serverless function (examples are for IBM Cloud Functions but should also work for Apache OpenWhisk ) that fires in response to activity on that change feed. …

Continue reading »

Written by Lorna Jane - - Aggregated on Monday April 23, 2018


Handle Webhooks with Serverless PHP

Did you know you can serverless with PHP? OK, so serverless is clearly not a verb, but since I love serverless tech and have also loved PHP for longer than I'm going to admit (the dates of the earliest posts on this blog might serve as a clue), using these technologies together is definitely my idea of a good time. …

Continue reading »

Written by Lorna Jane - - Aggregated on Tuesday February 20, 2018


What does a Developer Advocate do?

I'm a Developer Advocate (you might also hear job titles like Developer Relations, Developer Evangelist) and I'm constantly asked what that means. What do I do? The answer is different for every one of these jobs but there are some common themes. After 18 months of practice at answering this question, I think I'm …

Continue reading »

Written by Lorna Jane - - Aggregated on Tuesday January 30, 2018


Script for Migrating Related Posts in WordPress

I couldn't find the script I needed to migrate my existing related-post data to a new plugin so I fiddled about and wrote a rather hacky one. I thought I'd share it in case someone else needed it! Time for a new plugin This blog has nearly a thousand posts, and apparently 800+ pieces of related-post data. I find …

Continue reading »

Written by Lorna Jane - - Aggregated on Monday January 29, 2018


Copying CouchDB Data Between Laptops

I'm a regular and happy user of Apache CouchDB , so much so in fact that I'm writing a library to talk to it from PHP. While working on tweaking a feature, I realised that the laptop I use for development didn't have the right/enough data on it to test this particular thing - but that I had a suitable database on …

Continue reading »

Written by Lorna Jane - - Aggregated on Tuesday January 2, 2018


Slack Enterprise Grid and BotKit

I have the pleasure of using Slack Enterprise Grid on a daily basis as IBM has adopted it internally, I work there, and there are far too many of us to use a single slack instance. The main downside of Slack Enterprise Grid (apart from having about 15 slack organisations running in your client all the time) is that …

Continue reading »

Written by Lorna Jane - - Aggregated on Wednesday December 6, 2017


Login and Switch Spaces With Bluemix CLI

After answering a bunch of questions about the Bluemix CLI tool for IBM Cloud, I thought I'd share my personal cheatsheet in case it helps anyone looking for examples! Background: This relates to the Bluemix CLI for IBM Cloud (which was once called Bluemix, hence the tool name). IBM Cloud is a pretty powerful …

Continue reading »

Written by Lorna Jane - - Aggregated on Tuesday November 28, 2017


Testing API calls in PHP with Guzzle Mocks

I'm working on a CouchDB library for PHP, and so I needed to write some tests for it. CouchDB has an HTTP API so I'm basically making web requests and while I could certainly set up a test database and run full-on integration tests, there are a few limitations with that approach. Firstly: it means I'm testing the …

Continue reading »

Written by Lorna Jane - - Aggregated on Tuesday November 21, 2017


Live Demo: Risks and Rewards

I'm not a huge fan of the live demo in conference talks - it's really hard to do well so I see a very large number of bad ones. Also, it's super hard work to include them in my own talks in a meaningful way because they are so difficult to pull off. I could write a very long list of reasons not to ever live demo …

Continue reading »

Written by Lorna Jane - - Aggregated on Friday November 17, 2017


Connecting PHP to MySQL on Bluemix

Most of the PHP I write runs on Bluemix - it's IBM self-service cloud, and since I work there, they pay for my accounts :) There are a bunch of databases you can use there, mostly open source offerings, and of course with PHP I like to use MySQL. Someone asked me for my connection code since it's a bit tricky to …

Continue reading »

Written by Lorna Jane - - Aggregated on Wednesday August 23, 2017


Handling Incoming Webhooks in PHP

An increasing number of applications now offer webhooks as an integration, often in addition to an API. The classic example, familiar to most developers, is the GitHub webhooks which can notify your other systems such as CI tooling that a new commit has been added to a branch. If you imagine how many repositories …

Continue reading »

Written by Lorna Jane - - Aggregated on Monday July 24, 2017


HTTP Tools Roundup

At a conference a few days ago, I put up a slide with a few of my favourite tools on it. I got some brilliant additional recommendations in return from twitter so I thought I'd collect them all in one place in case anyone is interested - all these tools are excellent for anyone working APIs (so that's everyone!). …

Continue reading »

Written by Lorna Jane - - Aggregated on Monday July 3, 2017


Deploying OpenWhisk Actions With Dependencies

I mostly use OpenWhisk with NodeJS (which is lucky for me, it's the best supported of the languages and default for the documentation examples!) and while there are a bunch of npm modules already installed on OpenWhisk, sometimes there will be others that you also want to include. Alternatively or additionally, you …

Continue reading »

Written by Lorna Jane - - Aggregated on Thursday June 29, 2017


Building Conversations With Alexa

Having an Amazon Echo Dot in my office is quite fun, and I've accidentally started writing more skills and giving a few talks about building skills for the Alexa toolchain. Today I created a skill that uses multiple steps to make a conversation and thought I'd better write down what I did so I'd be able to remember! …

Continue reading »

Written by Lorna Jane - - Aggregated on Monday June 26, 2017


Package Parameters in OpenWhisk

I love OpenWhisk but I struggled a little to get the parameters attached in a sane way for a while so I am capturing my notes here for future reference! Parameters can be attached to actions or packages; I tend to break my actions down really small and pass data into them, while preferring to set parameters on the …

Continue reading »

Written by Lorna Jane - - Aggregated on Thursday May 18, 2017


Where was that GitHub Discussion?

Did GitHub change their activity feed? Or am I getting more confused now I contribute to so many different projects that I'm not a maintainer of? Either way, I struggle sometimes to find the pull request or issue that I had a discussion on to revisit or continue that discussion (yes, I get email notifications - and …

Continue reading »

Written by Lorna Jane - - Aggregated on Wednesday April 19, 2017


Multiple Search Keys in CouchDB

I work quite a bit with CouchDB (Cloudant, a hosted CouchDB solution, is part of Bluemix, IBM's cloud platform - and I work for IBM so I get to use this as much as I like) and today I found a feature I hadn't seen before. I struggled to find the docs, so I thought I'd post my working example here in case anyone else …

Continue reading »

Written by Lorna Jane - - Aggregated on Tuesday March 21, 2017


One OpenWhisk Action Calls Another

Working with openwhisk, it's easy to create many isolated actions and build them up into sequences; the output of one action is passed to the next action in the sequence. In my case, I wanted one action to spawn potentially many other actions. I had to look up how to do it and here it is so I can look it up more …

Continue reading »

Written by Lorna Jane - - Aggregated on Friday February 24, 2017


Alexa Project Name Generator on OpenWhisk

I'm having lots of fun with my Amazon echo and echo dots, creating skills for them. Initially I used Amazon's lambda platform since that's a very easy way to get started - but I'm an advocate for IBM and was looking for an excuse to play with OpenWhisk (an open source serverless offering that Bluemix has a hosted …

Continue reading »

Written by Lorna Jane - - Aggregated on Wednesday February 22, 2017