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
Copy file name to clipboardExpand all lines: README.md
+70-40Lines changed: 70 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,27 +50,54 @@ Please follow the following guidelines when creating or finding practice problem
50
50
If you have questions, send a message to #questions on the teachers Discord.
51
51
52
52
## Follow good programming style.
53
+
### Install Linters
54
+
This will save you time because when you submit a pull request (PR) on GitHub, we check for good programming style. Your PR will not be approved unless it passes those style checks. Also, linters basically enforce all of the style rules that we discuss below, so you basically can just skip to the next section (Follow the C4T practice and solution problem format).
55
+
56
+
* Java: Install checkstyle (SonarLint recommended as well)
57
+
* Python: Install flake8 (pylint recommended as well)
58
+
* HTML/CSS: Install SonarLint (recommended)
59
+
60
+
This should go without saying, but actually use the linters! If you see errors/problems/warnings, address them, don’t ignore them and keep going!
61
+
62
+
**Note:** We highly recommend that you use [Visual Studio Code](https://code.visualstudio.com/download), because it has a lot of useful extensions you can install with a few clicks (including the linters mentioned above). It also has great Version Control System (VCS) integration and extensions.
63
+
64
+
### Whitespace
53
65
* Indent properly.
54
66
* Make sure there are spaces between binary operators, parentheses, curly braces, etc. when applicable. (For method/function calls, there should not be a space between the method/function name and the parentheses.)
55
-
* Name files so that they are representative of what the program is about.
67
+
* For HTML, attributes should not have spaces between the attribute name, equal sign, and attribute value
68
+
* Leave empty lines where appropriate to increase readability
69
+
70
+
### Naming
71
+
* Name files so that they are representative of what the program is about. File names are also the name of the practice problem.
56
72
* Avoid naming files after concepts, like “Arrays.java”
73
+
* Java: Use class naming conventions to name files. For example, HelloWorld.java rather than helloWorld.java or hello_world.java or something else
74
+
* Python: Use snake case to name files. For example, hello_world.py rather than HelloWorld.py or helloWorld.py or something else
57
75
* Name variables/methods/functions descriptively, and follow your language’s conventions.
58
-
* Java: camelCase for regular variables, snake case (and uppercase) for constants
59
-
* Python: Snake case for regular variables, snake case (and uppercase) for constants
76
+
* Java: camelCase for regular variables, snake case (and uppercase) for constants
77
+
* Python: Snake case for regular variables, snake case (and uppercase) for constants
78
+
79
+
### Reduce complexity
60
80
* If a line of code is very long, separate it into 2+ lines (e.g. for long lists/arrays, long print statements, etc.)
61
-
*Leave whitespace where appropriate to increase readability.
62
-
*Add comments to explain parts of your code.
81
+
*Add comments to explain parts of your code
82
+
*Break up the program into methods/functions if applicable and if the students have learned about methods/functions at that point in time.
63
83
64
84
## Follow the C4T practice and solution problem format.
65
-
* All code filed under `practice` should be templates. Templates may include things like an empty class and main method. They must include a multi-line comment with the full instructions that are also displayed on Thinkific at the top of the program.
66
-
* All code filed under `solutions` should be solutions. Solutions should include the full instructions at the top of the file and then a possible solution to the problem.
67
-
* The practice template and solution should have *the same file name.*
68
-
* For Java teachers: Make sure that you have the correct package statement as the first line of your code.
69
-
70
-
## Thoroughly test your solution. Make sure it works as intended.
85
+
* Make sure you put the file(s) in the right directories.
86
+
* All code filed under “practice” should be templates.
87
+
* Templates may include things like an empty class and main method.
88
+
* They must include a multi-line comment with the title of the practice problem AND the full instructions for the problem.
89
+
* All code filed under “solutions” should be solutions.
90
+
* Solutions should include the practice problem title AND full instructions at the top of the file (exact same comment as in the practice template file) and then a (possible) solution to the problem.
91
+
* The practice template and solution should have the same file name.
92
+
* Java: Make sure that you have the correct package statement as the first line of your code.
93
+
94
+
## Testing
95
+
* Thoroughly test your solution. Make sure it works as intended.
96
+
* Try to break your program! Don’t just give input you know will work.
71
97
* Hundreds of students and ~50 teachers could potentially see and use your work. Please make sure that it works!
72
98
73
-
## Make sure that the problem is doable for the skill level of your students.
99
+
## Check the content.
100
+
* Make sure that the problem is doable for the skill level of your students.
74
101
* Check Thinkific to see if the concepts that you need to solve the problem have been covered already.
75
102
* Be aware of how long your own class takes on other practice problems.
76
103
* Practice problems shouldn’t take several hours/days.
@@ -81,32 +108,35 @@ If you have questions, send a message to #questions on the teachers Discord.
81
108
* If you found it in a book, cite the full title and author.
82
109
83
110
## Submit practice problem(s).
84
-
### Overall directions no matter which option you choose:
85
-
* Make sure you push to the correct folder and repository.
1. Dm Rebecca Dang on the Teachers Discord with your GitHub username and course(s) you’re teaching to be invited to the C4T GitHub organization
98
-
2. Clone the repo.
99
-
3. Create your own branch. Name it appropriately.
100
-
4. Push your branch to remote.
101
-
5. Mention @Curriculum Development on the Teachers Discord that you have pushed your branch. Be sure to tell us what the name of your branch is!
102
-
6. If Curr-Dev approves, you have permission to merge your branch with master.
103
-
104
-
### (2) Making a pull request
105
-
[See this help article](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests)
106
-
107
-
### (3) Email C4T Curriculum Development
108
-
1. Email [[email protected]](mailto:[email protected]) with all necessary info (e.g. instructions, practice template file, solution file).
109
-
2. Mention @Curriculum Development on the Teachers Discord that you have emailed us please!
110
-
111
111
112
-
Thank you teachers for following these guidelines and helping us build a problem base!
112
+
### Option 1: Use GitHub
113
+
***Note 1:** If you choose option 1, we assume you know basic Git, e.g. committing, pushing, pulling, branching, merging, etc. If you want to learn the basic Git you need to contribute, we recommend watching [this entire playlist.](https://www.youtube.com/watch?v=3RjQznt-8kE&list=PL4cUxeGkcC9goXbgTDQ0n_4TBzOO0ocPR&index=1)*
114
+
115
+
***Note 2:** If you want an overview of the Pull Request (PR) workflow we are using, read these articles.*
116
+
117
+
1. Send your GitHub username to a Curriculum Development member and ask them to add you as an outside collaborator on the repository or repositories that you want to contribute to.
118
+
2. Clone or fork the official C4T repository.
119
+
* All repositories can be found here: https://github.com/code-for-tomorrow
120
+
*[How to Clone](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository)
121
+
*[How to Fork](https://help.github.com/en/github/getting-started-with-github/fork-a-repo)
122
+
3. Work on the practice problems locally.
123
+
* If you cloned the repo, make sure you create and checkout a new branch. **DO NOT MAKE EDITS ON THE MASTER BRANCH.**
124
+
* If you forked the repo, you’re free to work on the master branch or make your own branches (though that is kinda unnecessary).
*[How to Push](https://help.github.com/en/github/using-git/pushing-commits-to-a-remote-repository)
128
+
5. Make a pull request to merge your branch with the master branch of the official C4T repo.
129
+
* Make sure that the title of your pull request is descriptive but concise.
130
+
* In the description part of your pull request, you should specify the following:
131
+
* Your full name (if it’s not clear from your GitHub profile)
132
+
* Chapter # and section name that this problem should go under (for example, Ch. 1 Intro to Python, Section: Comments)
133
+
*[How to Create a Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request)
134
+
6. Mention @Curriculum Development on the Teachers Discord that you’ve submitted a PR.
135
+
7. Monitor the status of your Pull Request on GitHub.
136
+
* It’s possible that the Curriculum Development team will Request Changes, in which case you will need to commit those changes before your PR will be approved and merged into the official master branch.
137
+
138
+
### Option 2: Use the Google Form
139
+
Submit a problem [here](https://forms.gle/hDWrPRG3HuAgUdCJ9) if you don’t have a GitHub account.
140
+
141
+
142
+
**Thank you teachers for following these guidelines and helping us build a problem base!**
0 commit comments