39

I'm a regular answerer (for the async/await questions, at least) on SO.

I've recently finished writing a book: O'Reilly's Concurrency in C# Cookbook. As you may guess, a lot of the recipes would apply to the async/await questions that I regularly answer on SO.

So, the question: is it acceptable for me to mention the applicable recipe in an answer? This is an example; the answer stands alone (it's the preferred solution), but the recipe would also be useful (also covers an alternate solution, with more discussion).

Would a link be acceptable? Of course, I'm certainly not going to get rich by self-promoting on SO (technical books tend to lose money overall, especially in a narrow target market). OTOH, that feels like pretty blatant self-promotion.

So I ask the community: should I remove the mention of the book at all, leave it as-is, or add a link?

16
  • 4
    There's already a lot of discussion on this topic already...have you looked through any of that yet?
    – Servy
    Commented May 8, 2014 at 18:16
  • 1
    Ah, apparently I was only searching meta.stackoverflow.com, not meta.stackexchange.com. I was wondering why this wasn't covered! Commented May 8, 2014 at 18:24
  • 4
    Skeet, Lippert (maybe more) somehow find a way to let people know they have published without using answers.
    – Gayot Fow
    Commented May 8, 2014 at 18:29
  • 4
    See my answer to What signifies good self promotion or self promotion part infinity? for a possible inspiration/example.
    – jscs
    Commented May 8, 2014 at 18:39
  • 20
    @GarryVass: It's not a matter of using an answer as a way to let people know that I've published a book - but I do use answers as a way of referring to more information. So long as the answers are helpful in and of themselves, I don't think it's a bad thing to point to more information, even if it's only available after purchase.
    – Jon Skeet
    Commented May 8, 2014 at 20:28
  • 1
    Self-promotion only bothers me when it is not explicitly clear that you are doing it, or the answer suffers for a lack of complete detail unless you call now (operators are standing by!) I know others feel strongly about this in different directions, but I only take exception when paid content is offered with feigned objectivity and masked intentions, or when it is shoehorned into an answer awkwardly as a blatant web traffic honeypot. If you simply mention that you wrote a book on a subject that you're answering on, that works for me; I can click your profile and get a link if I want more. Commented May 9, 2014 at 15:07
  • It's always at least partly self-promotion because it is not a neutral selection of sources. So if done too often it'll get annoying. I would restrict the mentioning of the book. Don't do it too often. However I like that you clearly say that it's your book. Commented May 9, 2014 at 15:19
  • 3
    Small print footnotes in answers might be nice too. After all the reference to the book does not answer the question directly but rather refers to more information. Commented May 9, 2014 at 15:22
  • 3
    Stephen, debate about the ethics of promotion aside, congratulations on the book :) Commented May 9, 2014 at 16:19
  • 1
    @JoshCaswell I can't believe you're promoting your own post like that! ;-)
    – Caleb
    Commented May 9, 2014 at 16:21
  • @Caleb: Well, at least we don't have to pay actual money to read Josh's shamelessly self-promoted post!
    – John Y
    Commented May 9, 2014 at 16:25
  • What? Your bill is in the mail already, @JohnY.
    – jscs
    Commented May 9, 2014 at 18:54
  • I prefer it this way: If it is publicly accessible source and it answers the question clearly, just link to the source is sufficient for me. But if it is not public (like, need to purchase a book), a good answer+reference to the source for more details is best, because everyone may not be able to buy the book to get the answer. In short, main point is whether question is answered (without spending money for that). For those who want to learn more than the answer, may be, let them pay. And example in question is good way to do it, I feel. Commented May 11, 2014 at 7:23
  • 13
    @SimonWhitehead: My master plan worked! Subtle self-promotion by asking about self-promotion! Mwa, ha, ha! Commented May 12, 2014 at 12:29
  • 8
    I address this very issue in my book...
    – Nathan
    Commented May 13, 2014 at 12:16

8 Answers 8

41

I think as long as the answer is useful, self-contained and stands on its own it is fine to refer to an outside source for more information even if that information is behind a pay-wall so to speak.

Further I think it might be quite helpful to the person asking if they were anyways looking for more resources on whatever the topic area of their question was. Especially considering that when it comes to tech books the largest cost is usually not the price of the book but rather the time it takes to read the book. An answer from the author of the book can be a great indicator of whether their book would be worth your time.

4
  • 3
    "...if they were anyways looking for more resources..." - asking for off-site resources is explicitly off-topic because such questions "tend to attract spam".
    – nobody
    Commented May 9, 2014 at 15:16
  • 1
    That's correct, but we aren't talking about the OP asking for off-site resource just that they (or someone else that finds the answer) might be looking for more information on the subject (or even if they weren't they might find it useful now that it was pointed out to them).
    – Jack
    Commented May 9, 2014 at 15:18
  • I agree with this part ONLY if the answer stands on its own and the pay-wall outside source is a way to get additional information (not talking about non-paywall outside sources). I do, however, think that information should be separated somehow. Either in a comment or a new section for "additional sources". I say this because I have had answers to my own questions where the answer contained no real effort to answer the problem, but suggested paying money for a solution instead. This is essentially offering the outside paid source as the solution itself.
    – teynon
    Commented May 12, 2014 at 1:14
  • @Jack . . . I agree strongly, which as an author is obviously self interest on my part. A corollary is that encouraging authors to contribute to Stack Overflow should benefit the community overall. I don't think every answer should be a reference to a book, but on rare occasions, I don't hesitate to make the reference. (If anyone actually looks through my answers and comments, they will see that I really do mean very rarely -- perhaps once every three months.) Commented May 12, 2014 at 4:38
37

I cover this in more detail in recipe 2.6 of my Concurrency in C# Cookbook.

I don't think that helps answer the question. Since I can't access that information unless I buy the book (or unless you link to an online version of that chapter), mentioning the book only serves to promote it. I think you should either add a link to the content (not just to a place to buy the book) or remove the reference.

49
  • 45
    I don't know - I'd view it as neutral for those who don't have the book (and don't want to get it), and positive for those who do have the book. It's linking information which may not be obvious even to those with the book - what's the harm of including it? It's important that the answer itself gives enough information to be useful stand-alone, but I don't see that it's a bad idea to give extra information as well.
    – Jon Skeet
    Commented May 8, 2014 at 20:28
  • 8
    (And it's not just for my own book, of course - I'd be very happy to refer to specific items in Effective Java, for example...)
    – Jon Skeet
    Commented May 8, 2014 at 20:29
  • 8
    @Bill By that same logic, shouldn't all links to Amazon be removed? Commented May 8, 2014 at 21:39
  • 3
    @JonSkeet It doesn't give extra information though. It just says that the information exists somewhere else without linking to it or including it.
    – Bill the Lizard Mod
    Commented May 9, 2014 at 3:50
  • 4
    @Bill: Saying where the information is (which recipe) is information in itself.
    – Jon Skeet
    Commented May 9, 2014 at 12:04
  • 3
    @Jon It's not useful information though. It's like linking to a site that's behind a paywall. It still doesn't provide an answer to the question.
    – Bill the Lizard Mod
    Commented May 9, 2014 at 12:07
  • 22
    @Bill: But that's why it's important that it's not the whole answer. It's just an extra bit of information in an otherwise standalone answer. And it is useful information to those who have the book. If you don't have the book, it does no harm and the rest of the answer is still fine. It is only additive, IMO.
    – Jon Skeet
    Commented May 9, 2014 at 12:13
  • 9
    @BilltheLizard: I don't think it's nearly as black-and-white as that. Is there any answer which has absolutely everything that can possibly be said about it? I don't think so. Do you view every answer as "incomplete" then? And you keep saying it's not a link... it's not a hyperlink, but it provides as much information as you need to get to the extra information as an Amazon link would... more, in fact, as it tells you the exact place in the book. Yes, it would be more convenient if it were a hyperlink to Amazon to get the book, but I don't see that as a fundamental issue.
    – Jon Skeet
    Commented May 9, 2014 at 12:34
  • 3
    Basically what I'm saying is that either this is fine - could be better by being a hyperlink, but fundamentally okay - or we should look down on every book link. I don't view the fact that I'd have to (gosh!) copy and paste the book title into a search bar as something so egregious that it deserves castigation, nor do I view the fact that the post author is also the book author as relevant... and the latter is what Stephen was mostly concerned about, I suspect.
    – Jon Skeet
    Commented May 9, 2014 at 12:35
  • 6
    I was never suggesting the link should take the place of a real answer. I was talking about cases like this specific one, where there's already a perfectly reasonable answer which no-one would view as "incomplete" in itself. Does it give every scrap of information possible about the topic? No, but neither does pretty much any answer. So is the link to more (non-free) information helpful, harmful or neither? My view is that it's helpful to some, harmful to none, and therefore okay.
    – Jon Skeet
    Commented May 9, 2014 at 13:19
  • 7
    I think some of it also comes down to the "teach a man to fish...", in that even with a complete self contained answer it still good/nice to provide pointers to additional information to user.
    – Jack
    Commented May 9, 2014 at 14:16
  • 5
    So basically the question is: "I gave a usefull answer, is it ok to now shamelessly self-promote my book?"
    – timo
    Commented May 9, 2014 at 14:33
  • 5
    @user3008011 Yes, that is basically how I'm reading the question. While I will agree with Jon that this case isn't quite that black-and-white, I do view the quoted reference as about 10% helpful, 90% promotional.
    – Bill the Lizard Mod
    Commented May 9, 2014 at 14:40
  • 4
    Is the issue shameless self promotion or that whats being promoted costs money, because if the issue is "shameless self promotion" than that applies even if the content is "freely available".
    – Jack
    Commented May 9, 2014 at 14:46
  • 5
    @BilltheLizard: This is the black-or-white completeness thing again. What I believe Jon and Caleb (and others) are saying is that there's often a "sufficient" answer to a question. It helps. It's good enough. But there's usually more information that would be useful to bring up. Perhaps further detail than is appropriate for the Stack Exchange format; perhaps more rationale; perhaps something that shows the asker "when you get more advanced, you can use this even better way to accomplish your goal"; etc. An answer can give the asker a fish, and provide a link showing them how to fish.
    – John Y
    Commented May 9, 2014 at 15:53
14

It seems that there are two important aspects to this question:

  • Is it okay to cite books in answers?

  • When, if ever, is it okay for an author to cite his or her own book in an answer?

On the first part: We tell people: "If you can imagine an entire book that answers your question, you’re asking too much." But it's often easy to see that an entire book or a chapter would help an OP, and I don't think there's anything wrong with pointing someone to a book as an additional resource, provided that the reference doesn't substitute for a useful answer to the OP's particular question.

You don't have to buy a book in order to learn from it -- most communities in the US have a library, and even if the library doesn't have the book in question, it may be able to procure it for you through inter-library loan. The information in many books is also available in other ways, e.g. though paid services like Safari, sometimes on free sites like Google Books, and portions may be available through previews. (I was able to preview the OP's book and see the section he referred to at no charge.)

On the second part: This comes down to motivation. You shouldn't mention your book if your goal is to promote it, even if it will only increase sales by 1 or 2 units. On the other hand, if you're honestly trying to add a useful resource to your answer, it doesn't matter whether you're the author or just a happy reader. That's a fine line, and it's hard for readers to judge someone else's motivation, so perhaps a more practical standard is relevancy. If your citation is relevant to the OP's question, then a citation is probably fine.

Additionally, if you're quoting from a book directly or indirectly, you should cite the book whether you're the author or not.

Would a link be acceptable? Of course, I'm certainly not going to get rich by self-promoting on SO... OTOH, that feels like pretty blatant self-promotion.

Go with that feeling. If you feel like it's blatant self-promotion, then it probably is. Don't try to figure out how you can work a reference to your book into an answer so that you can sell more books. Put a link to your book in your profile instead, so that people who go looking for more information about you will find it. Nevertheless, I think there are times when an author might reasonably refer to his or her own work without necessarily promoting it.

1
  • One possible way to judge motivation is how often one does it and how partial (not refering to other books) one is. Relevancy also seems difficult. If the question is self-contained then relevancy of further information is somewhere in the middle, difficult to judge really. How often is further information really needed? It might just be overkill. Commented May 9, 2014 at 15:32
11

Perhaps you could make some useful parts of your book that you think you would use in many of your answers publicly available, sort of as teaser excerpts (except they don't leave you wondering :P). Then, you could provide links to those parts when you answer a question in which it applies, and people who find your excerpts helpful may consider buying the book for more.

Just an idea that came to me, not anything from experience, but I hope it helps in some way!

1
  • 1
    I think that is what he is actually doing: Making the most relevant part of his book public in the answer, and refer to the source for more. Commented Mar 17, 2015 at 18:41
5

I've read the lengthy discussion between Bill, Jon and others. I know how you feel. I've written a book myself, and regularly answer questions that would be answered by the book. Although my answers are self-contained, the book would lead to much much deeper insight.

should I remove the mention of the book at all, leave it as-is, or add a link?

If the content is publicly available, then by all means add a link. If it's behind a paywall then don't mention it at all.

By not mentioning the book + chapter + page it feels like I'm letting the OP down. Because I give the man a fish instead of teaching him how to fish. It feels like I'm holding back. But consider the perspective of the readers of your answer. Many readers probably come to Stack Overflow for quick solutions, and the obvious self-promotion is a turn-off, and waste of time to even read that sentence mentioning your book.

Of course, I'm certainly not going to get rich by self-promoting on SO

Exactly. So the reference won't help you in any way. It won't lead to increased sales, and it won't win you a popularity contest. Yes, a keen reader could gain in-depth knowledge by reading your book, but they will be a tiny tiny minority. The vast majority will not appreciate it.

Spare yourself the drama. Just don't bring it up. You'll sleep better. Your profile is the perfect place to put this stuff, people who like your answer and want more of your wisdom will go there, and will be more receptive to the idea of investing in your book.

3

The way I solve this is that I've posted the content of my book online as a set of XHTML Web pages; plus I've put all the code examples from the book as actual Xcode projects, along with all the figures, as a Github repository.

Then when I answer a question, I actually give the answer, which might include code pasted in from the book; and in a subsidiary comment I might provide a link to an example or to the relevant section of a Web page. That way, I'm providing something of immediate value, and the answer itself is not dependent on the link (which, after all, could become outdated).

My technique has evolved over time. I used to include links in the answer, but linkrot has taught me not to do that. And I used to describe these resources as "from my book", but now I no longer do that either; I just say in my comment "I explain further here" or "Here's an actual downloadable example", and I let people discover that these are connected with a book if they are so inclined. They might discover this from my bio at Stack Overflow, or from the header on the Web pages or the Read Me at Github.

But if they don't, I don't care. My goal is to help people, not to advertise the book. I fought hard with O'Reilly for the right to post the book's content online for free, and I'm glad I did; those pages get a lot of hits, and my Github repository has a lot of stars.

At no time do I ever say, "You'd know more about this if you bought and read my book." Though, to be sure, I'm probably thinking it! Actually I'm usually thinking "How could you not have googled and found my book / examples online, since they tell you exactly what you need to know?!" But the point is, I use available and completely free content, with no strings attached, to supplement my efforts to provide answers and to educate people.

0

+1 for posting a link to the book, especially when answering a newbie's question. You'are already doing a tremendously great job and free community service here with your answers. Most of them have been fairly self-contained and targeting the questions to their cores, at least, to my memory.

So, people are already receiving an adequate help, sufficient to solve their problems. Plus, any follow-ups in the comments. If the asking person is willing to learn more on top of that, he/she should spare a few bucks and get the book, the money will be well spent in this case. If he doesn't, it's his choice to ignore the link.

Whether it will turn into a sensible profit for you is hard to predict. Apparently, newcomers are lazy to learn by reading books... why bother if there's a place like SO?

Anyhow, well done on the book. I really wish I had something like this a year ago, when I started using TPL and async/await extensively, but it reads great now, too. Here you go: a meta-promotion! :)

-3

Let us assume the answer is only available in his book for simplification.

If the author would not answer here, the answer would not be available on the internet. It is much harder to find informaton in a paper based book wihthout knowing which, and that it exists at all. So, for most practical purposes, that means it is "just not available".

Now, in answering the question, he makes part of the book available for free, and perfectly easy find.
But while the part he makes availab is only a small fraction of the content, he selects the fraction that provides 100% of the actual problem solving value to the asking user.

So, one could argue that, for the asker, the monetary value of the answer is at least as large as the full price of the book.
That is because the only way to solve the problem without the anwer has the cost of the sum of the cost of the following parts:

  • decide to risk literature research effort, not knowing a suitable book exists
  • conduct literature research, including recognizing a book can solve the problem without access to the text
  • aquire book at full book price or from library
  • recognize section of book or repeat from top
  • adapt solution from book to actual problem

I expect the sum of costs (including backtracking loops) is greater than the full book price.

When, realistically, but contrary to the simplifying assumption, his answer is not the only possible, but merely the best answer - or even just one of multiple good answers, it would change the details, but I feel the argument would still apply.

When looking from this viewpoint, it is perfectly acceptable when the author of both the answer and the book adds a reference to his book.
The form of the reference could describe it from this viewpoint, like below:

(This answer is an excerpt from my book "Answering Interesting Questions Every Day", section 3.1.4 "Answering: example 2345" adapted to your problem (ISBN99999999))

1
  • Actually, from intuition, I do agree with the other answers just as much; But when I found this perspective, it seemed like well worth writing it down. Commented Mar 18, 2015 at 16:16

Not the answer you're looking for? Browse other questions tagged .