Curriculum

Curriculum

Port a Finished Project to a Second Language with Shared Tests

Scenario

Order the four capstone steps to port your Attendance Eligibility Checker from JavaScript to Python (or Go) without introducing contract drift.

  1. 1…
  2. 2…
  3. 3…
  4. 4…

Try it yourself

Select the four porting steps in the safest, most verifiable order.

Reveal the explanation
  1. Freeze the shared JSON fixture suite (typical, boundary, and invalid cases)

    Step 1 · Lock the contract before writing a single line in the second language.

  2. Translate the guards and ordered branches into idiomatic second-language code

    Step 2 · Preserve identical error codes and exact boundary operators.

  3. Run the second language against the exact same fixture suite and read the output

    Step 3 · Verify every case matches the first language with zero skipped assertions.

  4. Wire both language runners into CI and commit the small explainable diff

    Step 4 · Future rule changes now stay synchronized across both languages automatically.

You have now completed the full New Generation Coding arc: from a plain-language problem statement, through logic, data, multi-language code, AI diff review, testing, and cross-language delivery.

Review first
Download shared test cases

Your turn

Port one Module 7 project (`checkAttendance` or `canLoanEquipment`) into a second language and run both implementations against the same fixture JSON.

Common mistake Writing brand-new informal tests in the second language that omit invalid-input cases from the first language.

Check your work

Two language files, one shared fixture suite, and separate recorded pass counts from both actual language runners.

Project brief

Basic
Port `checkAttendance` to a second language and pass all typical + boundary cases.
Intermediate
Verify exact `INVALID_ATTENDANCE` error parity across both languages using one shared fixture file.
Stretch
Add a CI workflow running both language test commands and reporting each runtime separately.

What to hand in

Include your diagram, expected-result table, code, actual test output, and the commit or diff you reviewed.

Review criteria

  • Logic · Your diagram shows every required path and boundary.
  • Verification · The tests exercise the stated acceptance cases and the recorded results match the code.
  • Review · The change is focused and you can explain the decision it implements.

Quick check

What is the strongest proof that your second-language port matches the original implementation?
Show the answer and reasoning

Correct answer Both language runners execute the exact same shared fixture suite (including invalid cases) and pass

Executing identical shared fixtures across both runtimes proves behavioral parity.