-
-
Notifications
You must be signed in to change notification settings - Fork 657
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement new Concept Exercise: net/http #2242
Comments
This issue is claimed by @MikaeelMF. |
@MikaeelMF Just bouncing some ideas about this. There was discussion about if it would be possible to have a client program communicate with a server program on localhost (eventually server and client can be the same program). Asking around, it seems that this is possible. Our containers run with networking disabled For reference, this is what I used to test this: simple-client-server.zip I thought of this idea of a client and a server because I'm imagining that if the exercise wants to teach about sending requests, our tests might want to start a server to validate the request the student does. The same if we want to teach about servers, probably the tests might act as a client to validate the server. With this I don't want necessarily to force the exercise into a particular direction - just exploring some options :) |
Thanks @andrerfcsantos for checking this out! My initial ideas are exactly revolving around testing solutions using a client/server structure as well. |
Great! Thank you for the instructions. |
Learning Objectives:The general objective is to get someone who knows nothing about network programming to start to get curious and get introduced to resources to follow up on given subjects if they wish to learn more. Therefore I have tried to give a short introduction on the following topics:
Out of Scope:Since this is an introduction, I will not go into any detail about the http headers. Also, it does not seem beneficiary to explain all request methods. I think a basic version of the concept introduction will be available in the coming days, when it is representable, I will create a PR and set it as a draft, so anyone who wishes to participate or take a look at it and suggest new ideas would do so easily. Please do not hold back any suggestions that you may have, I would truly appreciate it if you share with me any ideas or thoughts of yours on this topic. |
@MikaeelMF Please keep in mind that Exercism concepts/concept exercises are always about "How to do X in language Y? (for someone that already knows X)". They are not about "What is X?". In this case that means 1-3 would not be part of the concept, the concept would only be about 4+5 (How to make an http request in Go? How to set up an http server in Go?). For 1-3 you can say some brief introductory words and include links for people that are not yet familiar with the topic in general. In the future, we will have out own Exercism wide content for explaining these general programming concepts but it will take a while until we get there. As part of 5, I would recommend to explain how Go uses Go routines so that the code in an http handler can be written in a synchronous fashion without blocking any other requests from being processed. Since the scope of the learning objectives is now reduced, maybe you have space to include setting headers. Might be a good idea. Regarding io.Reader/io.Writer: Handwaving over something a little bit to keep the scope of the concept/exercise managable is totally fine. Also that some some prerequisite concept is not available yet happens quite often. You can still go ahead with your concept though. What we do in the JavaScript track in these cases is that we include links where people can read up on those things. Then later when the concept exists within the Syllabus, we replace the links to external resources with links to the Exercism concept. |
Ah I see! |
I have created a draft PR for this issue. I have written the client section and would really appreciate it if you could look at it and share your thoughts and ideas with me. P.S. I don't know if it is OK to create a draft PR and check things step-by-step in exercism, so please let me know if it is against here's working manners and I will close the PR right away. I just thought the concept will become more robust and better this way. |
@MikaeelMF It would help if in the description of the PR you could add some indication of the status of the PR. With this I mean a brief list of things you consider done (hence we can give feedback on), what is in progress and what is planned. This makes us avoid giving feedback on something that is not finished and avoid suggestions of things you've already planned. |
Oh My bad! I will do so right away! Update: I have added a To-Do list to explain things that I have decided to do, and things that are included as well. Also, I will update it as soon as I decide on new topics for other sections. |
I have completed my To-Do list for sections that I am going to cover about the server. I initially wanted to cover middlewares as well but figured maybe it becomes too long and also is not really beneficial to the general goals of the concept. |
Hi! |
I have fixed the formatting based on exercism guidelines and I think the content is ready to get merged. |
I commented in the PR. Re the configlet issue: Please ask about your issue in our Slack space or here https://github.com/exercism/configlet/issues. I don't use mac so I can't help with that. (As mentioned in the PR, this issue does not block you from working on the PR.) |
Getting Started
If you have not yet contributed to concept exercises before, this task requires some upfront reading to acquire the necessary background knowledge.
Here you can read about what Concept Exercises are and how they are structured:
If you have not done so yet, it is probably also helpful to do a couple of "Learning Exercises" (this is how they are called on the site) yourself. You can also look at the code of an existing concept exercise like
welcome-to-tech-palace
for reference.Also be aware of these general guidelines.
Goal
The goal here is to create a new concept exercise to teach how to use Go's built-in http server.
The concept and exercise need to be written from scratch.
Concepts
The following concept needs to be created. You can use the
introduction.md
file of the concept also asintroduction.md
file of the exercise. No need to create different content at this point. Additionally, if you want to save some time it is ok to not have an extensiveabout.md
for now. It can also be mainly theintroduction.md
content, maybe with some additions you would like to make.http
Learning Objectives
In the concepts the student should learn about the following topics and then practice them in the concept exercise.
Out of Scope
Prerequisites
Other prerequisites should be added as needed to solve the specific exercise.
Story Idea
It's a good idea for concept exercises to have a story that gives some flair and context to the tasks.
Create a new story for this exercise. The story doesn't need to be highly complex, even a small story goes a long way to make the tasks more interesting. For some inspiration for the story, check the other exercises on the track or the page Exercism docs: Stories for an overview of stories used across tracks.
The text was updated successfully, but these errors were encountered: