1. Mattt on WWDC 2020

    It’s refreshing to see Mattt’s reasoned take amidst all the attention-seeking headlines this week:

    As it turns out, going fully remote wasn’t merely good enough — it was, in many ways, superior to the original thing. […] Sessions are tight and well-paced. Rather than stretching or cramming content into a fixed time slot, they’re as long as they need to be.

    This definitely echoes my impressions. As someone who mostly followed along from home in the past, not only did I not miss much this year, but I got treated to a much improved remote experience.

    Mattt also brings up the topic of Excitement—or hype, as I often call it—and productivity:

    Here’s the thing about excitement: It’s kryptonite to developers. Excitement messes with our ability to focus on one thing, which is already a big struggle for a lot of us (myself included). When you’re excited, it’s almost impossible to get anything done.

    This is true for any endeavor, but especially so for software development.

    There are plenty of voices in the community who are echoing this excitement. I can’t add anything to that discussion. And besides, that’s not really where my head’s at right now.

    The official Apple content generates enough sense of FOMO as it is. Combining that with a firehose of What’s new in X blog posts, podcasts, YouTube videos, and tweets doesn’t help much as far as I am concerned.1

    It’s been an exciting week, so take a moment to collect yourself. Go on a walk. Take a hike. (Be safe about it.) Do whatever you need to break free of the “reality distortion field”. Once you do, you’ll have the necessary distance to determine what new technologies you should pay attention to and what you can ignore for now.

    Solid advice, WWDC or otherwise.

    1. I published my personal notes throughout the week, but my audience is infinitesimally tiny. Not to mention that I usually publish these things primarily for my future self.

  2. WWDC 2020: Day 4-5 Takes

    WWDC 2020 is officially over. Here are some notes based on a handful of sessions I watched in the past couple of days.

    • I am quite happy with all the WKWebView improvements that made it in this release. In particular, callAsyncJavascript will make bridging async JS and Swift a less painful affair. That said, some of these APIs, including the aforementioned, seem to be missing from the first beta.
    • Core Data didn’t get the overhaul many of us were hoping for, but it gained some useful APIs to help with batch operations. I’ll take that.
    • I am happy that we got a couple of sessions about unsafe Swift, an area that’s becoming increasingly important for those of us using Swift for server-side development (C library wrappers, database drivers, etc).
    • Speaking of server-side, it’s refreshing to see a session about using Swift on AWS Lambda. Apple has a lot of leverage when it comes to adopting Swift on the server, and sessions like these are a good sign that they are invested, at least to a certain degree, in promoting that.
  3. WWDC 2020: Day 2-3 Takes

    I’ve managed to watch most of the sessions released today and yesterday. Here are some of my personal highlights:

    • WebExtensions API support in Safari is excellent news for people building browser extensions. For those not familiar, it’s a standard way of developing cross-browser extensions, currently supported by both Mozilla and Google.
    • On the subject of Safari, several features and improvements made their way in this release. I’m particularly excited about the CSS bits, such as support for the :is() pseudo-selector, system font families, and CSS Shadow Parts—a way to allow Web Components to expose internal elements to the outside for styling purposes. Oh and WebP support.
    • As part of the Web Authentication API implementation in Safari, you can now use Face ID and Touch ID for user sign-in on your Web apps. You heard that right.
    • The new SwiftUI app life cycle is nothing short of impressive. I have been upgrading all my unreleased apps to this new API—since it’s iOS 14 only—and it’s been eye-opening to see how far this declarative approach goes in getting rid of boilerplate.
    • Contextual menus are now generalized in iOS and can be invoked from any button without requiring a long press or adding an overlay on top of the view. This is my favorite new addition to iOS this year—by far. Action sheets were always clunky to work with, and popovers felt off on the iPhone. It’s worth noting that SwiftUI doesn’t seem to have access to this new API as of this beta (Feedback: FB7776866).
  4. WWDC 2020: Day 1 Takes

    Instead of doing live reactions this year, I opted to jot down some notes during the Keynote and the State of the Union and share them in one go. So here goes nothing!

    • The home screen and springboard changes in iOS 14—App Library and Widgets—are clearly going towards adjusting the cognitive load in order to better surface the information that matters to the user at any given time. Let’s be honest, the icon grid has reached its peak usability almost a decade ago.
    • Another area that got a lot of attention in iOS 14 are the different interruptive modes in the user interface. In iOS 13 and earlier, receiving a phone call or activating Siri takes over the entire screen, making them effectively separate modes that interrupt the user flow. Starting iOS 14, these are replaced with lightweight overlays that preserve the current context.
    • App Clips are yet another aspect of evolving the app paradigm to better fit real world usage scenarios—the other two that come to mind are widgets and extensions.
    • The context preservation theme is salient in this year’s iPadOS update; not surprising given that context might be even more important on a large screen where multiple things could be happening at the same time.
    • The introduction of sidebars for in-app navigation in iPadOS 14 is another net win on the information density front. Sadly, App Library and inline widgets seem to be missing from the first beta.
    • I am very happy to see that pencil handwriting recognition works across the OS, supports Chinese characters (Kanji), and detects different languages in the same sentence. Alongside built-in translation, these are powerful new additions for language enthusiasts like myself. Update: It seems like Japanese is not supported in Beta 1. Bummer.
    • The reason Apple didn’t spend time talking about the ability to change the default browser and email client on iOS 14 is simple: most consumers couldn’t care less. If anything, antitrust regulators might be more into this one.
    • Built-in tracking control in Safari is looking to be intuitive and will likely make the current crop of content blockers obsolete; nothing beats what’s already there by default.
    • The macOS 11 Big Sur redesign is substantial. I have mixed feelings about different aspects, but I will leave that for later.
    • Control Center and the new Notification Center on Big Sur are welcome imports from iOS. The open nature of the Mac always allowed power users to devise ways to surface the information that matters to them (such as menubar apps), but for the majority of users, this is an accessibility upgrade.
    • The transition to ARM is going to be the first major architectural transition that I witness as an Apple platform developer. My main takeaway is that the timeline seems to be much more aggressive than anticipated.
  5. This Week I Learned #11

    Here are some of the things I learned this week, when I wasn’t biking or basking in the sun.

    • Why books—and other traditional methods of knowledge transmission—don’t always work (link)1. It is no coincidence that this essay resonated with me a great deal—learning is a topic that’s very near and dear to my heart. Most of the skills I use today to do my job are self-taught, and learning languages was and is still a big passion of mine. Andy expands on the idea that without additional metacognitive skills, reading books is insufficient to acquire knowledge and understanding due to the flawed transmissionist model that they are implicitly based on.2
    • Speaking of reading, I picked up the latest work of Shūzō Oshimi, わだち (chi-no-wadachi, Trail of Blood, 2017–ongoing), and I wasn’t disappointed. What starts out as a run-of-the-mill slice of life quickly spirals into an unsettling psychological thriller with some of the most nail-biting moments I’ve experienced in the format. If this sounds like something you would enjoy, give it a shot (日本語, English).

    1. I’ve had the pleasure to interact with Andy Matuschak, the author of this essay, when he used to work on UIKit at Apple. He was kind, helpful, and profusely generous with insider knowledge that helped me improve some of the articles I wrote on thoughtbot’s blog. I stumbled across his website this week and I am really looking forward to more of his work in the field of learning and cognition.

    2. As a matter of fact, “This Week I Learned” is a metacognitive tool I concocted to help me remember the new concepts, ideas, and techniques that I learn during a given week.

  6. Shipping a macOS or iOS app nowadays without a setting to match the system appearance is an increasingly harmful accessibility oversight. Discord on macOS is one of the offenders that has been consistently annoying me since earlier this summer.

    Discord appearance settings

  7. Nikita Prokopov on Syncthing

    Nikita Prokopov sharing his experience using a free and open-source alternative to Dropbox called Syncthing.

    Syncthing is everything I used to love about computers. It’s amazing how great computer products can be when they don’t need to deal with corporate bullshit, don’t have to promote a brand or to sell its users. Frankly, I almost ceased to believe it’s still possible. But it is.

    It is indeed heartwarming to see products like these still exist.1 I gave up on Dropbox long ago, and I have the same iCloud issues Nikita outlined. I am very happy to jump ship after reading this glowing review.

    1. Bonus points for being made in Sweden under a non-profit!

  8. This Week I Learned #10

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

    • Spontaneous cognition and how random thoughts emerge from the brain (link).
    • IPFS, a peer-to-peer protocol powering a number of decentralized Internet projects. I knew about Solid and Dat, but never heard about this one, which seems to be even more popular within the decentralized Web community according to this survey.
    • NGINX has now a preview release with HTTP/3 over QUIC support. The announcement blog post has a good overview of the technology and how it’s different from its predecessors.

    # Programming

    • The Fail publisher in Swift Combine. Similar to its sibling Just, it competes immediately, but with a failure instead of a value—useful for testing and debugging the unhappy paths in your app (link).
    • Writing tests is vital for maintaining a healthy, and functional, codebase. This is less of a revelation and more of a reminder: a test I wrote while debugging a database query issue helped me discover and fix two unrelated bugs.
  9. This Week I Learned #9

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

    • The current chain of events unfolding across the US made me realize how much work still needs to be done in a country that prides itself on equality and justice. #BLM
    • Tools for better thinking (link). A nifty website with an assortment of techniques and frameworks to help with decision making and problem solving. The Dropbox Design blog has more on some of these models.
    • Circle packing (Wikipedia). I was introduced to the concept of packing density in business school as part of a product design and packaging workshop, but I never had the chance to take a look at the math behind it. Geometry is beautiful.

    # Programming

    • The UI on the Crew Dragon was built using Web technology running on Chromium, according to this AMA.
    • I’ve used Swift key paths here and there, but I never explored the lesser known parts of this API. This week I picked up AnyKeyPath and PartialKeyPath<Root> and used them for a server-side project I am working on (link).
    • Android phones seem to be crashing when using a particular image as a wallpaper (link). According to this Twitter thread, the issue happens during color space conversion, where the formula used to create a pixel lightness matrix rounds the color values up, resulting in a RGB sum greater than 255.1 This in turn causes an out-of-bounds exception that keeps happening every time the system UI process restarts.

    1. This formula is formally called sRGB Luma (Rec. 709). I’ve written more about it and other color lightness topics here.

  10. This Week I Learned #8

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

    • The difference between input and output randomness in game design (video). The gist of it that randomness that occurs before a player action is referred to as input randomness—a prominent example being procedural level generation—while randomness that occurs after user action is called output randomness, such as the case with loot boxes and success rates.

    # Programming

    • I’ve been using Markdown for years, but I never realized you could add image titles like this: ![Alt](/url/to/image.jpg "A title"). Granted, I usually avoid using the title attribute for the reasons outlined here.
    • Core Data became a lot easier to work with since the last time I used it, which was before NSPersistentContainer for those familiar with the framework.1

    1. It still feels clunky by today standards—can we have the Codable of data persistence already?

  11. A SwiftUI function grapher in 160 LOC. The framework might be immature, but it made a lot of my work a tad easier. I will share the source as part of a project I am currently working on, so stay tuned!

    A function grapher in SwiftUI

  12. This Week I Learned #7

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

    • Concern trolls. I had never heard this expression before until I read about it in the context of US politics. It refers to a person who, in order to be accepted, pretends to agree with a group of people about a given topic, only to constantly seek to sow doubt and confusion among their ranks, disguising their ruse as “concerns”.

    # Programming

    • If there is something that can be exploited, you can rest assured that unscrupulous Web sites will exploit it. The latest episode is port scanning through WebSockets. I didn’t even know this was possible, and I am kind of bummed that browsers keep encroaching more and more on operating system territory. I mean, who in their right mind wants a random Web site to control their device vibration?
    • Boolean blindness and why booleans are not always the right choice in the context of data modeling. Via Matt Diephouse’s “You Might Not Want a Boolean”.
  13. I find it extremely frustrating to get a YouTube video as an answer to a programming question. I watch videos when I want to leisurely learn about something new, but when I have a specific problem to solve, they are my very last resort.

  14. A Stable Modular ABI for Rust

    Before Swift Evolution, I had no idea what an ABI was. Today, even though I still get lost when it comes to the minutiae, I can at least follow along threads like this one without feeling too uncomfortable.

    It’s also eye-opening to see how different communities and companies prioritize different aspects of a programming language. Rust got async/await since version 1.39.0, released last November, but they have yet to stabilize the ABI. Apple went about it the other way around with Swift, given the importance of ABI stability for their platforms.

    A stable ABI would allow Rust libraries to be loaded by other languages (such as Swift), and would allow Rust to interop with libraries defined in other programming languages. […] However, a stable ABI is not all peaches and roses. Having to standardize the memory layout of data can limit the number of optimizations the compiler can perform.

    A modularized ABI would be optional while compiling. This modular ABI could be published as a versioned crate. If the ABI ever needs a backward-compatibility breaking change, the change could be made within Semver. Alternatively, a new ABI-compliant compiler backend could be developed, or the current compiler backend could be extended to support an ABI feature flag that would toggle ABI compliant builds.

  15. This Week I Learned #6

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

    • How the MissingNo. sprite is rendered in Pokémon. If you are into retro games and programming, I highly recommend this channel.
    • The Scunthorpe problem is, according to Wikipedia, “the unintentional blocking of websites, e-mails, forum posts or search results by a spam filter or search engine because their text contains a string of letters that appear to have an obscene or otherwise unacceptable meaning.” Via Scunthorpe Sans.
    • How HTTP/3 and QUIC work. I hadn’t heard about QUIC until earlier this week and watching this talk by Daniel Stenberg was a perfect way to catch up. Thanks Alaa for the tip!

    # Programming

    • Global variables in Swift are lazy—it’s in the docs even. I don’t know how I ended up with the assumption that they are eagerly evaluated (thanks again, Kim!).
  16. As days keep getting longer here in Stockholm, I’ve been relying on the light appearance of macOS to avoid straining my eyes. One thing that caught me off guard is the dearth of decent-looking light themes for text-based applications. It’s almost as if developers have an overwhelming penchant for dark interfaces…

  17. This Week I Learned #5

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

    • 自粛じしゅくつか (jishuku-tsukare). An expression that’s gaining momentum right now in Japanese media, meaning getting tired of voluntary confinement.

    # Programming

    • Visual explanations go a long way in demystifying tricky topics such as floating numbers and regular expressions.
    • JavaScript frameworks are costly, argues this well-researched piece by Tim Kadlec. One would think that performance tends to get better over time in technology, but that doesn’t seem to be the case in JS-land.
    • I picked up some LaTeX this week for writing mathematical notations and this cheatsheet came in quite handy.
  18. This Week I Learned #4

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

    • The Blub Paradox (thanks Kim!). Coined by Paul Graham in his 2001 essay “Beating The Averages”, this concept refers to the inability of a programmer using a hypothetical mid-level language, called Blub, to:

      • Use a lower-level language due to lack of features they are familiar with in Blub.
      • Realize that they are looking at a higher-level language when they evaluate one.

      I have some reservations about this one, based on my own experience, but it’s a nice tidbit nonetheless.

    • I did some reading on flying machines this week and picked up a new word: ornithopter.
    • I almost feel ashamed for not knowing this one until this week1: deuteragonist and tritagonist.
    • This answer by Dave Abrahams to a Quora question about the most important things involved in delivering a great software library. If I had to pick only one, that would be “rigorously document“.
    • The .org TLD is saved!

    1. Not gonna lie, it’s a fairly prevalent feeling throughout these updates.

  19. This month I noticed a sudden influx of visitors to the We Need Chrome No More piece form last year—46k page views is way, way above the monthly average hovering around 1k. My self-hosted instance of Fathom shows some limited data about top referrers, but none of the numbers make sense, and I am totally fine with that.

    Website visitors, April 2020.

  20. Solutions, Problems, and Learning

    From a content creator perspective, it’s relatively easy to write about solutions. Tips and tricks. How to do X or Y. Lessons learned. In contrast, it’s significantly harder to write about problems—what’s at stake and why it’s worth the effort. Understanding a given problem to a level where it can be distilled requires much more rigor and experience than presenting solutions to said problem.

    From a learner perspective, especially in their early stages of the learning process, it is far more worthwhile to understand the problems, challenges, and tradeoffs than to build a repertoire of solutions. Doing the latter without the former might work in the short and mid-term, but on the long run it is very likely to hinder personal and professional growth. Fast food is an apt analogy.

    While this dichotomy makes learning certain topics particularly hard, it’s not unsurmountable. One has just to look hard enough.