: This is not different from what happens in the real world. You could solve your problem like we do in actual development - by being test driven. I.e., make the test a significant part of
This is not different from what happens in the real world. You could solve your problem like we do in actual development - by being test driven. I.e., make the test a significant part of your tutorial, and make it a high-level feature test (not a unit test).
This way, the reader can execute the test after each step, and get a different error message each time. For example, in Ruby on Rails:
Write a test that says "if the user clicks the new link XYZ, then the value ABC is read from the DB and displayed".
First error message will be "link XYZ not found".
Reader implements (only) the link, with a "href" pointing to the appropriate (new) controller/action.
Next error message will be "no route found"
Reader implements the route in config/routes.rb.
Next error message will be "controller not found"
Reader implements an empty controller.
Next error message will be "action not found in controller"
Reader implements the action.
Next error message will be "view template not found"
Reader implements the view template.
Next error message will be "value ABC not visible"
... and so on, and so forth.
Obviously, this works best if your language/framework of choice is good for this kind of development, and if you have spent time before setting up the testing environment in the context of your tutorial.
More posts by @Pope4766717
: Is there a format to write a good treasure hunt story? I'm writing a story for an Indian movie that revolves around a bunch of estranged siblings, who come to live in their father's abandoned
: How do you make random chance/happenstance not seem like deus ex machina? I like card games, particularly Magic: the Gathering, because they're a nice mixture of strategy and luck. I don't like
Terms of Use Privacy policy Contact About Cancellation policy © selfpublishingguru.com2024 All Rights reserved.