Skip to content

Latest commit

 

History

History
60 lines (40 loc) · 1.17 KB

checklist.md

File metadata and controls

60 lines (40 loc) · 1.17 KB

Сheck Your Code Against the Following Points

Don't Repeat Yourself

  1. Write your code, so you don't have duplicated lines or whole blocks of code.

Good example:

if "cat" in animal_list:
    print("found")
else:
    print("not found")

print("the end")

Bad example:

if "cat" in animal_list:
    print("found")
    print("the end")
else:
    print("not found")
    print("the end")
  1. Pay attention to avoid code duplication by using classes and functions

Code Style

  1. Use descriptive and correct variable names.

Good example:

with open("some_config_file.json", "r") as config:
    pass

Bad example:

with open("some_config_file.json", "r") as scf:
    pass
  1. Use one style of quotes in your code. Double quotes are preferable.

  2. Make sure that yor architecture is clear and your code is readable.

  3. Make sure you write the correct path to the JSON file.

  4. Make sure you use exactly import datetime, not the other way of import.

Clean Code

Add comments, prints, and functions to check your solution when you write your code. Don't forget to delete them when you are ready to commit and push your code.