My most favorite interview question I've come across yet was "You type 'google.com' into a browser address bar and hit <Enter>, what happens ...
For further actions, you may consider blocking this person and/or reporting abuse
You could go on for much longer if you also talk about hardware interrupts from the keyboard, and the handling of the WM_KEYDOWN window messages. That is, when you type "google.com" on the keyboard, where do those key presses go? How does the computer read and process them?
For every abstraction layer, there's always a deeper layer that you could explain in more detail. :)
welp, guess know what rabbithole I'm falling down next
You can answer this question for infinitely long -
keyboard and typing physics > brain signals to make you type > psychology about why you typed > your great grandfather's marriage and the quadrillion possibilities and detail since then that made you come to that interview > Infinite ā stuff about the creation of the universe. šµšµšµšµ
There is a Github repository that deals with that question and tries to be really specific.
alex / what-happens-when
An attempt to answer the age old interview question "What happens when you type google.com into your browser and press enter?"
What happens when...
This repository is an attempt to answer the age-old interview question "What happens when you type google.com into your browser's address box and press enter?"
Except instead of the usual story, we're going to try to answer this question in as much detail as possible. No skipping out on anything.
This is a collaborative process, so dig in and try to help out! There are tons of details missing, just waiting for you to add them! So send us a pull request, please!
This is all licensed under the terms of the Creative Commons Zero license.
Read this in ē®ä½äøę (simplified Chinese), ę„ę¬čŖ (Japanese), ķźµģ“ (Korean) and Spanish. NOTE: these have not been reviewed by the alex/what-happens-when maintainers.
Table of Contents
WM_KEYDOWN
message is sent to theā¦thanks for your nice comment , what happen if you copy n paste following address into your browser and press enter -- alamnr.github.io/profile.html?user...
As an addition, if you get into the google internal infrastructure, with their multi-layered DNS LB and service LB and front-end proxies you can talk for a few hours, at least :))
A good question indeed. I also realized that I lack in the TLS knowledge, I'll put it in the 1000 long TOREAD list.
I thought about including a section on browser mechanics - parse, evaluate, paint. But I didn't originally say anything about that so I deemed it to be out of scope.
I often ask this question to figure out which layer they have strength of technical knowledge.
If the interviewee talks about network layer longer than others, he probably have great skill on that layer.
The question is so incredibly broad and can be answered in so many (correct) ways that I can't see how it would be useful
Ah, but it is a perfect question to learn about the candidate, what he knows, how he thinks, etc. Itās a kind of Rorschach test. Also, a good sieve for two āinterestingā categories of people: āI donāt knowā, and āthe browse displays the google search boxā.
The nonce attribute on a script tag is a CSP-related attribute:
developers.google.com/web/fundamen...
It does prevent unsafe script from being executed on the webpage if you have an XSS vulnerability. As the nonce must be present in the CSP header, even if you could inject a
script
tag it wouldn't be executed.Also note that it does not always default to http and port 80: If your website is in a HSTS preload list. In the case of google.com, it isn't, but many big websites will.
If a website enforces HSTS, it will only default to HTTPS.
I like how that's nested under "fundamentals".
The tech equivalent of Subway's "How do you make a PB&J sandwich" interview test.
Both are obviously impossible to answer in full detail, so the question then becomes, what details do you choose to focus on?
Every time I see a breakdown of this question I am pleasantly surprised about where the author digs in vs skims over. I liked your approach here of writing out an answer off the top of your head and then digging in on what actually happens. I did my own take on this a while back, but I am afraid it came across waaaay more stiff :).
Can you try to explain me how to use SOLID in frontend with pure javascript?
Everyone forgets the obvious. It will break the Internet. Please don't do it. That wireless black box atop Big Ben will be subjected to bad things.
And then I would ask "how do the neurons inside your brain react on your intention to google 'cat videos'?".
If you were not a developer, what would you like to be?
Don't forget about all the neat low level stuff that's happening even before you leave the LAN!
So what did the interviewer say about your answer?
Great read, thanks for sharing this!
"Yeah, that's fine, we got it. Tell me about the last time you had a difficult bug."
Honestly, seemed like he had good questions but wasn't a good interviewer.
There is a whole github repo describing what happens in such detail that it will make happy any interviewer.
Can you do an "explain to a 5 year old" what happens when you type google into a browser?!
The First Few Milliseconds of an HTTPS Connection. moserware.com/2009/06/first-few-mi...
Hmm... and I thought you get to the google search. ;)
Good article, just a little note: from an OSI Model point of view, HTTP is placed in the Application layer, not in the Presentation one.