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 Aug 21, 2018. It is now read-only.
Several students are experiencing 'inconsistent indentation' errors when editing and then executing the sample files.
Current Formating: The sample files (today) are using tabs for indentation.
Problem: The default settings of the Notepad++ editor that many of them are using defaults to converting tabs-to-spaces. When they add new lines to the sample files, their editor is replacing their 'tabs' to spaces and causing the execution errors.
Recommendation:PEP 8 recommends using spaces as the 'leading practice', and recommends that "Tabs should be used solely to remain consistent with code that is already indented with tabs."
Either way (whether we go with tabs or spaces), I recommend that the sample-code files and the IDE settings (at least those in the dCloud environment) be set to use the same formatting. Additionally, with spaces being the 'leading practice', defaulting to this would likely provide greater 'compatibility' with IDEs on users' laptops.
The text was updated successfully, but these errors were encountered:
In triage meeting today, decided that this requires further discussion to determine the standard that we want all authors to apply to code samples. Furthermore, will need to decide how we educate and enforce the standard. Our new curator, Diane, might be able to help monitor the usage of tab vs spaces.
That's great! I'm glad coding standards are being considered.
Rather than creating something from scratch, and to align with the industry, I would recommend that we simply adopt the industry leading practices (with modification only if it is justifiably necessary). For Python, this would mean adopting PEP8 and possibly either PEP257 or the Google style-guide for docstrings convention.
Another benefit of adopting these industry practices, is that monitoring for consistency also doesn't take too much work, as a code linter (like flake8 or the like) can be used to automate the testing of contributors code.
Several students are experiencing 'inconsistent indentation' errors when editing and then executing the sample files.
Current Formating: The sample files (today) are using tabs for indentation.
Problem: The default settings of the Notepad++ editor that many of them are using defaults to converting tabs-to-spaces. When they add new lines to the sample files, their editor is replacing their 'tabs' to spaces and causing the execution errors.
Recommendation: PEP 8 recommends using spaces as the 'leading practice', and recommends that "Tabs should be used solely to remain consistent with code that is already indented with tabs."
Either way (whether we go with tabs or spaces), I recommend that the sample-code files and the IDE settings (at least those in the dCloud environment) be set to use the same formatting. Additionally, with spaces being the 'leading practice', defaulting to this would likely provide greater 'compatibility' with IDEs on users' laptops.
The text was updated successfully, but these errors were encountered: