Show HN: My Book, Hands-On Software Engineering with Golang
packtpub.com
packtpub.com
I tried to differentiate from other Go books out there by including things that align with my research interests. Inside the book and its accompanying code you can find lots of (hopefully) interesting concepts such as how to build from scratch data pipelines and a distributed graph processing system inspired by Pregel.
As simply discussing these concepts is not that interesting without some code, my main focus was to write a hands-on book. To this end, the book is kinda code-heavy and includes about 16.2k lines of Go code (52% Go code, 30% tests and 17% auto-generated mocks/gRPC stubs according to gocloc).
You can find the full source code for the book at https://github.com/PacktPublishing/Hands-On-Software-Enginee.... It comes with an MIT license so feel free to tinker with it and let me know what you think!
However, for the book source code, I opted to use dep to make sure it can be used by folks that use older Go compiler versions that lack support for Go modules. That being said, it should be trivial to convert the repo to use Go modules.
Why? (I don't mean that as snark; with the ease of installing and upgrading the go compiler compared to the olden days of acquiring a c compiler on a floppy disk - why not target the latest version? I[s] cgo trailing behind?)
1) Depending on the editor team assigned to your book, they may introduce arbitrary content guidelines (e.g. no code blocks over 15 lines, no figure subtitles; had to press hard to get them restored etc.) after you have already submitted a couple of chapters. I don't really mind the guidelines but it would be great to know them in advance as I had to go back and revise the content.
2) My biggest gripe was their authoring workflow. Personally, I would prefer to write everything in Tex but unfortunately, you need to use their online editing environment (essentially, a wordpress installation with a heavily modified tinyMCE). As I do everything in vim nowadays, I had to setup my own workflow (write markdown + bibtex references, pass through pandoc to convert to html, run a sed script to inject the correct css styles and copy the result back to their system). It's a bit more effort but it allowed me to work offline and use git to track my changes. If anyone is interested in a similar setup, let me know and I can push a repo on GH with the Makefile/css scripts.
Also, there doesn't seem to be a way to get an estimate of the book sales unless you wait for their periodic royalties report. Not sure how it works yet because the book just got released but maybe someone else can comment on this.
I made a similar workflow to you. I wrote using vim and markdown, then used pandoc to convert to HTML. I then wrote some scripts to mangle the HTML to something more compatible with Packt's system (adds some class names and the like).
Regarding sales, they send me royalty statements for each quarter about 3 months after the quarter's end. For example, my book was released in May. I didn't get my first statement until the end of September. My last statement is dated Dec 31st, and it covers July-September 2019.
You can also setup an Amazon author account and get Amazon sales numbers much more quickly. Just go to https://authorcentral.amazon.com/ and create an account. You'll then have to verify that you're the author of your book, but it's pretty straight forward.
1) They had very aggressive deadlines that I missed consistently without consequence.
2) Their editors were not native speakers of English, and introduced a ton of grammatical errors that people complained about to me.
3) They published the wrong version of a chapter.
4) They randomly decided one day to stop paying me royalties "because PayPal takes too much commission" or something.
It wasn't all bad, though. They did give me a pretty reasonable advance (at least compared to just writing documentation for free), and they did get good technical reviewers.
This was ~10 years ago, so things might have changed.
Wow wouldn't that be illegal?
[1] https://www.youtube.com/playlist?list=PLeLcvrwLe1849uRCrEOlQ...
I think the material should be relatively easy to follow up to chapter 11 for anyone with a basic understanding of programming in Go. Chapter 12 is a bit more complex as it describes the implementation of a distributed graph processing system.
I would definitely recommend taking a look at the (heavily commented) code on GitHub to see for yourself.
waves