opprDev / medical-image-downloader

:hospital: Medical Image Downloader
https://opprdev.github.io/medical-image-downloader
MIT License
8 stars 3 forks source link

Clean code #5

Closed luisrgpt closed 4 years ago

luisrgpt commented 4 years ago

As requested, I've seen the code of this repository and I've some suggestions that, in my opinion, may help improve the readability and expressiveness of the code.

I would like to highlight the following suggestions (in that order):

  1. Preliminary unit testing: First of all, we would need to add some unit testing, to apply our refactoring techniques as fast and as safe as possible.

  2. Renaming of variables and methods: I know this is usually subjective, but I have some renaming ideas that could be handy in this case. An IDE with refactoring features such as PyCharm could be used to prevent any side effects that this renaming might bring.

  3. Method refactoring: Nothing special... I know some "pythonic" expressions that could simplify the code, without providing much overhead. In the worst case, the changes can provide some irrelevant overhead that does not affect the functionality of the software.

  4. Check dependencies: It takes time to download all dependencies... Maybe we could remove one dependency or two if justifiable... Also, we could update and check if the code keeps working the way that it is intended to work.

I'll update this enhancement issue while progressing with the cleaning process. Any new ideas or suggestions, I'll also let you know.