Adventures in software engineering

About me

Code Katas

A code kata is a small programming challenge aimed at improving your programming and problem solving skills. The idea is you regularly spend 15 to 30 minutes solving a small problem.

Continue Reading

Code smells in PHP - Boolean parameters

This isn’t one of the most common code smells you’ll hear of, but I certainly think it deserves to be on the list. To me, boolean parameters in functions and methods generally indicate that the function in question has a split inside where the code can go one of two ways, often doing more than one thing!

Continue Reading

Code smells in PHP - Don't repeat yourself

Code smells allow us to spot traits in our code that may not stop it doing its job, but may indicate deeper rooted problems with the design of the code. I like the concept of code smells because it gives me a simple list of tells I can easily spot in my code which help improve the maintanability of that code. In this series we’ll go through some common code smells, why they’re bad, how to spot them and how to remove them from the codebase.

Continue Reading

Include a composer package as a git repository

Sometimes, you want to see how a composer package affects the including project as you make changes. But making changes to the package, committing, pushing and then pulling down the updated package can be a painful process. Luckily, composer allows us to specify that we’d like to pull down the full repository for specific packages. We are then able to modify this repo and see our changes instantly before committing anything.

Continue Reading