Learn Go with Pocket-Size Projects

by Aliénor Latour, Donia Chaiehloudj, and Pascal Bertrand

In November of last year I decided to take part in Manning's manuscript review program as I was already reading one of their MEAP books, Learn Go with Pocket-Sized Projects. Here are my thoughts after reading the entire manuscript...

Target Audience and Goals of the Book

As outlined in the first chapter the book's target audience includes:

The author's aim to achieve the following goals:


Structure

The book is comprised of 12 chapters, each one walking the reader through a single project although the final chapter technically covers two subjects and is designed to round off the book.

The kinds of projects you will develop include:

Each chapter follows a similar structure:

I don't have enough space in this article to talk about every project in the book but I'll briefly cover two of them.


Bookworm's digest (chapter 3)

If you're like me and you love reading books, then anything bookworm related is probably interesting to you! In this chapter you'll load virtual bookshelves stored in JSON files and use Go to read, sort and analyse the data.

This chapter covers the following:

Concurrent maze solver (chapter 9)

This chapter introduces you to the world of maze solving.

This chapter covers the following:

maze


Do the authors achieve their goals?

In my opinion the answer to this is a clear yes.

Goal one: Iterative process

Each chapter is split into sections with each section building on the previous. The chapters themselves are also sufficiently organised by difficulty.

The authors take a bottom up approach, for each project they start with the basics from initializing the module, defining the project specification, thinking through the design choices and finally onto implementation.

The reader is encouraged to commit their work to source control before any major additions.

The authors go to great lengths to explain their thought processes. This is very important from the readers perspective because it allows you to think about 'why' something should be done and not just 'how'.

Goal two: Production level code

Testing is a primary concern throughout the book and encouraged at every step.

The authors stress the importance of thinking through design choices carefully, not only their impact in the moment but also into the future.

Although anti-patterns are used to demonstrate less than ideal code, the authors do a good job of explaining the shortcomings and then go on to demonstrate a preferred implementation.

Goal three: Projects scaled for busy people

As is addressed in the book's appendix, several of the chapters have you write projects that rely on in-memory databases primarily to keep the projects sized reasonably (doable in a day or two). The authors stated clearly both in the chapters and in the appendix that this is normally an unacceptable solution and would not be suitable for production code.


Conclusion

I think that Learn Go with Pocket-Sized Projects is a beautifully written book that serves its stated goals.

The book does a good job of presenting the strength and flexibility of Go, offering projects that deliver a broad coverage of the language.

The writing style is a mixture of conversational, humorous and terse but for the most part explanations are straightforward and to the point.

I wouldn't recommend this book as a first read in Go for a newcomer, better a second or third book. Certainly I would recommend it to anyone looking for a book for further their knowledge in Go best practices and project design.

Further Notes:

Subscribe to this blog's RSS feed