Time approximation: 1 hour
Focus: Design patterns, code quality, testing, domain modeling
- ASSIGNMENT.md - The task description and requirements
- acceptance_tests_spec.rb - Automated tests to validate your solution
- sensor_data_generator.rb - Generates realistic test data
- TESTING_INSTRUCTIONS.md - How to use the tests and validate your work
# Install RSpec and other gems
bundle install# Start here to understand what you're building
open ASSIGNMENT.md# Create realistic sensor reading scenarios
ruby sensor_data_generator.rbThis creates:
sensor_test_data.json- All test scenariossensor_data_*.csv- Individual scenario files
Create your implementation following this interface:
# Required classes:
class SensorReading
attr_reader :temperature, :ph, :dissolved_oxygen
def initialize(temperature:, ph:, dissolved_oxygen:)
end
class SalmonProfile
def thresholds # Returns hash with min/max values
end
class TilapiaProfile
def thresholds # Returns hash with min/max values
end
class WaterQualityChecker
def initialize(species_profile)
def check(reading) # Returns array of alert strings
end# Run the acceptance tests
bundle exec rspec acceptance_tests_spec.rbGoal: All 48 tests should pass ✅
Please submit:
-
Your Implementation (Ruby files)
- Main classes (SensorReading, Profiles, Checker)
- Well-organized, readable code
- Use appropriate design patterns
-
Your Tests (RSpec files)
- Unit tests for your classes
- Test coverage for main scenarios
- Include edge cases
-
Documentation (README or comments)
- How to run your code
- Design decisions and patterns used
- How to add new species
-
Proof of Passing (optional but recommended)
- Screenshot or output of passing acceptance tests
- Shows all 48 examples passing
Your solution should:
- ✅ Pass all 48 automated acceptance tests
- ✅ Use appropriate design patterns (Strategy recommended)
- ✅ Be easy to extend (add new species, parameters)
- ✅ Have clean, readable Ruby code
- ✅ Include your own comprehensive tests
- ✅ Be well-documented
- Design Patterns (30%) - Appropriate use of Strategy, Factory, etc.
- Code Quality (25%) - Readability, Ruby idioms, maintainability
- Testing (20%) - Your tests + passing acceptance tests
- Domain Modeling (15%) - Understanding aquaculture concepts
- Documentation (10%) - Clear explanations of decisions
- 10 min - Design and planning (sketch classes)
- 30 min - Core implementation
- 15 min - Write your tests
- 5 min - Documentation and final validation
Pro tip: Make sure acceptance tests pass BEFORE writing documentation!
- Start simple - get basic validation working first
- Use the Strategy pattern for species profiles
- Make sure
check()returns an array (not nil) - Alert messages should be descriptive
- Run tests frequently to catch issues early
If you have questions about:
- Requirements: Check ASSIGNMENT.md
- Testing: Check TESTING_INSTRUCTIONS.md
- Interface: Look at acceptance_tests_spec.rb examples
Share the repository link
- If private repo: Add us as collaborator
- If public repo: Just send us the link
- All implementation files committed
- Your own tests included
- README with setup instructions
- Proof that acceptance tests pass (screenshot or CI)
- Clean git history (meaningful commits)
- Repository link shared with us
Submit by sharing: Your GitHub repository URL
Good luck! 🐟🦐
We're excited to see your solution!