8 ms·
Analysis of the Facebook app for iOS
- bdrool 10y ago> DO_NOT_USE_OR_YOU_WILL_BE_FIRED What could possibly be in there?
- spicyj 10y agoWe use it as a joke name for functions/modules that are deprecated or dangerous, or that otherwise should be avoided. It works pretty well even though it's (probably) an empty threat.
- i336_ 10y agoThanks for the info :D If I may ask, what's the "internal joke" (https://twitter.com/legneato/status/650491741343084545 https://twitter.com/legneato/status/650491741343084545) about? Also, I take it that the described duplication is due to isolation and compartmentalization (which I can appreciate). I'm curious if some kind of "final dedupe" could be tacked onto the end of the build process that just runs a bunch of fixed algorithms on the assets to find and remove duplicate resources - and maybe even code fragments, like Courgette (https://www.chromium.org/developers/design-documents/software-updates-courgette https://www.chromium.org/developers/design-documents/softwar...) does. FWIW, doing something like this would probably take a lot of pressure off the dev teams and make everyone's lives easier. On the current track, the app will be 300MB in a few months. lol
- harryf 10y agoAnd anyone got fired yet?
- Spiritus 10y agoWhy not just remove them instead?
- tokenizerrr 9y agoThe same reason why you otherwise deprecate stuff. Because it's still used. As for React, they have such a variable to allow interop with the react dev tools.
- desdiv 10y agoIt could be from React: https://github.com/facebook/react/blob/master/src/fb/ReactFBEntry.js#L16 https://github.com/facebook/react/blob/master/src/fb/ReactFB... That or it's a shibboleth common to Facebook projects.
- kilotaras 9y agoI once saw python code if 'i_know_what_im_doing' not in kwargs: raise ...
- efaref 9y agothat_function(i_know_what_im_doing=False)
- pdpi 9y agoIn a twisted kind of way, I'd call that a feature. If you're aware you don't know what you're doing, but still want to do it, that's kind of ok. Problem is when you're not even aware you're about to jump into some pretty hot water.
- joewalnes 9y agoJUnit ships with this method: void _dont_implement_Matcher___instead_extend_BaseMatcher_() I know this because I wrote it. If you're interested in why: https://www.reddit.com/r/programming/comments/nlt5x/i_believe_this_is_exactly_how_not_to_design_a/c3awk2i/ https://www.reddit.com/r/programming/comments/nlt5x/i_believ...
- LeoNatan25 10y agoThis is really unacceptable and so easy to solve, had they even bothered. But it has been known for years that Facebook just cannot (or will not) manage its application development process. I remember reading somewhere that they developed build tools that take multiple versions of the same static library and mangle the symbols so that all versions can be linked into a single binary and there are no symbol collisions - all this to allow developers to use whatever version they started of, and god forbid, require some sort of review or cooperation between developers. It is very sad to me that so many companies (start up or otherwise) aspire so much to have the same work methodologies as this company.
- brian-armstrong 10y agoIt takes just a little discipline, but nobody wants to do it. You're completely right - it's a shame how often products are made without any sense of deliberateness.
- lazzlazzlazz 10y agoThe fact that you think this third-party analysis has discovered an incredibly easy way to radically reduce the size of the Facebook app - but that Facebook has not "discovered" the same "fix" - reveals an oversimplified perspective of iOS, app development, and large tech companies. I absolutely guarantee that this analysis is missing some significant complexities, and that Facebook understands what's actually going on under the hood.
- mazerackham 10y agoLol +1 here. I guarantee LeoNatan25 that the situation is MUCH more complicated than he/she is giving credit
- jfoutz 10y agoIt's funny, because there seems to be a lot of effort to get exactly the right version of asset in every circumstance. I'd wager showing an old version of the thumbs up really would get someone fired. It's so much funnier though, that the solution is to just keep throwing in more and more copies of the images. I feel kinda bad for the poor developer responsible for keeping all of those copies up to date. Very much 'i pass butter' kind of programming.
- rurban 10y agoNew PM?
- iamleppert 10y agoThis is exactly what happens when you don't bother to have any coherent architecture. And is why you shouldn't get a job at Facebook if you really care about what kind of work you do.
- CoolGuySteve 9y agoThe funny part is even if you do interview at Facebook, they only ask algorithm whiteboard questions. So it doesn't really matter if you have the sort of aesthetic values that cause this horrible app or not. If anything they might be actively selecting for it by filtering out experienced hires.
- tmsldd 10y agoThis is a side-effect of the current app business model, which sacrifices software quality to deploy it fast to the market... who expends 1 month optimization while a new app comes every 6 months ?
- nagyf 10y agoWhy do you have to download all localizations? Isn't it possible to download only the required one after install? As far as I know Waze does this, for example. (Honest question, I'm not a mobile developer)
- ade2 10y agoSure you can! Downloading the localizations is a large extra complexity in development though, while simply bundling them all is a minor bother in increased download size, for the customer.
- pacificleo11 9y agobecause the complexity of development will increase many fold by doing so.
- enig_matic7 9y agoIs there a privacy analysis of the Facebook app that anyone knows about?
- TorKlingberg 9y agoThere must be a lot of people out there with 16GB iPhones that are constantly out of space. I don't think Apple publishes stats, but I guess >50% buy the cheapest model. The Facebook app also likes to use 500 MB for cache with no way to clear it other than deleting the app.
- jimboj 9y agoLots of apps are like this and I don't understand why. They should be using the caches folder and "the system may delete the Caches/ directory to free up disk space". However I have never seen this happen. When my phone runs out of space I have to manually delete these apps. Are they not using the correct folder, or is the system not deleting the caches?
- pacificleo11 9y agoI am one of them :(
- alimbada 9y agoI have a 16GB iPhone 6 and the Facebook app was the first I culled from my phone ~2.5 years ago. At that time I was getting annoyed that the app had slowly creeped up in size from between ~60MB and ~80MB to over 100MB. I have no intention of ever installing it again as I don't think FB have any interest in reducing the size back down to that level.
- azernik 9y agoAre these files not compressed on disk? I'd imagine duplicate data like this compresses very well.
- kevingadd 9y agoThat's assuming the on-disk compression deduplicates. ZIP does not and 7z only does in 'solid' mode. Compression is not a silver bullet for this either - if you have a repeated 8MB sequence in 8 different parts of a 250MB file, whether or not the sequence gets deduplicated depends on the compression algorithm, dictionary size, speed setting, etc. The solution to all the duplicated files is to dedup at build time.
- coldcode 9y agoI thought our apps were fat, this is ridiculous. But clearly they belong to the school of never rewrite just keep adding more and more and more. Eventually you wind up having no idea what you are shipping and the quality goes in the dumpster. At least you can use the web if you hate the mobile app (I do).
- beezischillin 9y agoI find it fascinating that they managed to get to this much disk footprint so soon without any of us having much of an idea about what is going on below the good. Despite weekly updates with nonsensical generic descriptions we still don't have actual features like support for devices like the iPad Pro. Especially with all the frequent A/B testing bull they're pulling recently, the quality and usability of their software is dropping on a weekly basis. It just seems like a bad combination of everything on a level Microsoft at their worst couldn't even come up with.