What does HackerNews think of 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?"

Agreed!

It reminds me of:

https://github.com/alex/what-happens-when

and how many of today’s CS-degree holders would barely understand any of it. As someone who has also “grown up with all the technology”, I’ve learned and experienced all that. But as a percentage of “software engineers”, there’s fewer and fewer that do every day.

A twist on the old “what happens when you type google.com into your address bar and press enter” question. If I were answering I’d talk about a couple areas I can adapt from the repo below, and save some time to also talk about API services and DBs to differentiate it from the usual answer. It is indeed a fun question!

https://github.com/alex/what-happens-when

Haha! The post was actually motivated by a common (interview) question: https://github.com/alex/what-happens-when. We thought it would make for a fun adaptation for the terminal world
In the valley you do not need a degree of any sort, but not having a degree is definitely the exception. Those people without a degree often have a long work history working for companies doing low level NOC/admin work while they leverage the coding skills they learn in their off time to become more valuable until they de-facto work as a programmer.

> I am tired of all this idiotic circus.

Here is the most important lesson you learn in college in a nutshell: You aren't as smart as you think you are and there are a a lot of things you don't know you don't know. If you're used to being the smartest person in any group of 30 people, then college can greatly humble you. College was the first time in my life where I was in a room and it was clear I was not the smartest person in it, maybe not even in the top half.

College, in my experience, helps diminish the Dunning-Kruger effect greatly.

I've interviewed a lot of people for SWE and performance greatly correlates with college. I never asked particularly hard questions and they were always very pragmatic questions, not ivory tower stuff. Many of the best staff engineers/managers I've worked with had masters degrees. It is more often than not graduates that make core systems.

The way you write shows that there is a lot you don't know you don't know and that you are considerably overconfident in yourself, particularly before you have a portfolio of externally validated useful software to backup your claims of how good you are.

Pragmatically:

A CS degree sets you up with a lot of information that would be useful for interviews (and understanding how things work) in an organized and systematic way.

Big O notation, basic data structures, basic algorithms, basic data structure manipulation with algorithms. Intuition about these things.

After basics, engineering courses take you on tours of important systems and protocols and touch on why they are the way they are not just what they are.

If I say "recursive backtracking" do you know what that means? That's a first semester topic and just about every company in the valley was doing interview questions that used it. Do you know test and set? Do you know why it is important? Do you know the three way handshake? Do you know why it is the way it is? Exponential backoff? Can you implement DFS/BFS in 5 minutes? Dijkstra's? Have you heard of dependency injection? Do you know why it's important? Entropy? Hashing? Buffer overflow? SQL Injection?

How much of this do you understand? https://github.com/alex/what-happens-when

> I love my own original interpretation of CS foundations and concepts.

You take this as a point of pride, but having a shared language and understanding allows you to communicate with and leverage other people.

I can't speak for the level of education you are around, but there exists good education that is definitely worth seeking out.

"What happens when you type google.com into your browser's address box and press enter?" https://github.com/alex/what-happens-when
> One of my favorite interview questions (created by Vikrum) was: “What happens after you type ‘https://www.google.xn--com-to0a into a browser and hit enter?”

Wow, I had no idea who came up with that question first. (see, e.g., https://github.com/alex/what-happens-when ).

When was the first time it was asked? Where?

Watch a live stream with a Googler trying to answer the old interview question of what happens when you type google.com into a webbrowser and press enter [1]

[1] https://github.com/alex/what-happens-when

I've been struggling with this concept in the context of teaching someone web development. There's just so much you "have" to know and it all seems so interrelated. Do you start with HTTP since that drives the web? If you do, do you first need to cover computer networking, IP addresses, routing? HTML and CSS aren't terrible to get started with, but are ultimately limited and [generally] aren't enough to build "some cool app". Then you have the beastly JavaScript, which you'll probably use on your front-end but only might use on your backend - there are so many other options. Python and Django? Ruby and Rails? Any of the dozens of PHP frameworks? Oh, right, now we might need to get into SQL. And builds and deployments and sysadmin-y tasks. Don't forget security. Or we could build everything serverless or on some PaaS, but how much understanding do you really have of what's going on there.

Having gone through undergrad and grad school for CS, I think part of it comes not truly realizing or accepting just how much knowledge you get from taking ~45 college courses . It's taken years for me to learn a reasonable breadth and depth of this subset of computer science, (and there's way more I don't know than I do know) and I struggle with the fact that I seem unable to boil all of that into the "a-b-a-b" pattern the author describes. Start doing the thing you want to be doing (e.g, making a web app), and learn just enough of the bits you need to keep on that path. But it's much easier said that done when you're starting from scratch.

It's like the pervasive interview question of "What happens when you type google.com in your browser and hit enter?"[0] Well, a lot... where do you start?

[0] https://github.com/alex/what-happens-when

> my mental model of causality was limited to the design of the machine - software interfaces and physical connections - and was completely missing the possibility of non-intentional interactions via the physical world.

I love hearing of stories like this. Similar line of thought to my personal favorite interview question: ""What happens when you type google.com into your browser and press enter?" (Answer in as much depth as you like.)"

https://github.com/alex/what-happens-when

I know this has been said a billion times but the CS interview is bullshit. It's like asking a pianist to describe how they would play a composition on the white board.

I always thought that this is a good question to ask https://github.com/alex/what-happens-when but then again probably not for all roles. It's good because even if the interviewee has seen the question, you can really gauge how much they know.

It has to do with designing a system to be used by people. UNIX is a system designed to be used by people.

- "Any command line interaction is decidedly more involved than the typical user plugging in a cable."

Right. "The typical user plugging a cable". I expect the user to become a "typical user" after learning how to choose and use a cable, and getting acquainted with his hardware and software. One is not born a typical user, as you seem to imply (plugging a cable is not a complex task). It is. Everything is complex. Using the command line is complex, and then you factor your "typical uses" into aliases or scripts.

Or maybe you curl | bash scripts from the web, and then cry when they fail / your box catches internet aids.

Or you use an ipad for all the computing you do, and expect things to just work.

See: a typical everyday usecase: https://github.com/alex/what-happens-when

Did the user write "oogle.com" instead of google, and got malware? ....Inexcusable, as you said? Should it just work?

I say: "why did the user write oogle.com? Did he want malware?"

Simple stuff.

Fascinating question, reminds me of this one that made HN almost two years ago: “What happens when you type Google.com into your browser and press enter?”

https://github.com/alex/what-happens-when

Would love to see Knuth's Challenge setup in a repo for collaboration.

HN Discussion on the above link:

https://news.ycombinator.com/item?id=8902105

> "in an automated manner"

I wonder where that line is drawn. A person using their browser, clicking a link to load a web page initiates a hundred different automated routines[1]. Is that not automation? Is it then automation to have a click initiate another click or two more clicks? Where do you draw the line?

[1]: https://github.com/alex/what-happens-when

I've had my fair share of bad interviews too. Just recently I was interviewing for a full stack position with a company that tried to get me to recite "what happens when I type google.com into my browser". I asked them where they had gotten idea from and showed them this: https://github.com/alex/what-happens-when. They decided ask me another question soon after.

Sometimes the questions aren't even related to data structures or algorithms. I'm OK with those because at least you can somewhat prepare for them. I've once had an interviewer ask me obscure questions about Netscape 6 (this was 2016 btw).

> I much prefer “homework” projects, even if they involve me working “for free”, because I feel like they ask for actual programming skills rather than the “guess the algorithm” lottery of phone screens and whiteboard coding.

Me too but when you're interviewing with 3+ companies at the same time while working at your current job, it gets difficult. There was one time where I had spend my Saturday afternoon maybe 6-8 hours completing their "homework" project. I got a call back from them a few days later for a follow up interview and they flat out didn't even bother to ask about the project I had completed for them. What was the point?

Tech interviews suck.

I like this version: https://github.com/alex/what-happens-when

It doesn't address the 'progressive layers' issue, but it _does_ include a TOC.

I have been asked this question before, and my answer was definitely biased towards the networking parts (DNS, TCP/IP, HTTP/S, certificates ...), and I provided absolutely no detail about keyboard/mouse/monitor I/O, parsing or rendering.

Here is a detailed crowdsourced answer to the interview question ""What happens when you type google.com into your browser's address box and press enter?""

https://github.com/alex/what-happens-when

also relevant (found here on HN last month)

what happens when you... https://github.com/alex/what-happens-when

The lack of understanding isn't necessarily a "misconception" -- it may just be incomplete knowledge of the entirety of the system.

I think the question "How does a toilet work?" is much like the question "What happens when you type 'google.com' into your browser and press enter?"[1] I'm sure I have a sufficient understanding of the general idea (e.g. flapper and siphon, or parsing and DNS lookup), but I'm well aware I couldn't reproduce or accurately describe the whole system/process on my own.

[1] https://github.com/alex/what-happens-when