#20705: Classes for Reed Muller Codes
-------------------------------------+-------------------------------------
       Reporter:  panda314           |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-7.3
      Component:  coding theory      |   Resolution:
       Keywords:                     |    Merged in:
        Authors:                     |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/panda314/classes_for_reed_muller_codes|  
23ff289a86e2d4266512e631f50ee75c6338ccd8
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Changes (by dlucas):

 * status:  new => needs_review


Comment:

 Hello,

 I started reading your code.
 Before giving actual comments on the code itself, here are some general
 comments:

 - there is certain conventions to respect while writing Python code. You
 can find a summary of these conventions
 [http://doc.sagemath.org/html/en/developer/coding_basics.html#python-code-
 style here].

 - lines are supposed to be less than 80 characters long. As I think it's
 an old rule, I'm completely ok if some lines are around 100 characters,
 especially in the doctests block which might be hard to break. However,
 some lines in your code are just too long: e.g. l. 58 is 161 characters
 long, l.92 is 144 characters long...). A general tip: in Python, as long
 as you are in the same parenthesis block, you can jump to the next line
 without any special character. For instance, this:

 {{{
 poly=poly+z*multivariatePolynomialInterpolation([evaluation2[i][k] for i
 in range(nq)], numberOfVariable-1, order-k, q, finiteField, _R)
 }}}

 can be written like this:

 {{{
 poly=poly+z*multivariatePolynomialInterpolation([evaluation2[i][k] for i
 in range(nq)],
         numberOfVariable-1, order-k, q, finiteField, _R)
 }}}

 - on names: in python, methods and variables names are written like this
 `function_name` and `variable_name` (and not `functionName` and
 `variableName`). Module names should follow the same convention
 (`reed_muller_code.py` instead of `ReedMullerCode.py`).

 - You wrote the documentation for a few methods like this:

 {{{
 r"""
 DOC
 """
 def my_func:
     code
 }}}

 but it should *always* be like this:

 {{{
 def my_func:
     r"""
     DOC
     """
     code
 }}}

 - More of the same, this DOC block should always be formatted like this:

 {{{
 def my_func(i1, i2):
     r"""
     Short description of my_func return value
     (Should be something like "Returns ....")

     [optional] more details

     INPUT:

     - ``i1`` -- description of i1

     - ``i2`` -- description of i2

     [optional] OUTPUT

     EXAMPLES::

         sage: ...

     [optional] TESTS::

         sage: ...
 }}}

 - you should always put one whitespace before and after operators
 (exception: precedence), e.g:
  - `a = b + c`
  - `a = (b+c) * (b-c)`

 - you used full names for variables everywhere but for `_R`. I think it
 would be better to rename it `polynomial_ring` or something like that.

 I'll run tests this afternoon and probably come back with more comments on
 the code itself.
 Don't worry about all my comments in formatting, it's your first big
 ticket for Sage, so it's perfectly normal to use wrong coding conventions.
 It takes some time to get used to it `;)`

 Best,

 David

--
Ticket URL: <http://trac.sagemath.org/ticket/20705#comment:9>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to