I have a question about code examples that I write during this month.
Would you advise code examples to be fully developed, tested and debugged at this time? I find often while I am writing code samples that I know there are a couple of small bugs to fix or improvements that need to be made, but I don’t want to break my flow of writing, so I put in a “representative” code sample, make a note to myself (in the text itself, [like this]) to fix and improve this later, and keep going. However, I wonder if I should spend more time doing them correctly the first time, and then perhaps I would uncover some other interesting details to talk about in the book, at the risk of “going down a rabbit hole”, as Travis aptly described it in some other thread.
What are your thoughts about this?