Programming in Go: Creating Applications for the 21st Century
- By Mark Summerfield
- Published May 4, 2012 by Addison-Wesley Professional. Part of the Developer's Library series.
- Copyright 2012
- Dimensions: 7" x 9"
- Pages: 480
- Edition: 1st
- ISBN-10: 0-321-77463-9
- ISBN-13: 978-0-321-77463-7
Register your product to gain access to bonus material or receive a coupon.
Product Author Bios
Mark Summerfield is an independent trainer, consultant, and technical editor and writer, specializing in C++, Qt, and Python. Mark graduated with first class honors in Computer Science from the University of Wales Swansea, UK, and later qualified as a teacher. Prior to starting Qtrac Ltd., he spent many years in the software industry working as a programmer, consultant, and technical writer. He worked as Trolltech's documentation manager from 2000 to 2004. He lives in Wales.
Your Hands-On Guide to Go, the Revolutionary New Language Designed for Concurrency, Multicore Hardware, and Programmer Convenience
Today’s most exciting new programming language, Go, is designed from the ground up to help you easily leverage all the power of today’s multicore hardware. With this guide, pioneering Go programmer Mark Summerfield shows how to write code that takes full advantage of Go’s breakthrough features and idioms.
Both a tutorial and a language reference, Programming in Go brings together all the knowledge you need to evaluate Go, think in Go, and write high-performance software with Go. Summerfield presents multiple idiom comparisons showing exactly how Go improves upon older languages, calling special attention to Go’s key innovations. Along the way, he explains everything from the absolute basics through Go’s lock-free channel-based concurrency and its flexible and unusual duck-typing type-safe approach to object-orientation.
Throughout, Summerfield’s approach is thoroughly practical. Each chapter offers multiple live code examples designed to encourage experimentation and help you quickly develop mastery. Wherever possible, complete programs and packages are presented to provide realistic use cases, as well as exercises. Coverage includes
- Quickly getting and installing Go, and building and running Go programs
- Exploring Go’s syntax, features, and extensive standard library
- Programming Boolean values, expressions, and numeric types
- Creating, comparing, indexing, slicing, and formatting strings
- Understanding Go’s highly efficient built-in collection types: slices and maps
- Using Go as a procedural programming language
- Discovering Go’s unusual and flexible approach to object orientation
- Mastering Go’s unique, simple, and natural approach to fine-grained concurrency
- Reading and writing binary, text, JSON, and XML files
- Importing and using standard library packages, custom packages, and third-party packages
- Creating, documenting, unit testing, and benchmarking custom packages
15 of 17 people found the following review helpful
Everything anyone could need to begin with.,
This review is from: Programming in Go: Creating Applications for the 21st Century (Developer's Library) (Paperback)This is a resoundingly thorough walkthrough of the Go language and all of its features and idioms. Despite being a ground up introduction, the book appears to be written with the assumption of the reader having some basic programming experience; so while it begins with the usual foundational explanations of types and syntax, the wording is refreshingly precise, dense and informative and continues this way going forward. Most who don't have a need to be talked down to but still would appreciate clear writing and a thorough detailing of the language from the bottom up would find this book is really well-suited.
While the book assumes familiarity with programming in general it is not at all withholding of examples or clarification, and indeed it errs on the side of caution in presenting multiple demonstrations of ideas before moving on to the next hurdle. Examples abound throughout, in fact nearly all chapters tend to have a long block of demonstrations at their end. To some... Read more
3 of 4 people found the following review helpful
Well written book that teaches solid idiomatic Go programming,
This review is from: Programming in Go: Creating Applications for the 21st Century (Developer's Library) (Paperback)Programming in Go by Mark Summerfield teaches to program in Go the Go way. This book is for those who are familiar with basic programming concepts and are interested in learning the Go programming language. Programming in Go is written in a hybrid tutorial/reference style. The coverage is comprehensive enough for it to be considered a reference, but it also includes detailed examples as well as exercises that make it suitable for a self-learner.
In my opinion the coverage of the Go language is both thorough and comprehensible with the material structured in a way that optimises learning programming the Go way. In the very beginning readers are introduced to Go with 5 short but effective examples, which provide an outline of Go's syntax and features. Consecutive chapters lay down a foundation and build on it. The author is careful to point out good Go style. Separate chapters are dedicate to the coverage of strings, object-oriented programming, and concurrent programming,... Read more
4 of 6 people found the following review helpful
A bit disappointing,
Amazon Verified Purchase(What's this?)
This review is from: Programming in Go: Creating Applications for the 21st Century (Developer's Library) (Kindle Edition)I had high expectations for this book, both because I've enjoyed the author's other books, and also because I've found other books in the "Developer's Library" to be well written and informative.
"Programming in Go" does have a lot of accurate information, and I was able to use it to get started writing code in Go. Also, I bought the Kindle version, and the formatting is great on my iPad, the cloud-reader, and my Mac's Kindle app.
My biggest complaint is the organization. The order that topics are covered just doesn't make sense to me. For example, Chapter 9 covers Packages. Section 9.1 is "Custom Packages", 9.2 is "Third-Party Packages", 9.3 is "A Brief Survey of Go's Commands," and then 9.4 is "A Brief Survey of the Go Standard Library." What's 9.3 doing in there? It's not even "Go commands relating to packages" - it covers "go help", "go vet", "go fix" and "gofmt". Even ignoring that it's in the chapter on Packages, why is "go help" just being mentioned... Read more
› See all 8 customer reviews...
Online Sample Chapter
Download the sample pages (includes Chapter 1 and Index)
Table of Contents
Why Go? 1
The Structure of the Book 4
Chapter 1: An Overview in Five Examples 7
1.1. Getting Going 7
1.2. Editing, Compiling, and Running 9
1.3. Hello Who? 14
1.4. Big Digits–Two-Dimensional Slices 16
1.5. Stack–Custom Types with Methods 21
1.6. Americanise–Files, Maps, and Closures 29
1.7. Polar to Cartesian–Concurrency 40
1.8. Exercise 48
Chapter 2: Booleans and Numbers 51
2.1. Preliminaries 51
2.2. Boolean Values and Expressions 56
2.3. Numeric Types 57
2.4. Example: Statistics 72
2.5. Exercises 78
Chapter 3: Strings 81
3.1. Literals, Operators, and Escapes 83
3.2. Comparing Strings 86
3.3. Characters and Strings 87
3.4. Indexing and Slicing Strings 90
3.5. String Formatting with the Fmt Package 93
3.6. Other String-Related Packages 106
3.7. Example: M3u2pls 130
3.8. Exercises 135
Chapter 4: Collection Types 139
4.1. Values, Pointers, and Reference Types 140
4.2. Arrays and Slices 148
4.3. Maps 164
4.4. Examples 171
4.5. Exercises 180
Chapter 5: Procedural Programming 185
5.1. Statement Basics 186
5.2. Branching 192
5.3. Looping with For Statements 203
5.4. Communication and Concurrency Statements 205
5.5. Defer, Panic, and Recover 212
5.6. Custom Functions 219
5.7. Example: Indent Sort 244
5.8. Exercises 250
Chapter 6: Object-Oriented Programming 253
6.1. Key Concepts 254
6.2. Custom Types 256
6.3. Interfaces 265
6.4. Structs 275
6.5. Examples 282
6.6. Exercises 311
Chapter 7: Concurrent Programming 315
7.1. Key Concepts317
7.2. Examples 322
7.3. Exercises 357
Chapter 8: File Handling 361
8.1. Custom Data Files 362
8.2. Archive Files 397
8.3. Exercises 405
Chapter 9: Packages 407
9.1. Custom Packages 408
9.2. Third-Party Packages 417
9.3. A Brief Survey of Go’s Commands 418
9.4. A Brief Survey of the Go Standard Library 419
9.5. Exercises 431
Appendix A: Epilogue 435
Appendix B: The Dangers of Software Patents 437
Appendix C: Selected Bibliography 441
Book + eBook Bundle
Book Price $35.99
eBook Price $12.60
eBook formats included
This book includes free shipping!
This book includes free shipping!
Includes EPUB, MOBI, and PDF
About eBook Formats
This eBook includes the following formats, accessible from your Account page after purchase:
EPUBThe open industry format known for its reflowable content and usability on supported mobile devices.
MOBIThe eBook format compatible with the Amazon Kindle and Amazon Kindle applications.
PDFThe popular standard, used most often with the free Adobe® Reader® software.
This eBook requires no passwords or activation to read. We customize your eBook by discretely watermarking it with your name, making it uniquely yours.
Get access to thousands of books and training videos about technology, professional development and digital media from more than 40 leading publishers, including Addison-Wesley, Prentice Hall, Cisco Press, IBM Press, O'Reilly Media, Wrox, Apress, and many more. If you continue your subscription after your 30-day trial, you can receive 30% off a monthly subscription to the Safari Library for up to 12 months. That's a total savings of $199.