Deep Dive I CodeLab Exercise
Work in progress ….
This CodeLab exercise is designed to help you practice the concepts you have learned in the Java Deep Dive I module on day-1. You will be working on a series of tasks that involve Java Streams, Java Time API, and maybe Lambdas. We will also practice pair programming and collaboration using Github.
Exercise Overview
Instructions
1. Team up (2 x 2)
- Team up in pairs of 2
- Find another pair to team up with
- Create a team of 4 people in Moodle
2. Setup the development environment (one per team of 2 x 2)
- One team member should fork Flight data Repo - a simple application that reads a CSV file with flight data and calculates the total flight time for each airline.]
- Add all team members as collaborators to the forked repository
- Protect the
main
branch and thedevelop
branch from pushing directly to it. Only allow Pull Requests to merge into these branches. - Every team member should clone the forked repository to their local machine
- Checkout the develop branch (each member)
4. Get aqainted with the code
- Run the application (find the Main class in
FlightReader
) and see how it works - Look at the code and understand how it works. How does the duration of the flights get calculated and more? You might want to know more about the Lombok library and how it is used in the code to simplify getters, setters, and more.
- Look at the json file and discuss the structure of the data with your team
- Make sure that the data in the json file correlates with the data printed in the console
- Find the unit-test and run it.
- See if you can understand the test and what it is testing. Could it be improved?
5. Identify tasks, break them down and assign to pair programmers as Issues in Github
Inspiration for first round tasks:
- Add a new feature (e.g. calculate the average flight time for a specific airline. For example, calculate the average flight time for all flights operated by Lufthansa)
- Add a new feature (e.g. calculate the total flight time for a specifc airline. For example, calculate the total flight time for all flights operated by Lufthansa)
6. Start working on the tasks (round 1)
- Create a branch off the
develop
branch for each task - Work on the tasks in pairs
7. Pull request
- Create a Pull Request to merge the task branch into the
develop
branch - Assign the Pull Request to the other pair for review
8. Review (description of how to conduct code reviews using pull requests)
- Review the Pull Request
- Provide feedback
- Merge the Pull Request and delete the branch
9. Repeat
- Identify the next tasks (get inspiration from the list below)
- Repeat steps 5-8 for the next tasks
Inspiration for tasks
- Add a new feature (make a list of flights that are operated between two specific airports. For example, all flights between Fukuoka and Haneda Airport)
- Add a new feature (make a list of flights that leaves before a specific time in the day. For example, all flights that leave before 08:00)
- Add a new feature (calculate the average flight time for each airline)
- Add a new feature (make a list of all flights sorted by arrival time)
- Add a new feature (calculate the total flight time for each airline)
- Add a new feature (make a list of all flights sorted by duration)
- Refactor the code where needed. Make sure that the code is clean and easy to read.