|
1 | 1 | # learn-programming-languages-with-examples |
2 | 2 |
|
3 | | -An educational repository for learning programming languages through focused concepts, runnable examples, and hands-on exercises. |
| 3 | +## Project Overview |
4 | 4 |
|
5 | | -The first fully implemented track is **C++ (C++17)**. |
6 | | -Content is designed for VS Code-first workflows and cross-platform execution (Windows MSYS2/MinGW + Linux g++). |
| 5 | +This repository teaches programming through small, runnable examples and focused exercises. |
7 | 6 |
|
8 | | -## Project Goals |
| 7 | +- Primary implemented track: **C++ (C++17)** |
| 8 | +- Expansion-ready for more languages (Python, Go, C#) |
| 9 | +- Designed for a **VS Code-first** workflow on Windows and Linux |
9 | 10 |
|
10 | | -- Learn core programming concepts progressively. |
11 | | -- Compare how the same ideas appear across languages. |
12 | | -- Practice with small exercises after each concept. |
13 | | -- Keep everything easy to run in VS Code on Windows and Linux. |
| 11 | +## Learning Philosophy |
| 12 | + |
| 13 | +The project follows a practical, step-by-step approach: |
| 14 | + |
| 15 | +- Learn one concept at a time. |
| 16 | +- Run a minimal example. |
| 17 | +- Solve short exercises immediately. |
| 18 | +- Build level capstones and assessments to combine concepts. |
| 19 | +- Track progress with checklists and review notes. |
14 | 20 |
|
15 | 21 | ## Repository Structure |
16 | 22 |
|
17 | 23 | ```text |
18 | 24 | learn-programming-languages-with-examples/ |
19 | 25 | .vscode/ # VS Code tasks and recommendations |
20 | | - templates/ # Reusable concept layout for new modules |
21 | | - scripts/ # Build validation scripts (PowerShell + Bash) |
| 26 | + scripts/ # Build/run/link-check helpers (PowerShell + Bash) |
| 27 | + templates/ # Concept module template |
22 | 28 | languages/ |
23 | | - cpp/ # Active C++ track (implemented) |
24 | | - python/ # Python parity track (foundations started) |
25 | | - go/ # Planned track |
26 | | - csharp/ # Planned track |
27 | | - STUDY_PLAN.md # 4-week guided learning plan |
| 29 | + cpp/ # Main implemented learning track |
| 30 | + python/ # Foundations started |
| 31 | + go/ # Planned |
| 32 | + csharp/ # Planned |
| 33 | + STUDY_PLAN.md # 4-week C++ study path |
28 | 34 | ``` |
29 | 35 |
|
30 | | -Main C++ content lives in `languages/cpp` and is split into measurable levels: |
| 36 | +## Learning Levels (C++) |
| 37 | + |
| 38 | +C++ content lives in `languages/cpp` and is organized into measurable levels: |
31 | 39 |
|
32 | | -- `01-foundations` |
33 | | -- `02-core` |
34 | | -- `03-advanced` |
35 | | -- `04-expert` |
| 40 | +1. `01-foundations` |
| 41 | +2. `02-core` |
| 42 | +3. `03-advanced` |
| 43 | +4. `04-expert` |
36 | 44 |
|
37 | | -Python parity starter modules live in `languages/python/01-foundations`: |
| 45 | +Each concept module follows this structure: |
38 | 46 |
|
39 | | -- [`types-and-io`](languages/python/01-foundations/types-and-io/README.md) |
40 | | -- [`control-flow`](languages/python/01-foundations/control-flow/README.md) |
41 | | -- [`functions`](languages/python/01-foundations/functions/README.md) |
| 47 | +```text |
| 48 | +module-name/ |
| 49 | + README.md |
| 50 | + example/main.cpp |
| 51 | + exercises/01.cpp |
| 52 | + exercises/02.cpp |
| 53 | +``` |
42 | 54 |
|
43 | | -## Guided Learning Path |
| 55 | +## How To Navigate The Repository |
44 | 56 |
|
45 | | -1. Complete setup: `languages/cpp/00-setup/README.md` |
46 | | -2. Open C++ roadmap: `languages/cpp/README.md` |
47 | | -3. Study one concept at a time: |
| 57 | +1. Start with setup: `languages/cpp/00-setup/README.md` |
| 58 | +2. Open the C++ roadmap: `languages/cpp/README.md` |
| 59 | +3. For each module: |
48 | 60 | - read `README.md` |
49 | 61 | - run `example/main.cpp` |
50 | 62 | - solve `exercises/01.cpp` and `exercises/02.cpp` |
51 | | - - use level `HINTS.md` only when blocked |
52 | | - - follow the level order from foundations to expert |
53 | | -4. Mark progress in `languages/cpp/CHECKLIST.md` |
54 | | -5. Build capstones in `languages/cpp/projects/` |
55 | | -6. Complete level assessments in `languages/cpp/assessments/` |
56 | | -7. Follow weekly pacing in `STUDY_PLAN.md` |
57 | | -8. Use per-level `PROGRESS.md` + `languages/cpp/SOLUTION_RUBRIC.md` for self-review |
| 63 | +4. Track completion: |
| 64 | + - `languages/cpp/CHECKLIST.md` |
| 65 | + - `languages/cpp/<level>/PROGRESS.md` |
| 66 | +5. Complete level practice: |
| 67 | + - capstones in `languages/cpp/projects/` |
| 68 | + - assessments in `languages/cpp/assessments/` |
| 69 | +6. Use: |
| 70 | + - `STUDY_PLAN.md` for pacing |
| 71 | + - `languages/cpp/SOLUTION_RUBRIC.md` for self-review quality |
58 | 72 |
|
59 | | -## Compile And Run (C++17) |
| 73 | +## How To Run Examples (C++17) |
60 | 74 |
|
61 | | -All C++ code is standard C++17 and should compile cleanly with: |
| 75 | +Required compile command: |
62 | 76 |
|
63 | 77 | ```bash |
64 | | -g++ -std=c++17 -Wall -Wextra -pedantic path/to/file.cpp -o path/to/output |
| 78 | +g++ -std=c++17 -Wall -Wextra -pedantic path/to/file.cpp -o output_name |
65 | 79 | ``` |
66 | 80 |
|
67 | | -### Linux example |
| 81 | +Example: |
68 | 82 |
|
69 | 83 | ```bash |
70 | 84 | g++ -std=c++17 -Wall -Wextra -pedantic languages/cpp/01-foundations/types-and-io/example/main.cpp -o types_and_io_example |
71 | 85 | ./types_and_io_example |
72 | 86 | ``` |
73 | 87 |
|
74 | | -### Windows (MSYS2 MinGW) example |
75 | | - |
76 | | -```bash |
77 | | -g++ -std=c++17 -Wall -Wextra -pedantic languages/cpp/01-foundations/types-and-io/example/main.cpp -o types_and_io_example |
78 | | -./types_and_io_example.exe |
79 | | -``` |
80 | | - |
81 | | -VS Code users can also run the included build task in `.vscode/tasks.json` to compile the currently open C++ file. |
82 | | - |
83 | | -## VS Code Workflow (Zero Friction) |
84 | | - |
85 | | -1. Open any `*.cpp` file. |
86 | | -2. Press `Ctrl+Shift+B` to build it with C++17 and strict warnings. |
87 | | -3. Run the task `Run active C++ file` from the command palette (`Tasks: Run Task`). |
88 | | -4. Use `Build and run active C++ file` for one-step iteration while studying exercises. |
| 88 | +On Windows (MSYS2/MinGW), run `types_and_io_example.exe`. |
89 | 89 |
|
90 | | -## Build Validation Scripts |
| 90 | +### Build helpers |
91 | 91 |
|
92 | | -You can compile all C++ examples and exercises with: |
93 | | - |
94 | | -PowerShell: |
| 92 | +Compile all C++ files: |
95 | 93 |
|
96 | 94 | ```powershell |
97 | 95 | ./scripts/build-all.ps1 |
98 | 96 | ``` |
99 | 97 |
|
100 | | -Bash: |
101 | | - |
102 | 98 | ```bash |
103 | 99 | bash ./scripts/build-all.sh |
104 | 100 | ``` |
105 | 101 |
|
106 | | -Run a single module example quickly: |
107 | | - |
108 | | -PowerShell: |
| 102 | +Run one module example quickly: |
109 | 103 |
|
110 | 104 | ```powershell |
111 | 105 | ./scripts/run-module.ps1 languages/cpp/01-foundations/strings |
112 | 106 | ``` |
113 | 107 |
|
114 | | -Bash: |
115 | | - |
116 | 108 | ```bash |
117 | 109 | bash ./scripts/run-module.sh languages/cpp/01-foundations/strings |
118 | 110 | ``` |
119 | 111 |
|
120 | | -`build-all` compiles each `*.cpp` file under `languages/cpp` with: |
121 | | - |
122 | | -```bash |
123 | | -g++ -std=c++17 -Wall -Wextra -pedantic |
124 | | -``` |
125 | | - |
126 | | -CI also validates this on Linux and Windows in `.github/workflows/cpp-build.yml`. |
| 112 | +## Development Environment |
127 | 113 |
|
128 | | -You can validate markdown links with: |
| 114 | +Recommended environment: |
129 | 115 |
|
130 | | -PowerShell: |
| 116 | +- **Editor**: VS Code |
| 117 | +- **C++ standard**: C++17 |
| 118 | +- **Compiler flags**: `-Wall -Wextra -pedantic` |
| 119 | +- **Windows**: Windows 11 + MSYS2/MinGW `g++` (or WSL Ubuntu with `g++`) |
| 120 | +- **Linux**: `g++` (GNU C++ compiler) |
131 | 121 |
|
132 | | -```powershell |
133 | | -./scripts/check-links.ps1 |
134 | | -``` |
| 122 | +VS Code tasks are preconfigured in `.vscode/tasks.json` to build/run the active C++ file. |
135 | 123 |
|
136 | | -Bash: |
| 124 | +## How To Contribute |
137 | 125 |
|
138 | | -```bash |
139 | | -bash ./scripts/check-links.sh |
140 | | -``` |
| 126 | +Contributions are welcome. |
141 | 127 |
|
142 | | -## Contribution Summary |
| 128 | +1. Read `CONTRIBUTING.md` |
| 129 | +2. Follow `CODE_OF_CONDUCT.md` |
| 130 | +3. Keep examples beginner-friendly and runnable |
| 131 | +4. Preserve level structure and module pattern |
| 132 | +5. Ensure C++ code compiles with: |
| 133 | + - `g++ -std=c++17 -Wall -Wextra -pedantic` |
143 | 134 |
|
144 | | -Contributions are welcome. Please: |
| 135 | +## Future Languages / Roadmap |
145 | 136 |
|
146 | | -- Read `CONTRIBUTING.md` for workflow and coding expectations. |
147 | | -- Follow the `CODE_OF_CONDUCT.md`. |
148 | | -- Keep changes educational, clear, and cross-platform. |
149 | | -- Ensure C++ examples compile with `-Wall -Wextra -pedantic`. |
| 137 | +- C++ is the active, most complete track. |
| 138 | +- Python foundations are started under `languages/python/01-foundations`. |
| 139 | +- Go and C# directories are present as planned tracks. |
| 140 | +- Goal: keep concept structure consistent across languages for easier comparison. |
150 | 141 |
|
151 | 142 | ## License |
152 | 143 |
|
153 | | -This repository is licensed under the MIT License. See `LICENSE`. |
| 144 | +This project is licensed under the MIT License. See [LICENSE](./LICENSE). |
0 commit comments