Challenges and Approaches to Teaching CS1 in Prison
Designing and teaching an introductory computing course for incarcerated students.
The Opportunity: Computing Education for Incarcerated Students
Bringing computing education to incarcerated and formerly incarcerated individuals is a powerful way to improve equitable access to computing careers and bring diverse perspectives into the field. However, teaching CS in a prison environment presents unique challenges that differ significantly from traditional college classrooms.
This report describes our experience designing and teaching an introductory CS1 course to 26 incarcerated students at a U.S. prison in Fall 2022. We discovered that while environmental barriers were substantial, the student population had remarkable strengths that could be leveraged for effective learning.
The Challenge: Environmental Barriers
Major Obstacles
- No code interpreter access - Students couldn't run code to test it
- Limited resources - No tutors, TAs, or outside materials
- Restricted access - Limited study space (6-8 hours/week)
- No debugging opportunity - Critical learning experience lost
- Limited communication - No reliable contact outside class
Unique Strengths
- Maturity & self-sufficiency - Adult learners with life experience
- Strong community - Deep sense of collective effort
- Independent learning skills - Experience with correspondence courses
- High engagement - Fully invested in learning
- Peer support - Natural mentoring relationships
Methodology: Design Experiment Approach
We adopted a design experiment methodology to navigate the many unknowns of teaching CS in prison. This approach allowed us to:
- Gather continuous feedback through weekly reflection assignments (mix of Likert-scale and open-ended questions)
- Adapt course design based on student experiences and pressing issues
- Capture the richness of the classroom environment rather than oversimplifying
- Learn from students’ natural patterns of behavior and collaboration
Data Analysis
Qualitative Coding
- Open coding of reflection responses
- Two independent coders with consensus
- Inter-rater reliability: 0.837-0.849
- Focus: collaboration policies, code examples
Learning Assessment
- 10 "benchmarking" questions on final exam
- Core CS1 skills: code tracing, explaining, writing
- Measured student learning outcomes
Key Lessons Learned
1. 🤝 Leverage the Strong Student Community
The most powerful asset was the deep sense of collective effort among students. Despite environmental constraints:
What we observed: Students spoke in terms of "we" rather than "I". They formed study groups where higher-performing students helped struggling students trace code on whiteboards and draw memory diagrams together. During Peer Instruction activities, strong students would move to sit with struggling peers.
Takeaway: Design courses that explicitly foster and celebrate community learning.
2. 💡 Make Students a Resource for Each Other
Without access to outside tutors or resources, students became each other’s primary learning support:
Result: No student was left behind. Positive relationships formed between lower- and higher-performing students. However, this dependency made independent coding on exams challenging—students relied heavily on peer collaboration.
Takeaway: Balance peer learning with opportunities for independent practice.
3. 🔄 Code Resubmission Policies are Critical
The absence of a code interpreter was the single largest hurdle:
The Problem
Students couldn't test code before submitting, and lost the critical learning that happens through debugging.
Our Solution
Unlimited resubmissions with instructor feedback, simulating the debugging process.
4. 📝 Mix Live Coding with Board Examples
Students had strong preferences for how code was presented:
| Method | Preference % | Student Quote |
|---|---|---|
| Combination (Board + Live) | 53.3% | "I like both methods. Going through prewritten code gives me the opportunity to really focus. Writing live code gives me the opportunity to see the execution." |
| Whiteboard | 46.7% | "Writing on the white board is easier...breaking down code point by point allows me to grasp each part." |
| Pre-written | 26.7% | "Pre-written examples seem clearer. Live coding gets confusing." |
| Live Coding | 13.3% | "Live coding works better for me...it slows everything down so I can digest the material." |
Best Practice: Write a long example on the board → trace its execution in a memory diagram → project its execution in a code interpreter.
5. 🎯 Use Relevant Examples
Andragogy Principle
Adult learners want to understand the value of learning something before investing effort. Incorporate culturally relevant examples that connect to students' diverse life experiences and backgrounds.
6. 🎤 Make Use of High Engagement in Lecture
Peer Instruction worked exceptionally well:
- Students were cooperative and self-organized
- Higher-performing students naturally moved to sit with struggling peers
- Students engaged in productive discussion about differing opinions
- Course evaluations highlighted this as particularly helpful
7. 📚 Students are Skilled Independent Learners
Many incarcerated students had extensive experience with self-teaching through correspondence courses:
Implication: Provide substantial resources for learning outside class—textbook readings, written materials, and video tutorials (given varying access to laptops).
8. 🎨 Create Opportunities for Self-Expression
Beyond required assignments, we allowed students to submit any code written for practice or fun:
- We transcribed the code, printed the output, and delivered it back
- Many students (both high and low performers) took advantage
- Programs were often personal and creatively expressive
- Future direction: Encourage creative expression more explicitly
Impact & Implications
For Computing Education
- Demonstrates feasibility of CS education in constrained environments
- Brings diverse perspectives into computing
- Expands equitable access to computing careers
- Benefits both students and the computing field
For Future Prison Programs
- Leverage student maturity and community
- Design for limited resources creatively
- Adapt teaching methods based on feedback
- Recognize and celebrate student strengths
Publication
This work was published in the Proceedings of the 55th ACM Technical Symposium on Computer Science Education (SIGCSE 2024):
Hogan, E., Li, R., Soosai Raj, A. G., Griswold, W. G., & Porter, L. (2024). Challenges and Approaches to Teaching CS1 in Prison.