1. Santa came late this year, but he at least made it just in time for my birthday!

    PlayStation 5

  2. 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!

  3. Between Combine’s Publisher, The Composable Architecture’s Effect, and NIO’s EventLoopFuture, I am often left wondering what operations are available where and what they’re called. Maybe I can use some type aliases and extensions to bridge the API gaps.

  4. In software, there is room for specialists, generalists, and everything in between. Enough with gatekeeping already.

  5. 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.


    1. 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.

  6. Chrome is Bad

    Loren Brichter (Twitter) shedding some light on yet another Chrome debacle on macOS:

    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.

  7. 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!

  8. “Who’s the idiot who wrote this code?” Oh, never mind, it’s yours truly from a couple of weeks ago.

  9. 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.

  10. Fixing Missing Input Sources when Upgrading macOS (Big Sur)

    I found a solution to the problem I posted about a while ago. It turns out that clearing input cache using these two commands takes care of restoring things to the way they’re supposed to be:

    sudo rm /System/Library/Caches/com.apple.IntlDataCache*
    sudo rm /var/folders/*/*/*/com.apple.IntlDataCache*

    Now back to typing Japanese. やったー!

  11. 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?

  12. 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.

  13. 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.

  14. 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.

  15. 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.

  16. 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!

  17. 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.

  18. Starting next week I will be helping Hyper Island students take their first step into the world of HTML, CSS, and JavaScript. I am pretty excited about this opportunity to share my passion for the Web, and I hope that by introducing them to the basic building blocks I can help them see the forest for the trees.

  19. I am quite tempted to use the new @AppStorage and @SceneStorage in SwiftUI, but the hefty price to pay on the debugging and testing front is giving me pause.

  20. This Week I Learned #20

    Here are some of the things I learned this week, in the order I’ve noted them down.

    # Programming

    • 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.