Browse Source

ascii-art-web questions and fixes

pull/384/head
lee 5 years ago
parent
commit
439c34bc8f
  1. 56
      subjects/ascii-art-web/ascii-art-web-dockerize.audit.en.md
  2. 13
      subjects/ascii-art-web/ascii-art-web-dockerize.en.md
  3. 98
      subjects/ascii-art-web/ascii-art-web.audit.en.md
  4. 4
      subjects/good-practices.en.md

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

@ -0,0 +1,56 @@
#### Functional Project Questions
###### Does the project present 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> .`).
```
student$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
<name of the image> latest 85a65d66ca39 7 seconds ago 795MB
```
###### 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>`)
```
student$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
cc8f5dcf760f ascii-art-web-docker "./server" 6 seconds ago Up 6 seconds 0.0.0.0:8080->8080/tcp ascii-art-web
```
###### Run the command `docker ps -a` to see all containers. Is the docker container running as above?
##### Try running the [command](https://docs.docker.com/engine/reference/commandline/exec/) `docker exec [OPTIONS] CONTAINER COMMAND [ARG...]`. (example : `docker exec -it <container_name> /bin/bash`) and do a `ls -l` to see the file system.
```
student$ docker exec -it postgres /bin/bash
I have no name!@51c2efe2d366:/$ ls -l
drwxr-xr-x 1 root root 4096 Dec 28 15:31 bin
-rwxr-xr-x 2 root root 4096 Sep 8 10:51 server.go
drwxr-xr-x 2 root root 4096 Sep 8 10:51 templates
I have no name!@51c2efe2d366:/$ exit
exit
```
###### Is the file system for the containers well organized?
###### Does the DockerFile contain some [metadata](https://docs.docker.com/config/labels-custom-metadata/) applied to the docker object?
###### Does the project present no [unused object](https://docs.docker.com/config/pruning/)?
#### General Requirements
###### +Does the project present a script to build the images and containers? (using a script to simplify the build)
#### Basic
###### +Does the server run quickly and effectively? (Favoring recursive, no unnecessary data requests, etc)
###### +Does the code obey the [good practices](https://github.com/01-edu/public/blob/master/subjects/good-practices.en.md)?
###### +Is there a test file for this code?
###### +Are the tests checking each possible case?
###### +Are the instructions in the website clear?
###### +Does the project run using an API?
#### Social
###### +Did you learn anything from this project?
###### +Can it be open-sourced / be used for other sources?
###### +Would you recommend/nominate this program as an example for the rest of the school?

13
subjects/ascii-art-web-dockerize.en.md → subjects/ascii-art-web/ascii-art-web-dockerize.en.md

@ -2,12 +2,17 @@
### Objectives
You must follow the same [instructions](https://github.com/01-edu/public/ascii-art-web.en.md) as the first subject.
You must follow the same [principles](https://github.com/01-edu/public/blob/master/subjects/ascii-art-web/ascii-art-web.en.md) as the first subject.
- For this project you must create at least :
- one image/Dockerfile
- one Dockerfile
- one image
- one container
- You must apply [metadata](https://docs.docker.com/config/labels-custom-metadata/) to Docker objects.
- You have to take caution of unused object (often referred to as "garbage collection").
This project will help you learn about :
- Client utilities.
@ -27,9 +32,9 @@ This project will help you learn about :
### Instructions
- The web server must be created in **Go**.
- The code must respect the [good practices](https://github.com/01-edu/public/good-practices.en.md).
- The code must respect the [good practices](https://github.com/01-edu/public/blob/master/subjects/good-practices.en.md).
- The project must have a **Dockerfile**.
- Your Dockerfile must respect the [Dockerfile good practices](https://docs.docker.com/develop/develop-images/dockerfile_best-practices/).
- The project must have files written in **HTML**.
- You must use Docker.
### Usage

98
subjects/ascii-art-web/ascii-art-web.audit.en.md

@ -0,0 +1,98 @@
#### Functional Project Questions
###### Does the project contain HTML files?
##### Try inputting "{123}\n<Hello> (World)!" with the standard template/banner.
```
__ __
/ / _ ____ _____ \ \
| | / | |___ \ |___ / | |
/ / | | __) | |_ \ \ \
\ \ | | / __/ ___) | / /
| | |_| |_____| |____/ | |
\_\ /_/
__ _ _ _ _ __ __ __ __ _ _ __ _
/ / | | | | | | | | \ \ / / \ \ / / | | | | \ \ | |
/ / | |__| | ___ | | | | ___ \ \ | | \ \ /\ / / ___ _ __ | | __| | | | | |
< < | __ | / _ \ | | | | / _ \ > > | | \ \/ \/ / / _ \ | '__| | | / _` | | | | |
\ \ | | | | | __/ | | | | | (_) | / / | | \ /\ / | (_) | | | | | | (_| | | | |_|
\_\ |_| |_| \___| |_| |_| \___/ /_/ | | \/ \/ \___/ |_| |_| \__,_| | | (_)
\_\ /_/
```
###### Does it display the right result as above?
##### Try to input "123??" using the template/banner standard.
```
___ ___
_ ____ _____ |__ \ |__ \
/ | |___ \ |___ / ) | ) |
| | __) | |_ \ / / / /
| | / __/ ___) | |_| |_|
|_| |_____| |____/ (_) (_)
```
###### Does it display the right result as above?
##### Try to input "$% \"=" using the template/banner shadow.
```
_| _|
_| _|_| _| _| _|
_|_|_| _|_| _| _|_|_|_|_|
_|_| _|
_|_| _| _|_| _|_|_|_|_|
_|_|_| _| _|_|
_|
```
###### Does it display the right result as above?
##### Try to input "123 T/fs#R" using the template/banner thinkertoy.
```
0 -- o-o o-O-o o o-o | | o--o
/| o o | | / | -O-O- | |
o | / oo | o -O- o-o | | O-Oo
| / | | / | \ -O-O- | \
o-o-o o--o o-o o o o o-o | | o o
```
###### Does it display the right result as above?
###### Does it display an understandable graphical representation of the result?
##### Try to navigate between all the available pages in the website.
###### Are all the pages working? Does the project avoid [404 status](https://www.restapitutorial.com/httpstatuscodes.html)?
###### Does the project avoid HTTP status [400 bad request](https://kinsta.com/knowledgebase/400-bad-request/#causes)?
###### Does the project avoid HTTP status [500 internal server error](https://www.restapitutorial.com/httpstatuscodes.html)?
##### Try making a request to the server (clicking a button to generate the ascii-art representation on the website)
###### Is the communication between [server and client](https://www.geeksforgeeks.org/client-server-model/) well established?
###### Does the server present the right [HTTP methods](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods)?
###### Has the website runned without crashing at anytime?
#### General Requirements
###### +Does the server present all the needed [handlers and patterns](https://golang.org/pkg/net/http/#HandleFunc) for the http requests?
#### Basic
###### +Does the server run quickly and effectively? (Favoring recursive, no unnecessary data requests, etc)
###### +Does the code obey the [good practices](https://github.com/01-edu/public/blob/master/subjects/good-practices.en.md)?
###### +Is there a test file for this code?
###### +Are the tests checking each possible case?
###### +Are the instructions in the website clear?
###### +Does the project run using an API?
#### Social
###### +Did you learn anything from this project?
###### +Can it be open-sourced / be used for other sources?
###### +Would you recommend/nominate this program as an example for the rest of the school?

4
subjects/good-practices.en.md

@ -27,3 +27,7 @@
- [**gofmt**](https://golang.org/cmd/gofmt/)
- [**goimports**](https://godoc.org/golang.org/x/tools/cmd/goimports)
- [**foimports vs gofmt**](https://goinbigdata.com/goimports-vs-gofmt/)
### Dockerfile
- [**Dockerfile**](https://docs.docker.com/develop/develop-images/dockerfile_best-practices/)

Loading…
Cancel
Save