-
Notifications
You must be signed in to change notification settings - Fork 95
Multiple candidates
Josh Hiles edited this page Dec 23, 2023
·
1 revision
It's not usually a good idea to try more than one alternative simultaneously. Behavior isn't guaranteed to be isolated and reporting + visualization get quite a bit harder. Still, it's sometimes useful.
To try more than one alternative at once, add names to some Try
blocks:
public bool CanAccess(IUser user)
{
return Scientist.Science<bool>("widget-permissions", experiment =>
{
experiment.Use(() => IsCollaborator(user));
experiment.Try("api", () => HasAccess(user));
experiment.Try("raw-sql", () => HasAccessSql(user));
});
}
- Publishing results
- Controlling comparison
- Adding context
- Expensive setup
- Keeping it clean
- Ignoring mismatches
- Enabling or disabling experiments
- Ramping up experiments
- Running candidates in parallel (asynchronous)
- Testing
- Handling errors
- Designing an experiment
- Finishing an experiment
Sometimes scientists just gotta do weird stuff. We understand.