Top
Best
New

Posted by fnthawar2 21 hours ago

Shopify is moving from React Native back to Swift and Kotlin(shopify.engineering)
1078 points | 763 commentspage 3
seanhly 20 hours ago|
Bragging about "using agents to code pre-GPT" is quite the corporate flex... weren't they notoriously bad back then? Might as well say, "We've been doing spreadsheets with quantum computing since 2016"
keeda 18 hours ago||
I would not say they were bad, mostly just primitive compared to what we have today. I can only presume they are talking about GitHub Copilot which was released before ChatGPT. I believe at the time it was little more than “spicy autocomplete.” Yet it could be surprisingly capable, e.g. I recall this blog, also pre-ChatGPT: https://medium.com/data-science/github-copilot-crushes-data-...

That said I did happen to work with a team in ‘21 - ‘22 that got access to an older coding model from OpenAI, also called Codex, through a corporate partnership. We also tested it out in an autocomplete UX. Our experience was rather hit-or-miss and I was a bit skeptical of AI-based coding at the time. That blog post above and others like it were an eye-opener and made me wonder if we were just “holding it wrong.”

Then ChatGPT was released. It was nowhere as good as the models today but it could write reams and reams of correct code and I realized the world had changed forever.

mike_hearn 19 hours ago||
I'm skeptical. Pre-ChatGPT the models didn't understand tool calls or file editing so you couldn't really do targeted edits. So I really am not sure what they mean by this.

I mean, it's not impossible - I wrote a "coding agent" with GPT-3. It sucked balls. The idea was you write a Markdown spec file and the tool then compiled it to an equivalent source code one shotting it every time, but it hardly worked at all. The file changed too much every time and instruction following wasn't good enough, so it'd keep changing the interface exported by the file, and there were lots of bugs etc.

Delgan 18 hours ago||
The GP misquoted the article. They actually wrote:

> Shopify has been using LLMs to build software since 2021

GitHub Copilot integrated into VS Code started becoming available that year. It’s definitely not a coding agent, but it was certainly LLM-assisted programming.

mike_hearn 18 hours ago||
Ah, that makes more sense.
Javantea_ 8 hours ago||
I was excited to hear some details about how LLMs are changing big companies' workflows. This is a fairly straightforward problem and good on them for discussing it. My first gut reaction is that there is no way I would let LLMs write a significant amount of my codebase. And then I remembered that not invented here (NIH) is a problem I have. If I let it decide what code I ship, I am making the same mistake as writing all my code from scratch. When I find myself worrying about alignment, that is what rigorous computer security policy is for. If it's not catching serious bugs written by LLMs it's not catching bugs written by people. Treating my own code as if it was written by someone else is just another part of computer programming.
zhyder 10 hours ago||
AI dramatically reduces the cost of writing code (especially when you have a reference), so the scale between native and cross-platform is going to tilt more towards native now compared to before.

But I'm curious what their update will be in a year or two. Because these costs don't reduce as dramatically with AI (unless you fully give up control and vibe code it):

1. Reading code

2. Manually testing code

bdangubic 9 hours ago|
1. AI will read the code

2. AI will manually test code

mcsniff 20 hours ago||
I use Shopify app every day, multiple times a day to run my business and it has always been buggy and inconsistent for me on Android, and I don't expect this will make it any better, especially with more AI in the mix, but we shall see.

Who wants to bet there still won't be a dark mode?

jrochkind1 18 hours ago||
I'm not totally following the part about the simulator(s), probably because I haven't actually done mobile development before.

> When simulator interaction is needed, the CLI can connect to them via a remote mode and drive the UI via commands without having to inspect the layout or the accessibility tree. This enables blazing-fast performance and E2E tests.

I think I'm not following. Don't you still need to test the accessibility tree and layout in the actual layer the user will interact with?

raspo 17 hours ago||
I have done some iOS development and still couldn't follow what the article was saying about the simulator. I'm actually quite interested in it, because (in my experience at least) verifying that the UI works as expected is quite painful with current LLMs and the developer tools available. They talk about building a CLI and keeping business logic isolated, ok fine, but do they still run the simulator and take screenshots to verify their work?!
jrochkind1 13 hours ago||
indeed it's not totally clear to me if they do or not, my question too! OK, good to know it's not just something I was confused about because of lack of context!
azuanrb 16 hours ago||
It’s a reasonable tradeoff. Shopify uses Rails, and there’s been a long history of discussion around E2E testing in the Rails community.

In recent Rails releases, system tests, or E2E tests, are no longer enabled by default. The short version is that they’re significantly slower and more brittle. Basecamp also removed most of their E2E tests.

I don’t know what Shopify does internally, but my guess is that they’ve taken some of those lessons and are trying to apply the same thinking to mobile development too.

https://guides.rubyonrails.org/testing.html?#when-to-use-sys...

jrochkind1 13 hours ago||
On theweb, not surprised that Rails switched from kind of encouraging people to use as many browser-automated tests (under whatever name) as possible , to trying to discourage people from using any. Rails way really likes being absolutist.

I work in Rails too, I try to keep them to a minimum, but I definitely try to do at least one happy-path test of any major page (which includes automated accessibility audit), going without them at all seems insane to me.

azuanrb 12 hours ago||
Forgot the source but DHH mentioned it's not all, just most. Still makes sense to have on some scenario, just not all, or the default anymore
jrochkind1 8 hours ago||
Oh okay. "No longer enabled by default" made it sound to me like the suggestion was not to use them at all, glad I misunderstood.
negative10xer 20 hours ago||
I remember their blog post claiming how much of a win it was to move over to react native and maintain high performance. They even listed their performance metrics. At that time I was a mobile developer for an e-commerce business and the metrics they were proud to share were unacceptable on our native apps. Here they are coming full circle
schrodinger 20 hours ago|
Before and after LLMs.
ropable 7 hours ago||
And so the mobile app development wheel turns. All of this has happened before, and all of this will happen again.
azangru 1 hour ago|
If the argument, which seems to be "code is cheap; let's write implementations for multiple platforms", remains true, what do you think will continue turning the wheel?
lackoftactics 20 hours ago||
I believe this will be overall trend in industry. Dropping React Native and Flutter for native
aatd86 20 hours ago||
That would be a huge mistake if we expect many more hardware and OS running them efficiently than just iOS and Android. Best is to have an IR. Now maybe that IR can be turnt into native code. But we shouldn't be constrained. As an incoming framework author, SwiftUI is problematic for instance because it has a programming model which is dated. And I don't particularly enjoy the language either. Looked fine at first and then got more complex than I feel is needed.

oh yeah, disclaimer: I write UI frameworks and dabble in PLs.

organsnyder 20 hours ago|||
> That would be a huge mistake if we expect many more hardware and OS running them efficiently than just iOS and Android.

Is that something we should be engineering for right now?

aatd86 19 hours ago||
Just like any engineering and business decision, this is a tradeoff. I probably don't see things from the same vantage point. Can't help but notice a trend however. What if this accelerates, especially with AI being an enabler?
uncomputation 15 hours ago|||
How is SwiftUI dated? It uses a declarative model. I don’t see UI framework paradigms shifting that much.
aatd86 14 hours ago||
It is virtual dom like. We don't have access to a stable underlying element like we would with plain UIKit. You can build declarative models without this virtualdomness. But SwiftUI was created during the react boom so they went with the Zeitgeist, understandably.

Now this is somewhat problematic if someone wants to implement better fine grained reactive systems. And I posit that the next paradigm is going to be in that direction given what I've been working on (furthering current reactive systems which only go halfway).

sgt 4 hours ago||
This is such a clueless take, and I see it surprisingly often. Declarative UI does not inherently mean virtual DOM nor does it "automatically" mean slower than UIKit.

The abstraction is huge advantage, especially when targeting different devices and screen sizes. We (and that includes Apple) have been learning the value of those kinds of abstraction boundaries for years, well before React.

It's also important to note that SwiftUI and UIKit are composable, so if some small part of your app needs low-level, finer grained control, then go ahead and use UIKit/Core Animation/Metal and SwiftUI for the rest.

aatd86 3 hours ago|||
Yes, declarative UI is just an abstraction of imperative code. :) The rest is properties of the internal implementation. The VDOM way obfuscates the internals more. Doesn't let you control rendering appropriately. It is so because the diffing and reconciliation algorithm have to be able to remove any subtree of views/nodes from the UI tree.

Then you can only have islands of either paradigm within each other. UIKit and SwiftUI do indeed compose, albeit coarsely.

I can't blame them, they got influenced by react. Don't even blame react, it was a good attempt. Basically trying to build a UI from a snapshot of a tree. Except this is too simplistic a model. They designed it as if you could equate the number of games and the number of positions in chess. Like a markov chain. Except playing chess has side effects. A mere snapshot does not encode those.

I understand the mistake.

accumulator 19 hours ago|||
I think it'll become a trend at larger, well-capitalized companies and startups, but not universally. The article mentions hundreds of engineers have worked on Shopify's RN apps, so they're well positioned to maintain two native codebases with agents and practically infinite token spend. Migration will be a harder sell for resource-constrained businesses.

It also depends on features. Many apps don't rely on platform features (widgets, watch apps) and are essentially webviews, and those will continue to do just fine on RN.

conmod278 20 hours ago|||
Can React Native become a sort of Compiler which compiles to natives (Android/Apple) now that AI can help in that direction as well? I don't know much about mobile ecosystem though.
lackoftactics 7 minutes ago||
the tricky part about React Native is that you almost always need to use it with expo.

I developed React native app for ios as side project and took breaks often and came back to have to do big updates with expo to make it work again. Maybe there is smoother process, but this was annoying

RetpolineDrama 20 hours ago||
Yep. Flutter has been dead-end for a while. RN won't last through 2027.
SV_BubbleTime 17 hours ago||
LOL, flutter/dart are pretty awesome and we have yet to encounter something that needed improvement.

We have small shims for IOS or Android BLE. But otherwise the discussion of should you go native is really a discussion of how many employees do you have to throw with this?

akmarinov 5 hours ago|
Not mentioned but this also gets them away from what now seems monthly npm supply chain attacks.

Big win for security

simonhamp 5 hours ago|
You don't have to ditch cross-platform building entirely just to escape dependency hell
akmarinov 5 hours ago|||
No, but it’s a nice bonus
hn993302 5 hours ago|||
Do you even escape dependency hell this way?
msephton 5 hours ago|||
It's a developer decision. But I'd say it's easier to not use dependencies on native because there are more capable system API. I don't use any in my iOS apps, and only one dependency in 20 macOS apps.
akmarinov 4 hours ago|||
Yeah, with iOS for example, you typically need very little third party dependencies for functionality. The main ones are things like analytics, crash reports, etc

I’m not aware of any attacks on native package managers in the past 5 years. The closest would be a poisoned Xcode build in China that wasn’t downloaded from Apple a while back.

Also getting an attack on one of the platforms means at least ~half your users are safe on the other one.

More comments...