/react-kata-1

Coding kata for React aimed to improve your development skills in continues sessions.

Primary LanguageJavaScriptMIT LicenseMIT

React.js Kata - Part 1: Library

Code kata in React.js where you have to write a library of books and magazines.

A code kata is an exercise in programming which helps a programmer hone their skills through practice and repetition.

Topic

You have to implement an abstracted and simple library system.

Frame conditions

  1. 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.

  2. 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.

  3. 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, do not take a look at your previous implementation.

  4. Develop your code based on React.js version 16.

    You do not need to use Semantic-UI, the layout, tests or routing provided. You can rename, refactor, remove or delete them as you with. They were created to provide a minimum structure so you can focus on what you think it is important to finish the tasks requested.

  5. Keep the following priorities in mind while you implementing - in the mentioned order:

    1. Code quality
    2. Usage of object oriented methods
    3. Functionality
  6. Given resources:

    Hint: There is a reason why there are so many books and authors in german with umlauts.

    • authors.csv: Contains authors with its email, firstName and lastName.
    • books.csv: Contains books with its title, description, one or more authors and an isbn.
    • magazines.csv: Contains magazines with its title, one or more authors, a publishedAt and an isbn.

Tasks

Main tasks

  1. Your software should read all data from the given CSV files in a meaningful structure.

  2. Print out all books and magazines with all their details (with a meaningful output format).

    Hint: Do not call printBooks(...) first and then printMagazines(...) ;-)

  3. Find a book or magazine by its isbn.

  4. Find all books and magazines by their authors’ email.

  5. Print out all books and magazines with all their details sorted by title. This sort should be done for books and magazines together.

Optional tasks

Hint: Optional means optional.

  1. Write Unit tests for one or more methods.

  2. Implement a view for direct path access for each ISBN and link then to the search results.

  3. Add a book and a magazine to the data structure of your software and export it to a new CSV files.

Procedure

  1. Get the code. There are several ways for it:

    1. With fork (makes it possible to preserve your work):

      1. Fork this repository
      2. Clone this fork to your computer:
        git clone <your github url>
        # Example: git clone https://github.com/blaubaer/react-kata-1.git
    2. Clone this repository with local branch:

      git clone https://github.com/echocat/react-kata-1.git
      git checkout -b run-<yourname>-<iteration number>
      # Example: git checkout -b run-blaubaer-1
    3. Just download it from here

  2. Open in your favorite IDE.

  3. Start the kata.

  4. Discuss with your friends and/or colleges your solution.

  5. Repeat after some days/weeks.

FAQ

How to install the application?
npm install
How to run your application?
npm run start
How to run your tests?
npm run lint
npm run test

License

See LICENSE file.