Hacker Newsnew | past | comments | ask | show | jobs | submit | mattgreenrocks's favoriteslogin

> I bet that WhatsApp is one of the rare services you use which actually deployed servers to Australia. To me, 200ms is a telltale sign of intercontinental traffic.

So, I used to work at WhatsApp. And we got this kind of praise when we only had servers in Reston, Virginia (not at aws us-east1, but in the same neighborhood). Nowadays, Facebook is most likely terminating connections in Australia, but messaging most likely goes through another continent. Calling within Australia should stay local though (either p2p or through a nearby relay).

There's lots of things WhatsApp does to improve experience on low quality networks that other services don't (even when we worked in the same buildings and told them they should consider things!)

In no particular order:

0) offline first, phone is the source of truth, although there's multi-device now. You don't need to be online to read messages you have, or to write messages to be sent whenever you're online. Email used to work like this for everyone; and it was no big deal to grab mail once in a while, read it and reply, and then send in a batch. Online messaging is great, if you can, but for things like being on a commuter train where connectivity ebbs and flows, it's nice to pick up messages when you can.

a) hardcode fallback ips for when DNS doesn't work (not if)

b) setup "0rtt" fast resume, so you can start getting messages on the second round trip. This is part of noise pipes or whatever they're called, and tls 1.3

c) do reasonable-ish things to work with MTU. In the old days, FreeBSD reflected the client MSS back to it, which helps when there's a tunnel like PPPoE and it only modifies outgoing syns and not incoming syn+ack. Linux never did that, and afaik, FreeBSD took it out. Behind Facebook infrastructure, they just hardcode the mss for i think 1480 MTU (you can/should check with tcpdump). I did some limited testing, and really the best results come from monitoring for /24's with bad behavior (it's pretty easy, if you look for it --- never got any large packets and packet gaps are a multiple of MSS - space for tcp timestamps) and then sending back client - 20 to those; you could also just always send back client - 20. I think Android finally started doing pMTUD blackhole detection stuff a couple years back, Apple has been doing it really well for longer. Path MTU Discovery is still an issue, and anything you can do to make it happier is good.

d) connect in the background to exchange messages when possible. Don't post notifications unless the message content is on the device. Don't be one of those apps that can only load messsages from the network when the app is in the foreground, because the user might not have connectivity then

e) prioritize messages over telemetry. Don't measure everything, only measure things when you know what you'll do with the numbers. Everybody hates telemetry, but it can be super useful as a developer. But if you've got giant telemetry packs to upload, that's bad by itself, and if you do them before you get messages in and out, you're failing the user.

f) pay attention to how big things are on the wire. Not everything needs to get shrunk as much as possible, but login needs to be very tight, and message sending should be too. IMHO, http and json and xml are too bulky for those, but are ok for multimedia because the payload is big so framing doesn't matter as much, and they're ok for low volume services because they're low volume.


I have a link in my bio of the book I wrote about it all. It doesn't contain much of these details. More of the driving philosophy.

How much did I remove?

- Stopped using my smartphone on a daily basis. Maybe 1-2 pickups a day. Down from ~60.

- Don't play video games for recreation, replaced with working out & basketball.

- Only allow my work devices in my office. Sets boundaries for personal/work life.

- Each device has a job-to-be-done. I can only write on my laptop. I can only communicate with my phone. I can only read on my iPad. I can only work on my work machine. etc

- Got rid of most streaming services and televisions. Watch maybe a 30-60 minute show every other night.

- Turned my bedroom into a cave, no artificial light.

- When bored, I pickup a book and place them all around my house so I'm not reaching for a device.

- etc.


Here's my form letter:

Dear _,

I am writing regarding [describe problem].

The appropriate resolution to this issue is [describe solution].

[Usually the solution is cash; if it is cash:] You may credit this to the form of payment you have on file, or by sending me a check at [address].

If you have any questions, you may call me at [phone number] at [time when I'm always free on a weekday during working hours in all us timezones].

I will contact my AG's office if I do not hear back from you in 30 days.

Thanks, [Name]

Mail it.

All state AG offices have a form for consumer complaints on their website. Usually it's very easy to find. Don't overthink it. Mention the letter in your AG complaint, include a copy and the date that you sent it. They will contact the business and start a resolution process. Usually you'll hear back in a week or so.


While I was hesitant to comment on the topic at all, it's worth it for men to have words for the bias, because the entire moral code of a lot of men who tend toward agreeability is based on not-upsetting the women in their lives, or anywhere for that matter, and the effect is pernicious.

There is a maturation stage for men that traditionally happened in late adolescence that doesn't seem as common these days. Now these men relate to women as though they expect women to supervise them, and expect other men to "behave," in a way that is acceptable to their percieved feminine supervisors, or they have some kind of hyper-conscientious responsibility to blunt themselves around women so as to seem "unthreatening" to them, because they are still fundamentally actuated by shame, even though it is just a harness our species uses to manage children.

The anxiety originates from this unmatured Women are Wonderful bias, which boys are taught as children so they can be managed, but with the expectation that they grow out of it or leave it behind during a rite of passage. The result of not breaking men of this childhood harness is they grow up to be "nice guys" who are really just full of anxiety and resentment from navigating the absurd bind of believing their goodness and identity as a protagonist comes from being validated by the women they have placed in their supervisory pedastal roles, and because by treating women as better, they have implicitly made the women in their lives responsible for their feelings instead of taking complete ownership of their own emotions and lives. I meet these "happy wife happy life" guys all the time, and not only do they compete to debase themselves and accumulate sacrifices nobody asked for, but they take it out as resentment of other men whose freedom from that bias casts a light on that undocked lever of shame they wear around like a collar - and then ultimately the women in their lives.

Women are people, and for any quality in a population, people tend to be on pretty long tailed distributions. When you refuse to see the worst examples because of some well meaning bias, it leaves the great ones unappreciated, which I think is the most harmful bias of all. Men and women can be wonderful, but nobody gets there without a lot of practice, imo.

The question isn't whether women are wonderful or not, as that's a dumb dichotomy - it's whether guys have matured into men by ceasing to be controlled by this internalized language of shame that was only necessary to keep them physically safe as children. Part of that is recognizing women aren't symbols, but other people, who like men are responsible for their own actions and feelings, and above all, not a single one is responsible for yours either.


As someone trying to understand what people find special about Lisp, this was helpful. I get it now about macros, but doesn't modifying the language in the compiler phase just complicate solving the actual runtime problem? I feel I would get distracted into writing my own DSL. I've never wanted to modify the language as I was writing in it. Now I'm curious.

Memorizing is meant in a different context.

Ultimately the problems boil down into a few "types". So you are memorizing the types.

https://dev.to/fahimulhaq/14-patterns-to-ace-any-coding-inte... https://neetcode.io/


Hi folks!

Author here - did not expect this post to blow up. Figured it might be helpful to provide some context on points of confusion:

1. Money > everything: an alternative way to look at this is that if you sort by offers, you notice there are a lot of neat companies in that list. I didn't just sort and then blindly apply. I sorted, and noticed that they all had something I was really interested in. I use Amazon weekly. My side projects use Stripe. I have side projects in fintech, and Brex is in fintech. Facebook is the home of React, which I've built most of my career on. In seeking high comp, my goal is to be able to self-fund the earliest stages of a startup, as right now I just don't have the idea that is compelling me to start something. I also want to help family, some of whom are in a financial rut. So it wasn't like I only looked at money. I started with money as the way to narrow down the list, and it turned out that list had a lot of interesting companies on it.

2. Making time for studying: as some folks pointed out, I have young children and with both of us parents working, I wanted to just make sure I wasn't encroaching on precious family time - and I think it's important to run things by your family if you think a routine might change. Turns out that extra study time infringed on none of it. I mostly studied on nights and weekends, during the baby's naps or after they went to bed. All I really wanted to say here was "if I can make time with a family, I believe you can find the time to study, too"

3. Do you really have to do this to land a good job? Heck no. My take on this was "leave nothing to chance." You'd be surprised how many startups are leveraging the FAANG interview process. It takes work to prepare for interviews at quality companies. I didn't want to spend the time interviewing with a company only to think "why didn't I prepare for this?" It's a waste of their time and mine if I don't come in fully prepared.

Lastly, someone pointed this out, but I just have changed my value system on work. I do care about what I do, but it is just a job. Family and life are so much more.

I think I have burnout from startups as an employee. I've worked on everything from sports to climate change, and it's been difficult to put so much heart and soul into something that statistically hasn't had much of a payout, in either literal dollars or impact on the world.

So in seeking my next role, I figured that if I have to work hard anyway, I might as well get myself closer to goals external to work, such as retirement, college funds for my kids, and helping my family out of debt. Or even, possibly, starting my own company.

And in the end, I have fantastic work/life balance. I spend less time working and more time with my family, all while making more. And I am very grateful that I have this time to focus more on family. While my initial list started with high-paying companies, by the time I had offers in, I very much wanted to ensure all of my needs were met, including time with my growing family.


When I saw Guy give this talk I was absolutely floored. Both the content and the style was impressive, the hand drawn transparencies, layered one on top of the other. It was the first time I realized one could give a talk with a high degree of style, that their were geniuses in our field. Guy and Gabriel's HOPL 50-in-50 talk was also very stylistic, but not as profound in content (more like entertainment).

Definitely one of the smartest and most talented persons in our field (OO PL).


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: