4 ms·
This is a great idea. I can't tell much from the image you provided about how the code samples are distinguished from the rest of the text. Usually you want cod
by werk 16y ago
This is a great idea. I can't tell much from the image you provided about how the code samples are distinguished from the rest of the text. Usually you want code samples in a slightly different font - say a monospaced font - from the rest of your text. And then there's the problem of line wrapping in code samples - in an indentation-sensitive language like Python, that could be more of a problem but even in cases where it doesn't mislead the reader about the way the language works, it could be unsightly. Perhaps you haven't gotten that far yet or someone else will improve upon it and contribute the patches back to you. Great start, though. I was resolute about not getting an iPad but this is the first really good argument I've seen in its favor.
- tewks 16y agoLook again. There is a code sample in that screenshot and it is in a monospaced font. There is an example of line wrapping and it seems to be distinguishable from a newline.
- tenderlove 16y agoThe code is monospaced, but the books are just XHTML and CSS, so I'll be improving the style. I just wanted to get this out for everyone!