News for hackers. Stuff that matters.
Re:How to write a programming book by lmilcin on Saturday May 23, 2020 @10:37AM (#23283276)
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 languages, paradigms, frameworks, etc. but I suspect that a huge part is due to the fact that programming book writers have huge incentive to make the book palatable to absolute beginners and anything else seems to be a sure way for the project to tank.

Re:How to write a programming book by dkersten on Saturday May 23, 2020 @01:31PM (#23284774)
Another thing that bothers me is that most intermediary books on a topic tend to start with a good chunk of beginner stuff. For example, many game programming books will cover a ton of beginner material at the start, same with graphics books or books on a particular programming language. I shudder to think of how much duplicated content that I will never read because I'm no longer a beginner is sitting in my bookshelf. If I buy an intermediary or advanced book, I don't need a recap giving me the absolute basics! Eg if its an intermediate-level programming language book, don't tell me how to do simple conditionals or loops or something that I definitely already know to consider an intermediate-level book...
Re:How to write a programming book by reificator on Saturday May 23, 2020 @05:53PM (#23286862)
This is why I look for gems like Professional Javascript for Web Developers[0][1]. (I can't speak to the latest version, I think I read the 3rd edition from 2012.)

It's a book about Javascript that assumes you've written software in other languages before. I believe the book uses Java/C#, Python, and maybe a couple other languages as reference points.

It describes language behavior and constructs that may be new to you, and details where the familiar may differ from what you'd expect. For instance, the section on `var` and how function scoping (and hoisting) differ from block scoping was quite detailed, but I don't remember it spending a lot of time on what it meant to declare a variable or why scoping rules matter.

If the book had a beginner focus I might have seen the section on declaring variables, skimmed to see the `var` keyword, and skipped the rest. Then I'd have written a bunch of code that would bite me later, because why would you ever assume function scoping when coming from another language?

It's unfortunate that it's so difficult to find books with either an intermediate to advanced focus, or a focus on switching languages, as I think both are sorely needed in the current programming ecosystem.

[0]: https://www.wiley.com/en-us/Professional+JavaScript+for+Web+...

[1]: https://www.amazon.com/Professional-JavaScript-Developers-Ma...

Re:How to write a programming book by mfrisbie on Saturday May 23, 2020 @08:53PM (#23288106)
Author of the 4th edition here!

Much credit goes to the author of previous editions, Nicholas Zakas, for dictating the style. He offered this advice when I began the new edition:

I tried to make it a book that had a distinctive approach, which is that it didn't treat the reader with kid gloves and went deep into technical details to people could really understand the language. This, more than anything else, is what people have told me they enjoyed about the book. It was unapologetically not for beginners.

More than anything else, this advice is what guided me in preserving the original style in the new edition.

Re:How to write a programming book by travisjungroth on Saturday May 23, 2020 @05:56PM (#23286889)
Fluent Python sounds like the same thing. It assumes experience in another language and having done the official Python tutorial.
Re:How to write a programming book by reificator on Saturday May 23, 2020 @06:03PM (#23286949)
Thanks, I'll have to check it out. I've definitely dabbled in Python but I would like to learn it properly.
Re:How to write a programming book by jagged-chisel on Saturday May 23, 2020 @05:59PM (#23286919)
There was a commenter here on HN (if my Google-fu serves me, I'll come back and edit with a link) talking about this problem wrt contracted educational services. Folks request intermediate to advanced training. The trainer shows up, finds out that everyone is actually a beginner with this particular technology, and has to adapt the course appropriately.

That's pretty good customer service, but it's not something you can get with a book. I suspect "intermediate" books with a "beginner" start are attempting to address this problem and head off the terrible reviews. Perhaps it's an ego thing with software engineers. "I'm no idiot, so I'm intermediate," "I've been doing software for decades so I'm advanced," and not realizing that it's about your experience with this technology, not your brain.

Re:How to write a programming book by lmilcin on Saturday May 23, 2020 @07:12PM (#23287469)
Okay, so you propose all books should be written for noobs just in case noob picks up something for already advanced user?

That just doesn't make any sense.

Obviously, the author of the book can explain the book is really meant for a user with some prior knowledge and experience of the matter. If the reader ignores it it's not really a problem of the author to deal with.

My background is mathematics and, as an example, just recently wanted to pick up some control theory. It is absolutely normal I pick up a book I have not enough knowledge to even start reading. It is normal. You get something else, study it, then go back to the one you tried to understand.

Re:How to write a programming book by amw-zero on Saturday May 23, 2020 @09:00PM (#23288145)
Agreed. The one thing the Internet surely did was enable self-starters to have their fill of the entirety of human knowledge. But you have to have determination and patience. Some things might not make sense the first time you read them. I come back to things that I’ve already read time and time again, and get new insights out of them each time.

“Oh!!! That’s what they meant here!!!”

I say this once a month with something I’ve read 50 times. We need to reward people for having determination, not make every single book beginner friendly at the expense of deep material. We’re doing the world a huge disservice by limiting the potential of what people could be sharing.

Re:How to write a programming book by taphangum on Saturday May 23, 2020 @02:36PM (#23285277)
This is the exact problem that I am working on with my project https://fromtoschool.com. Where we write books and create courses that teach new programming languages and frameworks to experienced developers, using the languages and frameworks that you already know.

The style we use to teach is optimized for speed of learning and teaches this way using the 'constructivist' method. I expand on this learning style, and why it is so effective more in this post: https://fromtoschool.com/why-most-programming-tutorials-are-....

Re:How to write a programming book by jsweojtj on Sunday May 24, 2020 @12:32AM (#23289091)
Your post in https://fromtoschool.com/why-most-programming-tutorials-are-... has links at the bottom to books and courses -- both point to https://fromtoschool.com/courses which gives me: page not found.
Re:How to write a programming book by taphangum on Sunday May 24, 2020 @01:17AM (#23289312)
Yep, the first book "From jQuery To VueJS" is still in the works. I'll be updating the pages to reflect the coming soon status of the book tomorrow!

But if interested you can leave your email address on the form at the bottom of the post.

Re:How to write a programming book by Swizec on Saturday May 23, 2020 @10:52AM (#23283418)
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 by sitkack on Saturday May 23, 2020 @08:29PM (#23287971)
That is why there is a small time window for smallish niches, like Elixir, Clojure or Rust. One has to have their eye one fashion, the crowds, the knowledge gap and the perceived utility.

I personally wouldn't wanting to be competing with all the other beginner material and sufficiently advanced material would take forever to produce.

But if there was a 100 page book on writing an Elixir/Phoenix app and deploying it on K8s across 4 cloud providers, using a CDN and Aerospike, I'd pay 50$ for that.

Re:How to write a programming book by Swizec on Sunday May 24, 2020 @01:18PM (#23292973)
> I'd pay 50$ for that.

That’s the other problem. The thing you just described is worth 6-figures when sold as a consulting deal. Why do you expect to pay just $50 for the book version?

Re:How to write a programming book by sitkack on Sunday May 24, 2020 @04:37PM (#23294486)
Exactly, which is why the expert information is teased out in a couple in depth blog posts.

https://www.michael-noll.com/projects/

Does a very good job in this regard. I think if you have a consulting agency where you can train or lead on multiple projects, then a book could be a very good sales vehicle.

Re:How to write a programming book by cosmodisk on Saturday May 23, 2020 @10:55AM (#23283436)
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 by alexashka on Saturday May 23, 2020 @03:05PM (#23285495)
What advanced material are you looking for?

A lot of research papers can be found online for free. What problem are you trying to solve that you feel would be helped by advanced material not found in research papers and/or computer science textbooks?

For me, the problems I've encountered that I thought were problems of lack of advanced learning material, have turned out to be problems of absence of tooling, libraries, frameworks and the will to create them.

In my particular case - I became an iOS developer and found out we're still paying people 100k+ to manually create trivial phone apps that fetch trivial database queries via json and display them in rather trivial ways on screens.

You wouldn't believe the number of people working on any given banking app that lets you display your past transactions and transfer money in-between accounts - it's basically a folder/file viewer with pre-defined file types and a couple of pre-defined actions for each. We've had folders, files and transactions to ensure correctness for decades! People are still re-creating these features!

Why do we have separate banking apps that do the exact same thing and why does displaying text fetched from a database and letting you modify it in the most trivial way, a job that pays 100k+ while producing bug ridden code?

There is no book to solve this problem and I believe most of the people employed in software development are churning out or maintaining this type of code. As a result, the market for advanced techniques in computer science is incredibly tiny - if you removed the idiotic whiteboard waterboarding techniques, academia and R&D at big corporations, you'd find out that there is maybe a few thousand people world-wide who are genuinely interested in putting advanced computer science to use.

I'd say this hypothesis explains why we don't have any actual progress in the field, just more javascript frameworks (simplifying, of course ) :) It doesn't explain very well what those billions of dollars in R&D at big corps are accomplishing besides removing ports from laptops and coming up with new keyboard mechanisms that fail when dust falls on them (lol) - maybe we're one day away from a quantum computer that changes everything? I have my doubts :)

Re:How to write a programming book by clarry on Saturday May 23, 2020 @05:32PM (#23286675)
> you'd find out that there is maybe a few thousand people world-wide who are genuinely interested in putting advanced computer science to use.

Nah, there are lots of people writing big complex programs with big complex architecture. Architecting programs isn't an "advanced compsci topic", but there are lots and lots of books that don't really talk much about it. Instead they show you how to use your programming language's (or framerwork's, database's, etc.) primitives in a basic way. That's pretty much the things you could just look up in a reference manual. Then you figure out the hard stuff yourself.

They tell me how to hold this bundle of hammer and nails, but I need to figure out how to design a skyscraper with them..

Re:How to write a programming book by munificent on Saturday May 23, 2020 @07:50PM (#23287715)
If you haven't read them yet, Design Patterns, The Pragmatic Programmer, and Code Complete, will all help you.
Re:How to write a programming book by clarry on Sunday May 24, 2020 @07:01AM (#23290709)
I've glanced at design patterns, but like most programming books, it bored me to death.

To me it reads like "now that you know how to hold this clumsy 90s OOP hammer, here's how to swing it". That's a far cry from architecting systems, and not a particularly motivating read for someone who's really not into that flavor of OOP (or much OOP at all).

Re:How to write a programming book by munificent on Sunday May 24, 2020 @05:23PM (#23294944)
I'm trying to think of a tactful way to phrase this, but let me just say it: If you're only willing to learn things that are in convenient, fun-to-consume packages, you'll miss out on a lot of the world's wisdom.

There are a lot of experts who have profoundly deep skills, but don't happen to write in your personally preferred writing style. Do you want that to get in the way of you learning from them? If not, you gotta meet them halfway.

I've learned a lot from well-written books. I've also learned a lot from frankly poorly-written books. Mastery takes work.

Re:How to write a programming book by clarry on Sunday May 24, 2020 @06:03PM (#23295253)
On the other hand, life is short, time is finite, and there's more to read and do and learn than any one person can do in a lifetime.

Time and time again I read things only to regret it later because I didn't get my time's worth out of it and probably could've spent that time on something more useful.

It's less a question of style and more a question of content. Do I feel like I'm learning something insightful or important? If not, I start to get bored. If it's a book people recommend a lot, I force myself to keep reading, and tend to get more and more bored. I might or might finish, but in the end I usually regret it. It's very rare for a book that doesn't start out well to do a U-turn and get good towards the end.

Re:How to write a programming book by Silhouette on Sunday May 24, 2020 @10:47PM (#23297248)
You make a valid point, and if you're reading fiction for pleasure then your own judgement of the experience is really the only thing that matters. However, if you're reading technical material with the aim of improving your skills, how can you tell whether you are learning something insightful or important?

A classic problem, and the reason that some questionable authors with unreliable content are nevertheless among the most popular in their field, is that the student of a technical subject is by definition never going to be qualified to evaluate tutorial material aimed at their current level. We all rely on the opinions of those more skilled or experienced than ourselves to guide us, at least until we reach a level where there are no more tutorials and instead we're learning from our own experiences including original research and discussions with peers.

In the case of Design Patterns specifically, if you're not into the kind of OOP where those patterns apply then it will have much less value to you. However, I'd say anyone who is working in a language like Java, C++ or C# should have at least passing familiarity with the patterns within and their names, if only to recognise the concepts and key details when they come up in discussion with fellow developers or get mentioned in code or documentation. Some of the ideas behind those patterns are relevant in non-OOP contexts as well, but in other programming styles they are often expressed very differently, which is why I say the book would have much less (but not necessarily zero) value to someone whose interests lie away from class-based OOP.

Re:How to write a programming book by Silhouette on Saturday May 23, 2020 @10:09PM (#23288489)
Those are all intermediate/improver kind of books, though. They contain a lot of useful material, and many programmers who haven't studied those subjects would benefit from doing so. However, the ideas would (should) be familiar to any professional programmer with more than a few years of experience. The challenge is where you go after that to continue developing your skills and broadening your experience for the next 5 or 10 or 20 years, rather than becoming the "eternal novice" who is proficient with the basic tools but unaware of more advanced idioms or more strategic issues that would help them to produce much better work.
Re:How to write a programming book by ghaff on Saturday May 23, 2020 @03:22PM (#23285616)
I suspect that, in many cases, books are most useful for people starting out because they don't know what they don't know and don't know what they really should know. Once you're more experienced, you probably care about deep dives in specific areas that may not even be of much general interest and may be very recent. And those are probably less amenable to books.