Can i post here my personal project for code evaluation?

First: working code is more important than anything. I hope you don't think I'm negatively criticizing your code or saying you must change things. I'm just trying to come up with possible ideas for improvements


I'm not familiar with your project so I could be wrong, but 1000 line classes and 350 line methods seem like they could be split up more.

You even split up one large function with comments. You could move those sections into their own functions.

Is NubianManager doing too much? I don't know.

The utility classes could probably be in their own module.


Which reminds me; at some point, you are going to want documentation. If this is going to be used by coworkers and changed, you might want to write tests for it too.


I read in another comment:

Logging, i'm allready using it, but sometimes i have to print some information just for my coworkers know what they have to search for.

logging can be finely tuned. You can log to different places, with different formats and different levels, all at the same time.

You might want to consider replacing print so you have fine control over output and can easily change it later.

Here's a snip from an old project. http://pastebin.com/yQmmPHEP It can definitely be improved but is a starting example of what can be done.

I have the top level logger capture everything that happens in the program and dumps it into a massive debug.txt file.

Errors are captured again by the top level logger and sent to a rotating file handler that outputs a different format. The error handler will write to a file until it is 70kb then create a new file until it reaches a max 6 files. Then it overwrites the old.

In addition to that, each class in the project sets up its own logger and logs relevant data to its own file. It also writes INFO level debugging to the console, prefixed with its own name.

The app logs everything, at least twice to disk and once to console. Along with custom Exceptions and good log messages, it keeps good records of every action and error.


I just noticed these 2 functions are identical except the hard coded file paths: parse_section and omp_properties

You could delete one and have the function accept a file path as an argument.

/r/learnpython Thread Parent