The problem came up recently about how to make sure plugins activated in the WordPress plugin UI don’t get deactivated if they are necessary for a site to function. I thought that was an interesting thought puzzle worth spending 15 minutes on, so I came up with this function as a solution:
I made a small site recently where I wanted all newly registered users from a specific email domain to automatically be administrators (this is a terrible idea, don’t do it). The user registration was restricted by Single-Sign-On and 2-Factor Authentication, so I felt relatively safe doing this, especially since it was only a “for fun” project.
The interesting bit of code that upgraded users to admins is as follows:
The big issue I’m having with iOS right now is the notification system. I feel like I’ve stepped back in time years. For a while now Android has had the ability to group similar notifications for an app. This makes organizing and clearing notifications very easy.
Compare this to iOS where the notifications are all separate:
Along with this difference, clearing notifications takes more interactions. You either have to swipe left and tap, or swipe left twice. With Android, it’s one simple swipe and all of those unwanted notifications for a single app are gone.
I know this sounds like a silly detail to complain about, but there’s just so much more about the Android notification experience. Many of the notifications are “rich” and provide more details when swiped down, such as image previews, more details, or the ability to reply to messages inline without opening an app.
It may be that iOS has these features as well, and I just don’t know how to use them since these features came to me organically on Android as they were added over the years. Because of that, I won’t hold it against iOS too much, but it’s still points taken away.
The first thing that I’ve learned during my transition to iOS is that the mobile keyboard experience is very subpar compared to Android. The stock iOS keyboard is bad, but even using a third party keyboard like Gboard doesn’t even come close to the experience on Android. The layout requires so many more taps to do simple things like numbers and punctuation.
Secondly, the down firing speakers of the iPhone 6s+ are absolutely terrible for consuming media–at least compared to the Nexus 6 and it’s stereo front firing speakers. Trying to watch a video on YouTube, I found myself having to hold the iPhone in an uncomfortable position to get even mediocre sound.
Now, that’s not to say that it’s all bad. The speed of this old iPhone, compared to my Nexus 6 is blazingly fast. All of the OS transitions are buttery smooth, there is absolutely no lag to be seen, and the camera can take pictures faster than I can tap!
The iOS experience doesn’t seem to be created for one-handed use, since I constantly have to stretch far to the top of the screen or exit lazy mode and get my second hand out to tap something at the top. Android’s bottom navigation bar is definitely a better user experience.
I have been a die-hard Android user since the Motorola Droid (OG Droid) came out in October 2007. The Apple iOS software world has always felt too restrictive for me, since I am forever a tinkerer.
My current phone is a Google Nexus 6 developed by Motorola, released in November 2014. Unfortunately, it’s showing its age. Google no longer sends OTA updates, so I rely on LineageOS to keep me safe and happy. Even with third-party software, the phone is plagued with problems. From incredibly slow encryption to poor CPU throttling when the battery gets low. The camera is also disgustingly slow, taking between 5-30 seconds to take and process a single picture, but at least the resulting images are beautiful.
There are saving graces though, such as the dual front-facing stereo speakers, amazing 6.0 inch 1440×2560 AMOLED screen, optical image stabilization, HDR, Qi wireless charging, and headphone jack :)
Unfortunately, it’s time to put my Nexus 6 aside and find a new phone. My wife has been using an iPhone for years now, after switching from Android (2014 Moto X). Today she got a new iPhone 8+, so we’ve come to an agreement that I need to at least try to use iOS for a while.
So tonight, after she migrated all of her apps and data to the new iPhone, I spent some time setting up all of my apps and accounts on her old iPhone 6s+. It’s already been a very alien experience, almost frightening–seeing how little I actually know about the software and hardware.
My plan is to use the iPhone for at least two weeks, and see how I feel about it. This also coincides closely with the release of the new Google Pixel 2 phones, which I will also be looking at. Last year I was very underwhelmed by the Google Pixel line, and felt that the hardware of the iPhone 7+ was much more advanced. If I’m able to thrive, or at least survive, in iOS then perhaps it’s time for me to truly look at switching platforms.
I’m hoping to write about this experience every day or two so that I force myself to look back at how my transition is going. I’m sure there will be many frustrations early on, but hopefully I’ll also have a good number of exciting moments when I get to experience some new and exciting software.
Last week an interesting issue came up for a client. Somehow a few posts were moved from Published to Draft. Unfortunately, post status isn’t stored in revisions so it’s unlikely we’ll ever know who or how it happened. Luckily there’s a simple solution I found to log all post status transitions in post meta: