Skip to content

Comments

Add Livebook integration for interactive learning#1

Merged
chops merged 1 commit intomasterfrom
claude/livebook-integration-setup-011CUuWxyEfvVWW9gzoLPnms
Nov 9, 2025
Merged

Add Livebook integration for interactive learning#1
chops merged 1 commit intomasterfrom
claude/livebook-integration-setup-011CUuWxyEfvVWW9gzoLPnms

Conversation

@chops
Copy link
Owner

@chops chops commented Nov 9, 2025

🎓 Livebook Integration for Interactive Learning
Overview
This PR adds a complete Livebook-based interactive learning system to complement the existing workbooks and study guides. Students can now execute code directly in their browser, get immediate feedback, and track their progress visually.

What's New
📚 7 Interactive Phase 1 Livebooks
Converted the Phase 1 workbook into 7 executable notebooks covering:

Pattern matching & guards
Recursion & tail-call optimization
Enum vs Stream (with live benchmarks & visualizations)
Error handling with tagged tuples
Property-based testing with StreamData
Pipe operator & data structures
Final challenge: Statistics calculator
🎯 Key Features
No more copy-paste to IEx - Students execute code inline
Interactive self-assessments - Kino forms track understanding
Visual feedback - VegaLite charts show benchmarks and progress
Progress dashboard - Track completion across all 15 phases
Smart Cells - Custom widgets for running tests and k6 load tests
📂 What Was Added
livebooks/
├── setup.livemd # Onboarding guide
├── dashboard.livemd # Progress tracking with charts
├── README.md # Complete usage documentation
├── phase-01-core/ # 7 interactive checkpoints
│ ├── 01-pattern-matching.livemd
│ ├── 02-recursion.livemd
│ ├── 03-enum-stream.livemd (includes benchmarks!)
│ ├── 04-error-handling.livemd
│ ├── 05-property-testing.livemd
│ ├── 06-pipe-operator.livemd
│ └── 07-advanced-patterns.livemd
└── [phase-02 through phase-15 directories]

lib/livebook_extensions/
├── test_runner.ex # Smart Cell for Mix tests
└── k6_runner.ex # Smart Cell for load tests
How to Test

  1. Install Dependencies
    mix deps.get
  2. Start Livebook
    make livebook

Opens at http://localhost:8080

  1. Walk Through the Experience
    Start: Open setup.livemd - verify environment checks work
    Learn: Try phase-01-core/01-pattern-matching.livemd
    Execute code cells (Cmd/Ctrl+Enter)
    Modify examples and re-run
    Complete self-assessment form
    Benchmark: Check 03-enum-stream.livemd - verify VegaLite charts render
    Challenge: Complete 07-advanced-patterns.livemd - statistics calculator
    Track: Open dashboard.livemd - verify progress visualization works
  2. What to Review
    Content Quality:

Exercises align with learning objectives

Code examples run without errors

Explanations are clear and accurate

Progression from simple to complex is smooth
Technical Implementation:

All code cells execute successfully

VegaLite visualizations render properly

Kino forms are interactive and responsive

Smart Cells compile (even if not tested with actual apps)
Documentation:

[object Object] is comprehensive

Navigation links work between notebooks

Main README.md section is helpful
Integration:

Doesn't conflict with existing workbooks/guides

Dependencies added to mix.exs are appropriate

Makefile target works correctly
Benefits Over Static Workbooks
| Static Workbooks | Interactive Livebooks | |-----------------|----------------------| | Copy-paste to IEx | Execute inline | | No visual feedback | Charts & benchmarks | | Manual progress tracking | Automated dashboard | | Static examples | Modifiable & re-runnable | | Text-only | Rich media & visualizations |

Dependencies Added
{:kino, "> 0.12"}, # Interactive widgets
{:kino_vega_lite, "
> 0.1"}, # Data visualization
{:kino_db, "~> 0.2"} # Database (future phases)
All are well-maintained, official Livebook packages.

Future Phases
The infrastructure supports all 15 phases. Phase 2-15 livebooks can be added incrementally as students progress.

Questions for Review
Content Accuracy: Do the exercises correctly teach the concepts?
Difficulty Progression: Is the ramp-up from Checkpoint 1→7 appropriate?
User Experience: Is the navigation intuitive?
Documentation: Is livebooks/README.md sufficient for self-service?
Ready to Merge?
✅ All code cells tested and working
✅ Documentation complete
✅ No conflicts with existing materials
✅ Successfully pushed to branch
✅ Follows repository conventions
Estimated Review Time: 30-45 minutes for thorough walkthrough

This commit introduces a comprehensive Livebook-based interactive learning
system to complement the existing workbooks and study guides.

## Changes

### Infrastructure
- Updated mix.exs with Kino dependencies (kino, kino_vega_lite, kino_db)
- Created livebooks/ directory structure for all 15 phases
- Added `make livebook` target to Makefile
- Created .progress.json for tracking student progress

### Interactive Notebooks (Phase 1)
Created 7 executable livebooks for Phase 1 (Elixir Core):
1. 01-pattern-matching.livemd - Pattern matching & guards
2. 02-recursion.livemd - Tail-call optimization & accumulators
3. 03-enum-stream.livemd - Eager vs lazy evaluation with benchmarks
4. 04-error-handling.livemd - Tagged tuples & with statements
5. 05-property-testing.livemd - StreamData & property-based testing
6. 06-pipe-operator.livemd - Pipelines & data structures
7. 07-advanced-patterns.livemd - Final challenge: Statistics calculator

### Support Files
- setup.livemd - Onboarding guide with environment checks
- dashboard.livemd - Progress tracking with VegaLite visualizations
- livebooks/README.md - Comprehensive usage guide

### Smart Cells
- lib/livebook_extensions/test_runner.ex - Run Mix tests for labs apps
- lib/livebook_extensions/k6_runner.ex - Execute k6 load tests

### Documentation Updates
- README.md - Added "Getting Started with Livebook" section
- LESSON-PLANNING-SYSTEM.md - Added Livebook as 5th learning layer

## Features

- **Interactive execution**: Students run code directly in browser
- **Visual feedback**: Benchmarks and progress charts with VegaLite
- **Self-assessment**: Kino forms track understanding of each concept
- **Progress tracking**: JSON-based persistence across sessions
- **Property testing**: Integrated StreamData examples and exercises
- **Real-world challenges**: Statistics calculator with CSV streaming

## Benefits

- Eliminates copy-paste to IEx workflow
- Immediate feedback on exercises
- Encourages experimentation
- Visual learning with charts and benchmarks
- Consistent progress tracking across all phases

## Testing

All 7 Phase 1 livebooks have been tested with:
- Executable code cells
- Interactive forms and visualizations
- Self-assessment checklists
- Navigation between checkpoints
@chops chops force-pushed the claude/livebook-integration-setup-011CUuWxyEfvVWW9gzoLPnms branch from 5c70d1b to efe2da2 Compare November 9, 2025 21:32
@chops chops merged commit 855d5f4 into master Nov 9, 2025
4 checks passed
@chops chops deleted the claude/livebook-integration-setup-011CUuWxyEfvVWW9gzoLPnms branch November 9, 2025 21:35
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