Skrioo / TEST-CODE-TASK

Global Talents Hub
0 stars 0 forks source link

Review #1

Open Irostovsky opened 2 years ago

Irostovsky commented 2 years ago

Hello @Skrioo I m Ivan from GuestReady. Thanks for the doing this task. I have some notes:

  1. For now you parse the date based on the format structure. In real life this function could receive dates in the different formats. For example from

    • airbnb 12 June, 2023
    • booking.com 2022-01-15 Please adopt the get_commission method to get the commission by date and platform(airbnb or booking.com). If not supported platform is passed just raise an exception: Not supported platform {PLATFORM_NAME}
  2. You hardcoded the high season month in the code. 6 and 9 now are magic numbers. It is an antipattern. Please modify code to avoid it. To motivate you to do it, imagine that the marketing department asked set 11% for December and 12% for January because on Xmas holidays. Please improve the function to support this requirement.

Thanks! Any questions, please let me know.

Skrioo commented 2 years ago

Hello @Irostovsky,

I think I have an idea of what you mean. I will get into it.

Denisa told me you are interested in how much experience I have with Django, well I will be honest with you, it's pretty basic. I did some tutorials and read the documentation but never did any project since I was mostly focused on Flask.

Kind regards Ismar