-
Notifications
You must be signed in to change notification settings - Fork 601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add another assert
to Agent "maintain state" koan
#219
base: master
Are you sure you want to change the base?
Conversation
To clarify/emphasize that this is a persistent state.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the suggestion!!
Can you tell me a little more about how you feel this improves on the understanding of this lesson?
When I first saw the code it wasn't 100% clear to me whether the result was a one-time thing or not. I wrote this extra test to confirm to myself that the state would remain persistently, and thought perhaps it would be a helpful thing to have by default. |
Hmm ya, I see what you mean. I feel like even this example might lead the learner to believe that the function is executed each time rather than being a producer of the state. Do you think a later example that shows how the state can be updated serves to solidify that better than a repeated assertion? Thoughts @felipesere ? |
For me this koan was confusing because the text said "maintain state, so you can ask them about it" but the example only queried a single time so the persistence wasn't clear. Especially coming fresh from the previous |
Thank you @jordan-brough for opening this PR 👍 Should we maybe connect this Koan somehow with one where we explicitly mutate the state? @iamvery I also feel we could extract the function in |
@felipesere i like that! let the code communicate that intent 💪 |
Sounds good! I'll take a stab at refactoring along those lines. Thanks. |
To clarify/emphasize that this is a persistent state.