Blog Posts
The Ideas of March
Chris Shiflett has asked the question, why don't people blog anymore? In this age of real-time streams and dead-simple status updates, blogs often feel like the uncared-for step-child or a website; indeed, many folks are trading their blogs for pages that simply track their various lifestreams (tweets, facebook status, flickr images, and more).
While this sort of thing is trendy and interesting, it also sucks:
Git Subtree Merging Guide
I've been investigating ways to incorporate third-party repositories and
libraries into my Git projects. Subversion's
svn:externals
capabilities are one compelling feature for that particular
VCS, and few, if any, other VCS systems, particularly the DVCS systems, have a
truly viable equivalent. Git submodules
aren't terrible, but they assume you
want the entire repository — whereas SVN allows you to cherry-pick
subdirectories if desired.
Why might I want to link only a subdirectory? Consider a project with this structure:
docs/
api/
manual/
html/
module_specs/
library/
Foo/
ComponentA/
ComponentB/
tests/
Foo/
ComponentA/
ComponentB/
On another project, I want to use ComponentB. With svn:externals
, this is easy:
library/Foo/ComponentB http://repohost/svn/trunk/library/Foo/ComponentB
and now the directory is added and tracked.
With Git, it's a different story. One solution I've found is using
git-subtree, an extension to Git. It
takes a bit more effort to setup than svn:externals
, but offers the benefits
of easily freezing on a specific commit, and squashing all changes into a
single commit.
Jon Whitcraft recently had some questions about how to use it, and I answered him via email. Evidently what I gave him worked for him, as he then requested if he could post my guide — which you can find here.
PHP Community Conference
Last year, a new conference launched, Brooklyn Beta. The buzz I heard about it from attendees was amazing; words like "inspiring," "intimate," and "energizing" were all used to describe the experience. I found myself wishing I'd made time in my schedule to attend.
Fast forward a few months, and a new conference has been announced, the PHP Community Conference. It has similar goals to Brooklyn Beta: create a conference where we can talk about the language we love so passionately.
How to Contribute to ZF2
ZF2 development is ramping up. We've been at it for some time now, but mostly taking care of infrastructure: converting to namespaces, re-working our exception strategy, improving our test suites, and improving our autoloading and plugin loading strategies to be more performant and flexible. Today, we're actively working on the MVC milestone, which we expect to be one of the last major pieces necessary for developers to start developing on top of ZF2.
A question I receive often is: "How can I contribute to ZF2?"
Consider this your guide.
Why PHP Namespaces Matter
You've heard about PHP namespaces by now. Most likely, you've heard about — and likely participated in — the bikeshedding surrounding the selection of the namespace separator.
Regardless of your thoughts on the namespace separator, or how namespaces may or may not work in other languages, I submit to you several reasons for why I think namespaces in PHP are a positive addition to the language.
Taming SplPriorityQueue
SplPriorityQueue is a fantastic new feature of PHP 5.3. However, in trying to utilize it in a few projects recently, I've run into some behavior that's (a) non-intuitive, and (b) in some cases at least, undesired. In this post, I'll present my solutions.
Aspects, Filters, and Signals, Oh, My!
Last month, during PHP Advent, gwoo wrote an interesting post on Aspect-Oriented Design, or Aspect Oriented Programming (AOP) as it is more commonly known. The article got me to thinking, and revisiting what I know about AOP, Intercepting Filters, and Signal Slots -- in particular, what use cases I see for them, what the state of current PHP offerings are, and where the future may lie.
But first, some background is probably in order, as this is a jargon-heavy post.
Making Zend Server Available Via SSL Only
In light of the recent remote PHP exploit, I decided to update a couple servers I manage to ensure they weren't vulnerable. In each case, I had been using hand-compiled PHP builds, but decided that I'm simply too busy lately to be trying to maintain updates — so I decided to install Zend Server. I've been using Zend Server CE on my laptop since before even any initial private betas, and have been pretty happy with it — I only compile now when I need to test specific PHP versions.
One thing I've never been happy about, however, is that by default Zend Server exposes its administration GUI via both HTTP and HTTPS. Considering that the password gives you access to a lot of sensitive configuration, I want it to be encrypted.
Simple Interfaces and Micro MVCs
My job is great: I get to play with technology and code most days. My job is also hard: how does one balance both functionality and usability in programming interfaces?
I've been working, with Ralph Schindler, on a set of proposals around the Zend Framework 2.0 MVC layer, specifically the "C", or "Controller" portion of the triad. There are a ton of requirements we're trying to juggle, from making the code approachable to newcomers all the way to making the code as extensible as possible for the radical performance tuning developers out there.
Vim Toolbox, 2010 Edition
I've been using Vim for close to a decade. I've often said that "Unix is my IDE" — because Vim is built in the Unix philosophy, allowing me to pipe input into it, out of it, and every which way I want. It fits very nicely with the Unix philosophy of doing one task well, and allowing redirection. I've found it ideal for web development in general and PHP development specifically — in fact, I've had excellent experiences in every language I've tried my hand at developing in when using Vim.
Vim is also my chosen productivity suite. When I want to write a document, I don't go into OO.o Writer or MS Word or some other word processor; I open up a window and start typing. In most cases, I can either cut and paste my work into other tools, or pipe it to transformation tools. I worry about the content first, and the presentation later… like any good MVC application. ;-)
Like any good tool, you have to invest time in it in order to reap its benefits. My learning has, to date, fallen into three time periods:
- The initial months in which I first learned Vim, via vimtutor and Steve Oualline's Vim book.
- A period in 2006-2007 when I felt the need to make my coding more efficient, and first started playing with exuberant-ctags and omni-completion.
- The last quarter of 2010 (yes, that's now) when I was introduced to a number of new tools via Twitter.
So, this is my Vim Toolbox, 2010 edition.