• craft
  • house
  • php
  • random
  • recipes
  • tech
  • work
29 Nov
2012

Managing PHP 5.4 Extensions on Ubuntu

My shiny new VPS* runs Ubuntu 12.10 (official subtitle: Quantal Queztal. Local nickname: Quirky Kestrel) and therefore has PHP 5.4 installed. It's very new so every command I type is missing, and today I realised that included a PECL module (pecl_http, of course). So I aptitude install php5-pear and then get tangled in dev packages (clue: look which libcurl you have already installed to figure out which of a long list of -dev packages to choose), managing finally to emerge with a pecl install http that completes successfully with the words:

configuration option "php_ini" is not set to php.ini location
You should add "extension=http.so" to php.ini

I've been using Ubuntu for some time however, and we don't put settings straight into php.ini, there's a directory called /etc/php5/conf.d/ where all the various module configurations live, or you can enable things just for when PHP is called by apache or from the CLI. However today I hopped into /etc/php5/ and saw this:

.
├── apache2
├── cli
├── conf.d
└── mods-available

Hmmm ... mods-available ? Continue reading

Posted in php | Leave a reply
26 Nov
2012

Unpacking and Editing a Chrome Extension

I've been having an issue with one of my chrome extensions recently - the keyboard navigation extension that I blogged about previously. This is a huge problem for me because without this extension, I can't "click" on anything on the internet! It was working on some pages, but on others it was drawing elements but not styling them correctly. The extension doesn't seem to be actively maintained, so I realised I was going to have to dive into the extension itself to understand the problems and have any chance of fixing it. Hurrah for open source software (not that I really write any js but I figured if I could understand the problem, maybe I could ask more intelligent questions) Continue reading

Posted in tech | Leave a reply
13 Nov
2012

From MySQL to MailChimp via CSV

Don't you hate disclaimers? I do, but before I do anything else, I must ask that you don't use the techniques below unless you are emailing responsibly.

Today I needed to pull email addresses for people who had signed up to a thing out of MySQL and into MailChimp so that I could actually email them about the thing. MySQL actually has a very cute feature for exporting the results of an SQL query as a CSV file, which I had to look up to remember how to do it. It goes something like this: Continue reading

Posted in tech | 2 Replies
09 Nov
2012

Teaching Those Beginning The Journey

Becoming a master developer is like becoming a master craftsman; you just can't rush the process. You learn the basics, apply those skills, and over time master them and adapt them to be your own. As time goes on, you take on bigger and more complicated tasks, and apply appropriate skills to those, and so on. Our journey as developers is really much the same and yet sometimes I feel that we don't help those at the very start of the journey as much as we could. Continue reading

Posted in work | Leave a reply
31 Oct
2012

A Little More OOP in PHP

This post forms part of a series of articles about using PHP to do objected oriented programming, or OOP. They were originally published elsewhere but are no longer available at that location, so I'm reposting them here.

This post follows an earlier entry introducing the basics OOP and what that looks like in PHP. This time around we'll look at some more advanced concepts and some more practical examples of building code, covering use of constructors and how to add access modifiers in to control how calling code can operate on your objects. We'll also show off how to create static methods and properties and, perhaps more importantly, illustrate applications of these features.

Continue reading

Posted in php | 3 Replies
30 Oct
2012

PHP at FOSDEM: Call for Papers

There's an excellent open source conference that happens every year in Brussels in February, called FOSDEM. It consists of some main tracks, plus a series of sub-rooms, where various technical communities are given some space to use for whichever talks they choose; the schedules are centralised so that people can pop in and visit any talks in any room that looks interesting. This year, for the first time, this includes a "PHP and Friends" room - I'll be organising this and I'm looking for your input, please.

Basically, we need to get some great submissions, so that when we come to choose the schedule (and it is only one track, one day, there's only a few slots available), we can put together something really fitting to showcase PHP for a wider audience than a PHP conference. Selection will be done on the basis of talk topic, abstract and length in the first instance - we'll only take into account the actual speakers when we're curating the final list.

Key things you need to know:

  • link to call for papers form (google forms)
  • Event is 2nd (and 3rd, but the PHP room is on the 2nd) of February 2013, at ULB campus Solbosh in Brussels, Belgium
  • No expenses will be covered by the event
  • There's also a Call for Stands if you have a project that you would like to represent there
  • If you're not speaking, come and join us anyway!
Posted in php | 2 Replies
29 Oct
2012

Confident Coding Report

Last week I had the pleasure of speaking at Confident Coding in San Francisco. This was a one-day event for mostly front-end developers, covering the things everyone seems to know but which seem like silly questions to ask - and it has an all-female speaker lineup.
Continue reading

Posted in tech | Leave a reply
15 Oct
2012

Ada Lovelace Day 2012: Estelle Weyl

Happy Ada Lovelace day! Technically that's in about half an hour as I write this in the UK but as I'm speaking at FOWA tomorrow morning, I will post this now before I get distracted. Ada Lovelace day is a day of celebrating women in science and technology, and one of the best ways to celebrate those women is to tell their stories. Every year, many woman will tell the story of a woman who has inspired them - you can find more stories on the FindingAda site.

Posted in tech | 1 Reply
15 Oct
2012

Introduction to PHP OOP

This is the first in a series of articles about using PHP to do objected oriented programming, or OOP. They were originally published elsewhere but are no longer available at that location, so I'm reposting them here.

Since the introduction of PHP 5 in 2004, PHP has had an object model worthy of that description and became a truly modern language for use on the web. Earlier PHP scripts would have been of the kind where, to quote from Alice's Adventures, you would "Begin at the beginning, and go on till you come to the end: then stop." Nowadays that very procedural approach is less common in PHP, so this article takes a look at some of the basic object oriented features available in the language and shows some examples of using them with code examples.

Continue reading

Posted in php | 12 Replies
11 Oct
2012

Confident Coding: San Francisco

While I'm in the US in a week or so, I'll be joining a stellar lineup at Confident Coding on October 20th in San Francisco. This is a by-women, for-women event to let us get together in a safe space where there are no stupid questions, and try to cover those tricks that it seems like everyone knows, but we all had to learn sometime!

Personally I'll be speaking about git and also about SSH and things that are not FTP, and anything else I get asked about on the day. The variety of skills in the speaker lineup of this event, organised by the lovely @estellevw, is frankly imporessive and I can't wait to meet all the speakers and attendees! I'm not often in the US at all (I'm a very reluctant traveller and I'm actually there for ZendCon the week after) so this is a rare opportunity for me.

The event is open to everyone, but if you don't identify as female and you want to attend, please bring with you someone who does - and either way you can make use of my discount code! Simply buy a ticket, entering LORNA20 at the checkout for 20% off the ticket price.

Hope to see you there :)

Posted in php, tech | 2 Replies