Santa came late this year, but he at least made it just in time for my birthday!
In preparation of the beta launch of one of my yet-to-be-announced projects, I have spent some time devising a plan for server-side caching using Redis. This led me to read about some common caching strategies such as cache-aside and write-through (link). I was never fluent in backend development jargon, but it’s never late to fix that!
In software, there is room for specialists, generalists, and everything in between. Enough with gatekeeping already.
Mozilla: Apple’s anti-tracking plans for iPhone
As you might have already heard, Apple announced earlier this summer their plans to turn off IDFA—a unique device ID used by advertisers track users across apps. Following the backlash from online advertisers and mobile game publishers that this move triggered, they subsequently backed down this fall when iOS 14 was released.
In the light of this development, Mozilla put out a page with a form for users like you and me to show support for Apple’s anti-tracking plans. I signed it and I recommend anyone who cares about online privacy to do so1.
The fact that both Apple and Mozilla generate a lot of revenue, albeit indirectly, from online and mobile advertising might sound puzzling at first, but the potential gains in terms of brand value and consumer trust would more than make up for the presumed losses.↩
Chrome is Bad
Google Chrome installs something called Keystone on your computer, which nefariously hides itself from Activity Monitor and makes your whole computer slow even when Chrome isn’t running.
I still don’t understand how people choose to use a piece of software that has consistently abused their trust.
After 8 months of writing This Week I Learned, I would like to try out a more spaced out frequency starting this month. Beside alleviating some of the pressure, the increased gap between the learnings and the synthesis is likely to help me remember things for longer!
“Who’s the idiot who wrote this code?” Oh, never mind, it’s yours truly from a couple of weeks ago.
The “users won’t be able to tell the difference” argument for Electron apps falls apart like a house of cards after every major OS release. It’s a weak argument to begin with, but these transition periods widen the chasm between proper native apps and all the other junk.
Fixing Missing Input Sources when Upgrading macOS (Big Sur)
sudo rm /System/Library/Caches/com.apple.IntlDataCache* sudo rm /var/folders/*/*/*/com.apple.IntlDataCache*
Now back to typing Japanese. やったー!
After updating my main partition to Big Sur, I noticed that my Japanese keyboard input sources entirely disappeared, from both the switcher and System Preferences. Anyone else came across this bug?
To say that my study and work experience in the US shaped the person I am today would be an understatement. I purposefully stay clear of discussing politics with strangers, especially online, but it warms my heart to see that love and compassion prevailed this week. Onwards and upwards.
You know your investment in good app architecture is paying off when you start knocking down features in a fraction of the time you allocate to the task.
I added rerouting the user to the sign in screen when the refresh token expires by adding 8 lines of code in the publisher pipeline that refreshes the access token.
I worked on a single server-side API endpoint for four hours straight. It involved an OAuth dance with a third party service, a database read then write, and some data validation along the way. I only compiled the code once at the end and fired a request against the new endpoint. Lo and behold, everything worked exactly the way it should.
I love using Swift on the server.
I just finished watching the latest episode of Pointfree. What they are working towards is nothing short of impressive, especially considering how little code it involves. Making an interactive onboarding tutorial using the same view code wouldn’t be possible without this level of encapsulation.
There is something about pull requests like this that leaves me with a warm, fuzzy feeling that’s quite hard to capture in words. Knowing that there are people out there who care about details as much as you do and who actively seek to make whatever they come across better is truly motivating. Thanks @dkhamsing for making my day!
The new site design is live! 🎉 This time around I focused on rethinking the landing page and expanding the light appearance to cover the entire site, not just the content area. For the light color palette, I drew some inspiration from the earliest iterations of the site, circa 2009.
Other changes include a new portfolio page, pagination in the microblog, and moving This Week I Learned to the main blog.
This Week I Learned #20
Here are some of the things I learned this week, in the order I’ve noted them down.
- How to use mdx and mdx-deck to create interactive slide decks. It’s essentially a mashup of Markdown and React that generates highly customizable HTML slides that can be deployed as is or exported as a PDF document. I usually scuff at the idea of using Web-based presenttion tools, but this stack lends itself particularly well for the Web-dev related material I am currently working on.
- I never paid close attention to how bitwise operations and bit shifting exactly work, but this article by Donny Wals prompted me to stop procrastinating and go over the official Swift guide on the topic.
- I managed to use the new
redacted(reason:)modifier in SwiftUI and remove the custom view I used for the purpose of displaying placeholders while the content loads. Happy to see utility APIs like these make their way to the framework.