Uploaded image for project: 'Moodle Community Sites'
  1. Moodle Community Sites
  2. MDLSITE-7166

[Policy] Meta policy: where there is an existing policy that is implemented consistenly, we will not change it

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: High High
    • Coding style
    • None

      Moodle's coding style policies fall into various categories:

      • Meta-policies, such as MDLSITE-5879 Respect PSR-1, and PSR-12 where no existing rule exists, or that new JavaScript will use CamelCase, and other common JS style conventions.
      • Custom policies, which do not contractict language norms, but add Moodle-specific rules, like MDLSITE-7091, which limite our use of 'use' to only the simlest cases.
      • Custom policies, which contractict (what are now) common languages conventions, but which have been fixed for a long time in Moode code, and implemented consistently. E.g. $alllowercasevariables.

      This issue proposes a Meta-Policy:

      • Long-stading coding style policies, which are consistenly implemented in existing code, won't be changed.

      Justification: The purpose of having coding style policies is to make all the millions of lines of Moodle code consistent. Any policy which changes a long-standing policy is acutally a vote for a policy of inconsistncy for the next 20 years.

      For example, MDLSITE-6594 was a coding style vote which had the effect of rendering a lots of existing code no-longer compliant with the style, and almost as soon as it was voted in, MDLSITE-7156 had to be rushed through, to undo the problems that caused.

      I think the vote here needs to options:

      Option A: Don't allow changes to long-standing, widely followed policies.

      Option B: Allow ourselves to shoot ourselves in the foot!

      (If anyone acutally thinks B is a good idea, please suggest a better wording )

      Or, to put it another way, we should focus coding style policy on improving things that are not currently defined well enough. Once a particular bike shed is painted, we shoud not waste time arguing for a change to a different colour.

            Unassigned Unassigned
            timhunt Tim Hunt
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.