You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 3, 2018. It is now read-only.
Here I wrote about some code issues that I had found.
First of all, I would like to write about most common code and doc issues:
Need to split lines and leave only 79 characters per line;
There are many mistakes in English words and sentences;
Variable names must be self-describing;
There are lots of magic constants and strings;
As for me, all modules have complex logic which very hard to understand. I believe that you can refactor the code and simplify it;
There is no information about the format of the input data and its types anywhere (at least you should have this information in your wiki or other docs sources);
Need to group methods in classes or in modules if you do not want to work with OOP.
And that's result of my code inspection file by file.
analytics/parser/utils.py
Very simple work with logging, need to add some additional flags to avoid mixing with possible third-party loggers or global django logger;
Need to separate logging config from code to config file;
There are some variable names which shadow built-in types (example: dict);
Also during whole file there are lots of lines in global namespace;
LinkFinder is not shadow data from other classes, internal methods and fields user can get with such example:
Intro
Here I wrote about some code issues that I had found.
First of all, I would like to write about most common code and doc issues:
And that's result of my code inspection file by file.
analytics/parser/utils.py
django
logger;dict
);LinkFinder
is not shadow data from other classes, internal methods and fields user can get with such example:LinkFinder.mining
method contains multiple if-statements with same condition.analytics/parser/main.py
parse
method contains 4 (4, Carl!) nested for-loops! Does anyone want to say that it's not a bad thing?analytics/finder/main.py
analytics/utils_backend.py
SECRET_KEY
indjango
settings)os.remove
method can throw exceptions but you do not process them.The text was updated successfully, but these errors were encountered: