Skip to content

Latest commit

 

History

History
232 lines (184 loc) · 6.94 KB

File metadata and controls

232 lines (184 loc) · 6.94 KB

Effect Learning Exercises - Project Status

✅ What's Created

Project Structure

  • ✅ 15 levels (directories)
  • ✅ 47 exercises (subdirectories)
  • ✅ 188 files (4 files × 47 exercises)

Documentation

  • README.md - main project page
  • exercises/EXERCISES.md - list of all exercises with checkboxes
  • exercises/GUIDE.md - usage guide
  • exercises/GETTING_STARTED.md - quick start
  • exercises/test-utils.ts - testing utilities

Tools

  • scripts/exercise-cli.ts - CLI for managing exercises
  • scripts/create-placeholder-exercises.sh - placeholder generator
  • scripts/generate-exercises.ts - exercise generator
  • ✅ Updated package.json with new scripts
  • ✅ Updated vitest.config.ts to support exercises

Level 1: Basics (FULLY READY) ✅

01-creating-effects ✅

  • ✅ Detailed README with concept, examples, hints
  • ✅ exercise.ts with 5 functions to implement
  • ✅ solution.ts with reference solutions
  • ✅ exercise.test.ts with 8 tests

02-running-effects ✅

  • ✅ Detailed README with concept, examples, hints
  • ✅ exercise.ts with 4 functions to implement
  • ✅ solution.ts with reference solutions
  • ✅ exercise.test.ts with tests

03-transforming-effects ✅

  • ✅ Detailed README with concept, examples, hints
  • ✅ exercise.ts with 5 functions to implement
  • ✅ solution.ts with reference solutions
  • ✅ exercise.test.ts with tests

Level 2: Error Handling (FULLY READY) ✅

01-expected-errors ✅

  • ✅ Detailed README with concept, examples, hints
  • ✅ exercise.ts with functions to implement
  • ✅ solution.ts with reference solutions
  • ✅ exercise.test.ts with tests

02-catching-errors ✅

  • ✅ Detailed README with concept, examples, hints
  • ✅ exercise.ts with functions to implement
  • ✅ solution.ts with reference solutions
  • ✅ exercise.test.ts with tests

03-fallback-strategies ✅

  • ✅ Detailed README with concept, examples, hints
  • ✅ exercise.ts with functions to implement
  • ✅ solution.ts with reference solutions
  • ✅ exercise.test.ts with tests

Level 3: Control Flow (FULLY READY) ✅

01-conditional-logic ✅

  • ✅ Detailed README with concept, examples, hints
  • ✅ exercise.ts with 5 functions to implement
  • ✅ solution.ts with reference solutions
  • ✅ exercise.test.ts with tests

02-looping ✅

  • ✅ Detailed README with concept, examples, hints
  • ✅ exercise.ts with 5 functions to implement
  • ✅ solution.ts with reference solutions
  • ✅ exercise.test.ts with tests

03-combining-effects ✅

  • ✅ Detailed README with concept, examples, hints
  • ✅ exercise.ts with 5 functions to implement
  • ✅ solution.ts with reference solutions
  • ✅ exercise.test.ts with tests

Levels 4-15: Basic Structure (READY TO FILL) 📝

For each of the remaining 38 exercises:

  • 📝 README.md (placeholder with basic structure)
  • 📝 exercise.ts (placeholder)
  • 📝 solution.ts (placeholder)
  • 📝 exercise.test.ts (basic test)

📊 Statistics

Files

  • Total files: ~200
  • Fully ready: 36 (Levels 1-3)
  • Placeholders: 152 (Levels 4-15)
  • Documentation: 5
  • Scripts: 4

Exercises

  • Total exercises: 47
  • Fully ready: 9 (Levels 1-3)
  • With basic structure: 38 (Levels 4-15)

Concept Coverage

  • ✅ Basics (creating, running, transforming)
  • ✅ Error Handling (expected errors, catching, fallback)
  • ✅ Control Flow (conditionals, loops, combining)
  • ✅ Concurrency (Fibers, racing, parallel)
  • ✅ Resource Management (Scope, acquire/release)
  • ✅ Services (Context.Tag, usage, Layers)
  • ✅ State Management (Ref, SynchronizedRef, SubscriptionRef)
  • ✅ Advanced Concurrency (Deferred, Queue, PubSub, Semaphore)
  • ✅ Streams (basics, transformations, combining, errors)
  • ✅ Sink (basics, composition)
  • ✅ Scheduling & Caching (Schedule, cached, Cache)
  • ✅ Batching & Requests (Request, RequestResolver)
  • ✅ Observability (Logging, Metrics, Tracing)
  • ✅ Configuration & Runtime (Config, ConfigProvider, ManagedRuntime)
  • ✅ Advanced Patterns (Interruption, Supervisor, Effect.gen)

🎯 Next Steps

For Users

  1. Start with Level 1

    cd exercises/01-basics/01-creating-effects
    cat README.md
  2. Implement Exercises

    • Read README.md
    • Write code in exercise.ts
    • Run tests: npm test exercises/01-basics/01-creating-effects
    • Compare with solution.ts
  3. Fill Remaining Levels (optional)

    • Update README.md with details
    • Add specific functions to exercise.ts
    • Implement solution.ts
    • Write tests in exercise.test.ts

For Developers

If you want to fill remaining exercises:

  1. Choose a level (e.g., Level 4: Concurrency)
  2. For each exercise:
    • Study the concept in Effect Docs
    • Update README.md with detailed description
    • Create specific functions in exercise.ts
    • Implement solution.ts
    • Write tests in exercise.test.ts
  3. Run tests to ensure everything works

🚀 Commands

# Testing
npm test                                          # All tests
npm test exercises/01-basics/01-creating-effects  # Specific exercise
npm test -- --watch                               # Watch mode

# CLI
npm run exercise list                             # List exercises
npm run exercise show 01-basics/01-creating-effects
npm run exercise test 01-basics/01-creating-effects
npm run exercise solution 01-basics/01-creating-effects

# Checking
npm run check                                     # TypeScript check

📚 Documentation

  • README.md - main page
  • exercises/EXERCISES.md - list of all 47 exercises
  • exercises/GUIDE.md - detailed guide
  • exercises/GETTING_STARTED.md - quick start
  • PROJECT_STATUS.md - this file

🎓 Recommended Learning Path

  1. Beginners (Levels 1-3)

    • 01-basics (3 exercises) ✅ READY
    • 02-error-handling (3 exercises) ✅ READY
    • 03-control-flow (3 exercises) ✅ READY
  2. Intermediate (Levels 4-6)

    • 04-concurrency (3 exercises) 📝
    • 05-resource-management (2 exercises) 📝
    • 06-services (3 exercises) 📝
  3. Advanced (Levels 7-15)

    • 07-state-management (3 exercises) 📝
    • 08-advanced-concurrency (4 exercises) 📝
    • 09-streams (4 exercises) 📝
    • 10-sink (2 exercises) 📝
    • 11-scheduling-caching (3 exercises) 📝
    • 12-batching-requests (2 exercises) 📝
    • 13-observability (3 exercises) 📝
    • 14-configuration-runtime (3 exercises) 📝
    • 15-advanced-patterns (3 exercises) 📝

✨ Features

  • 🎯 Progressive learning from simple to complex
  • 📝 Detailed concept descriptions
  • 💡 Examples and hints
  • ✅ Automated tests
  • 🎓 Reference solutions
  • 🛠️ CLI for management
  • 📚 Complete documentation

🤝 Contributing

Project is open for improvements:

  • Add details to Levels 4-15
  • Improve examples
  • Add more tests
  • Fix bugs
  • Suggest new exercises

Status: ✅ Ready to use (Levels 1-3 fully ready, others ready to fill)

Created: 2026-02-03

Version: 1.0.0