2019 – what a year!

Today is the last day of 2019, and what a year it has been! It feels like it packed enough for a decade.

In January, there was an internal company announcement of me resigning from CTO position in Qobo Ltd, a job I had for 4.5 years (which is my second longest run in one place). In February, this became public and I wrote this blog post.

Most of February and March, I’ve spent recharging my batteries, exploring my options, going to interviews and solving technical tests. While there is a huge market in Cyprus for an experienced IT professional, I didn’t feel like getting yet another job. I needed something new.

So from March or April I’ve started putting a few things together. Running a business is not my native habitat, but it felt like the right thing to do at the time. I’ve started putting a few ideas, people, and first clients together, and, slowly at first, the wheels started turning.

AlleoTech Ltd was incorporated in July, and by then everything was in motion. A startup is like a newborn child, it takes all the time and effort, and then some more. But I’m proud to say that next Wednesday we’ll celebrate a 6 month birthday.

It’s been a wild ride so far, but everything seems to be working out just fine. Even better than expected in all of ways.

With all that going on, I’ve learned a tonne of new technology and how people use it. I’ve also met more people this year than probably in the last ten years. I’ve also got schooled in a number of non-technical areas, such as accounting, legal, marketing and PR, sales, and finance.

I’d like to thank each and everyone of you, without who none of this would be possible. You are all great!

Next year looks to be very promising and exciting. There are quite a few things in the making and it looks like I’ll be quite busy for a long time to come.

Once again, thanks, and have a very Happy New Year!

IMDb : The new design

IMDb is widely known for two things: the overwhelming size of its movie database, and the fact that it never changes the way it looks.

Well, guess what, IMDb update its look and feel, and it’s not a minor change. It’s fast, it’s functional, and it no longer looks like it was built 20 years ago.

The funny thing is that while I was looking for a blog post announcing the changes, I came across this one from 2009. I haven’t realized that it was from 2009 until I saw the screenshots.

Some time ago the incredible happened: our beloved movie database site IMDb finally realized that it was not 1996 anymore and dared to hire some designers in order to – you won’t believe it – change the design of the page! When I visited the site the other day, I couldn’t believe my eyes

And just so that we keep the history, here are a couple of screenshots of how it used to look:

Great job IMDb! Even if it’ll take all of us a bit to get used to the new design. At least we know it’ll last another decade.

PHP CodeSniffer: Ignoring rules

PHP CodeSniffer is a great tool for making sure all your code is consistent with a set of rules and guidelines. However, there are cases, when you need to ignore the rules for a particular code snippet. For example, when you are working with third-party frameworks or libraries.

CodeSniffer provides a number of ways to do this. Until today, the following worked well for me:

// @CodingStandardsIgnoreStart
echo "Here goes some code that breaks the rules";
// @CodingStandardsIgnoreEnd

This is particularly useful for code within functions and methods. But what if you need to ignore a particular rule for the whole file, especially in places like method names, which are difficult to surround by starting and ending annotation tags?

Here’s an example that worked for me (thanks to this comment for the solution):

<?php
/**
 * @phpcs:disable CakePHP.NamingConventions.ValidFunctionName.PublicWithUnderscore
 */

The only bit that you’d probably need now is an easy way to find the name of the rule from the CodeSniffer output. The usual output of “./vendor/bin/phpcs” looks like so:

FILE: src/Model/Table/KeysTable.php
-----------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------
 53 | ERROR | Public method name "KeysTable::_initializeSchema" must not be prefixed with underscore
-----------------------------------------------------------------------------------------------------

But if you run it with the “-s” flag (thanks to this comment), CodeSniffer will add sniff codes to all reports. Here’s the same example with “./vendor/bin/phpcs -s“:

FILE: src/Model/Table/KeysTable.php
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 53 | ERROR | Public method name "KeysTable::_initializeSchema" must not be prefixed with underscore
    |       | (CakePHP.NamingConventions.ValidFunctionName.PublicWithUnderscore)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------

And that’s the code sniff rule that you can add to the ignore annotation tag at the top of your file, like I’ve shown above.