Assignment 1: AI + Terminal Foundations#

Course: 06-643 Scientific Software Engineering with AI Coding Agents

Covers: L00 (AI-Assisted Development) and L01 (Terminals and Shells)


This assignment has two components: Technical (Parts 1-3) and Reflection (Part 4). You will use AI coding agents to write real code, demonstrate terminal proficiency, and reflect on the experience.

Part 1: Plan-Execute with an AI Agent#

In this part you will practice the plan-execute workflow: write a plan first, then hand it to an AI coding agent as context.

The Task#

Use an AI coding agent (Claude Code, GitHub Copilot, Codex, Gemini CLI, or another agent of your choice) to write a Python script that:

  • Takes a directory path as input (command-line argument or input prompt)

  • Prints a summary containing:

    • Total number of files

    • Total number of directories

    • Total size (in human-readable format, e.g., KB/MB)

    • The 5 largest files with their sizes

Step 1: Write a Plan#

Before prompting the AI, create a file called PLAN.md that describes:

  • What the script should do

  • Expected inputs and outputs

  • Edge cases to handle (e.g., empty directories, permission errors)

  • Any libraries you expect to use

Paste your PLAN.md contents below.

# Paste your PLAN.md contents here as a comment or triple-quoted string.
# For example:
#
# """
# # Plan for Directory Summary Script
# ...
# """

Step 2: Show the Prompts#

What prompts did you give to the AI agent? Paste them below, including any follow-up prompts you used to refine the output. Note which AI tool you used.

# AI tool used: [e.g., Claude Code, Copilot, Codex, Gemini CLI]
#
# Prompt 1:
# """
# [Paste your first prompt here]
# """
#
# Follow-up prompts (if any):
# """
# [Paste follow-up prompts here]
# """

Step 3: Final Code#

Paste the final version of the directory summary script below. Include any modifications you made after the AI generated it.

# Paste your final directory summary script here

Part 2: Terminal Proficiency#

Navigate to any project directory on your system (or create one with some files in it). Demonstrate the following terminal skills by showing the commands you ran and their output.

For each task, paste the command and its output in the code cell below.

  1. List all Python files recursively in the directory

  2. Find all files modified in the last 7 days

  3. Count the total lines of code across all .py files

  4. Create a directory structure: project/{src,tests,docs}

  5. Use a pipe to find the 3 largest files in the directory

# Task 1: List all Python files recursively
# Command:
# Output:


# Task 2: Find all files modified in the last 7 days
# Command:
# Output:


# Task 3: Count lines of code across all .py files
# Command:
# Output:


# Task 4: Create directory structure project/{src,tests,docs}
# Command:
# Output:


# Task 5: Use a pipe to find the 3 largest files
# Command:
# Output:

Part 3: Comparing AI Tools#

Use at least two different AI tools to solve the same problem. Choose from: Claude Code, GitHub Copilot, ChatGPT, Cursor, Codex, Gemini CLI, Gemini.

The Task#

Write a Python function that:

  • Reads a CSV file (given a file path)

  • Returns basic statistics for each numeric column: mean, median, and standard deviation

  • Handles edge cases (missing values, non-numeric columns, empty files)

Use each tool separately to generate a solution. Paste the results below.

Tool A#

Tool used: [Name of AI tool]

Prompt used:

# Tool A: Paste prompt and generated code here
#
# Prompt:
# """
# [Your prompt]
# """
#
# Generated code:

Tool B#

Tool used: [Name of AI tool]

Prompt used:

# Tool B: Paste prompt and generated code here
#
# Prompt:
# """
# [Your prompt]
# """
#
# Generated code:

Comparison#

Compare the two tools across these dimensions:

  • Quality of code: Which tool produced cleaner, more readable code?

  • Edge case handling: Which tool better handled missing values, non-numeric columns, or empty files?

  • Prompting experience: Was one tool easier to prompt or more responsive to follow-ups?

Your comparison:


Part 4: Reflection#

Answer each of the following questions thoughtfully (a few sentences each is fine).

1. Plan-Execute Workflow#

What was your plan-execute workflow like? Did writing the plan before prompting the AI help you get better results? Would you use this approach again?

Your answer:

2. AI Tool Preference#

Which AI tool did you prefer overall and why? Consider ease of use, code quality, and how well it understood your intent.

Your answer:

3. Verification and Fixes#

What did you have to verify or fix in the AI-generated code? Were there bugs, missing edge cases, or style issues?

Your answer:

4. Terminal Skills#

What terminal commands were new to you? Which do you think will be most useful going forward?

Your answer: