PHPNews

Kitchen Island Project

We built our first "big" project (well, since the play kitchen a few years ago) since moving to this house nearly a year ago: a new kitchen island! I used to blog a lot about the house and crafts and things, then I got better known for code things and got stagefright and stopped ... but I love this stuff and I'll …

Continue reading »

Written by Lorna Jane - - Aggregated on Saturday July 14, 2018


Presenting from PDF

I've been using PDF as a file format for presentations for the last ~8 years and I LOVE it. The clue is in the name: Portable Document Format: it's an open standard, and works everywhere. You can embed your fonts, images, whatever ... if you end up presenting it from another machine for some reason, everything is …

Continue reading »

Written by Lorna Jane - - Aggregated on Monday July 9, 2018


Bind Services to OpenWhisk Packages

When working with serverless actions, often we'll still need to access some sort of service, whether it's object storage, a database, or whatever. Here's a quick overview of how this works for IBM Cloud Functions (plus some gotchas ....) For this example, I'll be connecting my NodeJS example code to a PostgreSQL …

Continue reading »

Written by Lorna Jane - - Aggregated on Thursday May 31, 2018


Relative Links with IBM Cloud API Gateway

I work quite a bit with serverless tech, particularly on IBM Cloud since I work there. At the moment I'm building a microservice using web actions . When a user creates data with a POST request, I want to redirect them to the URL of the new thing they created - but for that I need to know the URL that it was …

Continue reading »

Written by Lorna Jane - - Aggregated on Tuesday May 22, 2018


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