Skip to content

Conversation

@anthonydmays
Copy link
Contributor

Signed-off-by: Anthony D. Mays [email protected]

Copilot AI review requested due to automatic review settings August 25, 2025 18:40
Copy link
Contributor

Copilot AI left a 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));
Copy link

Copilot AI Aug 25, 2025

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.

Suggested change
rows.add(createRow(generators));
rows.add(row);

Copilot uses AI. Check for mistakes.
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());
Copy link

Copilot AI Aug 25, 2025

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.

Suggested change
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());

Copilot uses AI. Check for mistakes.
// Assert
for (var i = 0; i < data.size(); ++i) {
Map<String, String> row = data.get(0);
Map<String, Object> parsed = parsedData.get(0);
Copy link

Copilot AI Aug 25, 2025

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.

Suggested change
Map<String, Object> parsed = parsedData.get(0);
Map<String, String> row = data.get(i);
Map<String, Object> parsed = parsedData.get(i);

Copilot uses AI. Check for mistakes.
@anthonydmays anthonydmays merged commit 1c86afb into main Aug 25, 2025
1 check passed
@anthonydmays anthonydmays deleted the lesson_09 branch August 25, 2025 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants