Live data from Hacker News

“What happens when you type Google.com into your browser and press enter?”

github.com

51–60 of 136 posts

Re: “What happens when you type Google.com into your browser and press enter?”

#51
post #5

Love it! One of my favourite bad interview questions. I got asked this in an interview ~5 years ago. My response was to look shocked... Pause. Then ask: "What do you mean? What detail do you need? DNS? SYN / ACK? HTTP?" At the point I started talking about syn/acks they just cut me off and moved on to the next question. Same company (different person) started the phone screen with 'oh so your CV says you know linux,…

I think answering it with a general overview, and then optionally going into more detail based on feedback from the person you're explaining it to is actually a pretty important life skill for an engineer. Going into the weeds immediately is not great when you're communicating with people at a different skill level than yourself.

Re: “What happens when you type Google.com into your browser and press enter?”

#52
post #5

Love it! One of my favourite bad interview questions. I got asked this in an interview ~5 years ago. My response was to look shocked... Pause. Then ask: "What do you mean? What detail do you need? DNS? SYN / ACK? HTTP?" At the point I started talking about syn/acks they just cut me off and moved on to the next question. Same company (different person) started the phone screen with 'oh so your CV says you know linux,…

That's part of the point of the question - which part you go into detail on is a pretty good indication where your strengths lie. Someone who spends a lot of time on DNS and SYN/ACK is probably a low-level networking guru, and the rest of the interview should be structured accordingly. Someone who immediately jumps into HTTP requests, HTML parsing, and stylesheet application is probably a web developer, and the rest…

> Someone who talks about the enter key firing off an interrupt that the keyboard device driver handles and puts into a message queue for the windowing system's event loop to handle is a low-level desktop OS person.

Or someone with a background in electronics.

Re: “What happens when you type Google.com into your browser and press enter?”

#53
post #31

So far, nobody has filled in the section on how a key-press event works its way through the OS, up to the window system, to the application, and to the code handling the input text box. Then there's what's happening at the Google end. Before search personalization, popular queries ("google", "Britney Spears") were handled by caches the first Google machine you talked to, and never even reached the search engine. Sinc…

There's a whole lot of BGP and stuff like that on the interconnect, too.

Re: “What happens when you type Google.com into your browser and press enter?”

#55
post #27

> The keyboard controller then encodes the keycode for transport to the computer. This is now almost universally over a Universal Serial Bus (USB) connection, but historically has been over PS/2 or ADB connections. What about Bluetooth keyboards?

Ooh, now we can add a big section on EMR, wireless protocols, forward error checking, the possibilities are endless!

Nah, it always ends with Maxwell's equations.

Re: “What happens when you type Google.com into your browser and press enter?”

#56
post #5

Love it! One of my favourite bad interview questions. I got asked this in an interview ~5 years ago. My response was to look shocked... Pause. Then ask: "What do you mean? What detail do you need? DNS? SYN / ACK? HTTP?" At the point I started talking about syn/acks they just cut me off and moved on to the next question. Same company (different person) started the phone screen with 'oh so your CV says you know linux,…

I really enjoy asking that question when interviewing people, followed by "in as much or as little detail as you'd like".

This typically happens 3/4 of the way in, and allows me to peek and poke quite a bit - it also allows the interview, if it hasn't already, to switch from a rigid process to a fluent organic discussion.

Re: “What happens when you type Google.com into your browser and press enter?”

#57

There is also a very good introductory answer in this subject by Jean-Baptiste Quéru in 2013 [1] where he takes the revers approach of when the page is displayed, then talks about connection, OS, etc. "simplifying" the answer and going down several levels of abstraction and complexities to give the proper overwhelming sense that this question should impose. It is a very fun text to read and I really recommend it. [1]…

When I first read the headline I thought of this post as well, my instinct was that someone had pasted it into a Gist but it seems like a collaborative project to make an even more detailed answer. Which is neat.

Re: “What happens when you type Google.com into your browser and press enter?”

#58
His emphasis on lower level protocols is not what I would expect a python programmer.

I wonder what the following would say about me in an interview situation...

Device specific rendering. Localization and Language logic. Image download and display. Screen rendering. Caching, cookies & browser history. Analytics integration. Account lookup. The search being saved on the backend.

Re: “What happens when you type Google.com into your browser and press enter?”

#59

I would really like to know what happens when Im driving down a highway at say 60mph and browsing the web on my smartphone (or well let's say my wife is doing the driving and Im browsing the web :-) ). What kind of communication is happening between me and the cellphone towers? What data is my phone sending to the different cellphone towers as I drive by them? How does the cellphone tower send that data to the intern…

Almost everything is exactly the same as on your desktop computer. The only thing that's different is what goes on under your TCP/IP layers.

Your Phone has a modem built in, that modulates a digital signal over a carrier wave at a certain frequency (set of frequencies, depending on the channel access protocol) the modulated carrier wave is sent out to the cellphone tower.

When the modem is supposed to receive, when it's allowed to send, how it negotiates these things is all strictly defined by protocols the telecom industry has standardized on. I can't say I'm an expert on these protocols, there's a whole bunch of them. They are grouped in protocol stacks with familiar names like GPRS, EDGE, UMTS, LTE.

These protocols besides making optimal use of their available bandwidth taking into account all kinds of noise, disturbances, moving from tower to tower, other phones also specify how the communication should be encrypted.

The encoding/decoding of these protocols is usually done by an integrated circuit in your phone that's separate from the rest of the phone's functionality, to prevent you from tampering with it (and to ensure reliability I guess). So all your phone's general operating system has to do is interface with that circuit to get neat IP packets.

Post reply on HN