How to Create a RESTful API using Yii Framework

This screencast uses Yii 1.1.14. You can grab the code from https://github.com/mattmccormick/screencast-yiiframework-restfulapi Hi, there. My name is Matt McCormick. Welcome to this screencast on building a RESTful API with Yii Framework. It’s my first one, so I hope you’ll enjoy it and get a lot out of it. I’ve used Yii for a couple years […]

How Much Does a Website or Web Application cost?

If you’re thinking about building a website or web app, one of the first questions that comes up is “How much will it cost?” If you don’t have a technical background, the choices can seem overwhelming to figure things out. You might approach one software developer who charges $10/hr and another who charges $200+/hr. One […]

When to Separate View Files

I was brought in to help development on a CakePHP web application recently. One of the tasks should have been relatively simple – add an option to an admin page. In a well-designed application, this task should have taken a couple hours. Instead it took a couple days because I needed to figure out just […]

Launching an Info Course part 2: MVP Style

This post is the 2nd part of a series of posts about my experience in launching an info course from scratch. Read part 1: Overcoming Doubt. One of the things that has been gaining steam on the web lately has been the rise of “drip products.” Drip products are information products but instead of being […]

Launching an Info Course part 1: Overcoming Doubt

Recently my main source of work ended and it caused me to reflect on where I want to go with my career. I’ve always been interested in entrepreneurship but have only made a few half-hearted attempts that didn’t really go anywhere. So this time, I’ve resolved to take the next 6-12 months off to just […]

Safely Change Database Columns in Yii Framework

Note: This post refers to Yii Framework version 1.1.11 Let’s say you have an existing web application that uses Yii framework. For some reason, you would like to go about changing some column names in your database tables. Recently I went through this process because some tables in our application were using title and others […]

Unit Testing URL Routes in Yii Framework

(This post refers to Yii Framework v.1.1.11) Let’s say you have a bunch of custom URL routes setup in your configuration file for Yii. Since custom URL routes can quickly become complicated due to regular expression matching, it’s a good idea to have some tests in place to make sure that your URLs are getting […]

Your Controllers need to lose weight

Most software developers have probably heard of the design principle “Fat Models, Skinny Controllers” but I constantly come across code that doesn’t follow this principle. How skinny is skinny? Properly designed controllers should not have more than a few lines of code. For most actions, if you have more than four lines in the method, […]

Forget Sunscreen….Focus

Focus. If I could offer you only one tip for the future, focus would be it. In the next 20 years, we are going to face an extreme shortage of people who are able to focus single-mindedly on what they are doing. Children growing up these days face an onslaught of distractions thanks to news […]

How to Refactor a PHP Application

The great thing about PHP is how easy it is to get started. The bad thing about PHP is how easy it is to get started. I’ve worked on a few PHP sites where the code lived up to these statements. While it is incredibly easy to get a site up and running with PHP, […]

Everybody Loves Learning

A few weeks ago, my 2.5 year old niece was over in the evening. She was running around as usual. As I sat down to read something, she watched me turn on a lamp. As soon as she saw the light come on, she came running over to see what kind of magic had just […]

Make Time for the Long Term

The biggest mistake I see with fellow colleagues are people that just focus on the immediate tasks at hand. Day after day they only work on the tasks given to them and just try to get them done. Focusing on the immediate short-term tasks all the time is a recipe for mediocrity. It also leads […]

Book Review: The Passionate Programmer

The Passionate Programmer is a book everyone in software can benefit from. For those of us working in software, there is the tendency to get complacent. After all, salaries are usually pretty good, working conditions are generally comfortable and good software developers are usually in demand. I know I’ve gone through phases in my career […]

Are you passing up opportunities?

The trouble with opportunity is that it always comes disguised as hard work. The year was 1995. I was 14 years old and recently purchased a screaming fast 14.4 Kbps modem and signed up with a local ISP to finally get graphical Internet. This was the Internet with pictures! Ah, how I remember the days […]