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:

and a rather interesting counter argument to using them: 


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:

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.