PyJudge icon indicating copy to clipboard operation
PyJudge copied to clipboard

Code Documentaion

Open jatin56 opened this issue 6 years ago • 1 comments

The code for the application is not properly documented. New members wanting to contribute to the Project may find Difficult to understand the code and may have to spend more time to understand the code rather than improving it.

Properly Documenting the code will be useful for people who want to contribute or learn from the code

jatin56 avatar May 24 '19 08:05 jatin56

A few guidelines for this issue:

  • Use sphinx
  • don't add noise. Add meaningful docstrings.

For example, this is a useless docstring:

def add(x, y):
    """
    add: method
        adds two things
    parameters: x, y
    returns: number
    """

While I understand that your IDE might be doing this automatically for you please avoid the temptation to follow whatever your IDE tells you to do. A useful docstring/comment would be:


def some_fn():
    ...
    total = cost + damages + repair + 1
    # a comment explaining the significance of 1 and WHY we need it here
    ...

Comments like the following are also quiet useless:

x = a + b  # add a and b and store in x

theSage21 avatar May 24 '19 13:05 theSage21