In chrome on desktop, you can ctrl+click a bunch of tabs to multiselect, and then pull them into their own window. Now ctrl+shift+D on that window to bookmark them all. Then you can just close the window.
You search on google. You click links. Links lead yo pages that have Facebook like buttons. Facebook learned that you visited the page. Facebook has already prescraped the page and classified its content. Facebook now can show it in your feed.
You search on google. You click a link. That page has google ads. Google knows that you visited it. Google bids on facebooks ad exchange and sometimes wins the auction. Ads show up in the news feed. [Also works for any other advertising platform other than doubleclick(Google)]
You search on google. You click a link. The page has third party trackers that generate user lists that they sell. Facebook buys said user list. Facebook matches you in the list, and shows you a related ad.
Most likely its the first one.
What is certainly not happening:
You search on google. Click no links. You go to Facebook and see a related ad in the news feed.
Because to be really good at programming takes an almost obsessive devotion to honing your craft at a young age, and girls are far too social to spend their summers in front of a computer in the basement.
I would argue that that isn't the case at all. While I was one of those little boys who spent way too much time in front of a computer and video games as a kid, that is mostly NOT the case amongst my coworkers (I'm a software engineer at Google). Most seemed to pick it up in college when they chose it as a major, and didn't have much or any experience with computer science before then. I would argue the main difference between those who succeed here and those who don't is intelligence, a hunger to learn (rather than just tinker), and a good work ethic.
I don't mean to say that being locked away in your room as a child programming, etc, would hurt in any way. Again, that was mostly me as a child. I just mean that what matters most is an understanding of computer science and software engineering principles (Data Structures, Machine Learning, etc) not can you bang out a few thousand lines of code in a few hours. I never do that at work. I think it's more important to develop as a child the ability to learn, process, and make connections between ideas, and that can happen via learning in any field.
Just my 2 cents for what they are worth.