---
# System prepended metadata

title: Practice for new member

---

# Practice for new member

- Download [file (.tar)](https://drive.google.com/uc?id=1sV9Oydwb0A0KmOP-wQea10ADfJtVdWUt&export=download) to do workshop for Section I & Section II
- All Java applications (JDK 8) must be used [Apache Maven](https://maven.apache.org/)

---

## Some basic things
- [Java style](http://cr.openjdk.java.net/~alundblad/styleguide/index-v6.html), [Coding convention](https://www.oracle.com/technetwork/java/javase/documentation/codeconventions-139411.html)
- Pass by value, pass by reference, escaping reference
- Stream, parallel stream, method reference
- Functional interface, lambda expression
- [Typesafe config](https://lightbend.github.io/config/)

---

## I. Linux/Unix
### 1. Requirements
- What is Linux/Unix, CentOS?
- Compare with Windows
- Folder architecture
- Working with shell script on CentOS **(optional)**
- Remember some familiar command lines: mkdir, cp, mv...
### 2. Practice
Using command line to do all below questions
- Unzip [tar](https://drive.google.com/uc?id=1sV9Oydwb0A0KmOP-wQea10ADfJtVdWUt&export=download) file
- Move/Copy all txt files inside paragraphs/ directory to outside
- Remove paragraphs/ directory
- Remove tar file
**(all below questions are applied for all files)**
- Print contents of all files
- Print all lines which have "exception"
- Count all lines which have "exception"
- Print all lines which have "exception" or "error"
- Print all lines which have "exception" and "error"
- Count all the number appearances of work "exception"
- Print all 4th word of all lines. If the line is "Hello, this is practice for command line" -> print "practice"
	- Sort all those numbers asc
	- Sum all those numbers
	- Sort desc and remove duplicate number
	- Count the number appearances for each number
- Replace all "he" to "she"
- Create paragraphs/ directory
- Move/Copy all txt files into paragraphs/ directory
- Create new tar archive for paragraphs/

---

## II. Thread, multi-thread
### 1. Requirements
- Understand about thread, multi-thread
- What is thread local
- Understand about deadlock, livelock
- Pros & Cons of multi-thread
- When we use single/multi thread
- Concurrent and parallel
### 2. Practice
- Unzip [tar](https://drive.google.com/uc?id=1sV9Oydwb0A0KmOP-wQea10ADfJtVdWUt&export=download) file. Count all the appearances of each character  (only in alphabet, ignore number/special character such as: 1, 2, #, $, etc...) on all files. Remove all accent before couting. Example: đ -> d, ề -> e, ă -> a, â -> a, ầ -> a...
	- Using single thread to handle this
	- Using multi thread to handle this
	- Compare
---

## III. TCP, UDP
### 1. Requirements
- OSI model, TCP/IP model
- TCP, UDP
- TCP 3-way handshake

### 2. Practice
- Create simple chat (client, server) application using TCP/UDP.

---

## IV. HTTP
### 1. Requirements
- Understand HTTP protocol
- Understand REST principles
### 2. Practice
- Create a simple database (OracleDB or Postgres) contain 1 table ``Student`` with columns: ``id``, ``first_name``, ``last_name``, ``date_of_birth``, ``address``
- Create a Web service to CRUD with Student table using [Vert.x](https://vertx.io/) and JDBC **(required)**, Hibernate **(optional)**


---

## V. Docker
### 1. Requirements
- Image, container, volume
- Dockerfile
### 2. Practice
- Dockerize application of Section IV and deploy it.

---

## VI. Algorithm
### 1. Requirements
- Know some basic sorting algorithms
    - Insert sort
    - Merge sort
    - Bubble sort
    - Quick sort
- Dijkstra algorithm
### 2. Practice
- Find 2 greatest numbers using 1 for (loop). List number: 7, 4, 33, 8, 2, 91, 2, 91, 33, 8, 28. Result should be: 91, 33
- We have a below map
    - Start point: A
    - End point: Z
    - Grey: unavailable (print as 0)
    - White: available (print as 1)
    ![](https://i.imgur.com/AEu6qYZ.png)
- Question
    - Print all available paths that can go from A to Z (4 paths)
    - Print the sortest path like the image below
    ![](https://i.imgur.com/mR73JcH.png)

---

## VII. Coding
- Download [java application](https://drive.google.com/uc?id=15XyLPb0X_V7BGiUZzBLQQf-hWMcnSWYS&export=download) and run it by: **java -jar file-name.jar**
- Play with this
### 1. Requirements
- Knowledge about OOP
- Work with interface, abstract...
- Designing for future (easy to maintain or extend)
### 2. Practice
- Create a java application with the same above
- **Next level**: hero can shoot the monster (shoot up/down/left/right). Monster will be disappeared after being shooted **(optional)**
- **Next level**: hero have only 2 bullets to shoot monster **(optional)**
- **Next level**: have other kind of monster on map such as Dragon, Dragon only disappears when be shooted 2 times **(optional)**

---