Writing Acceptance Tests in Third Person

When I was learning to write acceptance tests with Cucumber everything started with “I”. It made sense because you were driving a browser to click buttons and fill in forms and that’s what “you” did. However, I recently realized this doesn’t work when writing tests that require multiple users to interact with the same test. […]

Continue Reading

Using RFQuiltLayout with RubyMotion and RMQ

RFQuiltLayout extends UICollectionViewLayout to squeeze multiple different size boxes onto the screen. It’s the equivalent of Masonry for iOS collection view cells. The RFQuiltLayout example uses Interface Builder for most of the setup, which was a challenge to map into code. I’m going to show you everything needed to change the default collection view layout […]

Continue Reading

Getting Started with Backbone.js

I’ve been learning Backbone.js and wanted to make a video that might help others that are in the process of learning it too. You can watch the video here on YouTube http://youtu.be/ig-zWy0moAw Table of Contents Introduction: 0:00 What we’re working on: 1:55 Making it work with vanilla jQuery: 3:30 How to think of Backbone Views: […]

Continue Reading

Doing More with WordPress

This is a screencast I recorded that shows a couple of ways to get more out of WordPress. I got the idea from this question on Stack Overflow and decided to make a video explaining the building process.

Continue Reading

PHP+Capistrano+Shared Host = Easy Deployments

I wrote a Rails app that was deployed with Capistrano and I loved it. Every time I made a change, one file or a dozen, I could get all the files up in a single command. In addition, if anything was broken I could revert to the previous deploy with cap deploy:rollback. While using Capistrano […]

Continue Reading

Using Ransack with HABTM

If you’re unfamiliar with Ransack, it’s basically an advanced search form generator for Rails. It allows you to add fields to the form for things like category_id_eq and title_cont and it will “magically” query the database. The only real problem with Ransack is the lack of documentation. Almost every time I had a problem I […]

Continue Reading

Add Flash Messages to Your Site

Flash messages are often used to give feedback to the user when an action has taken place. Such as, when they have logged in or tried to access a page without permission. How it Works Flash messages are set in $_SESSION[‘flash_messages’]. At the beginning of every page request we store them in a variable and […]

Continue Reading

The Basics of Creating a CMS with PHP

When people want to build a website for someone, they usually need to create a Content Management System (CMS) that allows the client to manage their own content. And while there are thousands of prebuilt CMSes that can get the job done, it can be very helpful to learn how to build one yourself. What […]

Continue Reading

Creating a cycle() function in PHP

I love using the cycle helper in Rails and I’ve always wished PHP had something similar. But every time I created one I ran into the same problem every time. How do I use multiple cycle calls in a single loop? I happened to look at Rails’ source code and noticed it allowed a specific […]

Continue Reading

Rails `link_to_with_notification` Helper Method

In with my last post on creating a notification badge I showed the HTML and CSS markup. But I forgot that even when the notification count was at zero it still showed the badge. The Problem Because was using a Rails app I wanted to continue using the link_to helper method. The Solution I created […]

Continue Reading