Why We Love Open Source Software
While working on a blog post for the Recess PHP Framework yesterday, the next in a series of tutorials on lambdas, closures, and anonymous functions in PHP 5.3, I happened across a peculiarity in PHP. An unexpected inconsistency in the language. (For the curious, and PHP familiar, the problem is that in 5.3 you can't directly invoke lambdas that are properties of a class, they can only be invoked as a local variable or with a dynamic dispatch function like call_user_func.)
PHP is a web programming language that we use at New Media Campaigns behind the scenes of our content management system for designers. After encountering this inconsistency in the language I was unnerved: it has major implications and limitations in how we could use PHP to achieve flexibility in our own software. With this inconsistency our programs would have to use extra code to work around it. This extra work-around code means slower software. With the work day on the verge of expiring, I decided to make an evening of trying to "fix" this inconsitency in PHP myself.
PHP is open source software meaning you can freely download the source code that makes up PHP, read it, tweak it, rewrite it, compile it, and use it without questions asked. This contrasts technology like Microsoft's .Net stack where the source code is completely closed and available only to Microsoft employees. We use PHP and other open source technologies like Linux (operating system software), Apache (web server software), MySQL (database software), and many others. Open source software is free to use and, here at New Media Campaigns, is a big part of what allows us to cost-efficiently launch websites for clients on our flexible CMS while continuing to grow. Unlike many web development firms, we don't have to pay software companies like Microsoft and Oracle major licensing costs and these savings are passed on to our clients. We don't just enjoy using open source software, we love creating it and contributing back to the community, too. Our PHP framework, Recess, is freely available, open source, and used by other web developers scattered across the globe to create powerful, modern web applications.
Now, to get to the bottom of this inconsitency in PHP. Hunting down where it was occurring in the wealth of C source code underneath PHP was the first challenge. It was a lot like trying to find a particular electrical wire in the back corner of a house's crawl space. You've been living in this house long enough to know roughly how things should work, but once you're down there it is dark, disorienting, and unfamiliar. Finding the wire that was out-of-wack only took a little crawling around. Upon finding it, though, the realization was that the electrician who wired the house used some pretty advanced and foreign techniques. Rather than giving up I crawled around to some of the other wires in the source code to see if I could glean how the relevant components of the system worked. Bit by bit it slowly came together in my mind. Once the clock struck 3am I realized it was time to stop tinkering, get out of the crawl space, and crawl into bed.
Last night I fell asleep completely enamored with open-source software. Sure, I haven't fixed the problem, yet. I'm not 100% convinced I'll manage to, but I'm eager to get back on the hunt this weekend. I've got leads! It is not often you need to get down and dirty in software's crawl space, but knowing you can is incredibly fun and powerful. Diving into someone else's source code has all the thrills of solving a big puzzle combined with the joys of learning loads of new stuff. Stay tuned to this blog as the PHP murder mystery case continues to unravel...