When it comes to debate, “to TDD or not to TDD” is right up there with “rent vs. buy”, “Batman vs. Superman” and “Chocolate vs. Vanilla”. Like the other debates, there is only one right answer to this question: It depends on the situation. The amount of Test Driven Development (TDD) to practice works best when […]
Code Odour: Using Both a List and Set Instead of Just a Dict
I came across something like the following code recently and ended up refactoring it to make it much simpler. Let’s take a look at what the original developer was trying to do. In the first statement, a new list of dictionaries is being created and stored in the result variable. Then an empty set is […]
Tips for Working Effectively as a Remote Developer
Communication, not programming ability, is the most important thing that will make you stand out as a great developer as opposed to just a good developer. If you can’t understand others or communicate well, it doesn’t matter how well you program because you’ll most likely end up doing the wrong things. As a remote developer, […]
What Living Abroad Taught Me About Software Development
Living abroad is one of those experiences that tough to communicate to someone who hasn’t experienced it. It’s like explaining colours to a blind man. Only someone who can see the colour will really understand. I had always wanted to go abroad when I was younger. In University I joined the student organization AIESEC which […]
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 […]
How to use Zend Framework’s ResultSet class with Yii Framework
Note: This post refers to Yii Framework version 1.1.11 and Zend Framework version 2.0.0 I’ve been working with the Yii Framework for about six months now. While it’s decently designed there are a few points that bother me about it. My favourite PHP framework that I’ve worked with is Zend Framework so this post is […]
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, […]