PHP Annotations

Basically, think of docblocks.

The idea behind them originally was to provide documentation on code. E.g. what the parameters of a method were, etc. See these slides for an overview

However, PHP Annotations take this a bit further by letting you inject behaviour. E.g. you can use these docblock statements to change the functionality of the class (i.e. injecting behaviour) which can promote decoupling. E.g. see Symfony uses PHP Annotations for Routing and Doctrine uses PHP Annotations for metadata.

Take a look at these articles / slides:

An overview: http://www.slideshare.net/rdohms/annotations-in-php-they-exist

and a rather interesting counter argument to using them: https://r.je/php-annotations-are-an-abomination.html 

 

Terminal side-by-side with Chrome Dev Tools

It bugs me that you have to switch from your browser to your Terminal to do things like check git, start servers, etc. It’s context switching which is always bad for developer productivity. E.g. you switch but can’t find the right Terminal or can’t find the right browser window when you switch back.

So this looked promising: http://blog.dfilimonov.com/2013/09/12/devtools-terminal.html

It promises to embed a terminal right in your Dev Tools as a separate tab. I was a little sceptical given that the github code is several years old.

But it does! Very neat. However, I assume it hasn’t been updated in a long time because it’s rather clunky. i.e. you have to start a command line tool then login via a WebSocket in your Terminal tab (via the Hamburger menu).

All the same – pretty cool. But I’ll probably still be switching between Chrome, my PHPStorm IDE and Terminal for some time to come.