Code kata in Node.js where you have to write a library of books and magazines.
You have to implement an abstracted and simple library system.
-
You have exact 2.5 hours of time - no minute longer.
If you reach this time limit stop your work immediately. It is one part of the kata to respect this time limit.
-
There are no restrictions on how to use the provided time. If you want to code the entire time, take a break or a cigaret - it’s up to you.
-
This is a real world situation. You are allowed to consult the Internet, use every library you want, call a friend ...
BUT: You are not allowed to do pair programming. AND If you have already done this kata before to have a look at your previous implementation.
-
Develop your code based on Node.js language level 8.
-
Keep the following priorities in mind while you implementing - in the mentioned order:
- Code quality
- Usage of object oriented methods
- Functionality
-
Given resources:
Hint: There is a reason why there are so many books and authors in german with umlauts.
authors.csv
: Contains authors with itsemail
,firstName
andlastName
.books.csv
: Contains books with itstitle
,description
, one or moreauthors
and anisbn
.magazines.csv
: Contains magazines with itstitle
, one or moreauthors
, apublishedAt
and anisbn
.
-
Your software should read all data from the given CSV files in a meaningful structure.
-
Print out all books and magazines (could be a GUI, console, …) with all their details (with a meaningful output format).
Hint: Do not call
printBooks(...)
first and thenprintMagazines(...)
;-) -
Find a book or magazine by its
isbn
. -
Find all books and magazines by their
authors
’ email. -
Print out all books and magazines with all their details sorted by
title
. This sort should be done for books and magazines together.
Hint: Optional means optional.
-
Write Unit tests for one or more methods.
-
Implement an interactive user interface for one or more of the main tasks mentioned above. This could be done by a website, on the console, etc.
-
Add a book and a magazine to the data structure of your software and export it to a new CSV files.
-
Get the code. There are several ways for it:
-
With fork (makes it possible to preserve your work):
- Fork this repository
- Clone this fork to your computer:
git clone <your github url> # Example: git clone https://github.com/blaubaer/nodejs-kata-1.git
-
Clone this repository with local branch:
git clone https://github.com/echocat/nodejs-kata-1.git git checkout -b run-<yourname>-<iteration number> # Example: git checkout -b run-blaubaer-1
-
Just download it from here
-
-
Open in your favorite IDE.
Hint: We recommend IntelliJ IDEA Community Edition.
-
Start the kata.
-
Discuss with your friends and/or colleges your solution.
-
Repeat after some days/weeks.
npm run start
npm run lint
npm run test
See LICENSE file.