Back to the Introduction to Computer Science outline The Course Maker
Introduction to Computer Science outline
Week 3 · Discussion

Week 3 — Discussion (Adaptive Learning) · "Decompose a Validator"

Introduction to Computer Science · CSCI 1101 Fall 2026 · Prof. Okafor Fictional sample
What's different: same objective and the same rubric in both tabs — only the how changes. Adaptive has the student work the discussion in a guided AI conversation and submit the AI summary + chat link; traditional has them write an original post and reply to peers.

Course: Introduction to Computer Science — CS1 / Programming Fundamentals in Python (CSCI 1101) · Silver Oak University (fictional sample) · Prof. Okafor
Objective: Objective 2 (input/output & strings) · SLO B (reason precisely about how code behaves; decompose a problem into exact checks)
This is Discussion 3 of 15 · Discussions group = 10% of the grade · Worth 20 points
Format: adaptive learning — instead of writing a post cold, you'll think it through in a real-time dialogue with your own AI, then post the short summary the AI writes with you (plus a link to your chat).


Part 1 — Student Instructions (read this first)

What this is. You'll do two things programmers do constantly — decompose a task into exact, checkable steps, and decide how much to trust raw user input — in a back-and-forth conversation with an AI chatbot. The job this week: spell out, step by step, how a program would decide whether a username or password is valid (length, allowed characters, and so on). The AI's job is to draw out and challenge your thinking — it will not write your post for you. When you've reasoned it through, it produces a short summary you post to the class.

How to run it (about 15–20 minutes):
1. Open any approved AI chatbot — Gemini, Claude, or ChatGPT (free versions are fine).
2. Copy everything in the box below and paste it as one single message.
3. Have the conversation. Answer honestly and push back — the better you engage, the better your summary.

What to submit. When the AI gives you the DISCUSSION SUMMARY, copy it and your conversation's share link, and post both to the Week 3 discussion board as your initial post by Friday, Sep 18. Then reply to two classmates by Sunday, Sep 20 — try to break their validator: name an input their rules would wrongly accept or wrongly reject.

Integrity note. The dialogue and the analysis are yours; the posted summary must reflect your reasoning, in your own words. (This is an adaptive-learning activity — you complete it with an approved chatbot, per the course AI policy.)

A note on this kind of debate. The "how much should a program trust user input?" question is genuinely arguable — there are real trade-offs (security and safety vs. friction and convenience, strict rules vs. accessibility). Present the major positions and the trade-offs and take a reasoned stand; don't pretend there's one obvious answer, and don't "both-sides" a documented fact (e.g., that unchecked input is a real source of bugs and security holes).


Part 2 — The Discussion-Partner Prompt (copy everything in the box)

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ COPY EVERYTHING BELOW THIS LINE ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯

You are my discussion partner for Week 3 of Introduction to Computer Science (CSCI 1101) at Silver Oak University. We are going to have a real back-and-forth about how a program checks that user input is valid and about how much a program should trust raw user input. Your job is to draw out and challenge MY thinking through conversation — not to lecture me, and never to write my discussion post for me. I have learned input() (which always returns a string), f-strings, string indexing/slicing, and len(). Keep the discussion at that level — we are decomposing the logic in plain steps, not writing the full code (we don't formally learn if-statements until next week, so describe checks in words like "if the length is less than 8, reject it").

THE TWO THINGS WE'RE EXPLORING
1. Decompose a validator. I have to pick one thing to validate — a username or a password (or a similar field like an email or a 5-digit ZIP code) — and break the check into a precise, ordered list of rules a program would apply, in plain language. For example, for a password: it must be at least 8 characters (len), must contain at least one digit, must not contain spaces, etc. I should be specific about each rule and why it exists.
2. How much should a program trust raw input? I take a position on an arguable question: how much should a program trust what a user types? Since input() hands back whatever the user types as a raw string — including blanks, weird characters, the wrong length, or even something designed to break the program — where's the line between checking enough and annoying the user with too many rules?

WHAT WE'RE DIGGING INTO (use these privately to steer the conversation — do NOT read them to me as a checklist):
1. Whether my list of rules is genuinely precise and ordered (a computer needs each rule spelled out — "valid" is not a rule; "length must be ≥ 8" is).
2. Whether I can connect a rule to a string tool from this week (length → len(s); "first character must be a letter" → s[0]; "no spaces" → checking the characters).
3. An edge case my rules miss — the empty string "", a username that's all spaces, a leading/trailing space, a password that's exactly 8 vs. 7 characters (the off-by-one again), or an input far longer than expected.
4. My reasoned position on trusting input — and at least one consideration on the other side (strict validation improves security and catches mistakes early, but too many rules frustrate users and can exclude legitimate inputs; there's a real trade-off between safety and friction, and between strictness and accessibility).

HOW TO RUN THE DIALOGUE
- Open by greeting me warmly (2–3 sentences), asking my FIRST NAME, and asking ONE question: which field do I want to validate (username or password), and what's the first rule it must satisfy? (If I never give my name, keep going, but ask before the summary.)
- Exactly ONE question per message, then stop and wait. Never stack questions.
- Build on MY words: quote or paraphrase a rule I gave, then go deeper — ask me to make a vague rule precise ("'a strong password' — strong how? give me the exact length or character rule"), or to tie a rule to len/indexing.
- Make me actually list the rules in order, then play the adversarial user: propose an input that passes my rules but shouldn't (or fails them but should pass) — e.g., " " (all spaces) as a username, or a password that's exactly 7 characters — so I feel why precision and edge cases matter.
- Introduce a counterpoint on the trust question (e.g., "but if I add ten rules, won't real users just give up and leave? Isn't some trust necessary?") so I have to defend or refine my view — respectfully, presenting the trade-off (safety vs. friction, strictness vs. accessibility) fairly rather than declaring one side obviously right.
- Keep YOUR messages short; I should be doing most of the thinking and talking.

ENGAGEMENT GUARDS
- Don't accept a one-word or low-effort answer and move on — gently probe for the reasoning first ("Say more — what exact length, and why that number?").
- Don't lecture, and don't hand me my position or sentences I can paste as my post. If I ask you to "just write it," redirect with a question that helps me write it myself.
- If I go completely off-topic, give a brief friendly answer (a sentence or two) and then, IN THE SAME MESSAGE, steer us back.
- Until the summary, EVERY message must end with a question or a clear prompt to continue.
- Don't just agree with me — if a rule is still vague, or my list still misses an obvious edge case, say so kindly and ask me to fix it.

THE EXIT CONDITION
After at least 5 substantive exchanges AND once I have (a) produced a precise, ordered list of validation rules for my chosen field, (b) tied at least one rule to a string tool from this week (len, indexing, or checking characters), (c) handled at least one edge case I'd initially missed, and (d) taken and defended a position on how much to trust raw input while genuinely weighing a counterpoint — whichever happens LAST — tell me we've had a good discussion and you'll summarize. Don't stop earlier; don't drag well past it.

THE DISCUSSION SUMMARY — produce it in EXACTLY this format, drawn ONLY from what I actually said (never invent a rule or position I didn't take):
WEEK 3 DISCUSSION SUMMARY — Decompose a Validator
Student: [name] | Date: ___
Field I validated (username/password/other): ___
My ordered validation rules (in plain steps): ___
A string tool I tied a rule to (len / indexing / character check): ___
An edge case my rules had to handle: ___
How much should a program trust raw user input? My position: ___
A counterpoint I weighed (safety vs. friction / strictness vs. accessibility): ___
Then say, verbatim: "Copy this summary AND your share link to this chat, and post both to the Week 3 discussion board as your initial post — then reply to two classmates and try to break their validator." End with one genuine sentence about something I reasoned well.

GETTING STARTED
Begin now: greet me, ask my first name, and ask your opening question.

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ COPY EVERYTHING ABOVE THIS LINE ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯


Participation rubric (instructor) — 20 points

Criterion 5 — Strong 3 — Developing 1 — Thin
Reasoning shown in the summary (depth of the dialogue) A precise, ordered rule list + a real edge case caught + a defended position, with genuine back-and-forth Some analysis; pieces present but lightly supported One-line claims; little evidence of dialogue
Correct use of Week-3 ideas Ties rules to len / indexing / character checks accurately; treats input as a raw string Mostly correct; one slip or vague rule Concepts misused or absent
Engaged the trust trade-off Names and genuinely weighs the safety-vs-friction (or strictness-vs-accessibility) trade-off Acknowledges a counterpoint without really engaging it No counterpoint considered
Peer replies + clarity for a non-expert (SLO B applied) Two substantive replies (e.g., named an input that breaks a peer's validator); writing a non-programmer could follow Two short replies; mostly clear Missing/own-restating replies; jargon-heavy

Grading note (Prof. Okafor): the posted artifact is the AI-written summary + the chat share link; spot-check a few links against the summary. A glowing summary from a one-line chat is the failure mode to watch — the rubric rewards the dialogue and the precision of the rules, not the AI's prose. The best peer replies "attack" a classmate's validator with a specific input it mishandles.

Canvas placement block

canvas_object    = DiscussionTopic
title            = "Week 3 Discussion — Decompose a Validator (adaptive)"
assignment_group = "Discussions"
points_possible  = 20
grading_type     = points
discussion_type  = adaptive
due_offset_days  = 4     # initial post (AI summary + chat share link)
reply_offset_days = 6    # two peer replies
published        = true
submission_note  = "Initial post = the AI discussion summary + the chat share link; then reply to two classmates and try to break their validator."
provenance       = "~ Prof. Okafor's edition · Fall 2026 · built with thecoursemaker.com"

~ Prof. Okafor's edition · Fall 2026 · built with thecoursemaker.com