PHPNews

Test Web Requests with a Local RequestBin

I've been a long-time fan of RequestBin, but it's no longer active since it suffered so much bad traffic. It's never been too difficult to set up locally and when I tried to do that last week, I realised it has got even easier because it now has a docker-compose configuration. Requestbin, in case you're not …

Continue reading »

Written by Lorna Jane - - Aggregated on Friday December 14, 2018


Are you Creating, Curating or Consuming?

I've been thinking lately about my own interactions online, especially around content. There are three main ways that I work with content: creating, curating and consuming. Each has their own place but I'll start by outlining each one. Creating content is all about putting your own creations out for others to share. …

Continue reading »

Written by Lorna Jane - - Aggregated on Thursday December 6, 2018


Generating PHP library code from OpenAPI

I'm working with a bunch of OpenAPI specs now I am working for Nexmo and so far I'm loving working with API descriptions. OpenAPI is the next iteration of what used to be called "Swagger", a machine-readable way to describe your API and from that description create docs, code libraries, tests, and all sorts. Today's …

Continue reading »

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


How NOT to Review a Pull Request

Examine the diff and comment on it, a line at a time That's not very constructive, Lorna. Do you have a bit more advice for us? Since you asked so nicely, yes I do! How to Review a Pull Request First, read the description. If there isn't one, close the pull request. You might need to go looking for an …

Continue reading »

Written by Lorna Jane - - Aggregated on Monday October 22, 2018


Managing Environment Variables in PHP

Now I work with more programming languages, I start to miss features from other languages when I come "home" to PHP. One that I hadn't seen in PHP before I saw it in other languages such as NodeJS (I think Ruby had the original implementation) was: a way to easily control setting your environment variables, particular…

Continue reading »

Written by Lorna Jane - - Aggregated on Monday October 15, 2018


Make a POST Request from PHP With Guzzle

I work extensively with APIs and a variety of serverside scripting languages, and best practice does change over time. Many of the most popular posts on this blog are 10 years old, because apparently I was interesting in 2008. Two in particular from around that time relate to making POST requests from PHP ... and …

Continue reading »

Written by Lorna Jane - - Aggregated on Tuesday September 18, 2018


Muffet: quick and easy link checking

In my not-so-new job I work on Nexmo's developer portal and that means a lot of documents, a lot of links, just a lot to keep track of! One thing I worry about is changing something and breaking links from somewhere else, so I wanted to be able to check for existing links, broken links, and to include internal links …

Continue reading »

Written by Lorna Jane - - Aggregated on Wednesday September 5, 2018


Support for Speakers

I've been a conference speaker for 10 years; I've given many talks, been to many events, organised a few events, and now have Opinions (TM) about conference speaking. This tweet showed up in my feed when someone tweeted at me to thank me for my support in their talks. Advice for conf speakers: When someone you …

Continue reading »

Written by Lorna Jane - - Aggregated on Sunday August 26, 2018


Vim settings for working with YAML

Having managed to avoid YAML until quite recently, my vim installation wasn't well set up at all for working with it. It needs more config settings than plugins, so I thought I'd write down what I found helpful. I'm using it quite a lot now I'm working with OAS (used to be Swagger) API definitions. Let's start with …

Continue reading »

Written by Lorna Jane - - Aggregated on Wednesday August 15, 2018


Using Config Files with Ngrok

I'm a huge fan of Ngrok , a tool to create a secure tunnel to your laptop. It is brilliant for testing, well, anything running locally really. Someone asked me about my setup recently and I'm using a couple of config files to keep things quick and consistent, so I thought I'd share here what I shared with them. You …

Continue reading »

Written by Lorna Jane - - Aggregated on Monday August 13, 2018


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