Logan Bailey

Adventures In Web Development

Blog, About, GitHub, and LinkedIn

Auto Dependency Resolution for IOC

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.

Horizontal Code Reuse Through Traits

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.

An alternative to confirmation email links

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.

Custom Date Formatting in Ruby on Rails

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.

Setup Double Foreign Keys

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.

How to Build Forums in Rails 3

October 20th, 2010
A short tutorial for rails 3, which covers the development of a forum. This tutorial requires little to no rails experience.

How to Setup AuthLogic In Rails 3

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.

The Short Comings of Sphinx GEO Search

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.