-
Notifications
You must be signed in to change notification settings - Fork 29
feat: adds lesson_09 homework and lesson_10 pre-work #360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Anthony D. Mays <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds lesson 9 homework content and lesson 10 pre-work materials. The homework focuses on data types in Java, requiring students to generate sample data files and implement data providers with correct type mappings.
- Adds a comprehensive homework assignment about choosing appropriate Java data types
- Creates a complete Java application with data generation and type parsing functionality
- Includes lesson 10 pre-work materials with CSV-related video resources
Reviewed Changes
Copilot reviewed 18 out of 20 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| lesson_10/README.md | Adds pre-work section with CSV learning resources |
| lesson_09/README.md | Updates homework section with detailed data types exercise instructions |
| lesson_09/types/ | Complete Gradle project structure with build files, wrapper, and configuration |
| lesson_09/types/types_app/src/main/java/ | Java application code including data providers, generators, and file loaders |
| lesson_09/types/types_app/src/test/java/ | Test suite validating data provider functionality |
| lesson_09/types/types_app/src/main/resources/data/ | Sample JSON data file for the AnthonyMays provider |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| var rows = new ArrayList<Map<String, String>>(); | ||
| for (var i = 0; i < 10; ++i) { | ||
| Map<String, String> row = createRow(generators); | ||
| rows.add(createRow(generators)); |
Copilot
AI
Aug 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 50 calls createRow(generators) again instead of using the row variable created on line 49. This creates different data for each row entry and wastes the computation from line 49.
| rows.add(createRow(generators)); | |
| rows.add(row); |
| var row = new LinkedHashMap<String, String>(); | ||
| for (int i = 0; i < GENERATORS.length; ++i) { | ||
| var columnIndex = i + 1; | ||
| row.put("column" + columnIndex, GENERATORS[i].generateValue()); |
Copilot
AI
Aug 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method uses the static GENERATORS array instead of the shuffled generators parameter, which defeats the purpose of shuffling the generators for randomized column types.
| row.put("column" + columnIndex, GENERATORS[i].generateValue()); | |
| for (int i = 0; i < generators.size(); ++i) { | |
| var columnIndex = i + 1; | |
| row.put("column" + columnIndex, generators.get(i).generateValue()); |
| // Assert | ||
| for (var i = 0; i < data.size(); ++i) { | ||
| Map<String, String> row = data.get(0); | ||
| Map<String, Object> parsed = parsedData.get(0); |
Copilot
AI
Aug 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The loop uses index i but always accesses element 0 in both data.get(0) and parsedData.get(0). This should use data.get(i) and parsedData.get(i) to test all rows.
| Map<String, Object> parsed = parsedData.get(0); | |
| Map<String, String> row = data.get(i); | |
| Map<String, Object> parsed = parsedData.get(i); |
Signed-off-by: Anthony D. Mays [email protected]