rector looks like an excellent tool for those days when you need to rewrite large chunks of legacy code for the modern coding standards and best practices. Of course, there are IDEs that can help a lot with refactoring, but they are usually complex and slow. Regular expressions have always been a poor man’s choice for replacing old code with new code. But life can be easier and better. rector helps you find and replace things like namespaces, class names, method names and property names; change type hints and values of parameters; replace magic methods with their real implementations, and much more.
I’m sure I’ll be trying it out Real Soon Now ™, with the upcoming release of CakePHP 3.6.
“PHP-FPM tuning: Using ‘pm static’ for Max Performance” looks at different process management settings in PHP-FPM: static, dynamic, and ondemand, and the way they affect performance. The default – ondemand – might work well for you if you have a large server with plenty of resources and not so many actual visitors. Running on a smaller instance, or expecting high spikes of traffic might require you to look into your PHP-FPM configuration and adjust it. The article is just what the doctor ordered.
Personally, I prefer having a dedicated instance for the web server, but that instance being as small as possible. With that, figuring out the correct settings for static process management is easier. It also minimizes all those nasty cases of running out of memory, swapping, and having an excessive CPU utilization. Which is especially useful when running on Amazon AWS instances.
It looks like we’re at the end, folks. If all goes according to a plan we’d rather not have, the November issue of Linux Journal was our last.
The simple fact is that we’ve run out of money, and options along with it. We never had a wealthy corporate parent or deep pockets of our own, and that made us an anomaly among publishers, from start to finish. While we got to be good at flying close to the ground for a long time, we lost what little elevation we had in November, when the scale finally tipped irrevocably to the negative.
I’ve been a subscriber of the Linux Journal for many years (just not the most recent ones), and I’ve learned a lot from it. It’s very sad to see it go, even though it’s been years since I read it last.
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: 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:
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:
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:
“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:
but I really liked the examples that were used to illustrate them – simple, yet very realistic.
A CSS tool written in Node JS as a command line app or library for the purging, burning, reducing, shortening, compressing, cleaning, trimming and formatting of duplicate, extra, excess or bloated CSS.
It sounds exactly like the time-travel trope of people being their own parent — a little wonky, but kind of fun to think about.