5 ms·
How in the name of everything did they manage to write 1.7M lines of code for a messenger app? That is an astonishingly large code base! We're talking about an
by hvidgaard 7y ago
How in the name of everything did they manage to write 1.7M lines of code for a messenger app? That is an astonishingly large code base! We're talking about an instant messenger app with heaps of features, having a LoC footprint 3.5% of the size of modern Windows.
- azinman2 7y agoAnd they ended up in hundreds of thousands of lines :) Wonder if part of this is custom video / audio codecs? That I’d imagine would contribute a good amount...
- philips4350 7y agoI wonder if react native library code and all the other code related to it like the js engine is included in that metrics.
- danabramov 7y agoThere was no React Native in the Messenger app before the rewrite.
- philips4350 7y agoOh my bad, i thought all facebook apps used react native
- tasogare 7y ago> Since then, we’ve added payments, camera effects, Stories, GIFs, and even video chat capabilities Simple: they added tons of crap nobody care. On this list, I only use video. Messenger is valuable because of the network effect, but feature wise 2003’s MSN was good enough.
- throwaway55554 7y agoDon't forget all the code to support A/B testing.
- hvidgaard 7y agoNone of that justifies 1.7 million LoC.
- Ayc0 7y agoThat's not true, the application, whether you like or not, it full of micro-interactions, well-done animations and transitions, features like the payment or stories, you can take photos directly from the app, etc. With that many features, it doesn't surprise me that the previous codebase was 1.7M LoC. Sure if you count only the messaging part, I'm fairly certain that the LoC is way lower than this. It doesn't make sense to compare the number of LoC of messenger to the number of LoC of software like Postgres because Postgres tries to be good at 1 thing and messenger tries to have a ton of features with good UI and UX. I don't like many of their features (I'm not using the stories or the payment), but some of my friends do and you have to recognize the work that the messenger team did to make them work that well.
- SifJar 7y ago> nobody care > _I_ only use (emphasis added) Just because you don't use those features, doesn't mean nobody cares about them
- ashishb 7y agoLOC is proportional to the number of engineers on a project. All engineers have to justify their existence, so, they will write code.
- therealdrag0 7y agoI've never felt the need to justify my own existence. There's always been a longer backlog of work than my teams would ever get through and managers who appreciated the work getting done. Another plausible explanation is lack of code re-use and reinventing the wheel because you don't know someone else solved the same problem. Also correlates with number of engineers.
- deleted 7y ago[deleted]
- FunnyLookinHat 7y agoI had the same question... And that's not counting LOC on the server. And all of this is for... glorified text messaging, right? I don't use FB so I could be missing context or features.
- Gene_Parmesan 7y agoOne of their points in the article was how they've decided to use more of the native OS interfaces instead of implementing their own versions (!!). For instance, using the OS's native threading library instead of writing their own. So, the number of LoC kinda start to make sense when you think about them re-implementing some not-trivial chunk of an OS's native functionality.