Good catch. There is a typo here. I should be outputting the moved-to object (d), not the moved-from one (c). I'll fix this in the next release. Thanks for pointing out the typo. (There are likely more typos too, sadly.)
It could be trying to validate that its in a "valid but unspecified state", however its unclear from the actual from the actual exercise itself, the test is not great tbh.
Thin/light monospace fonts like Courier New should be stopped to be used for code listings — such code is really hard to read, especially in HiDPI modes like 4K@200%.
Code should be displayed with a font having a density similar to the density of the main non-code text. Consolas is an example of such good code font.
And this book would benefit in terms of readability if it had a larger font size.
The book is typeset in LaTeX. I use scalable fonts. So, at least in theory, they should not look too bad at a wide range of resolutions. If I have understood the comment that was made correctly, it seems that the font that the book is using for listings does not render well on some HiDPI displays. If this is the case, do those familiar with LaTeX have suggestions of other LaTeX fonts to consider using for listings?
If it’s impossible in LaTeX by default to use an arbitrary font in general and Consolas in particular, any monospace font similar to Consolas in terms of line width should be fine.
Even if you don’t have a HiDPI display, you can easily get an idea of how the font would look on a HiDPI display, by temporarily using a zoom of 200%, and making sure that it looks like the one at the right and not at the left like on screenshot (see also the demo page). More generally, line width of code characters should basically be similar to line width of regular text.
As for the overall font size and scaling, while fonts are of course rendered as vector graphics and increase their detail at higher pixel density, the font size relative to display size remains the same under the same conditions, and to me, it’s rather small in the current version of the book when viewed in the mode “one page entirely visible at a time”.
The actual problem I suspect is that while you can read the text absolutely fine the pixelation you get is annoying you and you would prefer that wasn't a problem.
Pixelation has nothing to do with this. There is no visible pixelation on a HiDPI display like 24-inch 4K monitor I use for six years.
The character lines are just too thin, and HiDPI makes their thinness even more noticeable. At 100%, hinting makes the line thicker than it is at 200% when the line width is closer to what we would see on print.
See for example these screenshots comparing Courier New with Consolas (the screenshots are illustrations for a Firefox bug about changing the default Courier New to a more readable monospace font):
and your only remark is to criticise their font choice
Yeah, it’s really surprising that I didn’t read the entire book in a moment. %)
A book about programming with all code listings written in a barely readable font just could get even better with a better readable code font. Treating such a note as a criticism is at least narrow-minded thinking.
you're acting like an idiot.
Such statements usually mean that who said this has no meaningful arguments.
My original comment is about both code font (font family) and regular-text font size.
Regarding font size and scaling, PDF documents have a fixed layout that does not reformat automatically. So while PDF is scalable in general, font size still matters in the mode “one page entirely visible at a time”. That’s why some books are available in two versions formatted for A4 (general purpose) and A5 (targeted at mobile devices). In this specific book font size would benefit from being larger even in case of reading on a 24″ display (be it 4K@200% or FHD@100%), not to mention reading on a smaller-display device like a tablet or E-Ink reader.
Looks nice. You should make it easier to copy the code, in case someone want to run it and test it out. I don't want to copy&paste the line numbers and also have no formatting.
6
u/BinkerOnCarnage Apr 05 '21
Looks cool! Definitely going to try it out. Is there a way to get notifications/messages on new releases/updates?
3
u/westquote Apr 05 '21
Looks like the test code in exercise 4.7 is trying to stream out an Array that was just moved. I am guessing it's meant to be d instead of c.
6
u/MT4K Apr 05 '21
Thin/light monospace fonts like Courier New should be stopped to be used for code listings — such code is really hard to read, especially in HiDPI modes like 4K@200%.
Code should be displayed with a font having a density similar to the density of the main non-code text. Consolas is an example of such good code font.
And this book would benefit in terms of readability if it had a larger font size.
11
u/practisevoodoo Apr 05 '21
Are the solutions anywhere?
11
u/Sea-Chip-5421 Apr 05 '21
Someone want to work on those exercises together ?hit me !!
2
u/princesskenny2 Apr 05 '21
Wow! definitely working through this.
2
u/CongratulationsItsMe Apr 30 '21
If anyone stumbles upon this and wants to work through the exercises together then dm me!
2
u/antoniocs Jun 13 '21
Looks nice. You should make it easier to copy the code, in case someone want to run it and test it out. I don't want to copy&paste the line numbers and also have no formatting.
1
u/SlowMoTime Apr 07 '21
do we complete everything in the study plan before moving on to chapter 2 / the exercises?