This repository provides the project scaffold for a simple programming challenge. Though the challenge is very simple and a rather synthetic use-case, your results are a helpful starting point to discuss your programming flavor, skills and methodology.
BEFORE STARTING: Please take the time and read this document completely and carefully! It describes important parts of the challenge.
Implement a solution for the given tasks which aims for
-
robustness & correctness
-
readability & maintainability
-
clean software design & architecture
Be prepared to discuss your implementation and software design decisions. Show us how you would solve the task when working on your day-to-day job.
Feel free to come up with own ideas & solutions. There is no plain "right" or "wrong". Instead, we want to talk to you about how you achieved your goal and about your thoughts and design idea and process.
Between ~1.5 hour up to ~4 hours,
depending on your previous experience & development environment.
- Weather
-
In
weather.csv
you’ll find the daily weather data of a single month. Read the file, then output the day number (column oneDay
) of the day with the smallest temperature spread (difference between maximum & minimum temperature of the day.) The maximum temperature is the second columnMxT
, the minimum temperature the third columnMnT
. - Football
-
The
football.csv
file contains results of the English Premier League. The columns labeled ‘Goals’ and ‘Goals Allowed’ contain the total number of goals scored by and against each team (so Arsenal scored 79 goals themselves and had 36 goals scored against them). Read the file, then print the name of the team with the smallest distance (absolute difference) between ‘Goals’ and ‘Goals Allowed’. - Task
-
-
Try to write a single program, which is able to solve the "Weather" challenge.
-
Then try to refactor & extend your solution, that it additionally supports the Football challenge.
-
- Process
-
-
Favour the software design goals described under Goal over other goals like performance or feature set.
-
Try to follow a test-driven development approach.
-
Your solution should focus on maintainability, reusability and readability. Here are some hints on how you may achieve these goals:
-
The most important aspect is separation of concerns. Think about the different concerns involved in the task and how they may need to change in the future. For example: one concern is reading the file. What others components can you think of? Try to design separate, concise software components for each concern.
-
Often a quick diagram illustrating the components and their interactions can be helpful. If you draw a diagram, feel free to include it in your solution.
-
Design intuitive interfaces for the components in a way that each component can be replaced. For example in the next evolution step of your solution you might need to support other data formats like JSON files or even Web services. The Reader for the CSV-files in your example could be replaced with a reader that implements the same interface but reads JSON-files.
-
Use meaningful names for classes, properties and methods. By reading the name, one should already have an idea of what something does.
-
Document your development by small, frequent git commits that address a specific matter each (e.g a feature). Try to make the commit messages as expressive as possible, so a reader knows what a commit does.
For this project, the Java Development Kit 11 or above is required. You can download it from https://adoptopenjdk.net/.
The starting point for every challenge is provided as a branch in a Gitlab.com/GitHub hosted Git repository. Be careful to adjust the URLs below accordingly.
To start
git clone https://[gitlab|github].com/exxcellent/programming-challenge.git
or if you’ve forked the repository then
git clone git@[gitlab|github].com:YOURNAME/programming-challenge.git
See what challenges are available by listing the branches present:
git branch -a
cd programming-challenge
git checkout challenge-CHALLENGENAME
The project scaffolds provides a Maven pom.xml
as starting
point. You should be able to start with any IDE or text editor
you are convenient with.
After installing Maven 3.x you should be able to
- Build & test your project
-
mvn verify
- Then to run the main class de.exxcellent.challenge.App
-
mvn exec:java
- To remove the compilation output
-
mvn clean
- Or use your IDE functionality
-
to run & debug you program.