Recap: In an effort to change the coding world for the better, make new friends and drink so much amazing free Truth coffee that I could see through time, I presented a workshop on Improving Code with PHPUnit and TDD at WordCamp Cape Town 2018. As the caffeine hasn't yet left my system, and because … Continue reading Improving your Code with PHPUnit and Test Driven Development: Part 2
Last week I had the pleasure of attending WordCamp Cape Town 2018 and hosting a workshop on PHPUnit and Test Driven Development. I find reviewing slides from talks to be too abstract to be of much help (unless you're reviewing slides in a panic a week before you are due to present and need to … Continue reading Improving your Code with PHPUnit and Test Driven Development: Part 1
I am currently involved in a project that utilises the WordPress REST API. As a follower of the principles of Test Driven Development (TDD) the project comes complete with extensive unit and integration tests that were all written prior to even conceptualising any code. Some times. As an aside, I'd place my current level of … Continue reading Writing Tests for a Class that Uses the ArrayAccess Interface
I recently took on a small site for an amazingly talented motion graphics designer. Mainly because her work is so good that I could put it on a plain HTML page with no CSS and it would still look amazing, but also so I could dip my toes back into frontend development again and attempt … Continue reading Pillage and Plunder: Letting Vimeo Build Your WordPress Posts For You
About a 18 months ago I decided not to be the kind of programmer who sits on his backside all day getting frustrated and angry at code not working properly, and never exercising. I had long ago stopped going for coffee at the gym regularly enough to retain the gym membership that comes with my … Continue reading Musings of a Long Distance Runner: What is Immutable?
Having established how to create mock methods with stubs that run multiple times, I was pretty certain that I had finally slain the unit testing dragon, was king of the PHPUnit castle and a lifetime of finely tested code and buxom wenches awaited me (because buxom wenches go weak at the knees for well tested … Continue reading Rock Out With Your Mock Out: Using the PHPUnit at() Method
After bearing my soul regarding my battles with SSH keys, Bitbucket and GIT, I was pleasantly surprised to receive a comment on the post. My initial pleasure was in realising that someone actually read the thing (presumably to the end in order to reach the comments section), so I was overjoyed when I realised I … Continue reading Solve All Life’s Problems With Automation
Ok so the title is a little dramatic, but I had just run the same provisioning script multiple times only to have it fail when trying to clone a Bitbucket GIT repository. Luckily I resolved everything, which is why I am here chirpily regaling you with my story instead of picking up bits of smashed … Continue reading SSH Keys, Bitbucket and SourceTree on MAC – A Ménage à Trois of Misery
Another day, another PHPUnit revelation. Yesterday some code started returning an internal server error. In true developer fashion, I ran the same process several times and was absolutely staggered to find that the same thing happened every time. No amount of hard refreshing or cache clearing would help. I considered phoning the server hosting company … Continue reading PHPUnit stubs methods that run more than once.
My rule-of-thumb approach to issues in terminal is to kill the process, quit terminal and restart my MAC. If that fails, I call an exorcist and retire to a safe distance and assume the recovery position. Recently I've occasionally been getting the following error when running "vagrant up": vagrant /opt/vagrant/embedded/gems/gems/vagrant-1.9.2/lib/vagrant/util/safe_chdir.rb:25:in `chdir': Too many open files … Continue reading Vagrant Too many open files – getcwd