The book C++: The Programming Language¹ (Waylon Warren, editor) claims to present “the complex subject of C++ in the most comprehensible and easy to understand language.” A rather overdone book blurb, in my opinion.
Anyway, the book does have an attractive cover, or at least an inoffensive one.
But wait, let’s zoom in on the code shown on the computer monitor.
function updatePhotoDescription() {
if (descriptions.length > (page * 9) + (currentImage.substring(⟦ blurry ⟧')) {
document.getElementById("bigImageDesc").innerHTML + ⟦ blurry ⟧
}
}
function updateAllImages() {
var i = 1;
while (i < 10) {
var elementId = 'foto' + i;
var elementIdBig = 'bigImage' + i;
if (page * 9 + i - 1 < photos.length) {
document.getElementById( elementId ).src = 'images/⟦ blurry ⟧
document.getElementById( elementIdBig ).src = 'images/⟦ blurry ⟧
} else {
document.getElementById( elementId ).src = '';
This isn’t even C++. It’s JavaScript!
¹ Note that this is not the book The C++ Programming Language by the language inventor Bjarne Stroustrup.
So this is perhaps one of the times when we should judge a book by its cover.
`if (page * 9 + i – 1 < photos.length)`
makes me want to vomit
It’s not even a mono space font… barbaric.
Almost certainly. Why would the author (or, editor, I guess) be consulted on the book cover? They’re a writer, not a graphic designer. But it’s still a really big screwup for a tech publisher to make.
I was consulted on the cover to my book. In fact, they asked me “What do you want the cover to look like?”