Archive for May 8, 2020

Friday, May 8, 2020 [Tweets] [Favorites]

Resilient Decoding in Swift

Airbnb:

This package defines mechanisms to partially recover from errors when decoding Decodable types. It also aims to provide an ergonomic API for inspecting decoding errors during development and reporting them in production.

[…]

After running this code, foo will be a Foo where foo.array == [1, 3] and foo.value == nil. In DEBUG, foo.$array.results will be [.success(1), .failure(DecodingError.dataCorrupted(…), .success(3)] and foo.$value.error will be DecodingError.dataCorrupted(…). This functionality is DEBUG-only so that we can maintain no overhead in release builds.

Cool use of Swift property wrappers and projected values.

See also:

Previously:

Stack Overflow Layoffs

Prashanth Chandrasekar (via Hacker News):

Like companies large and small, we have had to make difficult choices in order to reflect the market conditions. This week, we reduced our global workforce by approximately 15%. Most of the affected employees were furloughed, except for employees and contractors in regions where furloughs were unfortunately not an option. These actions primarily affected sales and customer success teams within our Talent business, which is dependent on the hiring environment.

[…]

Despite the impact to our Talent business, we are seeing significant growth in our core SaaS business, Stack Overflow for Teams, and our Advertising business.

Talent is their product for helping tech companies to hire. The Web site that we use is not the main focus of the company.

aventured:

The only certainty with Stack Exchange, is that it’s going to end up in the belly of one of just a few possible tech companies: Microsoft, Oracle, Google, Salesforce, etc.

[…]

Knowledge services are not great businesses, they’re almost entirely incompatible with the venture capital model. Those that take VC all eventually get force-liquidated, without exception. Stack Exchange is still pretending to be a knowledge service. As they took on more venture capital they pivoted to being primarily HotJobs 3.0. The only way they were going to avoid that outcome, is to 1) never take major venture capital 2) stay super thin operationally; they did neither, so they get liquidated, it’s only a question of time now.

The Internet will need to replace Stack Exchange with a new platform in the near future, as it’ll combo rot and most of the communities will be killed off after SE is sold. I’d advise someone/s out there to get started on replacing SE right now, as by the time you get a new platform up to speed (assume a few years), SE as it has been thought of over the prior decade will be on its last legs and the new platform will be in prime position to step in.

Stack Overflow is not open source, but all the content is Creative Commons.

Previously:

Rewriting Facebook.com

Ashley Watkins and Royi Hagigi (via Hacker News):

A complete rewrite is extremely rare, but in this case, since so much has changed on the web over the course of the past decade, we knew it was the only way we’d be able to achieve our goals for performance and sustainable future growth. Today, we’re sharing the lessons we’ve learned while rearchitecting Facebook.com, using React (a declarative JavaScript library for building user interfaces) and Relay (a GraphQL client for React).

[…]

On our old site, we were loading more than 400 KB of compressed CSS (2 MB uncompressed) when loading the homepage, but only 10 percent of that was actually used for the initial render. We didn’t start out with that much CSS; it just grew over time and rarely decreased. This happened in part because every new feature meant adding new CSS.

[…]

By using rems, we can respect user-specified defaults and are able to provide controls for customizing font size without requiring changes to the stylesheet. Designs, however, are usually created using CSS pixel values. Manually converting to rems adds engineering overhead and the potential for bugs, so we have our build tool do this conversion for us.

[…]

To prevent flickering as icons come in after the rest of the content, we inline SVGs into the HTML using React rather than passing SVG files to <img> tags. Because these SVGs are now effectively JavaScript, they can be bundled and delivered together with their surrounding components for a clean one-pass render.

Previously:

Dithering Podcast

John Gruber:

Dithering is a new podcast from yours truly and Ben Thompson. Three episodes per week, 15 minutes per episode. Not a minute less, not a minute more.

It’s a subscription: $5/month or $50/year.

[…]

Dithering is subscription-only but it is entirely built on plain-old wide-open RSS, and is designed to work with any and all podcast players. There is no Dithering app and never will be. […] Episodes exist only in the feed, and thus, from a listener’s perspective, only in their podcast player.

Update (2020-05-12): Ben Thompson:

That time limit is certainly a challenge (that is why we recorded 20 episodes before we launched — the entire back catalog is available to subscribers), but we really wanted to experiment with what a podcast might be. We purposely don’t have show notes or much of a web page, and we have created evocative cover art embedded in each episode’s MP3, because the canonical version of Dithering is in your podcast player. This is as pure a podcast as can be — and that means open, even if it isn’t free.

[…]

This, if you squint, looks a lot like email: create something that listeners find valuable on an ongoing basis, and deliver it into a feed they already check, i.e. their existing podcast player. That is Dithering: while you have to pay to get a feed customized to you, that feed can be put in your favorite podcast app, which means Dithering fits in with the existing open ecosystem, instead of trying to supplant it.

Update (2020-05-19): John Gruber:

We’ve had just over 5,000 sign-ups so far and not one single request for a refund. Zero! And for that $5/month price you get access to the whole back catalog of episodes going back to mid-March.

[…]

What’s really cool is that if you sign up, listen, and decide to subscribe to Dithering, you can do it right in your podcast app, from the link at the top of the episode’s show notes. It’s really very clever — and completely built on the open web.

Update (2020-05-20): Peter Kamb:

Independent/subscription podcasts need a better experience than this[…]

Flexgate Class Action Lawsuit

Joe Rossignol:

A nationwide class action lawsuit filed against Apple in Northern California court this week accuses the company of knowingly concealing a defect with a display-related flex cable on recent 13-inch and 15-inch MacBook Pro models.

[…]

Apple seemingly fixed the issue by extending the length of the flex cable by 2mm in the 2018 MacBook Pro. It also launched a free repair program in May 2019, but the program only applies to 13-inch MacBook Pro models released in 2016.

Previously: