I love being in on hiring interviews, especially interviews for technical candidates. One of my favorite questions, whether we’re hiring a systems administrator, software engineer, DevOps specialist, or QA engineer, is deceptive. At first glance, it appears so easy. And on the surface, it is. But once you dive into the gory details, you realize that the question touches on so many important concepts.
What does this do:
$> wget http://www.yahoo.com
The Simple Answer
The simple answer is “It downloads Yahoo’s homepage.” Guess what? That’s a correct answer. And truth be told, that’s usually the first answer I get from anybody who has any professional IT experience. But I’m looking for someone who has more than just the basics.
The Follow-up
“Yeah, you’re right. It downloads Yahoo’s homepage. But what does it really do?” This is where things get interesting. There are so many directions the candidate can go from here. Ideally, the candidate will hit on many of the following topics.
- The shell starting a new process.
- DNS resolution for http://www.yahoo.com.
- Finding a route to yahoo.com.
- Creating a socket to yahoo.com.
- Making an HTTP request.
- Yahoo’s servers putting together an HTTP response.
- How TCP ensures that the request and the response are each interpreted correctly.
- What happens when wget tries to write the file to disk.
- Whether the socket closes immediately, and how to tell if the socket is still open.
- How a firewall can interfere.
- What the shell does once the wget process exits.
- How NAT can alter what happens.
Depending on how you’re feeling, and whether you want to make the candidate squirm, you can drill in more on any of those topics. What does the HTTP request look like? How does HTTP 1.1 differ from HTTP 1.0?, or How do routers work together to take your packets from your network to Yahoo’s? Do all packets take the same path?, or How does the shell know which command you really mean to execute? What happens if there is a wget executable in your current directory? What would you do if you were told “command not found?”
Let your curiosity run wild! This can be a fun interview question!
I am never interviewing with you. 🙂
LikeLike