Archive for January 27, 2023

Friday, January 27, 2023

SwiftUI in timing.is App

Bardi Golriz:

It took a few hours to fall in love with SwiftUI. So much so that we instantly decided to abandon a cross-platform codebase and go fully native on iOS. […] Towards the latter stages of development, we even re-considered our decision to go with it. At the end, we didn’t drop it for a couple of reasons. We were too deep into the process. Being a bootstrapped operation that was already severely behind schedule, we couldn’t afford to restart. But this wasn’t why. Despite the regular friction, we still loved it. Because like any commitment, you must let the majority rule. It was fun at least 51% of the time. But let’s talk about the <= 49% that wasn’t.

[…]

[ScrollView] was the control that we wrestled with the most. An infinite scroll is expected in a calendar app. Executing this was relatively straightforward, but only moving forward in time. Because trying to load items on demand scrolling up resulted in a noticeable jitter. I asked on StackOverflow, and 2k views since, it’s apparent there’s no native approach that works. I actually raised this in a WWDC lab with a SwiftUI engineer last year, and their recommendation was to 1) create a LazyVStack with a ridiculously large data set in both directions and 2) scroll to today onAppear. A creative workaround, except unfortunately scrollTo behaves unreliably inside a LazyVStack. It would usually not even come close to the intended target, occassionally missed it by a little, and rarely correctly.

[…]

Views will refresh unnecessarily. And in a calendar with an infinite scroll, this will lead to noticeable slowdowns. You’re always literally one @Published property away from triggering one.

[…]

Finally, in case I forget again, remember an @EnvironmentObject will trigger a view update even if the view has no reference to any of its properties. An inexpensive way to determine unnecessary redraws is by setting the background colour of a view to Color.random, a clever trick by Peter Steinberger.

[…]

when you are editing an entry, we want the title field’s cursor position to be at the beginning. But, alas, not possible.

Previously:

Update (2023-01-30): See also: Hacker News.

Weather Machine

Electric Dream Machine:

Weather APIs are notoriously complicated—every vendor offers their own proprietary data structures, unit types, and request formats. With Weather Machine, you can write just one integration and get highly accurate global forecasts from The Weather Company, AccuWeather, AerisWeather, and many other sources.

[…]

Dark Sky’s single-response JSON format remains the gold standard for developer friendliness. Weather Machine makes every data source drop-in compatible with Dark Sky’s API, so you can switch over in minutes.

[…]

Weather Machine is the underlying platform that we built to power our own weather app, Hello Weather.

Previously:

The Enshittification of All Things

Cory Doctorow:

Here is how platforms die: first, they are good to their users; then they abuse their users to make things better for their business customers; finally, they abuse those business customers to claw back all the value for themselves. Then, they die.

I call this enshittification, and it is a seemingly inevitable consequence arising from the combination of the ease of changing how a platform allocates value, combined with the nature of a “two sided market,” where a platform sits between buyers and sellers, hold each hostage to the other, raking off an ever-larger share of the value that passes between them.

[…]

This is enshittification: surpluses are first directed to users; then, once they’re locked in, surpluses go to suppliers; then once they’re locked in, the surplus is handed to shareholders and the platform becomes a useless pile of shit. From mobile app stores to Steam, from Facebook to Twitter, this is the enshittification lifecycle.

[…]

These videos go into Tiktok users’ ForYou feeds, which Tiktok misleadingly describes as being populated by videos “ranked by an algorithm that predicts your interests based on your behavior in the app.” In reality, For You is only sometimes composed of videos that Tiktok thinks will add value to your experience – the rest of the time, it’s full of videos that Tiktok has inserted in order to make creators think that Tiktok is a great place to reach an audience.

Mike Masnick (via Old Unix Geek, Jason Kottke):

We recently wrote about Cory Doctorow’s great article on how the “enshittification” of social media (mainly Facebook and Twitter) was helping to lower the “switching costs” for people to try something new.

[…]

And this, quite frequently, leads to the process that Cory lays out in his enshittification gravity well. Because once you’ve gone public, even if you have executives who still want to focus on pleasing users and customers, eventually any public company is also going to have other executives, often with Wall Street experience, who talk about the importance of keeping Wall Street happy.

[…]

But one of the major problems with this that I’ve discussed for years is that even if you believe (ridiculously) that your only goal is to increase profits for shareholders, that leaves out one very important variable: over what time frame?

[…]

For years, Tim O’Reilly has (correctly) argued that good companies should “create more value than they capture.” The idea here is pretty straightforward: if you have a surplus, and you share more of it with others (users and partners) that’s actually better for your long term viability, as there’s more and more of a reason for those users, partners, customers, etc. to keep doing business with you.

[…]

This is one of the reasons that both Cory and I keep talking about the importance of interoperability. It not only allows users to break out of silos where this is happening, but it helps combat the enshittification process. It forces companies to remain focused on providing value and surplus, to their users, rather than chasing Wall Street’s latest demands.

Eric Schwarz:

It’s a bit depressing because I can make a list of web sites, stores, services, etc. that I can go back and say, “Man, remember when x was good? I miss that.”

Michael Simmons:

Spotify is a vastly superior experience to Apple Music, which shows Apple doesn’t need to innovate their services and can rely on a user base that believes anything “Apple” is superior even when it’s not. Apple Music’s slow performance and lack of device handoff says it all.

Previously:

Update (2023-07-06): Future Tense (via Hacker News):

Amazon now feels more like a racket than an open shopping platform; you can’t find posts from your friends on Facebook because it’s clogged with unsolicited advertising; and Uber no longer seems like a cool, efficient taxi service, it’s morphed instead into a global machine for turning gig workers into the new underclass – it’s all part of a process Cory Doctorow has dubbed “enshittification”.

In this feature interview, the Canadian sci-fi author, journalist and digital rights activist explains why the digital world seems so exploitative and tawdry. But he has optimism for how things might be improved in the future.

Apple Appeals UK CMA Decision

Florian Mueller:

On Friday the UK Competition Appeal Tribunal (CAT) published a summary of application (PDF) of Apple’s January 18, 2023 appeal of the November 22, 2022 decision of the UK Competition & Markets Authority (CMA) to make a market investigation reference (MIR) into the markets for mobile browsers (particularly browser engines) and for the distribution of cloud gaming services. The court also announced that the initial case management conference would be held on Tuesday, January 24.

Ben Lovejoy:

Even more crazily, this is the second time that a single word has had a major impact on potential action against the Cupertino company on the very same issues.

The first time came down to the legal difference between an antitrust “study” and an “investigation,” and this time it all hinges on the legal meaning of the word “shall” …

If Apple can win on this procedural technicality, it raises the burden of proof on the CMA for the substantive issues.

See also: Hacker News.

Previously:

Update (2023-04-03): Juli Clover:

The Appeal Tribunal agreed with Apple, and said that the CMA should have launched the market investigation at the same time that it published the duopoly report in June 2021. By not doing so, it “erred in law.”