Comment by Einenlum
Oh boy.
I can relate so much to this article and everything said here. I published a book last year and it has been a long journey. It took me one year and a half to write it. But then when you think it's done, it's just a second challenge coming up. I wanted to write a book that was as straight-to-the-point as possible. The publisher I signed with didn't really understand my approach and wanted me to turn it into a random book ("less rough") where you would get the usual long and useless introductions that I hate. Took me a while to realise that if I signed with a publisher it was just to get this "I'm an author" recognition this article talks about. I realised I didn't even buy "regular" programming books and most of my library are self published books. I didn't want to publish a book I would have not read.
Ended up cancelling my contract and publishing it myself. I talk a bit about it in this article: https://www.einenlum.com/articles/my-book-from-php-to-python...
I sold like 50 of them but got great feedback. To anyone wondering if it's worth it financially, definitely NOT. Is it still worth it for other reasons? I would say I don't regret it but you first have to realise you'll go into a rabbit hole and experience the levels of stress the author of the article talks about.
The advantage of a publisher like Apress or O'Reilly is a lot of people still attach probably excessive value to the publisher pedigree.
The downside, as you say, is that they control length, format, pricing, deadlines, etc.
I went through the publisher route once through two editions and, on net, I'm glad I did but I've also self-published in no small part because I'd rather write some more bite-size books on narrow topics and I want to be able to do whatever I want with the material on the schedule I choose.