Skip to content

Commit d883742

Browse files
authored
Merge pull request #2 from lucasbellesi/codex/java-foundations-mvp
Add Java educational track through advanced modules
2 parents b71cbca + ba5edbf commit d883742

113 files changed

Lines changed: 6142 additions & 190 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/cpp-build.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ jobs:
3131
with:
3232
dotnet-version: "8.0.x"
3333

34+
- name: Setup Java
35+
uses: actions/setup-java@v4
36+
with:
37+
distribution: "temurin"
38+
java-version: "21"
39+
3440
- name: Install clang-format
3541
run: |
3642
sudo apt update
@@ -71,6 +77,12 @@ jobs:
7177
with:
7278
dotnet-version: "8.0.x"
7379

80+
- name: Setup Java
81+
uses: actions/setup-java@v4
82+
with:
83+
distribution: "temurin"
84+
java-version: "21"
85+
7486
- name: Install g++
7587
run: |
7688
sudo apt update
@@ -111,6 +123,12 @@ jobs:
111123
with:
112124
dotnet-version: "8.0.x"
113125

126+
- name: Setup Java
127+
uses: actions/setup-java@v4
128+
with:
129+
distribution: "temurin"
130+
java-version: "21"
131+
114132
- name: Setup MSYS2
115133
uses: msys2/setup-msys2@v2
116134
with:

CONCEPT_INDEX.md

Lines changed: 45 additions & 45 deletions
Large diffs are not rendered by default.

CONTRIBUTING.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Thank you for contributing to this repository.
99
- Use clear English for all text, comments, and instructions.
1010
- Maintain cross-platform compatibility (Windows MSYS2 + Linux).
1111
- Keep Node-based tooling simple and explicit when touching the TypeScript track.
12+
- Keep Java modules on plain `javac`/`java` until the track intentionally adopts build tooling.
1213

1314
## Workflow
1415

@@ -52,12 +53,13 @@ For large changes, you can run one language at a time before the full check:
5253

5354
- `python scripts/automation.py check-exercise-output-contracts --language python`
5455
- `python scripts/automation.py check-exercise-output-contracts --language go`
56+
- `python scripts/automation.py check-exercise-output-contracts --language java`
5557
- `python scripts/automation.py check-exercise-output-contracts --language typescript`
5658
- `python scripts/automation.py check-exercise-output-contracts --language cpp`
5759
- `python scripts/automation.py check-exercise-output-contracts --language csharp`
5860

5961
These smoke checks also compile standalone C# exercises by generating temporary validation projects during the check.
60-
TypeScript checks restore Node dependencies from `package-lock.json`, compile with `tsc`, and execute the emitted JavaScript with `node`.
62+
TypeScript checks restore Node dependencies from `package-lock.json`, compile with `tsc`, and execute the emitted JavaScript with `node`. Java checks compile single-file programs with Java 21 using `javac` and run them with `java`.
6163

6264
The public PowerShell and Bash scripts are thin wrappers over the shared Python automation core in `scripts/automation.py`. Curriculum validation and smoke target metadata live in `scripts/automation_manifest.json`.
6365
The artifact cleanup command removes generated build outputs, reports, temporary binaries, and exercise report files while keeping restored dependencies such as `node_modules`.
@@ -82,7 +84,7 @@ Use [EDUCATIONAL_EXAMPLE_REVIEW_RUBRIC.md](EDUCATIONAL_EXAMPLE_REVIEW_RUBRIC.md)
8284
- `## Checkpoint`
8385
- Every project or assessment checkpoint should include:
8486
- `README.md`
85-
- runnable entrypoint (`main.cs` + `.csproj`, `main.go`, `main.py`, or `main.ts`)
87+
- runnable entrypoint (`main.cs` + `.csproj`, `main.go`, `Main.java`, `main.py`, or `main.ts`)
8688
- the same learner goal, input/output shape, and acceptance expectations as the corresponding C++ checkpoint
8789
- required `## Learning Metadata` before `## Quick Run` with `Difficulty`, `Estimated Time`, `Prerequisites`, and `Learning Focus`
8890
- recommended `## Cross-Language Notes` before `## What To Check`
@@ -97,6 +99,7 @@ Use [EDUCATIONAL_EXAMPLE_REVIEW_RUBRIC.md](EDUCATIONAL_EXAMPLE_REVIEW_RUBRIC.md)
9799
- Avoid external dependencies and test frameworks for C++ modules.
98100
- Avoid external dependencies and test frameworks for non-C++ checkpoints.
99101
- Keep the TypeScript track on plain Node console programs; do not introduce browser, DOM, or framework dependencies.
102+
- Keep the Java track on package-free single-file programs; do not introduce Maven, Gradle, or `src/main/java` until the curriculum intentionally adds build tooling.
100103
- Keep examples aligned with C++17.
101104
- Keep documentation in English and keep path names consistent with folder names.
102105
- Keep parity planning updated in `LANGUAGE_PARITY_MATRIX.md` when adding modules or checkpoints to non-C++ tracks.

LANGUAGE_PARITY_MATRIX.md

Lines changed: 49 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,77 @@
11
# Language Parity Matrix
22

3-
This matrix tracks module and checkpoint parity across C++, C#, Go, Python, and TypeScript.
3+
This matrix tracks module and checkpoint parity across C++, C#, Go, Java, Python, and TypeScript.
44

55
- Canonical order is defined by the C++ track.
66
- C++, C#, Go, Python, and TypeScript now reach module and checkpoint parity through `04-expert`.
7+
- Java currently tracks `01-foundations`, `02-core`, all `03-advanced` modules and checkpoints, and the first `04-expert` module as a Java 21 MVP.
78
- Status labels:
89
- `Done`: module implemented with example, exercises, and README.
910
- `Planned`: module not implemented yet, already queued in order.
1011

1112
## Foundations (`01-foundations`)
1213

13-
| Module | C++ | C# | Go | Python | TypeScript |
14-
| --- | --- | --- | --- | --- | --- |
15-
| types-and-io | Done | Done | Done | Done | Done |
16-
| operators-and-expressions | Done | Done | Done | Done | Done |
17-
| control-flow | Done | Done | Done | Done | Done |
18-
| functions | Done | Done | Done | Done | Done |
19-
| arrays-and-vectors | Done | Done | Done | Done | Done |
20-
| strings | Done | Done | Done | Done | Done |
21-
| scope-and-lifetime-basics | Done | Done | Done | Done | Done |
22-
| formatted-output-and-iomanip | Done | Done | Done | Done | Done |
14+
| Module | C++ | C# | Go | Java | Python | TypeScript |
15+
| --- | --- | --- | --- | --- | --- | --- |
16+
| types-and-io | Done | Done | Done | Done | Done | Done |
17+
| operators-and-expressions | Done | Done | Done | Done | Done | Done |
18+
| control-flow | Done | Done | Done | Done | Done | Done |
19+
| functions | Done | Done | Done | Done | Done | Done |
20+
| arrays-and-vectors | Done | Done | Done | Done | Done | Done |
21+
| strings | Done | Done | Done | Done | Done | Done |
22+
| scope-and-lifetime-basics | Done | Done | Done | Done | Done | Done |
23+
| formatted-output-and-iomanip | Done | Done | Done | Done | Done | Done |
2324

2425
## Core (`02-core`)
2526

2627
Current parity progress in non-C++ tracks:
2728

2829
- C#: `6/6` modules complete
2930
- Go: `6/6` modules complete
31+
- Java: `6/6` modules complete
3032
- Python: `6/6` modules complete
3133
- TypeScript: `6/6` modules complete
3234

33-
| Order | Module | C++ | C# | Go | Python | TypeScript |
34-
| --- | --- | --- | --- | --- | --- | --- |
35-
| 1 | input-validation | Done | Done | Done | Done | Done |
36-
| 2 | algorithms-basics | Done | Done | Done | Done | Done |
37-
| 3 | file-io-basics | Done | Done | Done | Done | Done |
38-
| 4 | sorting-and-searching | Done | Done | Done | Done | Done |
39-
| 5 | maps-and-frequency-counting | Done | Done | Done | Done | Done |
40-
| 6 | error-handling-and-defensive-programming | Done | Done | Done | Done | Done |
35+
| Order | Module | C++ | C# | Go | Java | Python | TypeScript |
36+
| --- | --- | --- | --- | --- | --- | --- | --- |
37+
| 1 | input-validation | Done | Done | Done | Done | Done | Done |
38+
| 2 | algorithms-basics | Done | Done | Done | Done | Done | Done |
39+
| 3 | file-io-basics | Done | Done | Done | Done | Done | Done |
40+
| 4 | sorting-and-searching | Done | Done | Done | Done | Done | Done |
41+
| 5 | maps-and-frequency-counting | Done | Done | Done | Done | Done | Done |
42+
| 6 | error-handling-and-defensive-programming | Done | Done | Done | Done | Done | Done |
4143

4244
## Advanced and Expert
4345

4446
Current parity progress in non-C++ tracks:
4547

4648
- C#: `5/5` modules complete in `03-advanced`, `5/5` in `04-expert`
4749
- Go: `5/5` modules complete in `03-advanced`, `5/5` in `04-expert`
50+
- Java: `5/5` modules complete in `03-advanced`, `1/5` in `04-expert`
4851
- Python: `5/5` modules complete in `03-advanced`, `5/5` in `04-expert`
4952
- TypeScript: `5/5` modules complete in `03-advanced`, `5/5` in `04-expert`
5053

5154
### Advanced (`03-advanced`) - Current Expansion Queue
5255

53-
| Order | Module | C++ | C# | Go | Python | TypeScript |
54-
| --- | --- | --- | --- | --- | --- | --- |
55-
| 1 | structs-and-classes | Done | Done | Done | Done | Done |
56-
| 2 | constructors-and-invariants | Done | Done | Done | Done | Done |
57-
| 3 | copy-and-move-semantics | Done | Done | Done | Done | Done |
58-
| 4 | inheritance-and-polymorphism | Done | Done | Done | Done | Done |
59-
| 5 | templates-basics | Done | Done | Done | Done | Done |
56+
| Order | Module | C++ | C# | Go | Java | Python | TypeScript |
57+
| --- | --- | --- | --- | --- | --- | --- | --- |
58+
| 1 | structs-and-classes | Done | Done | Done | Done | Done | Done |
59+
| 2 | constructors-and-invariants | Done | Done | Done | Done | Done | Done |
60+
| 3 | copy-and-move-semantics | Done | Done | Done | Done | Done | Done |
61+
| 4 | inheritance-and-polymorphism | Done | Done | Done | Done | Done | Done |
62+
| 5 | templates-basics | Done | Done | Done | Done | Done | Done |
6063

61-
`04-expert` projects and assessments are now implemented across all active non-C++ tracks.
64+
`04-expert` projects and assessments are now implemented across all active non-Java tracks.
6265

6366
### Expert (`04-expert`)
6467

65-
| Order | Module | C++ | C# | Go | Python | TypeScript |
66-
| --- | --- | --- | --- | --- | --- | --- |
67-
| 1 | memory-management-and-raii | Done | Done | Done | Done | Done |
68-
| 2 | smart-pointers-in-depth | Done | Done | Done | Done | Done |
69-
| 3 | concurrency-basics | Done | Done | Done | Done | Done |
70-
| 4 | performance-and-profiling-basics | Done | Done | Done | Done | Done |
71-
| 5 | modularization-and-build-structure | Done | Done | Done | Done | Done |
68+
| Order | Module | C++ | C# | Go | Java | Python | TypeScript |
69+
| --- | --- | --- | --- | --- | --- | --- | --- |
70+
| 1 | memory-management-and-raii | Done | Done | Done | Done | Done | Done |
71+
| 2 | smart-pointers-in-depth | Done | Done | Done | Planned | Done | Done |
72+
| 3 | concurrency-basics | Done | Done | Done | Planned | Done | Done |
73+
| 4 | performance-and-profiling-basics | Done | Done | Done | Planned | Done | Done |
74+
| 5 | modularization-and-build-structure | Done | Done | Done | Planned | Done | Done |
7275

7376
## Checkpoint Parity
7477

@@ -79,18 +82,18 @@ Status labels:
7982

8083
### Projects
8184

82-
| Checkpoint | C++ | C# | Go | Python | TypeScript |
83-
| --- | --- | --- | --- | --- | --- |
84-
| 01-foundations | Done | Done | Done | Done | Done |
85-
| 02-core | Done | Done | Done | Done | Done |
86-
| 03-advanced | Done | Done | Done | Done | Done |
87-
| 04-expert | Done | Done | Done | Done | Done |
85+
| Checkpoint | C++ | C# | Go | Java | Python | TypeScript |
86+
| --- | --- | --- | --- | --- | --- | --- |
87+
| 01-foundations | Done | Done | Done | Done | Done | Done |
88+
| 02-core | Done | Done | Done | Done | Done | Done |
89+
| 03-advanced | Done | Done | Done | Done | Done | Done |
90+
| 04-expert | Done | Done | Done | Planned | Done | Done |
8891

8992
### Assessments
9093

91-
| Checkpoint | C++ | C# | Go | Python | TypeScript |
92-
| --- | --- | --- | --- | --- | --- |
93-
| 01-foundations | Done | Done | Done | Done | Done |
94-
| 02-core | Done | Done | Done | Done | Done |
95-
| 03-advanced | Done | Done | Done | Done | Done |
96-
| 04-expert | Done | Done | Done | Done | Done |
94+
| Checkpoint | C++ | C# | Go | Java | Python | TypeScript |
95+
| --- | --- | --- | --- | --- | --- | --- |
96+
| 01-foundations | Done | Done | Done | Done | Done | Done |
97+
| 02-core | Done | Done | Done | Done | Done | Done |
98+
| 03-advanced | Done | Done | Done | Done | Done | Done |
99+
| 04-expert | Done | Done | Done | Planned | Done | Done |

README.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
This repository teaches programming through small runnable examples and focused exercises.
66

7-
- Five active language tracks: C++, C#, Go, Python, and TypeScript.
7+
- Six active language tracks: C++, C#, Go, Java, Python, and TypeScript.
88
- Shared concept naming across tracks for easier comparison.
99
- Each module follows the same shape: `README.md`, `example/main.*`, and two exercises.
1010
- Each implemented level ends with a project and an assessment checkpoint.
@@ -19,6 +19,7 @@ For the full local pipeline, install:
1919
- Go
2020
- .NET 8 SDK
2121
- Node LTS with `npm`
22+
- Java 21 JDK
2223

2324
If you only want to learn one track, follow that track README first because language-specific prerequisites differ.
2425

@@ -30,10 +31,12 @@ If you only want to learn one track, follow that track README first because lang
3031
- [C++ Guide](languages/cpp/README.md)
3132
- [C# Guide](languages/csharp/README.md)
3233
- [Go Guide](languages/go/README.md)
34+
- [Java Guide](languages/java/README.md)
3335
- [Python Guide](languages/python/README.md)
3436
- [TypeScript Guide](languages/typescript/README.md)
3537
2. Start at the first roadmap for that track:
3638
- C++: [00-setup](languages/cpp/00-setup/README.md), then `01-foundations`
39+
- Java: `01-foundations`, then `02-core`, `03-advanced`, and the available `04-expert` modules
3740
- C#, Go, Python, TypeScript: `01-foundations`
3841
3. Run one module example.
3942
4. Solve `exercises/01` and `exercises/02` in that module.
@@ -53,6 +56,7 @@ If you only want to learn one track, follow that track README first because lang
5356
| C++ | 00-setup, 01-foundations, 02-core, 03-advanced, 04-expert | Foundations, Core, Advanced, Expert, projects, assessments | Most complete and primary track |
5457
| C# | 01-foundations, 02-core, 03-advanced, 04-expert | 8/8 foundations modules, 6/6 core modules, 5/5 advanced modules, 5/5 expert modules, 4/4 projects, 4/4 assessments | Module and checkpoint parity complete through expert |
5558
| Go | 01-foundations, 02-core, 03-advanced, 04-expert | 8/8 foundations modules, 6/6 core modules, 5/5 advanced modules, 5/5 expert modules, 4/4 projects, 4/4 assessments | Module and checkpoint parity complete through expert |
59+
| Java | 01-foundations, 02-core, 03-advanced, 04-expert partial | 8/8 foundations modules, 6/6 core modules, 5/5 advanced modules, 1/5 expert modules, 3/4 projects, 3/4 assessments | Java 21 MVP complete through advanced checkpoints plus first expert module |
5660
| Python | 01-foundations, 02-core, 03-advanced, 04-expert | 8/8 foundations modules, 6/6 core modules, 5/5 advanced modules, 5/5 expert modules, 4/4 projects, 4/4 assessments | Module and checkpoint parity complete through expert |
5761
| TypeScript | 01-foundations, 02-core, 03-advanced, 04-expert | 8/8 foundations modules, 6/6 core modules, 5/5 advanced modules, 5/5 expert modules, 4/4 projects, 4/4 assessments | Module and checkpoint parity complete through expert |
5862

@@ -80,6 +84,13 @@ dotnet run --project languages/csharp/01-foundations/types-and-io/example/types-
8084
go run languages/go/01-foundations/types-and-io/example/main.go
8185
~~~
8286

87+
### Java
88+
89+
~~~bash
90+
javac -d build/java languages/java/01-foundations/types-and-io/example/Main.java
91+
java -cp build/java Main
92+
~~~
93+
8394
### Python
8495

8596
~~~bash
@@ -105,6 +116,7 @@ learn-programming-languages-with-examples/
105116
cpp/
106117
csharp/
107118
go/
119+
java/
108120
python/
109121
typescript/
110122
~~~
@@ -133,7 +145,7 @@ A standardized `## Learning Metadata` block is required before `## Quick Run` fo
133145
Checkpoint artifacts under `languages/<language>/projects/*` and `languages/<language>/assessments/*` should mirror the corresponding C++ checkpoint style:
134146

135147
- `README.md`
136-
- runnable entrypoint (`main.cpp` in C++, `main.cs` + `.csproj` in C#, `main.go` in Go, `main.py` in Python, or `main.ts` in TypeScript)
148+
- runnable entrypoint (`main.cpp` in C++, `main.cs` + `.csproj` in C#, `main.go` in Go, `main.py` in Python, `Main.java` in Java, or `main.ts` in TypeScript)
137149
- same learner goal, input/output shape, and acceptance expectations as the C++ version
138150

139151
## Example Commenting Standard
@@ -160,7 +172,7 @@ bash ./scripts/verify-repo.sh
160172
bash ./scripts/lint.sh
161173
~~~
162174

163-
`verify-repo` validates curriculum structure, the blocking education-quality gate, output contracts, and compiled-language builds. `lint` validates formatting and static checks for C++, Python, Go, C#, and TypeScript.
175+
`verify-repo` validates curriculum structure, the blocking education-quality gate, output contracts, and compiled-language builds. `lint` validates formatting and static checks for C++, Python, Go, C#, Java, and TypeScript.
164176

165177
Use narrower commands only when you want a faster loop on one area:
166178

@@ -198,15 +210,15 @@ bash ./scripts/clean-artifacts.sh
198210
bash ./scripts/verify-repo.sh
199211
~~~
200212

201-
GitHub Actions validates links, README structure, module completeness, checkpoint completeness, documentation sync, compiled-language builds, multi-language smoke checks, and Linux lint checks for C++, Python, Go, C#, and TypeScript.
213+
GitHub Actions validates links, README structure, module completeness, checkpoint completeness, documentation sync, compiled-language builds, multi-language smoke checks, and Linux lint checks for C++, Python, Go, C#, Java, and TypeScript.
202214

203215
The public PowerShell and Bash scripts remain the supported entrypoints, but they now delegate to a shared Python automation core under `scripts/automation.py` backed by `scripts/automation_manifest.json`.
204216

205217
Use `clean-artifacts` when you want to remove generated build outputs, reports, temporary binaries, and exercise report files without removing dependencies such as `node_modules`.
206218

207-
The multi-language smoke scripts also compile standalone C# exercises by generating temporary validation projects during the check and compile TypeScript programs before executing their smoke targets.
219+
The multi-language smoke scripts also compile standalone C# exercises by generating temporary validation projects during the check and compile TypeScript programs before executing their smoke targets, and compile Java single-file programs with Java 21.
208220

209-
Use [EDUCATIONAL_EXAMPLE_REVIEW_RUBRIC.md](EDUCATIONAL_EXAMPLE_REVIEW_RUBRIC.md) to keep entry examples pedagogically consistent during reviews. The education audit command is advisory and writes markdown/json findings without failing CI.
221+
Use [EDUCATIONAL_EXAMPLE_REVIEW_RUBRIC.md](EDUCATIONAL_EXAMPLE_REVIEW_RUBRIC.md) to keep entry examples pedagogically consistent during reviews. The education audit command writes markdown/json findings; `verify-repo` fails on blocking findings, while oversized-example findings remain advisory unless you opt into strict mode.
210222
Use [EDUCATIONAL_ANTI_PATTERN_BACKLOG.md](EDUCATIONAL_ANTI_PATTERN_BACKLOG.md) for the prioritized anti-pattern vs corrected-example expansion plan.
211223

212224
`verify-repo` now fails on blocking education-quality findings: low example-comment ratio, missing output explanation markers, or boilerplate comments. Oversized example findings remain advisory. When you want the stricter local cleanup mode that also fails on oversized examples, run:
@@ -220,7 +232,7 @@ Documentation sync also validates that [CONCEPT_INDEX.md](CONCEPT_INDEX.md) cove
220232
For long exercise-contract runs, you can scope by language:
221233

222234
~~~bash
223-
python scripts/automation.py check-exercise-output-contracts --language typescript
235+
python scripts/automation.py check-exercise-output-contracts --language java
224236
~~~
225237

226238
## Contributing

STUDY_PLAN.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,21 @@
22

33
This plan assumes 5 study days per week, 60-90 minutes per day.
44

5+
This is the canonical study plan because the C++ track is the primary complete reference. Learners using C#, Go, Python, TypeScript, or Java can follow the same weekly concept order by opening the matching language guide and concept paths from [CONCEPT_INDEX.md](CONCEPT_INDEX.md). Java currently has complete foundations, core, advanced modules and checkpoints, plus the first expert module.
6+
57
## How To Use This Plan
68

79
1. Follow modules in order.
810
2. For each module: read `README.md`, run `example/main.cpp`, solve `exercises/01.cpp` and `exercises/02.cpp`.
911
3. Mark progress in `languages/cpp/CHECKLIST.md`.
1012
4. Use level capstones to combine concepts.
1113

14+
For another language, replace the C++ file names with that track's entrypoint convention:
15+
16+
- Java: `example/Main.java`, `exercises/Exercise01.java`, `exercises/Exercise02.java`
17+
- C#: project-based examples with `.csproj`, exercises as `01.cs` and `02.cs`
18+
- Go, Python, TypeScript: `example/main.*`, `exercises/01.*`, `exercises/02.*`
19+
1220
## Week 1 - Foundations Basics
1321

1422
Modules:

0 commit comments

Comments
 (0)