November 7th, 2014
A quote from David West, author of Object Thinking, on object composition, which I would've disagreed with a few years ago now really resonates with me. SRP is an important principal, that while we may not apply it religiously helps to make code more maintainable.
September 12th, 2014
An easy way to inject the authenticated user, Auth::user(), into any object using the IoC container in Laravel.
September 11th, 2014
Ever wondered how Laravel determines which objects to pass into your classes. This guide explains how automatic dependency resolution works by showing you how to make a basic IoC container. This relies heavily on php reflection api.
February 22nd, 2014
Traits were added to php in version 5.4 as a way to introduce horizontal code reuse. They end up being a way to programmatically copy and paste methods into objects. Traits act as php's version of multiple inheritance.
January 23rd, 2014
array_chunk is a native php method you've probably never used before, but it probably could have saved you time on lots of occasions. Here we'll dive into a use case for array_chunk, other than batch requests to services, that will help you write cleaner code.
August 1st, 2013
A quick how to guide on redirecting all http routes to https using symfony's routes component.
September 12th, 2012
I hate confirmation links. Those emails you get, that say click here to make sure somebody actually reads this email. I propose an easier way for us as developers to verify that somebody is checking a given email address.
August 31st, 2012
Some quick links from a lightning talk I gave at sfphp's open mic night.
July 11th, 2012
It's just bad practice. Really its annoying and nobody likes having this terrible user expierence.
March 8th, 2011
When developing your rails app, you've probably run into an issue where the default string value of a date makes no sense for your application. More often than that, there are probably 2 to 3 different date formats that you routinely use. In this article, we'll cover setting up default date formats and short cuts to access thsoe formats.
February 28th, 2011
This will cover how to use Devise as your user authentication system. In previous posts I've used AuthLogic which is a good solution, I just find Devise simpler to use and implement. This will extend from my article Rails 3 Blog Tutorial. I'd highly suggest going through that tutorial, or you can run these commands.
February 20th, 2011
Every wonder how to easily roll your own blog? This series will take you through the ins and outs of writing your own blog using Ruby On Rails 3.
October 22nd, 2010
Ruby on Rails offers a couple different standardized date formats which can be really helpful. I'm personally a huge fan of :db, I hate looking it up all the time. But you may be wondering how to create a custom date format.
October 21st, 2010
This is how to create a model relationship in Ruby on Rails where one model, Message, has two foreign keys to another model, User. The sql tables are defined below, and is given the solution in Ruby and how to retrieve the values.
October 20th, 2010
A short tutorial for rails 3, which covers the development of a forum. This tutorial requires little to no rails experience.
October 6th, 2010
I was trying to figure out to setup AuthLogic in Rails 3 and ran into several issues. This is a step by step guide in setting it up.
September 24th, 2010
Drinking the Sphinx Search koolaid runs to issues with geo search. Here I explain the short comings of Sphinx Search Geo Location functionality.
September 1st, 2010
Want to prompt the user for a large amount of text for your CLI application? Using some flag and a large string on the command line is not always ideal. Fear not, it's easy to open a text editor from inside your application.
August 18th, 2010
Sphinx is a simple and easy to use full text search engine. This article will cover installation and setup of your first search index.