Scaling WordPress @ #wpldn

Last night I did a short presentation on Scaling WordPress using as an example giving an overview of the solutions we use for different scaling issues as well as highlighting some solutions that you can try out on smaller sites:

My ethos for sharing code

A recent discussion around the way we write and share small helper scripts inside Automattic made me think a lot about why I do things the way I do and why I am against “authorship attribution” in shared code.

The views I have are strong and I think a good guiding principle for working collaboratively with your peers especially in Open Source projects:

I am very strongly against authorship attribution – it puts up a barrier to contribution by setting a subconscious ownership barrier around things.

I give you my code to do as you wish, I mold your code to do as I wish, I blame early and often when searching for bugs, and I expect you to have forgotten you wrote the tool I’m asking you about especially if you committed it yesterday!

What is your ethos and what do you think of mine?

Understanding complex RegEx

I’ve been wondering for a while if there was a good way of reverse engineering the meaning/function from a complex Regular Expression pattern such as the one used in the make_clickable function in WordPress.  This morning while debugging an issue with this function causing occasional segfaults in php I started searching around for a suitable tool and found YAPE::Regex::Explain to be the only reasonable solution.

Continue reading “Understanding complex RegEx”