Browse Source

Merge branch 'master' into adding_questions

content-update
OGordoo 5 years ago committed by GitHub
parent
commit
0be9bb1cf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 281
      docs/addition_of_exercise_draft.md
  2. 14
      scripts/docker.sh
  3. 3
      scripts/install_client.sh
  4. 1
      scripts/ubuntu_tweaks.sh
  5. 4
      subjects/ascii-art-web/ascii-art-web-dockerize.audit.en.md
  6. 18
      subjects/ascii-art/ascii-art-color.audit.en.md
  7. 2
      subjects/ascii-art/ascii-art-color.en.md
  8. 41
      subjects/ascii-art/ascii-art-justify.audit.en.md
  9. 6
      subjects/ascii-art/ascii-art-output.en.md
  10. 8
      subjects/ascii-art/ascii-art.en.md
  11. 2
      subjects/go-reloaded/go-reloaded.audit.en.md
  12. 12
      subjects/groupie-trackers/groupie-trackers-search-bar.audit.en.md
  13. 10
      subjects/groupie-trackers/groupie-trackers-search-bar.en.md
  14. 47
      subjects/my-ls-1/my-ls-1.audit.en.md
  15. 4
      subjects/net-cat/net-cat.audit.en.md
  16. 16
      subjects/net-cat/net-cat.en.md
  17. 34
      subjects/push-swap/push-swap.audit.en.md

281
docs/addition_of_exercise_draft.md

@ -0,0 +1,281 @@
# THE ADDITION OF EXERCISE PROCEDURE
##### This is for a go exercise in the piscine-go
## **1. Writing the subject and / or writing the solution**
Always address each exceptional cases.
Example: [fprime](https://github.com/01-edu/public/blob/master/subjects/fprime.en.md).
The exceptional cases in the `usage` part.
```console
student@ubuntu:~/piscine-go/test$ go build
student@ubuntu:~/piscine-go/test$ ./test 225225
3*3*5*5*7*11*13
student@ubuntu:~/piscine-go/test$ ./test 8333325
3*3*5*5*7*11*13*37
...
student@ubuntu:~/piscine-go/test$ ./test 0
student@ubuntu:~/piscine-go/test$ ./test 1
1
student@ubuntu:~/piscine-go/test$
```
The subject states that only **positive integer** will be tested, however, 0 and 1 are not primes.
The subject writer made a mistake because of forgetting that fact.
During the exam, the test was testing the `1` case and expecting a `1\n` to be printed. The real result should only have been a `\n`.
Some students found this mistake. An update of the subject during the exam treating that special case was immediately necessary.
1. Try to avoid the “you” and contracted “language”
2. Always check the formating md
------
### fprime <span style="color:#ff3234">(Title of the exercise)</span>
#### Instructions <span style="color:#ff3234">(Instructions of the exercise)</span>
Write a program that takes a positive `int` and displays its prime factors, followed by a newline (`'\n'`). <span style="color:#ff3234">(general guidelines, notice the imperative style tense and the avoidance of “you”. “You” is authorized in the case of a presence of a back story where the player is immersed)</span>
- Factors must be displayed in ascending order and separated by `*`. <span style="color:#ff3234">(formating requirement) </span>
- If the number of parameters is different from 1, the program displays a newline. <span style="color:#ff3234">(special case requirement, this case will need to be tested)</span>
- The input, when there is one, will always be valid. <span style="color:#ff3234">(Clarification on what the tester will do, hence giving the student guidelines on the cases to be handled, the tests have to reflect this instruction as well)</span>
- In this exercise the primes factor of 1 is considered as 1. <span style="color:#ff3234">(Handling of exceptional case: THIS Happens to be a mistake, we will see uses this example for the “UPDATING A SUBJECT/TEST PROCEDURE”)</sapn>
### Usage
```console
student@ubuntu:~/piscine-go/test$ go build
student@ubuntu:~/piscine-go/test$ ./test 225225
3*3*5*5*7*11*13
student@ubuntu:~/piscine-go/test$ ./test 8333325
3*3*5*5*7*11*13*37
student@ubuntu:~/piscine-go/test$ ./test 9539
9539
student@ubuntu:~/piscine-go/test$ ./test 804577
804577
student@ubuntu:~/piscine-go/test$ ./test 42
2*3*7
student@ubuntu:~/piscine-go/test$ ./test a
student@ubuntu:~/piscine-go/test$ ./test 0
student@ubuntu:~/piscine-go/test$ ./test 1
1
student@ubuntu:~/piscine-go/test$
```
------
## **2. Creating the files for tests (4 main cases)**
### always in -> *all/tests/go/*
### **Folder organization**
- Function exercise in a Quest `(strlen)`
- 2 files:
- strlen_test.go
- solutions/strlen.goz
```console
go
| strlen_test.go
|
| __ solutions
| |-strlen.go (package solutions)
|
| __ student (the same thing as the solutions, just run "cp -aT solutions/ student/")
```
- Program exercise in a Quest `(doop)`
- 2 files
- doop_test.go
- solutions/doop/main.go
```console
go
| doop_test.go
|
|
| __ solutions
| |__doop
| |-main.go (package main)
|
| __ student (the same thing as the solutions, just run "cp -aT solutions/ student/")
```
- Program exercise in the exam `(dooprog)`
- 2 files
- solutions/doopprog/main.go
- solutions/doopprog/doopprog_test.go
```console
go
|
| __ solutions
| | __ doopprog
| |-main.go (package main)
| |-doopprog_test.go
|
| __ student (the same thing as the solutions, just run "cp -aT solutions/ student/")
```
- Function exercise in the exam `(atoiprog)`
- 3 files
- solutions/atoi.go
- solutions/atoiprog/main.go
- solutions/atoiprog/atoiprog_test.go
```console
go
|
| __ solutions
| |
| |-atoi.go (package solutions)
| |__atoiprog
| |-main.go (package main)(func main(){} stays empty)
| |-atoiprog_test.go
|
| __ student (the same thing as the solutions, just run "cp -aT solutions/ student/")
```
------
## **3. Writing a file_test.go (test file for go)**
### <span style="color:#00bae6">**RULE 1**</span>
- Make the test as independent as possible (no self-made functions imported)
- **If** the source is not in the import section, copy and paste the function, with **lowercase** for the first letter of its name.
- Example: addprimesum_test.go
![isaprime](isaprime.png)
The func isAPrime is fully copied to the file.
### <span style="color:#00bae6">**RULE 2**</span>
Every special case in the subject should be tested. Preferably first. Before the randoms tests
### <span style="color:#00bae6">**RULE 3**</span>
Whenever possible do at least 1 random test! This is to avoid cheating by predictability of the tests. If the tests are fixed, then the student may create a forest of ifs program to bypass the tester.
### z01.functions to be used by tester
- Function exercise in a Quest (strlen) ![z01sl](strlenz01.png)
```go
z01.Challenge(t, studentSol, studentStu) // if the program doesn’t have arguments
z01.Challenge(t, studentSol, studentStu, args...) //if the program has arguments
```
- Program exercise in a Quest (doop) ![z01doop](doopz01.png)<- Screenshots to be added.
```go
z01.ChallengeMain(t) // if the program doesn’t have arguments
z01.ChallengeMain(t, args...) // if the program has arguments
```
- Program exercise in the exam (dooprog) Screenshots to be added.
```go
z01.ChallengeMainExam(t) // if the program doesn’t have arguments
z01.ChallengeMainExam (t, args...) // if the program has arguments
```
- Function exercise in the exam (Atoiprog) Screenshots to be added.
```go
z01.Challenge(t, studentSol, studentStu) // if the program doesn’t have arguments
z01.Challenge(t, studentSol, studentStu, args...) //if the program has arguments
```
------
## **4. Testing locally (`go test` or `go test -run=Test\<nameOfTheFunction\>`)**
### you do -run=... because you have many test files, so you need to run just one
### Before every PR : a go test has to be executed (in several situations) in the folder(s) of the exercise(s) worked on
**First thing first**
```console
rm -r student
cp -aT solutions/ student
```
### Execute a go test in the appropriate folder
- Function exercise in a Quest `(strlen)` ![](image.png)
`all/test/go`
```console
go test -run=TestStrlen
```
- Program exercise in a Quest `(doop)` ![](image.png)<- Screenshots to be added.
`all/test/go/`
```console
go test -run=TestDoop
```
- Program exercise in the exam `(dooprog)` Screenshots to be added.
Here you can do just *go test*, because there's only one test file
`all/test/go/student/dooprog`
```console
go test
```
- Function exercise in the exam `(atoiprog)` Screenshots to be added.
`all/test/go/student/atoiprog`
```console
go test
```
### **NOTE:** If a go test gives a (cached) result, use this type of command (example with raid3):
```go test count=1 raid3_test.go```
The result should be an OK message:
- This means that the test is running correctly when the correct solution is given. If this does not work, the test file is likely to have errors inside.
- Time should be under 5-6 seconds. If longer, remove some of the iteration of the random tests (for example, less random tests)
- Be watchful of exercises with challenge function: Always test a copy of the variable and not the same variable for both the student and the solution function.
- Introduce errors in the student solution.go file in order to see the errors message and compare them to the subject examples.
- Error messages for structures exercises (linked lists, binary trees) need to be tailored accordingly.

14
scripts/docker.sh

@ -0,0 +1,14 @@
#!/usr/bin/env bash
# Install Docker
script_dir="$(cd -P "$(dirname "$BASH_SOURCE")" && pwd)"
cd $script_dir
. set.sh
apt-get -y install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu disco stable"
apt-get update
apt-get -y install docker-ce docker-ce-cli containerd.io
adduser student docker

3
scripts/install_client.sh

@ -10,7 +10,7 @@ cd $script_dir
. set.sh
disk=$(lsblk -o tran,kname,hotplug,type,fstype -pr |
grep -e nvme -e sata -e sas -e ata |
grep -e nvme -e sata -e sas -e ata -e vda |
grep '0 disk' |
cut -d' ' -f2 |
sort |
@ -43,6 +43,7 @@ apt-get -yf install
. vscode.sh
. libreoffice.sh
. exam.sh
. docker.sh
# Install additional packages
pkgs="

1
scripts/ubuntu_tweaks.sh

@ -80,6 +80,7 @@ services="
apt-daily-upgrade.timer
apt-daily.timer
console-setup.service
e2scrub_reap.service
keyboard-setup.service
motd-news.timer
remote-fs.target

4
subjects/ascii-art-web/ascii-art-web-dockerize.audit.en.md

@ -2,7 +2,7 @@
###### Does the project have a DockerFile?
##### Try running the [command](https://docs.docker.com/engine/reference/commandline/image_build/) `"docker image build [OPTIONS] PATH | URL | -"` to build the image. (example : `"docker image build -f Dockerfile -t <name_of_the_image> ."`).
##### Try running the [command](https://docs.docker.com/engine/reference/commandline/image_build/) `"docker image build [OPTIONS] PATH | URL | -"` to build the image using the project Dockerfile. (example : `"docker image build -f Dockerfile -t <name_of_the_image> ."`).
```
student$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
@ -10,7 +10,7 @@ REPOSITORY TAG IMAGE ID CREA
```
###### Run the command `"docker images"` to see all images. Does the docker image build as above?
##### Try running the [command](https://docs.docker.com/engine/reference/commandline/container_run/) `"docker container run [OPTIONS] IMAGE [COMMAND] [ARG...]"` to start the container. (example : `"docker container run -p <port_you_what_to_run> --detach --name <name_of_the_container> <name_of_the_image>"`)
##### Try running the [command](https://docs.docker.com/engine/reference/commandline/container_run/) `"docker container run [OPTIONS] IMAGE [COMMAND] [ARG...]"` to start the container using the image just created. (example : `"docker container run -p <port_you_what_to_run> --detach --name <name_of_the_container> <name_of_the_image>"`)
```
student$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

18
subjects/ascii-art/ascii-art-color.audit.en.md

@ -1,17 +1,17 @@
#### Functional
##### Try passing as arguments `"hello world" --color=red`.
###### Does it displays the expected result?
###### Does it display the expected result?
##### Try passing as arguments `"1 + 1 = 2" --color=green`.
###### Does it display the expected result?
##### Try passing as arguments `"(%&) ??" --color=yellow`.
###### Does it display the expected result?
##### Try specifying a set of letters to be colored (the second until the last letter).
###### Does it displays the expected result (the corresponding set of letters with that color)?
##### Try specifying letter to be colored(the second letter).
###### Does it displays the expected result (the corresponding letter with that color)?
###### Does it display the expected result (the corresponding set of letters with that color)?
##### Try specifying letter to be colored (the second letter).
###### Does it display the expected result (the corresponding letter with that color)?
##### Try specifying letter to be colored(just two letter).
###### Does it displays the expected result (the corresponding letters with that color)?
###### Does it display the expected result (the corresponding letters with that color)?
##### Try passing as arguments `"HeY GuYs" --color=orange`, in order to color `GuYs`.
###### Does it display the expected result?
##### Try passing as arguments `"RGB()" --color=blue`, in order to color just the B.
@ -31,13 +31,13 @@
#### General
##### +Is it easy/intuitive to specify letter(s) to be coloured?
##### +Can you use more than one color in the same string?
###### +Is it easy/intuitive to specify letter(s) to be colored?
###### +Can you use more than one color in the same string?
#### Basic
###### +Does the project runs quickly and effectively (Favoring of recursive, no unnecessary data requests, etc.)?
###### +Is the output of the program well structured? Does any letter seems to be out of line?
###### +Does the project run quickly and effectively (favoring of recursive, no unnecessary data requests, etc.)?
###### +Is the output of the program well structured? Does any letter seem to be out of line?
###### +Is there a test file for this code?
###### +Are the tests checking each possible case?
###### +Does the code obey the [good practices](https://github.com/01-edu/public/blob/master/subjects/good-practices.en.md)?

2
subjects/ascii-art/ascii-art-color.en.md

@ -4,7 +4,7 @@
You must follow the same [instructions](https://public.01-edu.org/subjects/ascii-art/ascii-art.en) as in the first subject but with colors.
- The output should manipulate colors using the **flag** `--color=<color>`, in which `--color` is the flag and `<color>` is the color of choice.
- The output should manipulate colors using the **flag** `--color=<color>`, in which `--color` is the flag and `<color>` is the color name of choice (ex: orange, green, blue).
- The colors must respect the [RGB](https://en.wikipedia.org/wiki/RGB_color_model) concept.
- You should be able to specify a single or a set of letters you want to be colored (use your imagination for this one).
- If the letter isn't specified, the whole `string` should be colored.

41
subjects/ascii-art/ascii-art-justify.audit.en.md

@ -1,62 +1,83 @@
#### Functional Project Questions
##### Try passing as arguments `"left standard --align=right"`
###### Does it displays the correct result at the right side?
###### Does it display the correct result at the right side?
##### Try passing as arguments `"right standard --align=left"`
###### Does it displays the correct result at the left side?
###### Does it display the correct result at the left side?
##### Try passing as arguments `"hello shadow --align=center"`
###### Does it displays the correct result at the center?
###### Does it display the correct result at the center?
##### Try passing as arguments `""1 Two 4" shadow --align=justify"`
###### Does it displays the correct result justified?
###### Does it display the correct result justified?
##### Try passing as arguments `"23/32 standard --align=right"`
###### Does it displays the correct result at the right side?
###### Does it display the correct result at the right side?
##### Try passing as arguments `"ABCabc123 thinkertoy--align=right"`
###### Does it displays the correct result at the right side?
###### Does it display the correct result at the right side?
##### Try passing as arguments `"!#$%&" thinkertoy --align=cente"`
###### Does it displays the correct result at the center?
###### Does it display the correct result at the center?
##### Try passing as arguments `""23Hello World!" standard --align=left"`
###### Does it displays the correct result at the left side?
###### Does it display the correct result at the left side?
##### Try passing as arguments `""HELLO there HOW are YOU?!" thinkertoy --align=justify"`
###### Does it displays the correct result justified?
###### Does it display the correct result justified?
##### Try passing as arguments `""a -> A b -> B c -> C" shadow --align=right"`
###### Does it displays the correct result at the right side?
###### Does it display the correct result at the right side?
##### Try reducing the terminal window and run `"abcd shadow --align=right"`
###### Does the representation adapt to the terminal size displaying the right result in the right side?
##### Try reducing the terminal window and run `"ola standard --align=center"`
###### Does the representation adapt to the terminal size displaying the right result in the center?
##### Try passing as arguments a random string with lower and upper case letters, and the align flag ("--align=") followed by a random alignment (left, right, center or justify).
###### Does it display the expected result?
##### Try passing as arguments a random string with lower case letters, numbers and spaces, and the align flag ("--align=") followed by a random alignment (left, right, center or justify).
###### Does it display the expected result?
##### Try passing as arguments a random string with special characters, and the align flag ("--align=") followed by a random alignment (left, right, center or justify).
###### Does it display the expected result?
##### Try passing as arguments a random string with lower, upper case, spaces and numbers letters, and the align flag ("--align=") followed by a random alignment (left, right, center or justify).
###### Does it display the expected result?
#### Basic
###### +Does the project runs quickly and effectively (Favoring of recursive, no unnecessary data requests, etc.)?
###### +Is the output of the program well structured? Does any letter seems to be out of line?
###### +Is there a test file for this code?
###### +Are the tests checking each possible case?
###### +Does the code obey the [good practices](https://public.01-edu.org/subjects/good-practices.en)?
#### Social
###### +Did you learn anything from this project?
###### +Would you recommend/nominate this program as an example for the rest of the school?

6
subjects/ascii-art/ascii-art-output.en.md

@ -2,7 +2,7 @@
### Objectives
- You must follow the same [instructions](https://public.01-edu.org/subjects/ascii-art/ascii-art.en) as in the first subject but writing the result into a file.
- You must follow the same [instructions](https://public.01-edu.org/subjects/ascii-art/ascii-art.en) as in the first subject **while** writing the result into a file.
- The file must be named by using the flag `--output=<fileName.txt>`, in which `--output` is the flag and `<fileName.txt>` is the file name.
@ -13,13 +13,13 @@ This project will help you learn about :
- Ways to receive data.
- Ways to output data.
- Manipulation of strings.
- Learning about the choice of outputs.
- Choices of outputs.
### Instructions
- Your project must be written in **Go**.
- The code must respect the [**good practices**](https://public.01-edu.org/subjects/good-practices.en).
- It is recommended that the code should present a **test file**.
- It is recommended that the code presents a **test file**.
### Usage

8
subjects/ascii-art/ascii-art.en.md

@ -2,10 +2,10 @@
### Objectives
Ascii-art consists on receiving a `string` has an argument and outputting the `string` in a graphic representation of ASCII.
Ascii-art consists on receiving a `string` as an argument and outputting the `string` in a graphic representation of ASCII.
- This project should handle numbers, letters, spaces, special characters and `\n`.
- Take a look on the ASCII manual.
- Take a look at the ASCII manual.
This project will help you learn about :
@ -20,14 +20,14 @@ This project will help you learn about :
- Your project must be written in **Go**.
- The code must respect the [**good practices**](https://public.01-edu.org/subjects/good-practices.en).
- It is recommended that the code should present a **test file**.
- It is recommended that the code present a **test file**.
- It will be given some [**banner**](https://github.com/01-edu/public/blob/master/subjects/ascii-art) files with a specific graphical template representation of ASCII. The files are formatted in a way that it is not necessary to change them.
### Banner Format
- Each character has an height of 8 lines.
- Characters are separate by a new line `\n`.
- Characters are separated by a new line `\n`.
- Here is an example of ' ', '!' and '"'(one dot represents one space) :
```console

2
subjects/go-reloaded/go-reloaded.audit.en.md

@ -257,7 +257,7 @@ str = <<==123==>>In<<==123==>>1820,<<==123==>>Thomas<<==123==>>de<<==123==>>Colm
##### Try executing the program passing as argument: `"happy thoughts" "good luck"`
`huppy thooghts guod lack`
###### Does the program returns the value above?
##### Try executing the program passing as argument: `"al's elEphAnt is overly underweight!"
##### Try executing the program passing as argument: `"al's elEphAnt is overly underweight!"`
`il's elephunt es ovirly AndErweaght!`
###### Does the program returns the value above?

12
subjects/groupie-trackers/groupie-trackers-search-bar.audit.en.md

@ -30,6 +30,18 @@
##### Try to search for the creation date `"1965"`.
###### Does it present as result "Scorpions" and "Pink Floyd"?
##### Start typing an artist/band beginning with `"G"`.
###### Does it present as suggestion the band you were looking for?
##### Start typing a location of one of the concerts.
###### Does it present as suggestion the location you were looking for?
##### Try to search for an artist/band member beginning with `"R"`.
###### Does it present the artist/band you were looking for?
##### Try to search for a creation date of an artist/band.
###### Does it present the artist/band you were looking for?
#### Basic
###### +Does the code obey the [good practices](https://public.01-edu.org/subjects/good-practices.en)?

10
subjects/groupie-trackers/groupie-trackers-search-bar.en.md

@ -15,14 +15,14 @@ Groupie-trackers-search-bar consists of creating a functional program that searc
- The program must handle case sensitive.
- The search bar must have typing suggestions as you write.
- The search bar must identify and display in each suggestion the individual type of the search cases. (ex: Freddie Mercury -> member)
- Example if you start writing `"phil"` it should appear as suggestions `Phil Collins - member` and `Phil Collins - artist/band`. This is just an example of a display.
- For example if you start writing `"phil"` it should appear as suggestions `Phil Collins - member` and `Phil Collins - artist/band`. This is just an example of a display.
This project will help you learn about :
- Manipulation, display and storage of data.
- HTML.
- [Events](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/) creation and display.
- JSON files and format.
- Manipulation, display and storage of data.
- HTML.
- [Events](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/) creation and display.
- JSON files and format.
### Instructions

47
subjects/my-ls-1/my-ls-1.audit.en.md

@ -1,62 +1,81 @@
#### Functional
##### Run both my-ls-1 and the system command `ls` with no arguments.
###### Does it displays the same files and/or folders in the same order?
###### Does it display the same files and/or folders in the same order?
##### Run both my-ls-1 and the system command `ls` with the arguments: `<file name>`.
###### Does it displays the same file?
###### Does it display the same file?
##### Run both my-ls-1 and the system command `ls` with the arguments: `<directory name>`.
###### Does it displays the same files and/or folders in the same order?
###### Does it display the same files and/or folders in the same order?
##### Run both my-ls-1 and the system command `ls` with the flag: `-l`.
###### Does it displays the same files and/or folders with the same display?
###### Does it display the same files and/or folders with the same display?
##### Run both my-ls-1 and the system command `ls` with the arguments: `-l <file name>`.
###### Does it displays the same file with the same display?
###### Does it display the same file with the same display?
##### Run both my-ls-1 and the system command `ls` with the arguments: `-l <directory name>`.
###### Does it displays the same files and/or folders with the same display?
###### Does it display the same files and/or folders with the same display?
##### Run both my-ls-1 and the system command `ls` with the flag: `-l /usr/bin`.
###### Does it displays the same files and/or folders with the same display? Be aware of symbolic links.
###### Does it display the same files and/or folders with the same display? Be aware of symbolic links.
##### Run both my-ls-1 and the system command `ls` with the flag: `-R`, in a directory with folders in it.
###### Does it displays the same files and/or folders?
###### Does it display the same files and/or folders?
##### Run both my-ls-1 and the system command `ls` with the flag: `-a`.
###### Does it displays the same files and/or folders in the same order?
###### Does it display the same files and/or folders in the same order?
##### Run both my-ls-1 and the system command `ls` with the flag: `-r`.
###### Does it displays the same files and/or folders in the same order?
###### Does it display the same files and/or folders in the same order?
##### Run both my-ls-1 and the system command `ls` with the flag: `-t`.
###### Does it displays the same files and/or folders in the same order?
###### Does it display the same files and/or folders in the same order?
##### Run both my-ls-1 and the system command `ls` with the flag: `-la`.
###### Does it displays the same files and/or folders in the same order?
###### Does it display the same files and/or folders in the same order?
##### Run both my-ls-1 and the system command `ls` with the arguments: `-l -t <directory name>`.
###### Does it displays the same files and/or folders in the same order?
###### Does it display the same files and/or folders in the same order?
##### Run both my-ls-1 and the system command `ls` with the arguments: `-lRr <directory name>`, in which the directory chosen contains folders.
###### Does it displays the same files and/or folders in the same order?
###### Does it display the same files and/or folders in the same order?
#### General
###### +Does the program runs with colors as in the ls command?
###### +Does the program has other flags except for the mandatory ones?
##### Try running the program with `-R ~` and with the command time before the program name (ex: "time ./my-ls-1 -R ~").
###### +Is the real time less than 1,5 seconds?
#### Basic
###### +Does the code obey the [good practices](https://public.01-edu.org/subjects/good-practices.en)?
###### +Is there a test file for this code?
###### +Are the tests checking each possible case?
#### Social
###### +Did you learn anything from this project?
###### +Would you recommend/nominate this program as an example for the rest of the school?

4
subjects/net-cat/net-cat.audit.en.md

@ -16,10 +16,10 @@
###### Does the second Client receive the message?
##### Try creating a server and 1 Client and send some messages using this Client. Then create a new Client.
###### Can the new Client see all the messages?
###### Can the new Client see all the previous messages?
##### Try creating a server and 3 Clients and send a message using the second Client.
###### Does all the Clients(first, second and third) received the same message?
###### Does all the Clients (first, second and third) received the same message?
##### Try creating a server and use 2 or 3 different computers and create for each computer one Client.
###### Did the server/Clients connected with success?

16
subjects/net-cat/net-cat.en.md

@ -2,9 +2,9 @@
### Objectives
This project consists on recreating the **NetCat in a Server-Client Architecture** that can run in a server mode on a specified port listening for incoming connections, and it can be used in client mode, trying to connect on a specified port and transmitting information to the server.
This project consists on recreating the **NetCat in a Server-Client Architecture** that can run in a server mode on a specified port listening for incoming connections, and it can be used in client mode, trying to connect to a specified port and transmitting information to the server.
- NetCat, `nc` the system command, is a computer network utility for reading from and writing to network connections using TCP or UDP. It is used for anything involving TCP, UDP, or UNIX-domain sockets, it is able to open TCP connections, send UDP packages, listen on arbitrary TCP and UDP ports...
- NetCat, `nc` system command, is a computer network utility for reading from and writing to network connections using TCP or UDP. It is used for anything involving TCP, UDP, or UNIX-domain sockets, it is able to open TCP connections, send UDP packages, listen on arbitrary TCP and UDP ports...
- To see more information about NetCat inspect the manual `man nc`.
@ -29,15 +29,15 @@ Here is a simple example of connection and transmission between Server-Client by
```
- To see the host IP use the command `ifconfig` on the host machine.
- To see the host IP use the command `ifconfig` on the server host machine.
Your project must work in a similar way that NetCat works, in other words you must create a group chat. The project must present :
Your project must work in a similar way that NetCat works, in other words, you must create a group chat. The project must present :
- TCP or UDP connection between server and multiple clients (relation of 1 to many), the type of connection must be established by using a flag, just like `nc`, by default it uses TCP connection, if you want to use UDP connection present the flag `-u`.
- TCP or UDP connection between server and multiple clients (relation of 1 to many). The type of connection must be established by using a flag, just like `nc`, by default it uses TCP connection, but if you want to use UDP connection present the flag `-u`.
- Each Client must have an user name.
- Clients must be able to send messages to the chat.
- Messages sent, must be identified by the time that was sent and the user name of who sent the message.
- If a Client joins the chat, all the messages sent to the chat must be uploaded to the new Client.
- If a Client joins the chat, all the previous messages sent to the chat must be uploaded to the new Client.
- If a Client connects to the server, the rest of the Clients must be informed by the server that the Client joined the group.
- If a Client exits the chat, the rest of the Clients must be informed by the server that the Client left.
- All Clients must receive the messages sent by other Clients.
@ -83,8 +83,8 @@ listening on port 8080....
- Client 2 :
```console
stuednt$ ./net-cat 192.168.1.123 8080
wellcome, you are connected
student$ ./net-cat 192.168.1.123 8080
welcome, you are connected
enter user name : client2
your name is client2

34
subjects/push-swap/push-swap.audit.en.md

@ -1,72 +1,100 @@
#### Functional
##### Try to run `"./push_swap"`.
###### Does it display nothing?
##### Try to run `"./push_swap 2 1 3 6 5 8"`.
###### Does it display a valid solution and less than 9 instructions?
##### Try to run `"./push_swap 0 1 2 3 4 5"`.
###### Does it display nothing?
##### Try to run `"./push_swap 0 one 2 3"`.
```
Error
```
###### Does it display the right result as above?
##### Try to run `"./push_swap 1 2 2 3"`.
```
Error
```
###### Does it display the right result as above?
##### Try to run `"./push_swap <5 random numbers>"` with 5 random numbers instead of the tag.
###### Does it displays a valid solution and less than 12 instructions?
###### Does it display a valid solution and less than 12 instructions?
##### Try to run `"./push_swap <5 random numbers>"` with 5 different random numbers instead of the tag.
###### Does it still displays a valid solution and less than 12 instructions?
##### Try to run `"./checker "` and input nothing.
###### Does it display nothing?
##### Try to run `"./checker 0 one 2 3"`.
```
Error
```
###### Does it display the right result as above?
##### Try to run `"echo -e "sa\npb\nrrr\n" | ./checker 0 9 1 8 2 7 3 6 4 5"`.
```
KO
```
###### Does it display the right result as above?
##### Try to run `"echo -e "pb\nra\npb\nra\nsa\nra\npa\npa\n" | ./checker 0 9 1 8 2"`.
```
OK
```
###### Does it display the right result as above?
##### Try to run `"ARG = "4 67 3 87 23"; ./push_swap $ARG | ./checker $ARG"`.
```
OK
```
###### Does it display the right result as above?
#### General
##### Try to run `"$ARG= "<100 random numbers>"; ./push_swap $ARG"` with 100 random different numbers instead of the tag.
###### +Does it displays less than 700 commands?
###### +Does it display less than 700 commands?
##### Try to run `"$ARG= "<100 random numbers>; ./push_swap $ARG | ./checker $ARG"` with the same 100 random different numbers as before instead of the tag.
```
OK
```
###### +Does it displays the right result as above?
###### +Does it display the right result as above?
#### Basic
###### +Does the code obey the [good practices](https://public.01-edu.org/subjects/good-practices.en)?
###### +Is there a test file for this code?
###### +Are the tests checking each possible case?
#### Social
###### +Did you learn anything from this project?
###### +Would you recommend/nominate this program as an example for the rest of the school?

Loading…
Cancel
Save