Test Driven Development training course notes
A couple of weeks ago Chris and I went on a TDD course from Codemanship.
»A couple of weeks ago Chris and I went on a TDD course from Codemanship.
»Last week I gave a talk at BCS Dorset about technical debt:
»This is a quick update to my original blog post criticizing mutability in PSR-7.
»In PHP, Traits can't implement interfaces. They can, however, include abstract methods. These methods then need to be implemented by the concrete class that implements the trait. This allows a trait to provide some boilerplate implementation that depends on an concrete implementation. This isn't always a good idea (it's verging on violating the Dependency Inversion Principle but it's better than a trait attempting to use a method that has no contract.
»PSR-7 contains interfaces for HTTP messages. These are like Symfony Kernel's Request and Response interfaces. Having these new interfaces would be great for the PHP community but there's a couple of issues with their current state that I'm not happy with.
»Someone posted a question about using global variables on r/php, which I answered. Copied here for posterity.
»My notes on Everzet's talk "Design how your objects talk through mocking" at PHPNW14
»Quick strace command that I use all the time to see what files a process is opening:
»I haven’t done much with Canvas, so I thought I’d experiment by making Conway’s Game of Life with a little JavaScript. Conway’s Game of Life is based on a grid of cells, which are either alive or dead. It has 4 simple rules rules:
»Bitcoin is a digital currency without any central control. It was introduced 4 years ago today (3rd January 2009). 1 Bitcoin (BTC) is currently worth around $13. Last year Bitcoin grew considerably in market cap (now about $150 million) and popularity, with many organisations accepting Bitcoin as a form of payment.
»As the first alpha of PHP 5.5 has been released, now is a great time to play with its new features. The first new feature is generators. Generators are like very simple iterators.
»Every now and then I need to batch resize or change the quality in some images. Photoshop and the GIMP let you do this, which is fine if you’re happy using your mouse or lots of RAM. The most efficient way of processing images is with ImageMagick. ImageMagick is the canonical way to do image manipulation and many GUI tools are based on it. ImageMagick is a useful tool to know and learning the basics of it will hopefully save you lots of time.
»The PHP Framework Interoperability Group (PHP-FIG) are a group representing most of the big names in the PHP world such as Zend and Symfony. The group has formed to encourage PHP frameworks to be more interoperable. They’ve come up with 3 standards: PSR-0, PSR-1 and PSR-2.
»