01-edu / public

📚 @01-edu's Public Repository
http://public.01-edu.org/
225 stars 448 forks source link

quad subject: files to submit #2455

Closed ajdidabdelali closed 7 months ago

ajdidabdelali commented 7 months ago

quad

Hi, In the Quad phase, instructions tells candidate to : 1) Write a function QuadX that prints a valid rectangle with a given width of x and height of y. 2) Make sure you submit all the necessary files to run the program. So I consider that a solution proposed by a candidate must be validated under these conditions: if the program is executed correctly and functions exists. Dividing functions in several packages is not necessary (particularly in this simple circumstance), and go.mod also, only if modules are out of main module directory. On other side, the auditor check existence of go.mod but he (or she) ignore to check existence of main package !!! if a program can't be executed without go.mod, it will not be executed firstly without main package. The consequence of this issue is that my solution, which consisted of a single Go file containing the main package and all functions, was affected. I'm sorry.

nprimo commented 7 months ago

Hi @ajdidabdelali, thank you for your feedback.

It is always a good practice to add a go.mod to your go packages/projects, even for a "hello world". The rest of the audit should not care about the structure of the project since it asked to test the functions' outputs.

Were the auditors able to run your program without the go.mod file?

ajdidabdelali commented 7 months ago

The auditor displayed the file that I submitted to him but by applying the checklist he checked the absence of the go.mod file and therefore he did not test my program yet I reminded him that according to the instructions, the main thing is that the program is executable whether or not it is accompanied by go.mod, and that the functions are in separate packages or grouped in a single package and even in the "main package". Unfortunately, I see my quad not validated with my group for an unjustified reason, because of a checklist contradicting the instructions. With all my greetings

ajdidabdelali commented 7 months ago

No, unfortunately, he applied the checklist literally, absence of go.mod so no point in seeing the rest despite the fact that the solution was well worked and presented. I tested it on my computer in the absence of go.mod and it worked correctly with a clear output and presenting all possible cases for the five quads.

nprimo commented 7 months ago

Hi @ajdidabdelali, you can read more about how you should set up future projects (programs, libraries...) on the official go site wiki. go.mod is required to be able to run your program "everywhere", even outside the GOPATH, so, unfortunately, even if the logic inside the solution you submitted was correct, there was still an issue on "being able to run your program".

If any of the things I mentioned do not make sense to you, please, feel free to do some research and get back to this ticket if there is anything else you would like to add :)