116 karma · joined June 12, 2017
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.
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.
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.
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!
I will be talking about this approach in more detail in GolangUK '17.
If you take a look at the Go runtime sources you will notice that all the low-level arch/os-related bits have been split into separate files which usually invoke some syscalls (e.g. the memory allocator eventually calls mmap)
The idea I am currently investigating is to first provide an implementation for things such as physical memory allocation and virtual memory mapping which would ultimately allow me to bootstrap the Go allocator. From that point onwards the plan is to incrementally add more features and gradually initialize the rest of the runtime.
This is much more difficult than it sounds as all code must be written in such a way to prevent the compiler from calling the runtime allocator (no variables allowed to escape to the heap).