CategoryTechnology

All the articles related to Information Technology related fields, including programming snippets, and other things I’m interested in

Office 365 – test trial is over, back to Google

I’ve been using Office 365 for office correspondence for about 7 months, since I moved to Qobo. Today I say enough to Office365 corporate lookalike email client. Everything is back to Google.

UX experience

One of the things I couldn’t get used to is the right-click bindings. I guess the assumption was to enrich the functionality of the interface by letting you move/delete assets on your sidebar (aka folder management). As the result – half of the browser daily routine is cut off. Most of the time my main working tool (apart of the vim) is the browser (webdev happy days!).

When someone screws up the shortcuts that I use gazillion times per day, it kind of annoys me. Who would have thought to replace Ctrl-R to “reply” shortcut for “refresh“. Ah, bollocks, moving on!

Focused/Other/Pinned emails. Pinned email go to the top of the list. Focused follow right after. Others – somewhere at the end. 6 emails fit into my laptop screen height, so you can get an idea, that the number of pinned or focused emails is quiet limited. I guess, I’m too old school to get these things right!

Search & Filter. Google Email search and filtering is unbeatable. Period.

 

CakePHP: Interview with Larry E. Masters

Interesting interview with one of the core members of CakePHP community – Larry E. Masters.

Throughout the interview Larry covers CakePHP Framework history, as well as covering major milestones of CakePHP 3.x version.

If you’re still into 2.x then it’s time to upgrade, as it brings some nice perks.

More flexible code, and massive performance boost.

Work fuel: what really motivates us

Seth Godin published once again a great article on work/life motivation.

  • Becoming a better version of yourself
  • Catastrophe (or the world as we know it will end)
  • Connection (because others will join in)
  • Creative itch (the voice inside of you wants to be expressed)
  • Dissatisfaction (because it’s not good enough as it is)
  • Engineer (because there’s a problem to be solved)
  • Generosity (because it’s a chance to contribute)
  • Possibility (because we can, and it’ll be neat to see how it works in the world)
  • Selection (to get in, win the prize, be chosen)

IIO Sensor proxy: screen rotation

One of the things,  I don’t get is why Linux enabled IIO Sensor Proxy default.

With a GNOME 3.18 (or newer) orientation changes will automatically be applied when rotating the panel.

Ambient light will be used to change the screen brightness. Geoclue will be able to read the compass data to show the direction in Maps.

It’s really annoying on the laptops if you accidentally rotate your monitor. So here’s is a what you got to do:

sudo systemctl stop iio-sensor-proxy.service
sudo systemctl disable iio-sensor-proxy.service

Enough with screen rotations.

PHP: Testing protected methods in CakePHP3

One of the things I recently had to deal with – PHP unit testing protected methods of the class in CakePHP 3. Few seconds of checking StackOverflow brought a nice and elegant way of checking protected methods using ReflectionClasses.

Sebastian Bergmann has a complete guide how to check non-public functionality of the classes in his archieves.

Here’s a short sample of the code using CakePHP3:

<?php
use Search\Model\Table\SaveSearchTable;
use Cake\TestSuite\TestCase;
class SaveSearchTableTest extends TestCase
{
public function setUp()
{
$this->SavedSearches = \Cake\ORM\TableRegistry::get('SavedSearches');
}
public function testProtectedMethod()
{
$methodName = 'protectedMethod';
$reflectionClass = new \ReflectionClass('\Search\Model\Table\SaveSearchesTable');
$method = $reflectionClass->getMethod($methodName);
$methodResult = $method->invokeArgs( $this->SavedSearches, ['arg1', ['arg2']]);
$this->assertNotEmpty($methodResult);
}
}