Monthly Archives: April 2014

Duke Dumont ft. Jax Jones – I Got U

I hate this song.

Not for the reasons you might think. It’s an awesome, feel good track, upbeat, lovely vocals, unapologetically sunshiney and I will undoubtedly play it constantly whenever the sun appears for a brief glimpse this summer. So why do I hate it?

Well it’s mostly the way the video makes me feel. I’m a huge music video nerd, and this one is very good for a dance track. Yes you have the usual unfairly hot people in swimsuits dancing around in unbelievable locations. But this is somehow different thanks to the first person perspective. I finish watching this video, look around at my messy flat, the flat grey weather outside, and the washing up piling up in the kitchen, and feel, well, inadequate. That the video says; “hey look at all this amazing adventure out there, now look at your life, it’s crap”. I think I’d like the video more if at the end he looked sad that it was just a sim or something, but no, he knows he can go back whenever he likes. Smug bastard.

Maybe this says far more about my mental state than the video itself. But hey, it’s how it makes me feel.

So thank you Duke Dumont for making a catchy summer dance track with a great video. You’ve really put my life in perspective. Now just take my money and leave.

So long Kohana

Anyone who’s followed the progress (or lack thereof) with the Kohana framework probably wasn’t surprised by yesterday’s announcement of its End of Life. As someone who was a loud proponent of Kohana (see my GitHub if you don’t believe me), I wanted to put down some reflections on the passing of my “weapon of choice” framework.

Kohana is the reason I’m a good developer today, I have absolutely no doubt about that. I did some of my very best work using this framework, and it remains the only one that really felt aligned to how I wanted to build things.

It taught me important lessons. It taught that writing PHPDoc comments will always be a good thing by rewarding those that did with dynamically generated API docs for my classes as well as it’s own; see userguide module. It taught me that PHPs autoloader (long considered a weakness of the language) could be turned into something innovative and insanely powerful (see cascading file system). It taught me that speed and real world uses trump over-abstraction every time. It taught me to write full APIs; getter and setters on everything, array or single values for setters etc, and that trying to force developers to use your class “your way” is counterproductive. Kohana’s use of single functions to do get and set (pass a value = set, no values passed = get) still feels insanely clean to me, and I wish more people would use it as it makes APIs vastly more “fluent”.

But I’ll tell the other side too. Unit testing was never a pleasant experience, with new versions of phpunit often breaking your tests for weeks until the core team fixed it. And Kohana’s use of statics is seen by some as a weakness. Personally I always felt there were very few cases where statics are used without merit, but that’s just my opinion. Also it’s lack of documentation for newbies (step by step user guides, cookbooks et al) was a running joke amongst its users.

The attitude of the core development team needs to be called out too. Whilst the project was at its height, the strong and focussed leadership, with a clearly defined roadmap and vision was a godsent. When the team abandoned it almost overnight, that exclusionary attitude to development became a millstone, with those wanting to contribute (myself included) having no idea where to begin, or even knowing if such contributions would be welcomed.

All that being as it is, I always felt this was a framework for “real PHP engineers”. It embraced what made PHP strong (fast, auto loader etc) rather than trying to force it into a Java-esque soup of subclasses, or an amateurish mess of PHP3 and magic.

Judging a framework by its docs (as so many did with Kohana) is simply the worst way of evaluating a framework. And yet we still see people do it today, with “prettiest website and baby’s first steps guides” often winning over genuine exploration of a projects philosophy and architecture to see if it’s the right tool for the job.

But I digress.

There’s one more reason why I think the passing of Kohana is particularly significant. In my opinion, the cascading auto loader will never happen again. Now we live in a world of PSR-0 and the FIG, frameworks that pursue different avenues of core behaviours are either shunned directly by the bleating masses (“lol y u no PSR n00b?”) or indirectly by not being compatible with Composer, therefore effectively dead in the eyes of the community. It worries me that we’re moving away from a blank canvas (albeit wild west) and into a very tunnelled world.

Consider that three of the most popular frameworks are based on the Symfony HTTP Kernel (Silex, Laravel and Symfony itself). All require PSR-0 and all require composer. Fine, that’s absolutely their choice, and I’m not suggesting that being based on the Kernel is a bad thing, far from it. I just want us as a community to make sure there is room for innovation outside of this set menu. Judging by the downright poisonous attitude that is displayed towards other component libs (Aura for instance), I do worry about the future of the PHP space.

But I won’t go into more of that here. This is a tribute to Kohana. I’m sure it’ll live on as Ohanzee in some guise, but the framework I have known and loved has reached the clearing at the end of the path.

I, for one, will miss it. So long old friend.