If you’re not using Swagger (or OpenAPI) yet to document your APIs, you should start. It’s pretty simple to get started - especially in PHP. I recommend using the swagger-php package - it’s pretty easy. Just use annotations, and then generate the Swagger definition when you’re done. (more…)
All entries of my technical and business blog.
Startups - take note: Sometimes More Features Aren't Better
The real reason we’re not successful or getting a bunch of sales, is because we’re missing feature X, Y and Z! Add them immediately! (more…)
Get Better at Logging
Have you ever submitted a debug log for a piece of desktop software? I’m always enthralled at the sheer amount of information that is included in some of these error reports. It reminds me that I don’t do enough logging. As a matter of fact, I think most PHP developers don’t do enough logging. (more…)
Google Street View Animation
Today, while trying to think of a clever way to create a “hire Aaron” page (yup, resume is right here), I came up with an idea to animate a Google Street View page. My initial goal was to animate a rotation and some travel down a road, but I’ve been unable to find a more seamless way of doing the horizontal travel. It looks like there is just going to be jumps in their photography... (more…)
How to Use the Same Method for Add/Update in a Doctrine App
I’m a huge fan of the service architecture paradigm - and that means that I use services in my controllers to handle persistence. I wanted to abstract the add and update methods from my services and put them into an abstract class. In addition, I didn’t want to have to specify the exact method - I just wanted to call save on the entity. Finally, I wanted to log it properly and verbosely. (more…)
Using Your Namespace for Optimum Readability
I love namespaces in PHP as much as the next programmer - but there’s always been something about namespaces in my own applications that bothered me. And that’s when I have similar or identical named services, forms, entities or models. (more…)
Doctrine Database Connection Fails in Gearman Worker
One of the things that was really bothering me when I first started using Gearman was my consistently failing doctrine database connection. (more…)
Reduce Vagrant code duplication by using functions
I use Vagrant for most of my server management. One thing I noticed is that my Vagrantfile can get pretty large - especially if I have multiple environments that share the same configuration. (more…)
PHP Templating Languages Indicate a Problem Elsewhere
I can’t help but think a lot of PHP applications have a problem. These beautifully crafted, object oriented, highly engineered applications are still making one vital mistake. And that’s using one of the various templating libraries or languages that PHP has. (more…)
Short-hand PHP Dotenv instantiation
I’m a big fan of PHP DotEnv for creating my environment variables for my scripts. (It’s always a good thing to keep your passwords and credentials separate from your source code, according to OWASP). (more…)