👩‍💻 The Import Users Kata

This is a refactoring kata 🔧

The kata consists on reading, parsing & print data from different sources (csv & network).


A college from your company created a simple script that read users, unfortunately that person left the company a few months ago, and you need to change the functionality, but you find out the current code gets more and more tangled over the time. You talked to your boss, and he decided to give you time to improve it.

The current code is very basic but no-one feels comfortable or want to modify it.

  • Improve the current code, but maintaining the original behaviour
  • Split logic into different functions/classes if necessary
  • Consider testing ("black-box" & "white-box")
  • Have fun!

⏩ Next iteration

Instead of displaying the output through terminal, store the information somewhere else, like a text file or a SQLite database.

Instructions

This kata is available in the following languages:

🐘 PHP

From php folder, run:

php run.php

✨ Javascript

From javascript folder, run:

npm install
node run.js

It is required at least Node 18 to have access to the fetch() library

☕ Java

From java folder, run:

mvn compile exec:java -Dexec.mainClass="src.Main"

🎁 Kotlin

From kotlin folder, run:

gradlew build
gradlew run

🐍 Python

From python folder, run:

python3 main.py