Senior Software Engineer

Optimizing the realpath_cache

Better PHP performance by optimizing realpath_cache! System calls are big performance hits on an OS. Systems calls typically lead to context switches in which the CPU state is saved and retrieved during which kernal code in the CPU pipeline. Anyways, filesystem access definitely uses system calls in an OS. PHP does that a lot especially during include, require, include_one and require_once. Anytime a file is accessed PHP will issue a realpath call.

HTML Signatures in Apple Mail

Short, concise and good looking HTML email signatures! Though there are quite a few of email applications for the Mac OSX none of them combine all the email accounts into one. I mean they don’t work with my work email while working with my personal and schools emails or vice versa. The only one that does is Apple Mail. The email signature feature in Apple Mail is very limited and this post is a way to work around that.

Linux PHP Daemon

Better than a crontab! Many a time have my development team needed to “cronify” a PHP script for completing business logic quietly behind the scenes. Once the command-line (CLI) version of the application was complete they would start creating and managing a crontab. This practice is NO MORE for my development teams! Enter a better way of “cronifying” or better stated “daemonizing” a PHP CLI application. I have created a sample of “daemonizing” a PHP CLI application at https://github.

Service Locator vs. Dependency Injection Container

I am NOT as crazy as I thought! Over the last few years of learning to incorporate Java-like patterns into my PHP development practices one area seemed to drive me crazy, almost to the point of second guessing myself about dependency injection altogether. Years ago I learned from Misko Hevery from Google that a service locator is really just global state or a bad singleton in sheep’s clothing. He states that a service locator violates the Law of Demeter and calls singletons are pathological liars.

Personal CDN for Free

Use Google Apps for a free personal CDN: So with some personal branding on a few websites it became apparent that my life would be much simpler if I had a personal CDN to store and share common files. After a little bit of research some CDN providers it became obvious that there are not many simple or FREE personal CDN solutions out there. So I googled “personal cdn” and the first link was magical!