Datasets:
|
Download NOTES.md from adindamochamad/codebuddy-tutor-id: direct link, hf CLI and curl.
- Browser
- Download file 9.27 kB
-
https://huggingface.co/datasets/adindamochamad/codebuddy-tutor-id/resolve/main/NOTES.md
- Command line
-
hf download hf://datasets/adindamochamad/codebuddy-tutor-id/NOTES.md
-
curl -L -o NOTES.md https://huggingface.co/datasets/adindamochamad/codebuddy-tutor-id/resolve/main/NOTES.md
9.27 kB
NOTES — CodeBuddy Tutor ID build
Working notes for how the 120-row set was assembled from the 55-row seed. Kept for provenance and review.
1. Starting point
- Started from
data/seed_v1.json(55 already-migrated examples: 15syntax_error, 15runtime_error, 10logic_error, 10code_quality, 5ocr_correction). - Seed
instruction,code, andhintwere not rewritten during the initial build. The only initial-build seed edits are the factual corrections in section 2, and they touchfeedbackonly. (One later exception:syn_001was rewritten during the review pass — see section 6.) - Schema and field order were preserved exactly:
id, kategori, sub_kategori, bahasa_pemrograman, tingkat, instruction, code, hint, feedback, corrected_code.
2. Factual fixes applied to the seed (feedback only)
- qual_007 —
f'{92.5:.0f}'/format(92.5, '.0f')prints92, not93. Python uses round-half-to-even (banker's rounding), so92.5rounds down to the even value92. The example comment# tanpa desimal: 93was corrected to92, with a short note explaining the rounding rule. - qual_001 — the format spec
:,.0fproduces90,000(comma separator), not90.000. Python's,thousands separator is a comma by default; the output commentRp 90.000was corrected toRp 90,000, with a note that:,uses a comma. - ocr_001 — the original bullet was circular: "'l' salah baca sebagai 'l'". Rewritten to say the loop variable should be
i, and that handwritteniis misread asl. - ocr_004 — the student
print(“Halo,” nama)is also missing the comma between the twoprintarguments. The goldcorrected_codealready adds it (print('Halo,', nama)), but the feedback did not mention it; a sentence about the missing comma was added. - syn_010 — the claim that
inputwas "dikalikan dengan string" (multiplied by a string) is wrong.int(input'...')is aSyntaxError: a name (input) is directly followed by a string literal, which Python does not allow;input(...)needs parentheses. Wording corrected. - qual_010 — the claim "15 baris → 5 baris" was inaccurate. Recount of the actual strings: the student if-elif program is 17 lines and the dictionary version is 11 lines. The feedback now states
17 baris → 11 baris. (Line counts were computed programmatically from the exactcode/corrected_codestrings, not estimated.)
All other seed content is unchanged.
3. New examples (65 added → 120 total)
New ids were chosen so they do not collide with the seed. Each new example is original, beginner-level (pemula), Python-only, and targets a sub-category that was thin or missing in the seed. No seed bug was cloned with only renamed variables.
Target mix reached exactly: syntax 25, runtime 25, logic 25, quality 25, OCR 20.
- syntax_error (+10):
syn_016–syn_025- new sub-categories:
missing_comma,python2_print,keyword_as_identifier,unmatched_bracket,unexpected_indent,typo_keyword(new token),quote_in_string,fstring_error,missing_colon(for-loop),return_outside_function.
- new sub-categories:
- runtime_error (+10):
run_016–run_025- fills previously-missing exceptions:
ValueError(badint()conversion, and unpacking),TypeError(len()on int, int not subscriptable, int not callable),ModuleNotFoundError,IndexError(string index),UnboundLocalError,FileNotFoundError,ValueError(math domain /sqrtof negative).
- fills previously-missing exceptions:
- logic_error (+15):
log_011–log_025integer_division,operator_precedence,logic_operator(orvsand),wrong_initialization(min and max seeded with 0),type_comparison(int vs str),truthiness(or 'iya'),wrong_formula(percent as*20, circle arear*2),wrong_accumulator(append value vs square),counter_logic(=1vs+=1),swapped_logic(odd/even labels),off_by_one(string slice),misplaced_statement(average inside loop),premature_return("all pass" returns on first pass).
- code_quality (+15):
qual_011–qual_025guard_clause,boolean_comparison(== True),use_enumerate,membership_in,builtin_function(sum),string_join,flatten_nested_if,ternary_expression,avoid_global,pep8_spacing,extract_variable(DRY),dict_get_default,use_any_all,early_continue,number_formatting(:.2f).
- ocr_correction (+15):
ocr_006–ocr_020- distinct confusable-character mechanisms:
rn↔m(import),cl↔d(def),vv↔w(while),9↔g(range),5↔S(name),8↔B(numbers),(↔{,.↔,(decimal→tuple), merged tokens (defhitung),3↔E(else),0↔o(for),1↔l(name), split token (pri nt),l↔i(if), bracket mismatch (]↔)).
- distinct confusable-character mechanisms:
4. Split
- 90 train / 30 test, stratified by
kategori, noidoverlap. - Per-category test counts: syntax 7, runtime 6, logic 6, quality 6, OCR 5 (= 30).
- The test set mixes seed and new rows and spans varied sub-categories on purpose. Test ids:
- syntax:
syn_003, syn_008, syn_011, syn_017, syn_019, syn_021, syn_024 - runtime:
run_005, run_009, run_013, run_016, run_020, run_022 - logic:
log_002, log_006, log_011, log_014, log_018, log_021 - quality:
qual_003, qual_007, qual_013, qual_016, qual_019, qual_024 - OCR:
ocr_003, ocr_008, ocr_013, ocr_016, ocr_019
- syntax:
5. Judgment calls
feedbackvscorrected_codealignment. Wherefeedbacklists several valid fixes,corrected_codeholds exactly one beginner-friendly primary fix; the alternatives stay infeedback. This matches the seed's existing convention.- Outputs described in
feedbackare read-verified, not executed. Per the build constraints, no student code or gold code was run.corrected_codewas validated withast.parse(syntax only). Printed outputs / return values quoted infeedbackwere checked by hand. ocr_013(.↔,) andrun_017("too many values to unpack") describe runtime consequences (19,99becomes a tuple; unpacking mismatch raisesValueError) without executing anything; these were reasoned through, not run.- OCR examples are synthetic. They model plausible OCR confusions of handwritten/photographed code rather than the output of any particular OCR engine.
- A few new
codesnippets intentionally don't parse (that is the bug being taught). Onlycorrected_codeis guaranteed to be syntactically valid.
6. Review-pass fixes (applied after first review)
Content-only fixes; the 120-row set, the 25/25/25/25/20 mix, the 90/30 split membership, and the schema/key order are all unchanged. Edits were mirrored across data/seed_v1.json (for the seed row), data/all.json, and the matching split file so the three stay consistent.
- ocr_013 —
19.99 * 0.1does not print1.999; it prints1.9989999999999999(binary floating point). The feedback's output comment was corrected to the real value1.9989999999999999. (An earlier draft suggestedround(pajak, 2)would give1.99; that is wrong —round(19.99 * 0.1, 2)is2.0because the third decimal is8, so the tidy-rounding aside was dropped. The row's lesson is the OCR comma/period confusion, not formatting.) Thecode/corrected_codewere left as-is. - syn_001 — the old student
code(prin('Halo Dunia')) is valid syntax and only raisesNameErrorat runtime, which contradicted itssyntax_error/typo_keywordlabel. To keep the 25/25/25/25/20 mix, the row was not relabelled; instead the example was rewritten to a genuine keyword-typoSyntaxError:iff nilai >= 75:(typo ofif).instruction,hint,feedback, andcorrected_codewere updated to match.id,kategori(syntax_error), andsub_kategori(typo_keyword) are unchanged. After the edit,ast.parseon the studentcodefails andcorrected_codeparses. - qual_025 — the feedback now states that
int(harga * 100) / 100also changes the result (it truncates 19.9876 → 19.98), whereas:.2frounds to 19.99 — not merely a tidier display. - log_013 — added a line noting that
0 <= nilai <= 100(used incorrected_code) means exactly the same asnilai >= 0 and nilai <= 100, so the hint/feedback ("useand") and the gold code are consistent. - qual_011 — the
instructionpreviously said the code was "bersarang terlalu dalam" (deeply nested), but the snippet is a flat if/else. Rewritten to match the actual lesson: an unnecessaryelseafterreturn(guard clause). - README.md — citation year changed from 2025 to 2026.
- Removed the untracked duplicate
seed_v1.jsonfrom the repo root; the canonical copy remains atdata/seed_v1.json.
7. For reviewer attention
- Confirm the tutor voice and difficulty of the 65 new rows match the seed to your liking (tone, analogy use, length).
- Spot-check the recomputed numbers in the two formatting fixes (qual_001, qual_007) and the line recount (qual_010) against your own reading.
- Confirm the test-split selection (which specific rows are held out) suits your evaluation plan; it is easy to re-stratify if you want different coverage.