I. Basics

  1. Discuss the topic with me.
  2. The preferable programming languages are Kotlin or Python. Talk to me if you want to use any other language (Java, C++, C#, are generally ok).

II. Git and Pull Request

  1. The code must be submitted via a pull request in a git repository
    1. Create an empty repository in bitbucket, GitHub, or MFF's GitLab
    2. Create a branch
    3. Commit all your code on that branch (not in master)
    4. Create a Pull Request
    5. Add me as a reviewer (jhana for bitbucket, jirka-x1 for GitHub)
    6. Send me a non-automated email about this with the subject "NPFL128 Project<yourfirstname><yourlastname><assignmentnumber>"
  2. You have to react to all comments of mine: add "fixed" if you agree and fixed it, ask for more detail, or disagree. But don't just fix or ignore it silently.

III. General

  1. There is a readme file in the root (use markdown or plain text). It must specify 
    1. What the project is solving (add a reference to the relevant paper)
    2. Scope - what you implemented and what is left for future
    3. How to run the project 
    4. Add a file with sample output if appropriate
  2. Do not use jupyter notebooks, write regular production-like code (the notebook can be added to provide an example of use, but it must call the regular functions you define)
  3. Write functions that
    1. solve a single well-defined task 
    2. are documented 
    3. are testable; bonus points for unit tests
    4. ideally, the output is via the return value only. If any parameters have to be modified, document it
  4. Use self-explanatory variable and function names
  5. Document all functions (what they do, what is input, what is output); add other comments as appropriate 
  6. You must use appropriate libraries to handle JSON, XML, csv, etc. Do not write the code yourself.
  7. All files end with a newline (see: this)

IV. Python

  1. Strictly follow the PEP8 code style; a reasonable IDE (e.g., IntelliJ IDEA, PyCharm, MS VS Code) checks this for you.
  2. Use type hints
  3. Use `with` to manipulate files.
  4. Use argparse to parse arguments. 
  5. Consider using: pathlib's Path for all files and directories, Counter to count objects.