How we built Facebook Lite for every Android phone and network
code.facebook.com
code.facebook.com
FB does so much awesome technical stuff, and often shares/open-sources it. But the actual FB site -- for me, at least -- is lacklustre. The only thing it really shines for is event management.
This said, I guess anyone who reads HN is likely to be an outlier; and the site's success evidently means a lot of people like it.
It could be a huge business for Facebook if they could be bothered.
However, I just looked... and they make so much more than I ever imagined. Who are these people clicking Facebook ads, or is it so amazing at targeting me I haven't noticed myself clicking.
Worse, every time I try to use it, it seems like everything on the page is jumping around; it takes too long to render and scrolling isn't smooth, so it's impossible to just smoothly scroll down and see everything. But I see that on a lot of sites these days.
What about HHVM makes you think that? Producing an optimised version of PHP is easier than moving from PHP to another language.
I really don't understand why they don't fix the problems on their own website first.
Facebook engineering is over-engineering the whole application across multiple platforms but can't fix many usability issues and add missing features on many of them. Finally a like/action, comments around a few hundred "friends" with text, audio and video shouldn't require that much effort. I mostly suspect they over engineer because they can! namely too much money can buy too much talent and skills. But maybe they don't need that much.
Contacting support lead to something like "Thanks for your report. While we don't have time to investigate or address every problem that's reported, we take all problems seriously. Please try again at a later date to see if this issue has been resolved."
I get that we're extremely small fish in Facebook's eyes, but I would've thought reselling $30k/mo in ad inventory would at least get us some way to have these issues resolved for their clients.
That said, I can't say Google is all that much better.
This contradiction made it really weird to get started with React. It still makes me feel dirty sometimes.
https://www.facebook.com/notes/facebook-engineering/under-th...
They go through all this reverse engineering before they go back to usual solution of code stripping with ProGuard.
And then continue on with more crazy hacks.
FB engineering is usually impressive feats but questionable motives. "Wow you sure fit that square peg through that round hole. That's ...impressive"
Do you think we wanted to do a crazy runtime patch and didn't explore every other short/medium-term option? Do you think we wanted to write our own build system (Buck)? Or our own JS view layer (React)? Our own PHP virtual machine (HHVM)? Our own database (Presto/RocksDB)? Our own IDE (Nuclide)?
You "laughing" tells me you have never worked on a large codebase with hundreds of engineers shipping very quickly, so you can't empathize with the sort of problems that come up.
Btw, every time Google Apps hit the limit they merely bumped the limit in AOSP and dropped support for old OS versions...
That sounds laugh worthy to me.
I also work at a large company that has had its own mobile development "issues", and I found those plenty humorous as well.
I shall gaze from afar.
There's been very little really truly interesting blue-sky technical work at FB that's I'm aware of other than trying to figure out how to get around pretty prosaic issues through clever hackery rather than just doing it some other already established way and trying to figure out how to exploit their user-base for targeted ads (which by many accounts from folks I know aren't all that great w/r to ROI).
The more interesting stuff seems to be happening in their acquisitions like WhatsApp and Oculus, but the "Facebook stink" feels like it's already starting to get to those teams as well.
I honestly have almost no idea what their 13,000 employees must be doing outside of data center operations and various O&M projects at this point. Building quality mobile client software definitely doesn't seem to be it.
What I find immensely interesting is how they're pulling in around $11/user/year (about $4 in pure profit)! Their economy of scale is pretty good considering it only costs them about $7/user/year to run the service. I'd easily pay $10/year for a service like FB that didn't entirely suck and had all my friends on it.
If you're not blocking facebook ads, they're making far more money from you than $10/yr. There's a huge difference in the value of different eyeballs and anyone on HN is probably worth significantly more than average to advertisers.
$11/user/yr is tiny for a social network that is many people's primary communication tool, it's only going to get bigger as facebook growth levels off and mobile continues to monetize better.
Unfortunately I can't get it through google play (not available in the UK) so I have to manually download and keep the apk updated. I wish they'd enable it for all countries.
The separate messenger app is also going that way, hopefully they'll eventually create a Messenger Lite app too.
None of those pesky permissions like snooping through my contacts
That may depend on what brand phone you have though, but my Lenovo and my Huawai used to be able to do it.
Combine that with something like Greenify that will stop the app from doing stuff in the background and killing your battery, and it's actually a better experience than the mobile website. It's just insane on how much you must tame the application to be acceptable to use. Wish Facebook engineers would take note of how bloated and overreaching their app is by default.
For some reason every bank on the planet needs to know my location, send/receive text messages on my behalf and listen to my microphone in order to display a damned account balance.
Because being logged in with FB in the browser tracks what sites you visit (or at least it did).
Tinfoil is great. It's basically just a wrapper app for the mobile site but it basically allows much greater control over what data you want FB to have access to.
In my case, nothing.
Just install "Trillian"; it does Facebook messaging, plus a bunch of other networks, and is fast and low-resource.
[1] https://web.archive.org/web/20130624002458/https://www.lite....
[2] https://play.google.com/store/apps/details?id=com.facebook.l...
* in selected countries.
It wraps the http version in a very nice fashion gives you configurable message notifications, offline browsing. Allows you to disable images and other niceties.
There's an extensive changelog on the github page, and you're free to add new features if you feel like it.
To "install" the app you would just provide link to your production server to the Android OS and it would appear on homescreen.
You might also be interested in exponentjs.com, they're building what you describe using React Native.
I wish there was an iOS version.
But this approach sounds like a new architecture of building android application which gives more control on server side since have core logic there.
I hear things like virtual machine on the client, sending a UI DOM over the wire, executing most application code on the server - but it's a long-winded description of a web browser. Using different technologies for the slots, but basically an isomorphic thing.
Keep in mind that this is not the official release location, so caveat emptor.
No. 1 MB downloads in seconds on most connections; slow connections will be closer to half a minute than to 'seconds'.
This is why the Facebook app is so bloated in the first place, assumptions about connections and devices in the majority of the world.
Still. The point is that this does not take several minutes to download, and thus is unlikely to fail. And that's a huge achievment on Android. Applications that do very little can very easily get to 5 or 10MB. Facebook does quite a lot, and the benefits of doing that with only 1MB are obvious.
> Downloading a typical app with 20 MB APK can take more than 30 minutes on a 2G network
Then again overstating accomplishments is pretty standard for tech blog posts.
In what universe is a 600MHz CPU and 290MB of RAM restrictive for a glorified RSS reader?
We detached this subthread from https://news.ycombinator.com/item?id=11252782 and marked it off-topic.