-
From MySQL to MailChimp via CSV
13 November 2012
Read moreDon'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:
-
Teaching Those Beginning The Journey
09 November 2012
Read moreBecoming 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.
-
A Little More OOP in PHP
31 October 2012
Read moreThis 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.
-
PHP at FOSDEM: Call for Papers
30 October 2012
Read moreThere'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 …
-
Ada Lovelace Day 2012: Estelle Weyl
15 October 2012
Read moreHappy 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 …
-
Introduction to PHP OOP
15 October 2012
Read moreThis 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.
-
Confident Coding: San Francisco
11 October 2012
Read moreWhile 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 …
-
PHPNW Tutorial Day
09 October 2012
Read moreI've spent the last few days at PHPNW - it was amazing and inspiring and incredibly sociable from beginning to end but I wanted to share some thoughts about tutorial day in particular. For context, I delivered a full-day tutorial at PHPNW this year, entitled "PHP Tools", containing the following topics:
git
apache virtual hosts
api documentation
static analysis tools
profiling with xhprof
deployment with phing
Somewhere along the line my attendees were unexpectedly efficient (or I was impatient) and we ended up ahead of my planned schedule, so I asked if anyone had any questions to fill the final hour or so.
-
Git Cheat Sheet
26 September 2012
Read moreToday I thought I'd share my "cheat sheet" for git - the commands that I use on a day-to-day basis. I've used entirely the command line tools, since those are the same on every platform. GUI tools and IDE plugins are available for git so it is worth taking a look at what is available for the development environment you use.
-
Github API Access Tokens via Curl
25 September 2012
Read moreI'm working on some demos for a tutorial I'm giving next month and since I'd like to show off Github's API, I needed an access token for it. They have the usual web flow but I'm cutting as many corners as I can to keep the demos nice and quick, so I looked into the support Github has for generating an API key programmatically.
-
API Documentation with IODocs
18 September 2012
Read moreI write a lot of APIs, and I also preach that your API isn't finished until it has excellent documentation. Which is great, but that means I therefore have to lead by example and document my APIs :) Enter iodocs from the talented folk at Mashery.
Iodocs is a node.js application (which is fun for a PHP developer. Most developers write a bit of JS, but this one hasn't). You describe your API and all its methods in JSON, and then iodocs presents an interface for you to enter API keys, add parameters to each request and press the "try it!" button. This makes your API call and shows you the results on screen, which seems like a great way to demonstrate what all the various parameters do!
-
Do Open Source with Git and Github
06 September 2012
Read moreThis article originally appeared in the May 2012 php|architect magazine.
Often I find absolutely competent programmers, who aren't involved in open source, either because they don't know how to approach a project, or because they just aren't sure how the process even works. In this article we'll look at one example, the conference feedback site joind.in, and how you can use GitHub to start contributing code to this project. Since so many projects are hosted on github, this will help you get started with other projects, too.
