9 ms·
So, they've reduced 1.7M lines of code to 360K. Let's pause here for a moment: - NumPy is 360K lines mostly C - Postgres is around 2.1M of C - Go 1.13 is aro
by aldanor 7y ago
So, they've reduced 1.7M lines of code to 360K. Let's pause here for a moment:
- NumPy is 360K lines mostly C
- Postgres is around 2.1M of C
- Go 1.13 is around 1.5M of Go code
- Rust 1.37 is around 1.2M of Rust code iirc
- core llvm is around 3M of C++ iirc
...
A chat app is 1.7M. A chat app...
Makes me feel sorry for all the time spent/wasted by all those devs, many of whom are unquestionably brilliant and could've worked together on something truly awesome, big and useful. But we all know that doesn't pay the bills and so here we are.
- runeks 7y agoThe only other application in your list is Postgres. NumPy is a library. The other three are compilers. Why are you comparing these with a GUI-based chat application?
- moron4hire 7y agoI have a set of code I use for my VR projects that I've been iterating on over the last five or so years. It includes a ton of not-VR stuff, too, just stuff that I tend to include in my projects. (aside: and I'm not trying to make it a "framework". It's just my own code and it's only publicly available in the sense that I don't charge for it, don't want to waste a private Github repo on it, and won't stop anyone from using it, but I'm also not going out of my way to teach them how to use it). THAT code, my "all encompassing, personal repository for every VR app I'd ever make", is only 100K lines of code. I once downloaded all of my dependencies and counted all of those lines and still only got to 200K. Well, not counting Unity. But at that point, you might as well start counting the LoC of the OS.
- pests 7y agoFor what it's worth, GitHub private repos are now free so you don't have to sorry about wasting one.
- moron4hire 7y agoYes, I know, but I do also occasionally share code snippets out of it. If someone in a chatroom is asking how to do X, I'll just link to a source block in my repo. It's lazier than copy-pasting the code, but I also think it's good to let people see the broader context, maybe explore on their own a little. I wouldn't mind if other people started using the code, but I've been burnt too many times during attempts to push my OSS projects over the years that I just don't want to put any actual effort into attracting people anymore.
- notyourday 7y agoIt's a chat app that works very well even on the crappiest connections. If it having 1.7M lines of code indicates anything it is that creating a "simple app that provides simple functionality over a network well" is hard. Look at the garbage generated by Google - text messages and images on Google hangout are not guaranteed to arrive in order ( or even be sent in order ) unless you are on a great network.
- pathseeker 7y agoOrdering messages and providing reliability does not require 1.7M lines of code.
- notyourday 7y agoCode wins arguments. FB messenger beats everything, Whatsapp, Wire, Signal, WeChat, Telegram included, in the suckiest network connections.
- ringzero 7y agoRepeating a point without adding proof doesn't make your point more valid. When people say "code wins arguments", they're referring to using source code to prove something, not "it wins because it has more source code" (???).
- notyourday 7y agoPeople say "Code wins arguments" because written code that works demonstrates the winning argument against the code that is either not written or does not work. FB messenger exists and works on crappy connections. Google hangout exists and messes up on crappy connections. Telegram exists and messes up on crappy connections ( see the issues it has in Africa ). Signal exists and does not work well even on non-crappy connections. Whatsapp exists and sort of works on crappy connections. Matrix exists and sucks on crappy connections. What we need is something that exists and works on crappy connections that has less LOC than FB messenger to demonstrate that it is possible to handle crappy connections and modern messaging in much fewer lines of code.
- abhia 7y agoI'm fairly certain that they also included third-party libraries in that 1.7M.
- greenshackle2 7y agoIt seems you are correct: > We also used quite a few of the OS libraries, including the JSON processing library, rather than building and storing our own libraries in the codebase.
- bytematic 7y agoSometimes making something simple is harder than making something complex
- lwb 7y agoHonestly, a chat app that 1 billion+ use per month that includes payments, camera effects, extensive social integrations, stories, GIFs, reactions, games, polls, voice recording, calling, video chat, and works across all mobile platforms, with nine years of technical debt, that thousands of developers build simultaneously seems WAY more complicated to me than any of your examples. Messenger may not have "HN clout" but the devs who work on it are having some of the greatest software impact in the world.
- _bxg1 7y ago> that includes payments, camera effects, extensive social integrations, stories, GIFs, reactions, games, polls, voice recording, calling, video chat To be fair, this is part of the problem ^
- derefr 7y agoIt's an inner-platform effect, certainly, but not one FB asked for. If they were allowed by the app-stores to factor their app into separate "plugins" that were auto-installed when a friend used them in a chat, the way iMessage does, they'd probably do that. But they're not allowed to have their own seamless plugin ecosystem, so into the monolith everything goes.
- _bxg1 7y agoNo, they specifically used Messenger as a way of pushing all of those different things on its massive install-base. Anything that distances them from the user in any way would compromise on that objective.
- dmos62 7y agoFacebook and all the rest benefit from developing closed ecosystems that others can't benefit from. It's not a coincidence that their systems are systems-within-systems.
- threeseed 7y agoJust because there are features that you don't use doesn't make it a problem. In fact people who like stories and camera effects likely way outnumber the people that don't.
- A4ET8a8uTh0 7y agoWhile I understand the sentiment, you are making an assumption here that all messenger is a chat app. It seems excessive ( and it is ), but you don't know what kind of heavy lifting is being done under the hood. I am not really defending it, but number of code lines alone is not a good way to evaluate code.
- ardit33 7y agoit seem you don't have experience on large scale apps... and the people that make these type of comments almost never have had to work on large applications..... Spotify had about 500k, lines of code in 2015, (not including external libraries). We did make it in a feature based architecture, where there was a main container app (and a major core playback library) and for every major feature they had their own sub-project.... and there were 10+ teams contributing into it. There were about 13 features at the beginning, (think, playlists, radio, shared ui libraries, etc...). Each feature was about 10-20k lines of code in total. So, about 2-3 features equal a small standalone iOS app. When I left, there were more than 80 features in the app. Some were essential, many were a/b tests, and some were probably just legacy/waiting to be removed. 80 features * 15k lines of code = 1.2mil loc, easily, and they are the equivalent of shipping 20 small apps standalone.... What are these features and why is just a stupid music app so large? : video, podcasts/shows, genius, etc.. etc.. etc.... To users just looks like another tab but almost every one of these major features could be its own standalone app for size and complexity.
- wodenokoto 7y agoI would love to read more about why large apps are so big. I currently work on a project that is much larger than I would expect it to be, both in terms of codebase and people, and while I don't know who to jank, I also don't understand why it has to be so big.
- Domenic_S 7y agoShort answer: because it's way more feasible to remodel your kitchen than to tear down your entire house and rebuild it. And then your bathroom. And then convert the garage. And then add an addition. And in 10 years you have this cobbled-together monstrosity
- Aeolun 7y agoBut your garage (the first part of what is now your house), was built with a weird kind of screw, that was only sold by one shop at the time, but was cheapest. Now your entire house is built with those screws, but they’re not produced anymore so you’ve set up a small smelter next to your home where you’re making them yourself. Unfortunately the quality is a good bit worse, so parts of your house start degrading faster and faster, but meanwhile you’re still building all new parts with your shitty screws. Nobody wants to replace the screws because “It’s a proven method”, ignoring all signs to the contrary. All new parts of the house are only as good as the worst part, the screws, and the moment anyone steps on the wrong plank the whole room comes crashing down. But nobody worries, next time they’ll just use two screws.
- greenshackle2 7y agoAll these programs have textual interfaces only (as far as I know). Having a GUI doesn't justify 1 million+ LOCs, but just for a sanity check, pgAdmin 4 has ~260k LOCs, without counting its dependencies.
- keyle 7y agoThis would be a big part of this you know: > [...] We accomplished this by using the native OS wherever possible [...]
- HeavenFox 7y agoRumors are the FB iOS app have more lines of code than iOS itself
- saagarjha 7y agoI would not be surprised if this is the case. I am fairly sure the corollary is true: Facebook has more people working on iOS than Apple does.
- aylmao 7y agoI thought this comment was making the opposite point, that it was impressive that Messenger was now only 360K LoC. I honestly think it is. Compliers, DBMS, a library such as NumPy— they're all complex, but Messenger, even considering the features removed, is a very full-featured application. We're not talking IRC here. It has activity status, payments, stories, photo filters, audio messages, location sharing, video-calling, etc. It's actually pretty impressive that that fits in 360K LoC IMO.
- mliker 7y agoThis "chat app" is used by more than a billion people in the world.
- saagarjha 7y agoNumber of users has little correlation with number of lines of code.
- madeofpalk 7y ago> Makes me feel sorry for all the time spent/wasted by all those devs, many of whom are unquestionably brilliant and could've worked together on something truly awesome, big and useful I'm really not a fan of this virtue shaming that people often tend to do as developers, where if you're not working to solve world peace then you're a waste of a developer. Sometimes people just like getting paid? Sometimes people just don't really care, they just want a job or want to write code?
- ksec 7y agoI wonder how many LoC for Whatsapp, Which is comparable to Messenger. And what is it written in.