Skip to content

chaos-generator/gumtree-address-book

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Gumtree coding challenge

The task

Your task is to develop a small java application. We need you to build your application in your own GitHub repository. Please do not fork our repository to create your project. Once you are done, send us a link to your repository.

Please allow yourself at least 1 hour of uninterrupted time for this task, but feel free to spend as much time on the task as you like and make the solution and the code as perfect as you like.

The application

Your application needs to read the attached AddressBook file and answer the following questions:

  1. How many males are in the address book?
  2. Who is the oldest person in the address book?
  3. How many days older is Bill than Paul?

Some insights into what we'll be looking for (and what we will not):

  • Feel free to use any dependency management and build tools eg maven or gradle
  • Please do not use database, we are more interested in your Java skills than your SQL skills
  • Feel free to commit as often as you'd like. The more commits the better! Please commit at least once within the first hour
  • It's better to complete 1 task than to start 3
  • Feel free to use any java libraries you feel appropriate
  • We will be looking at how you approach the task (e.g. how you break it into sub-tasks) and how you structure your code to answer the questions

Good Luck!

Post Test notes.

I've separated reading the data in the DAO layer, manipulating the data in the service layer and I created a simple pojo and a simple App to run and answer the three question from the test.

I've wrote mostly success tests, but with more time, I'd write tests for corner cases, such as more mal-formed data eg. invalid dob format, test for existence of header, empty vs null cells, etc.

The bit that I spent most of the time, was actually stuck with converting 2 digit years into LocalDateTime, which was either failing the parsing, or giving me a date in the future. A quick google pointed me in the direction of Joda to resolve this issue.

Coverage is above 79% and find bugs reported no issues.

I would consider adding a controller layer as well as adding spring, so that allows for dependency injection, making use of the interfaces to create loosely coupled interactions. Also, spring-boot would make it simple to get all this as a REST API.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages