I'm currently working on a technical book focused on graphics programming. One challenge I'm encountering is that the graphics programming APIs tend to be very verbose, resulting in sample code that is quite lengthy. If I include the full source code for each example, a significant portion of the book will be occupied by code, which may not be the most useful approach. Instead, I want to prioritize providing detailed explanations.
However, if I only include a few lines of code relevant to each explanation, I'm concerned that readers may struggle to see the big picture and connect the dots between different concepts.
Have you come across any books that handle this balance effectively? I'm eager to learn from their approach. Additionally, any other suggestions regarding the format of a traditional technical book are welcome.
Thank you.
- full code and samples in a easy access repository.
- Even better: the code are runnable using a online editor with compiler
- only three most meaningful parts are printed in the book.
For the printed code, you can introduce the boilerplates once then mark them in the successive sections.