Skip to content

This repository contains the technical assessment pairing exercise for candidates interviewing for a software engineering position at Gaggle.

Notifications You must be signed in to change notification settings

gaggle-net/candidate-technical-assessment-pairing-exercise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This exercise is meant to showcase your technical abilities by pairing with a Gaggle software engineer to modify an existing codebase by adding a new feature.

  • You will fork this repository and use this issue as your requirements.
  • You will pair with a Gaggle software engineer to implement the new feature.
  • The code coverage should not decrease as new code is added.

Application

This application is a Web Service responsible for providing contact information from our contact database. The application is a proof of concept and is currently using an embedded database that inserts default data on startup.

Default Contact Data

id name
1 Bruce Wayne
2 Dick Grayson
3 Jason Todd
4 Selina Kyle
5 Oswald Cobblepot
6 Edward Nygma

Features

Feature Description Endpoint
Search By Id Retrieve a specific contact by referencing it's unique identifier. /api/contacts/{id}
Search By Name Retrieve one or more contacts by searching by name (full or partial). /api/contacts?name={name}

Build & Test Application

Assumptions

  • Java (8+) is installed (tested with openjdk version "1.8.0_275")
  • Maven (3+) is installed (tested with Apache Maven 3.6.3)

Compile and Execute Unit Tests

% mvn clean verify

Run Application

% mvn spring-boot:run

Test Application

You can test using a tool like Postman, or even using cURL from the commandline.

Examples using cURL

Search for a contact by their id.

% curl -i 'localhost:8080/api/contacts/1'
HTTP/1.1 200 
Content-Type: application/json
Transfer-Encoding: chunked
Date: Sat, 31 Jul 2021 20:01:18 GMT

{"id":1,"name":"Bruce Wayne"}

Search for a contact by their name.

% curl -i 'localhost:8080/api/contacts?name=bruce'
HTTP/1.1 200 
Content-Type: application/json
Transfer-Encoding: chunked
Date: Sat, 31 Jul 2021 20:02:24 GMT

[{"id":1,"name":"Bruce Wayne"}]

Search for a contact with an invalid id.

% curl -i 'localhost:8080/api/contacts/99999'
HTTP/1.1 404 
Content-Type: application/json
Transfer-Encoding: chunked
Date: Sat, 31 Jul 2021 20:03:55 GMT

{"error":"No contact found with id = 99999","timestamp":"2021-07-31T20:03:55.860+00:00"}

Search for a contact with a name that doesn't exist.

% curl -i 'localhost:8080/api/contacts?name=bob'
HTTP/1.1 200 
Content-Type: application/json
Transfer-Encoding: chunked
Date: Sat, 31 Jul 2021 20:05:04 GMT

[]

About

This repository contains the technical assessment pairing exercise for candidates interviewing for a software engineering position at Gaggle.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages