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…
- 2…
- 3…
- 4…
Try it yourself
Select the four porting steps in the safest, most verifiable order.
Reveal the explanation
- 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.
- Translate the guards and ordered branches into idiomatic second-language code
Step 2 · Preserve identical error codes and exact boundary operators.
- 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.
- 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
This browser could not save your progress. Changes last until you leave the page.