Change SQL mode for MariaDB in Fedora 27

After I upgraded my laptop to Fedora 27, I started experiencing some weird issues with most of the projects I am developing locally.  Trying to save anything into the database that involves dates, started throwing the following errors:

Error: SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '2017-11-30T13:30:48+02:00' for column 'timestamp' at row 1

A quick look around showed that Fedora 27 ships MariaDB v10.2, while the previous distribution version shipped MariaDB v10.1. Digging through the changes between the two versions didn’t help much, even though there is slight mention of the related change.

SQL_MODE has been changed; in particular, NOT NULL fields with no default will no longer fall back to a dummy value for inserts which do not specify a value for that field.

StackOverflow is much more helpful, as always.  These two threads – one and two – in particular, explained the changes and suggested the fix.  I had to either fix the projects I was working on, or modify my local configuration to use the old SQL mode.  This thread provided some more details, so the final solution was adding the following to the /etc/my.cnf and restarting the MariaDB service:


And now we are back to normal.

The Global Airport Database

Global Airport Database – Arash Partow

The Global Airport Database is a collection of data about all (???) airports in the world, big and small.  It covers a total of 9,300 airports worldwide.

That’s pretty interesting.  For example, how many airports do you think there are in Cyprus?  Obviously, there is the Larnaca International Airport and Paphos International Airport.  Then, there is one in Nicosia, which is not functioning since the island was divided.  And there is one in Acrotiri on the British military base.  Four, right?   Well, the Global Airport Database has a total of 7 (!!!) entries for the country of Cyprus:

LCCC:N/A:N/A:NICOSIA ACC/FIC:CYPRUS:000:000:000:U:000:000:000:U:00000:0.000:0.000
LCPH:PFO:PAPHOS INTERNATIONAL:PAPHOS:CYPRUS:034:043:004:N:032:029:008:E:00013:34.718:32.486

Larnaca and Paphos are there. The Akrotiri one is there too. Then we have 3 records for Nicosia. And one more for Episkopi. Hmm …

Fedora 27 and high DPI support

I’ve recently updated my laptop to Fedora 27 and since then I had some issues with the rendering of the desktop fonts.  At first, everything seemed too large and over-magnified.  Resetting the desktop fonts to much smaller sizes helped a bit, but there were still random issues with different applications – Google Chrome, Skype, etc.   I think these much be related to the recent improvements to high DPI support.

A few things helped me a long the way.  Here are the links, just in case I’ll need to find them in the future:

Ultimately, the things that solved my problems were the last link (installing better fonts for Fedora), and adjusting the fonts resolution from 142 dots per inch down to 96.

7 Skills Of An Effective Developer

7 Skills Of An Effective Developer” is a great article that goes over what it takes to become an effective developer.  The choice of skills is rather standard and has been covered in other articles before:

  1. Communication
  2. Empathy
  3. Planning
  4. Presentation
  5. Documentation
  6. Testing
  7. Git

but I really liked the examples that were used to illustrate them – simple, yet very realistic.