We recommend choosing concepts based on what will be most engaging to learners going through challenges. Some concepts will apply to the challenge as a whole, others might only apply to specific stages.
When going through the stage instructions for challenges, think about:
- What concepts one would need to know to solve the stage?
- What concepts are likely to trigger natural curiosity in learners as they go through the stage?
For example, here are the stage 2 instructions for the HTTP server challenge:
In this stage, you’ll respond to a HTTP request with a 200 OK response.
Your program will need to:
- Accept a TCP connection
- Read data from the connection (we’ll get to parsing it in later stages)
- Respond with
HTTP/1.1 200 OK\r\n\r\n(there are two
\r\ns at the end)
It’s okay to ignore the data received from the connection for now. We’ll get to parsing it in later stages.
For more details on the structure of a HTTP response, view the MDN docs.
and here are some concepts that might be useful in this stage:
- TCP: An overview: Learn about the TCP protocol and how it works
- HTTP Response Structure: Learn about the structure of HTTP responses
- HTTP Request Structure: Learn about the structure of HTTP requests
- HTTP Status Codes: Learn about common HTTP status codes and what they mean
- HTTP Request Methods: Learn about HTTP request methods (GET, POST etc.) and what they mean
Here are some other concepts that might be useful in the HTTP challenge but not necessarily in this stage:
- HTTP Headers: Learn about HTTP headers and how they work.
- Persistent HTTP connections: Learn about persistent HTTP connections and how they work.
- HTTP Pipelining: Learn about how HTTP pipelining allows multiple HTTP requests to be sent over a single TCP connection.
- HTTP/1.1 vs HTTP/2: Learn about the differences between HTTP/1.1 and HTTP/2.