And I don't think this is a knock against it. React Native is mainly an effort-multiplier, and Facebook has plenty of resources to do 2x the work (or 1.5x or whatever it is in practice)
And it's not just an effort multiplier, it also provides a unified codebase on both platforms which helps to provide a more consistent UX and less bugs.
Sure, and the single biggest weakness over at Mozilla is that they're more focused on building a better Chrome (a.k.a. following the leader) instead of innovating or fixing bugs. That's why we've lost useful tools like the 3D DOM rendering in favor of a fucking chat client in Thunderbird. Or why if your system is lagged enough you can hit Cmd+T, start typing a URL, hit return, and have Firefox load the new URL in the old tab… but at least we have that awful search instead of separate, proper, URL and search bars. It's why we get limited-time-only!!! paid themes while all extensions get disabled because someone forgot to deal with an expired certificate.
Mozilla, and by extension the Firefox crew, lost sight of their core competencies a long time ago. Every dumbass design decision the Chrome folks make, Mozilla will emulate a few years later.
Definitely agree on some of this stuff. The themes situation sounded pretty delusional the whole time. And there were many more decisions like that.
However, what is this about separate search and url boxes? I have that, still. You don't have to have just the single box. Still, the main url box still behaves as a search either way. Is that what you mean?
I generally prefer react native apps (note that this is not the same as react which is more of a web framework) over Flutter. Because Flutter fakes native UI elements instead of just calling them.
The desktop messenger apps are still react native. The mobile apps were always native (ObjC and C++ on iOS, C++ and Java on Android). The mentioned project was mostly to rewrite the core of messenger in C to further reduce overhead and code size compared to those other mentioned languages.
Can anyone shed light on where the complexity is coming from? Even 360kloc for a chat client seems excessive - its original size, 1.7Mloc, is hard to accept. How does it break down - e.g. 120kloc UI, 120kloc networking/data, and 120kloc other?
(For comparison I dl'd https://github.com/signalapp/Signal-iOS and ran cloc. It's about 400kloc of Swift, so I guess it's in the ballpark. I just wouldn't have guessed it was so big, and I'd like to know why.)
Just conjecture here since I have not ever done work in the messenger space: Perhaps it’s like Uber in that all of the complexity comes from localization features?
Edit: I saw another post further down that hypothesized that all of the complexity was with integrations outside of barebones messaging like photos, calls, other Facebook products etc. which seems plausible as well
Because you don't make money deleting code. People at tech giants don't love their employers like they are their mother or something. They don't do things that don't get them rewarded. Implementing new features does.
And so engineers implement new features and write more code and release the features and get rewarded for doing so. Once the feature is done, if it's easy to delete it they will. If not, and it never is, they'll leave it around and move on to something else.
When you have 3 billion users if you make the company 1/100th of a penny per user per year you pay for yourself. That's like increasing the value of the average user by 1/200,000. So your feature doesn't even have to be that good. It just has to be minimally better than what it's replacing. Restyle a button to be more appealing in the peripheral vision of users and that probably breaches that threshold.
Reality is that it isn't quite this easy (fewer users are that valuable, most don't use it daily, etc). But it gets the point across. You work there to make more money and deleting some feature that is probably referenced by some other dead code somewhere else isn't profitable work for anybody.
I actually don't think it's a ton. Go count the lines of code of one of your small projects. I have something I spun up in the evenings over a few days and it's 2000 lines. It feels like nothing.
Tech giants have thousands of engineers working on these projects for many years and delete and rewrite features on a regular cadence. The fact that Messenger is only ~500 times bigger than my project is kinda weird to me. Mine has 1 user, it has 3 billion.
Why is it depressing? Does some collection of people on earth suffer from tech giant apps having too many lines of code? It very effectively shovels money from these soulless companies into the pockets of the employees. No living entity is suffering, just the company from it's own bloat.
I find it to be quite a beautiful result. Developers get to develop and not focus on maintenance. The lack of local maintenance creates repository wide maintenance jobs that are also interesting in their own right.
It is tragedy of the commons. But really the only one who deals with the tragedy is the corporate entity.
Companies don't suffer. That is reserved for the living.
The depressing part is the large amount of waste here. Wasted time, wasted opportunity, wasted money. Wasted lives. What you're doing here is known as the broken window fallacy.
The same developers could be developing meaningful things. They could be learning, like adults do, how to clean up after themselves, and so lead richer lives. The people forced into being code janitors could spend their time making things that actually get used. Or everybody could just do less work and go home early, doing things they care about.
And speaking of use, let's note that the waste impacts the users and the world. The users could be getting better software. More useful features. Fewer bugs. New products, new ideas. They could also avoid a lot of the chaos that comes when a company dies of pernicious waste. For example, note that the original browser company, Netscape, failed due to poor code maintenance, letting IE take over. What might have happened if they had done better?
My bet is on "object-oriented obfuscation" and bloat caused by "modern" coding styles. Looking through the Signal source you linked to, I see tons of the former. There is an absolutely insane amount of boilerplate-looking code in here, for example: https://github.com/signalapp/Signal-iOS/tree/main/Signal/src...
I don't know Swift or the iOS UI API, but a lot of that code seems to be manually creating and positioning UI elements and otherwise implementing UI functionality that I'd expect the OS to handle. It's a lot of code that should really be data (arrays, structures).
To offer a huge contrast, a long time ago I wrote an MSNP chat client in pure Win32, and it was around 2kloc. The binary was 24KB. Of course it only supported contacts, presence, and text messaging, but I still can't see features like audio/video or the crypto that Signal has needing 100x more, especially if they use OS functionality for much of them.
Messenger on Android is genuinely one of the buggiest pieces of software I have ever used. It astounds me that people will take technical advice and use software libraries developed by this company that delivers such poor quality software.
Just a few of the issues off the top of my head. Most of these have been ongoing for several months and some for several years.
* Type something into the input box, quick-switch to another app, then switch back to messenger. Your half-finished message is now gone. But if you kill messenger completely then bring it back, your message is back - even if you have sent and received dozens of messages in the interim.
* The sticker selector has been completely broken for at least 3 years. It shows the grey smiley face placeholder image for every sticker pack apart from your bitmoji rip-off pack. This bug has been around long enough that I have verified it happens on 3 different phones from different manufactures (because I have upgraded twice in the time this bug has existed).
* The recently used emoji category may as well be using a random number generator to select what goes in there.
* The share menu from other apps sometimes shows Messenger twice. This doesn't happen for any other apps for me.
* Custom notification sounds on a chat will randomly revert back to the hideous default sound.
* Images I post will display properly until one other person sends a message to the chat, then will turn white and not come back unless I hard-stop the app and bring it back. It's not clear if this is occurring for other people in the chat, but I've only seen it happen to my own images and not others'.
* Quite often someone will post a picture to the chat and instead of a picture I will see them post the message "XXXX posted a photo". The only way to see the photo is to hard-kill the app and bring it back.
Messenger does a ton of things. It does video calls, voice calls, text messages... you can send money, send gifs, send videos... you can even view Instagram Stories for some fucking reason.
I’d be shocked if they don’t have 10k loc devoted to the status indicator alone. It’s cross user-facing service, cross platform, and notoriously unreliable enough to be a convenient excuse for social inaction (not that I’d know anything about that /s).
“We accomplished this by using the native OS wherever possible, reusing the UI with dynamic templates powered by SQLite, using SQLite as a universal system, and building a server broker to operate as a universal gateway between Messenger and its server features.”
This was a clusterfuck. When David Marcus failed upwards they decided to throw out the overcrammed feature experiments that had turned the app into Word 2000, a deluge of features with 2-8% user base.
But they never informed any of the dozens of other teams in the company they had courted for 5 years … gaming, payments, bots, etc and who had been building on top of it and brought partners.
Just overnight suddenly they went ‘fuck you and your customers, we need to compete with iMessage in the US, we deprecate everything and your partners can eat it’
Of course it failed and the cost was massive - partner trust was destroyed, game developers ruined, people left without access to bot based financial services, etc.
What’s the context here? As someone who doesn’t know anything about Facebook or messenger I have difficulties understanding what happened. Are you saying that this rewrite was a clusterfuck, or that the previous implementation was one?
I can’t remember if this is the exact library LightSpeed uses, but this CG/SQL library that Meta made makes it easier to write complex SQL queries for SQLite: