Buying an iPad in Fall 2022
The Choices are Great -- and Clearer than Before
I know a lot of people get confused about which iPad they need to buy for what they want to do. This guide is my stab at helping to sort out the options and what might be right for you.
Getting Midnight in the UNIX Epoch from Perl
Many computer functions dealing with time are calculated in the number of seconds since the UNIX Epoch. I wanted to get midnight tomorrow in those Epoch seconds so that my Bible word Wordle clone Biblicle could say when the next word would be available. I couldn’t easily do the entire calculation on the client side in JavaScript, because when the next word is served varies: if the user is logged in, it is at midnight for the user’s specified time zone on FaithTree (which may or may not match their computer’s time zone), but if the user is not logged in, it will be at midnight Central Time (“US/Chicago”).
The calculation needed to be done on the backend on the server, which is written in Perl. This page had a suggestion how to get the number of seconds so far elapsed in the day, which could easily be modified to instead give me the number of seconds remaining. Problem: I want to calculate on the basis of the local time zone not UTC/GMT. Thankfully, using Perl’s DateTime object, that isn’t difficult:
use DateTime;
my $tomorrow = DateTime->now(time_zone => $timeZone);
my $secs = ((23 - $tomorrow->hour) * 3600) + ((59 - $tomorrow->min) * 60) + (59 - $tomorrow->sec);
$tomorrow->add( seconds => ($secs + 1) );
my $tomorrowStarts = $tomorrow->epoch;
With that little code snippet, $tomorrowStarts will return the first second of tomorrow located to $timeZone and relative to the Epoch.
Procrastinator's Gift Guide
Still Christmas shopping and getting nervous? In the second OFB YouTube channel video, I look at four items still able to arrive before Christmas that make thoughtful and fun gifts for just about anyone.
Das Keyboard 4 Professional for Mac
A Premium Board Squarely Aimed at Typists
Nearly twenty years ago, the great mechanical keyboards of early computing were largely forgotten, spoken of in reverent tones by the faithful few who clung to them in a sea of mushy, but cheap successors. Das Keyboard stood out as a counterpoint, an attempt to offer a modern, mainstream-friendly board with mechanical switches years before the current resurgence took hold. Do its boards still hold up in a more competitive landscape? And, given that it is Christmastime, would a Das Keyboard make a nice gift?
Mevo Start Live Streaming Camera
A Live Streaming Exploration of Simple Made Simple, Complex Made Possible
I’ve talked about the Mevo live streaming cameras several times here on asisaid. They’re great for church and ministry functions and Logitech was kind enough to send a couple of their newest model units out to OFB so I could review them:
Live streaming continues to grow in influence while remaining complicated to do well. Mevo pioneered an easier path to quality live streaming a half decade ago with its original live streaming camera and the Mevo Start is the company’s latest entry into that line.
The Year When the Cheapest Mac was the Best
Apple's M1 Ushered in High End Performance for Average Users
My take on the Apple M1 line of systems as the sibling M1 Pro/Max systems emerge:
Since its introduction, no one has ever mistaken the Macintosh as the cheap option for computers. Nor would anyone who watched Apple’s launch of its insanely fast M1 Pro and Max chips on Monday argue that the new MacBook Pros are cheap. However, when the dust settles, the previous reigning top Apple Chip — the M1 — will still be the one that created a year when the cheapest Mac was the best Mac and one of the best computers, period.
Optimizing Little Hills, FaithTree and Open for Business
I’ve been deploying a lot of server optimization tricks to improve the performance of Little Hills, FaithTree and Open for Business these past months. They had all grown slow with the kludge of adding additional features and my once snappy homegrown content management system (also used here), SAFARI, was no longer snappy. That all threatened user frustration and, for that matter, lower rankings on Google, which pays attention to the performance of sites it refers people to.
I’ll blog about some of the other optimizations a different day, but one I’m rather pleased with is support for WebP. I’ll admit to ignoring it in no small part because Apple didn’t support it. I use primarily Apple Safari to browse the web, including pages served by my SAFARI (which I called that before Apple’s Safari was launched, so I’m being stubborn and keeping the name). However, WebP arrived on Safari with iOS 14 and MacOS Big Sur, so I revisited the format and found it could offer substantial savings in download size on many images. With support in every modern browser, I figured I’d implement support in SAFARI.
By support, I mean my goal was to be able to upload an image to the site and the software takes care of turning it into a WebP. SAFARI now does that, taking images of known types and running several layers of optimization. First, it tries to make a more efficient JPEG using ImageMagick’s PerlMagick module; once that is complete, it attempts to make a WebP version. It only keeps the optimized JPEG version if it is at least 20% smaller than the original. Likewise, it only keeps the WebP if it is that much smaller than the optimized JPEG. Since not everything older supports WebP, there’s no reason to mess with it, if a JPEG will do.
This is similar to what I later read described here. I want to implement more of Bernat’s optimizations in the future.
That’s great, I thought, but then I realized the next issue (which is described with a solution in Bernat’s piece, but I hadn’t found it yet at the time): if not every browser supports WebP, I have to be prepared to serve the JPEG still. The HTML5 <picture> element supports giving different image options and letting the browser installed, but my goal was not to require me (or anyone else someday posting to Little Hills’ site) to manually think through the process of describing alternatives. It also does nothing to take advantage of the automatically generated alternatives I previously created when it comes to existing pages.
The solution was complicated by another optimization I made. My long worn solution would be to come up with a series of mod_rewrite rules for my Apache server to analyze if the browser could handle WebP and then replaced the JPEG with a WebP if possible. However, I recently implemented an NGINX caching server to get its advantages over Apache, so I needed to figure out the NGINX way to do it. That turned out to be a bit confusing to me at first, but simple in practice.
Here’s the final bit of NGINX configuration magic used to reroute requests to WebP (or the optimized JPEG), as best suited. It finds any folder location under an images directory and then looks for an .optimized subdirectory. If it finds one, It looks for the WebP version if applicable and the optimized JPEG if the WebP version is unavailable or the browser does not support it.
location ~ ^(?<extra>.*?)(?<prefix>/images/(?:.*/)?)(?<rxfilename>.*)$ {
expires 365d;
add_header Pragma "public";
add_header Cache-Control "public, no-transform";
add_header Vary Accept;
try_files $extra$prefix.optimized/$rxfilename.$webp_suffix $extra$prefix.optimized/$rxfilename.jpg $uri =404;
}
This has been working great for a couple of months now — I started writing this post back on July 7 and then got sidetracked — so if you’re looking to optimize your NGINX configuration, I definitely commend it to you.
Epomaker GK68XS
Minimalism, Sturdiness Make for an Intriguing Keyboard
I’m doing a series of keyboard reviews for OFB. Here’s the second one, on the Epomaker GK68XS, which I like quite a bit:
Like Keychron, Epomaker has emerged in no small part due to its successive and successful crowdfunding of boards that eschew the gaudy B-movie sci-fi appearance of many gamer keyboards. Both companies also make a lot of different models, several of which have gotten a lot of attention for gee-whiz new features during those hugely successful crowdfunding campaigns.
Situated somewhere in the middle of Epomaker’s lineup is the unassuming GK68XS, which lacks all that hoopla, but like the K2 ticks off the sorts of boxes a person looking for a keyboard of similar layout to one’s laptop might want.
It isn’t a perfect keyboard, but if you’re looking for the same sort of keyboard I have been, it’s worth your consideration.
Keychron K2
So Close, I Wish It Were Perfect
I’ve been on the quest for the perfect keyboard for a while and I kick off a review series exploring different options with the very nice Keychron K2:
What I want is relatively simple, if hard to find: a mechanical keyboard that is oriented towards writing, not gaming. My match would be reasonably compact and friendly towards Macs, too. Keychron, as much as anyone, has arisen as one of the few companies interested in ticking those boxes.
What do I like about it?
The K2’s size is just about perfect for anyone who finds the size of an average laptop keyboard — including MacBooks — agreeable. It dumps the numpad to free up more of my desk, but doesn’t overdo the downsizing like so-called 60% boards do. They often drop keys I depend on for writing and editing, such as the arrow keys.
Many smaller options also end up with at least a few keys in non-traditional locations, slowing my touch typing. The K2 is perfect on this count, making it easy to go from my MacBook Pro’s keyboard to it and back again without having to recondition where my fingers go to do things. Mac friendly multimedia keys are also where you’d expect, which is nice and not necessarily a given on mechanical boards. I am not sure how I lived without volume and mute keys on my keyboard for so many years, but those years are a distant memory.
RavPower Mini External SSD Pro Hard Drive
It is Better than a Thumb Drive
I take a look at RavPower’s tiny, portable SSD:
When the pandemic hit last year, it threw me into a world where I was doing vastly more video editing than I did previously. Anyone who has spent time splicing and dicing video files knows those files can fill up storage devices really quickly and they are a pain to transfer between computers. Enter the new class of tiny, pocketable, external SSDs like the RavPower Mini External SSD Pro.




