Skip to content

Instantly share code, notes, and snippets.

@shriram
shriram / README.md
Last active March 4, 2026 05:37
Review of Claude Code-generated code for a bookshop, March 2026

Context

This is code generated as part of our course on agentic coding. The code below was written by Claude Code using its default model in late Feb 2026.

Learning Objective

The purpose of this assigment was to help students realize that, in the absence of explicit prompting to this effect, Claude Code (in its current state) is highly unlikely to generate code with a clean separation of concerns. The specific concern we wanted to focus on was the factoring-out of business rules. This is to set up students to learn about business rules, author them separately, and then figure out how to incorporate them into the program: e.g., using something like the RETE algorithm.

The hope is that once students learn this concept, they will recognize it in future tasks, and think to prompt for it to be done more deliberately. Since Claude doesn't do it automatically, it's something they need to be taught abo

Call for Papers, Demos, and Discussions

Workshop Title

Dates

URL

Scope

@shriram
shriram / .md
Last active July 22, 2024 23:12
RepoQuest

RepoQuest: The Repository as a Textbook

Analysis: The Weaknesses (and Strengths) of Textbooks

Textbooks have been used for learning for centuries. However, in general, and especially in our specific context — computing education — they suffer from some critical defects:

  1. Textbooks are passive. The reader does not know how well they have actually understood something. (Some people, including us, have tried to create “active textbooks”, but these only partially ameliorate the other issues.)
  2. Textbooks tend to be focused on conceptual learning. Often, students want and need hands-on, practical learning.
  3. Textbooks are not an authentic learning environment. When a student goes into the workforce, as a programmer, they will be working with repositories, not textbooks.
  4. In computing learning, it is typical for a learner to also be constructing some software. However, this sits completely separate from the textbook,
@shriram
shriram / homepage.html
Created January 7, 2024 14:21
Editable QuickLinks page
<!DOCTYPE html>
<!-- Credits: mostly written by GPT-4. -->
<html>
<head>
<title>Quick Items</title>
<style>
/* Add your CSS styles here */
body {
font-family: Arial, sans-serif;
}
@shriram
shriram / sort-lines.rkt
Last active July 30, 2020 12:02
Racket QuickScript for sorting lines in source files
#lang racket
;; I sometimes include a data file in my program source, and
;; find it useful to sort the data *in the source*
;; (e.g., to make it easier to find something, or just to
;; eliminate the cost of sorting each time the program runs).
;; This file provides four scripts. Each one accepts a *selection*
;; of lines. It does not "parse" the lines: e.g., if you have a
;; '( at the front of one of the lines, that will not be ignored