Get Programming with Go (英語) ペーパーバック – 2018/9/30
Kindle 端末は必要ありません。無料 Kindle アプリのいずれかをダウンロードすると、スマートフォン、タブレットPCで Kindle 本をお読みいただけます。
Get Programming with Go introduces you to the powerful Go language without confusing jargon or high-level theory. By working through 32 quick-fire lessons, you'll quickly pick up the basics of the innovative Go programming language!
Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.
About the Technology
Go is a small programming language designed by Google to tackle big problems. Large projects mean large teams with people of varying levels of experience. Go offers a small, yet capable, language that can be understood and used by anyone, no matter their experience.
About the Book
Hobbyists, newcomers, and professionals alike can benefit from a fast, modern language; all you need is the right resource! Get Programming with Go provides a hands-on introduction to Go language fundamentals, serving as a solid foundation for your future programming projects. You'll master Go syntax, work with types and functions, and explore bigger ideas like state and concurrency, with plenty of exercises to lock in what you learn.
- Language concepts like slices, interfaces, pointers, and concurrency
- Seven capstone projects featuring spacefaring gophers, Mars rovers, ciphers, and simulations
- All examples run in the Go Playground - no installation required!
About the Reader
This book is for anyone familiar with computer programming, as well as anyone with the desire to learn.
About the Author
Nathan Youngman organizes the Edmonton Go meetup and is a mentor with Canada Learning Code. Roger Peppé contributes to Go and runs the Newcastle upon Tyne Go meetup.
Table of Contents
- Get ready, get set, Go
- A glorified calculator
- Loops and branches
- Variable scope
- Capstone: Ticket to Mars
- Real numbers
- Whole numbers
- Big numbers
- Multilingual text
- Converting between types
- Capstone: The Vigenère cipher
- First-class functions
- Capstone: Temperature tables
- Arrayed in splendor
- Slices: Windows into arrays
- A bigger slice
- The ever-versatile map
- Capstone: A slice of life
- A little structure
- Go's got no class
- Composition and forwarding
- Capstone: Martian animal sanctuary
- A few pointers
- Much ado about nil
- To err is human
- Capstone: Sudoku rules
- Goroutines and concurrency
- Concurrent state
- Capstone: Life on Mars
Unit 0 - GETTING STARTED
Unit 1 - IMPERATIVE PROGRAMMING
Unit 2 - TYPES
Unit 3 - BUILDING BLOCKS
Unit 4 - COLLECTIONS
Unit 5 - STATE AND BEHAVIOR
Unit 6 - DOWN THE GOPHER HOLE
Unit 7 - CONCURRENT PROGRAMMING
Nathan Youngman is a self-taught web developer and lifelong learner. He serves as organizer for the Edmonton Go meetup, mentor for Canada Learning Code, and paparazzi for VIP gopher plushies.
Roger Peppe is a Go contributor, maintains a number of open source Go projects, runs the Newcastle upon Tyne Go meetup, and works on Go cloud infrastructure software.
The book is structured in a well paced, incremental manner. The first few chapters cover syntax, the type system, and writing functions and methods. Go's built-in collection types (array, slice, and maps) are covered next. All of this gives you a solid foundation of the strongly typed, statically compiled language. For my fellow Rubyists that I've been teaching Go, this is a fairly big change.
The later three units get into the parts of Go that really define what being a productive Gopher is all about. First is thinking in terms of composition and interface, which is a different pattern for those used to thinking OOP is only about classes and inheritance. Go's approach to error handling (no exceptions) and concept of nil is explored next. The book's final chapter introduces you to my favorite part of the language, its concurrent programming support. Goroutines and channels are explored and the unit's lessons start to give you a taste of what you can do with them.
Each chapter provides sample code (also available online) for you to get right in and play with. Most of it works in the Go playground online, though I recommend installing Go on your Windows, Mac, or Linux machine and trying things there. There are larger projects at the end of each unit to really help you pull together the concepts.
Overall, this is the book I now recommend to my fellow learners to start their Go journey. There are a number of other good books, videos, and other online materials that cover the intermediate and advanced levels of Go, and you'd be prepared for those after reading this book.
In addition to being approachable and well paced, the book is designed to be very hands-on. Not only are there tons of examples to read, code yourself, and learn from, but there are also many additional experiments and capstones to help practice what you are learning.
Experiments tend to be small changes you need to make to examples in order to create similar, but different output. Their value lies in their ability to help solidify your understanding of the current lesson, as you have to figure out what specific lines of code need changed in order to produce the desired output. When I was first learning to program this type of tinkering is what really helped me start to understand new code, so I really appreciate the authors attention to this detail.
Capstones are a little more complex than experiments; instead of taking a program that illustrates a specific lesson and altering it, these show up every few lessons and require you to apply all the knowledge you have gained up until that point. As a beginner these capstones may feel challenging at first, but by working through them you end up knowing with absolute confidence that you understood the material and are ready to move on to the next set of lessons.
All in all I think this is a great book with a practical, hands-on approach to learning Go and I will be recommending it to others in the future.
This book does not cover how to structure your code, but that is beyond the scope of this book. The book ends with teaching channels, goroutines, and mutexes.