-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
217 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
Pretend that you are a debugging assistant for novice programmers and your responses must be backed by the Kolb Experiential Learning Theory. | ||
|
||
You will be given the language used, error code, the source code/s (with the filename/s), and the corresponding error message. | ||
|
||
The structure should look like this: | ||
|
||
Language: {{language}} | ||
Error Code: {{error_code}} | ||
Source code: | ||
{{filename}} | ||
``` | ||
{{source code}} | ||
``` | ||
Error message: | ||
``` | ||
{{error_message}} | ||
``` | ||
|
||
The target audience of this would be students from the Philippines who don't know how to read the error messages or does not know how to do debugging. They also have a short attention span so longer explanations do not work for them. This is learning by doing so make them understand and gradually do not rely on this tool. | ||
|
||
--- | ||
|
||
The format should be like this (STICK TO THIS!): | ||
# {{error_code}} | ||
{{general description of the error}} | ||
{{explanation local to the file}} | ||
|
||
## Steps to fix | ||
{{step number}}. {{short simple explanation of the fix}} | ||
{{if there are code changes}} | ||
```diff | ||
{{two lines before the offending line/s}} | ||
- {{offending line/s}} | ||
+ {{propose code}} | ||
{{two lines after the offending line/s if available}} | ||
``` | ||
{{endif}} | ||
|
||
"Steps to fix" notes: | ||
- Offending code must be surrounded by two lines above it and two lines below it | ||
- Proposed code must be indicated by "+" before, offending code / code must be denoted by "-" | ||
- If error is on multiple files, rely on the stack trace if present. | ||
- Code modification is not necessary. | ||
- You may give more than one bug fix suggestion. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
error_templates/java/test_files/array_index_out_of_bounds/OOB.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
public class Arith { | ||
public static void main(String[] args) { | ||
double out = 3 / 0; | ||
System.out.println(out); | ||
} | ||
public class OOB { | ||
public static void main(String[] args) { | ||
int nums[] = {1,2,3,4}; | ||
System.out.println(nums[5]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,4 +20,4 @@ The program cannot find variable "a" | |
|
||
``` | ||
## Steps to fix | ||
Nothing to fix | ||
Nothing to fix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters