Author Archives: Coach J

Doctrine ORM Repository Unit Tests

Last time, in the Doctrine ORM Repository Hydration article, we discussed how to use the Doctrine ORM to separate our SQL code into a repository layer. This enabled us to pass a strongly typed DTO to the UI layer as opposed to stringly-typed arrays.

This article will be focused on designing phpunit tests for the previous article. We will focus our efforts on these four repository implementations:

Continue reading

Doctrine ORM Repository Hydration

With most web applications, there comes a time when your administrative users need reports. These statistics go beyond the typical domain entities and properties that you deal with day-to-day. They consist of aggregate functions (i.e. SUM and MAX) that return numeric scalar values. Lets look at a common MVC solution to expose this data in PHP, and explore how we might refactor that code into something that is maintainable. Our goal is to find the highest quality code that is simple and easy to test.

Continue reading

Redis Sessions in PHP with Kohana

Writing software that scales with little effort can be a daunting task. The days of “throw hardware at the problem” are here, and managing a web farm with dozens of servers is a real problem for PHP developers. When moving from one to many web servers, the first task is managing PHP session consistency. We will discuss how to accomplish this using the Redis PHP Session Save Handler.

Continue reading

Intro to Vagrant with Kohana and Zen Kommerce

If you work in web development you most likely have suffered through the pains of building your dev environment on more than one occasion. The chances of having dependency problems grow with the size of your team making it difficult to be productive. This is especially true for open source projects when lowering the barrier to entry can net you more contributors. In this post I will walk you through our development environment for Zen Kommerce, an open source e-commerce platform, built in the PHP Kohana framework.

Continue reading

Volleyball Player Efficiency Rating, Part 3: Calculations

The following tables are examples of how to record the performance stats into a spreadsheet. The hyphen represents a separation between sets. This is not required and can be omitted, but it does tend to help with data entry. It can also be helpful for extending this spreadsheet at a future date to drill down into individual set statistics.

Continue reading

Volleyball Player Efficiency Rating, Part 2: Our System


The system we use at Concordia University Texas is based closely on Jim Coleman’s research and the computer system created by Rod Schall. We rate passing and digs on a (0-3) point scale to make the objective recording much easier. During pass and dig calculations the stats are adjusted to the (0-4) point scale by changing the 3’s to 4’s and the 2’s to 3’s… thus removing all 2’s. This is done to balance all skills on a 4 point scale and to enable the composite PER statistic to be valid. This is our rating system:

Continue reading

Volleyball Player Efficiency Rating, Part 1: Introduction

Statistics: a formal science that applies numerical data to a group of individuals or experiments. Volleyball, like many other sports, has a severe disconnect between media stats and the actual performance level of the players in the game. As coaches we must find a way to bridge this gap if we want to effectively measure our players skills and help them stay focused to achieve their goals. Box scores alone will not give you the empirical information you need to measure the output from your players.

Continue reading