Rewriting the Messenger codebase for a faster, smaller, simpler messaging app (2020)
engineering.fb.com
engineering.fb.com
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.
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.
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?
Things like Flutter are the new ones that have been able to learn from and improve on it.
React native is pretty heavy. Works nice and happy for those who enjoy it.
(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.)
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
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 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.
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?
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.
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.
Edit: @flockonus (now deleted, why'd you do that, my new HN friend?!)
If by "karma == moving maintains" you mean emailing hn@ycbombinator.com like the rest of us.. then ok ;)
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.
There are so many more. Terrible software.
My favourite thing is perhaps how they auto convert everything to emoji even on my (S21U) mobile where my keyboard has direct emoji input.
I like my text based smileys dammit - please let me keep them! :-)
iOS only.
“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.”
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.