Live data from Hacker News

How to write a programming book

aquicarattino.com

11–20 of 71 posts

Re: How to write a programming book

#11
Generally speaking, books as a format make no sense. I have seen the financial records for number of popular tech book authors — and numbers related to them having published, for example: products, services, consulting & speaker fees, etc. If the author is trying, they make way more money from the numbers related to them publishing than the book sales.

If you like writing long form tech guides, do yourself and your audience a favor, figure out how to publish your materials for free digitally and grow an audience you have direct one-on-one access to, then allow people to order paper versions if that’s what they prefer.

Then, writing a book becomes easy: grow audience, provide an outline, get feedback, write more, write testable code, get more feedback, etc.

Anything you write (as in subsection) should have a timestamp of when it was: written, rewritten, last reviewed, test, environment tested, etc.

Re: How to write a programming book

#12
post #10

What pains me about programming books is that due to the market pressure the balance is skewed extremely in the direction of beginner material and there is precious little material for advanced users. If you look at other branches of knowledge, say electronics, there is couple of books for beginners and then massive selection of highly specialized books for experts. I get that part of this is due to multitude of lang…

As someone who writes programming stuff, yes this! I avoid complete beginners and aim for junior to mid.

The problem is that this is still a crazy fast growing field. Say we double in number every 5 to 10 years. That means at 5 years experience you are more experienced than half the industry.

That’s mindboggling.

Newbies also need more help and are more willing to pay for help.

Oldbies only pay for help when entering a new area. Like a fortran engineer picking up React or a JS person getting into C++

One problem is that software engineering doesn’t quite value experience yet. Easier to throw 3 newbies at a problem than 1 senior who’s never seen this new tech anyway.

The other issue is that engineers are smart and motivated by problem solving. They’d rather figure it out themselves than take all the fun out by just learning it like a normal person and reaping the rewards.

Also advanced stuff often gets so in the weeds that only you and 50 of your friends in the whole world even care. Or it’s so specific to your company tht only other people at your company care.

Re: How to write a programming book

#13
post #10

What pains me about programming books is that due to the market pressure the balance is skewed extremely in the direction of beginner material and there is precious little material for advanced users. If you look at other branches of knowledge, say electronics, there is couple of books for beginners and then massive selection of highly specialized books for experts. I get that part of this is due to multitude of lang…

I remember reading a comment on why there's a shortage of very advanced books in databases,where the author argued that anyone who know his stuff at that level is more likely to keep it to himself, because there's tons of money to be made+ lots if proprietary stuff nobody wants to be open about.

Re: How to write a programming book

#14
This is relevant to me because I'll likely be teaching Linear Algebra online in the Fall. I'm rethinking support materials from scratch. This article does not rethink its genre from scratch. And I nearly stopped reading, unwilling to take advice from a fixed pitch body font.

I've learned dozens of programming languages, and I find programming books increasingly unreadable. They all give me that feeling of ADHD that actual programming heals.

I've also made progress learning various human languages. No single approach works. Doing crosswords in old age doesn't fight off dementia but does make one better at doing crosswords. For language aquisition, read with the sole goal of getting better at reading. Listen with the sole goal of getting better at listening. Repeat phrases in the car as if that's a self-contained game one plays. Then trust that these separate skills will integrate as one travels; they do.

For anyone who has learned the board game of Go, it's interesting how books on Go are compartmentalized. There are books solely dedicated to short timescale tactics, for example.

After a few programming languages, one can easily absorb the "short timescale tactics" of a programming language, and still be at a loss on idiomatic ways to assemble complete programs. Just as the best mathematicans only read original literature, the best programmers simply read code. A programming book can ease the transition to reading code. We should be clear that this is our primary goal.

One experiences a more intense sensation of comprehension, reading and understanding how a short complete program works, than reading any neverending text that ambles on. Take a cue from human language aquisition: Programming books should deliver a sequence of "aha!" moments of comprehension, teaching language constructs through explanations of a sequence of cleanly separated short complete programs. Their success should be measured in terms of the enjoyability and intensity of the experience of reading code this way. Leave it to the reader to find other ways to put together the rest.

Re: How to write a programming book

#15
post #3

This would be interesting if I could read it. Would it be possible to display text without enabling JS? I have read several IT books recently and they aren't good. Basic stuff like visibility of diagrams, presenting advanced subject matter but also supposedly in a way that will teach you programming, or having pages of code to illustrate something trivial.

> Would it be possible to display text without enabling JS? No, because then how would it set up pullquotes like "If you don't set a baseline somewhere, you risk starting a book that grows backward" that you can tweet at the push of a button? (Is that really a thing? I guess it must be somewhere, but it's new to me on a (I guess) programmer's blog.)

They are just links to Twitter, no JS involved on those fragments.

Re: How to write a programming book

#16

This would be interesting if I could read it. Would it be possible to display text without enabling JS? I have read several IT books recently and they aren't good. Basic stuff like visibility of diagrams, presenting advanced subject matter but also supposedly in a way that will teach you programming, or having pages of code to illustrate something trivial.

I'm working on that. I just used a stock template for the website.

Re: How to write a programming book

#17

I think the article is really general advice about (tech) writing, not about writing a programming book. There is very little if anything specific to programming itself, e.g. e.g. the types of code fragments you should use as examples. Also, apart from the line: > You can always ask feedback from people you trust to gain confidence there is no mention of getting someone to proofread or even copy edit the book. This w…

Indeed, there's no remark about it because I wanted to split the act of writing from the publishing of the book. The sentence on asking feedback was geared towards checking the ideas, having an overview of what you've written by someone else (which is not the same than proofreading).

All what you mention as missing, is part of my current ongoing process, and I still haven't learned nor tested enough as to summarize it.

Re: How to write a programming book

#18
post #8

This would be interesting if I could read it. Would it be possible to display text without enabling JS? I have read several IT books recently and they aren't good. Basic stuff like visibility of diagrams, presenting advanced subject matter but also supposedly in a way that will teach you programming, or having pages of code to illustrate something trivial.

Someone needs to make a Hacker News bingo card. "Doesn't work with JS disabled" would definitely be on there.

Along with "you need JS for the modern web"

Re: How to write a programming book

#19
post #5

One thing that is constantly left out of books is challenging problems with solutions for the user to cement the new ideas they’ve learned in actual examples. It’s very easy to read along and nod your head but it’s very hard (at least for me) to incorporate my new skills without memorable hands on examples.

As a reader, what I do is make up my own challenges. Do I feel comfortable modifying the code and knowing it will still run error-free?

I do the same when learning a new concept, find a little way to apply it by slightly to heavy modifying the original code until it clicks. I save those to a folder I can reference sometime in the future. I’ve been doing this for a really long time and it works well for me.

Re: How to write a programming book

#20
post #17

I think the article is really general advice about (tech) writing, not about writing a programming book. There is very little if anything specific to programming itself, e.g. e.g. the types of code fragments you should use as examples. Also, apart from the line: > You can always ask feedback from people you trust to gain confidence there is no mention of getting someone to proofread or even copy edit the book. This w…

Indeed, there's no remark about it because I wanted to split the act of writing from the publishing of the book. The sentence on asking feedback was geared towards checking the ideas, having an overview of what you've written by someone else (which is not the same than proofreading). All what you mention as missing, is part of my current ongoing process, and I still haven't learned nor tested enough as to summarize i…

Fair points.

I hope the process goes well! Doing what you are doing is really difficult and I have lots of respect for those who try!

Post reply on HN