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

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

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

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

  6. 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. やったー!

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

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

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

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

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

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

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

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

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

  16. People picking a side in these public feuds between mega corporations aren’t thinking straight. They are doing it for their bottom line—what are you doing it for?

  17. This Week I Learned #19

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

    • Esprit de l’escalier, “the staircase spirit”, is a French expression used in English to describe the frequent occurrence of coming up with the perfect reply only after leaving the premises of the argument or debate.

    # Programming

    • What connection pooling means in the context of server-side applications and how it’s implemented and used in various Swift frameworks (link).

    • Orthogonality in programming refers to the ability to use a limited set of constructs in a limited number of combinations, where changing one part doesn’t affect the others (via this article).

    • Speaking of orthogonality, or extreme lack thereof, the Web front-end ecosystem is as fragmented, poorly documented, and messy as ever. With every new wave of build tools, frameworks, and dependency managers comes an additional layer of compatibility issues and gotchas. Sometimes writing few extra lines of code for one less dependency isn’t all that bad.

  18. As I started work on the next iteration of the site, I realized that I need to reconsider certain content-related aspects. For instance, I have been exclusively using this microblog for the past year or so, all but abandoning the main blog. One obvious change I could begin with is moving This Week I Learned entries over to the blog or even splitting them into their own thing altogether.

  19. This Week I Learned #18

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

    • Polybius is an urban legend from the early 2000s around an arcade game experiment that was allegedly run in the 80s by the US government in Portland, Oregon. According to the legend, the game was extremly addictive and caused several psychoactive effect on the players. Shortly after its supposed release, it is said that all Polybius arcade machines have disappeared without a trace.1

    • The Zeigarnik Effect refers to people’s tendency to remember incomplete tasks better than successful ones (via Laws of UX). No wonder I have a constant sense of guilt over my abandoned side projects.

    # Programming

    • Writing both the client-side app and the server-side API in Swift has some pretty significant benefits. In addition to sharing a lot of business logic, this approach reduces the impact of context switching when developing a new end-to-end feature. Writing the entire stack in the same language, using the same IDE, in the same workspace is a godsend.

    1. Most of this sounds ludicrous, but it never hurts to indulge in an urban legend or two, especially if it involves video games.