Go Brain Teasers
Exercise Your Mind
by: Miki Tebeka
Published | 2021-09-10 |
---|---|
Internal code | d-gobrain |
Print status | In Print |
Pages | 110 |
User level | Intermediate |
Keywords | go, puzzles, web development, algorithms, brain teasers |
Related titles | Powerful Command-Line Applications in Go by Ricardo Gerardi (May 2021) |
ISBN | 9781680508994 |
Other ISBN |
Channel epub: 9781680509151 Channel PDF: 9781680509168 Kindle: 9781680509137 Safari: 9781680509144 Kindle: 9781680509137 |
BISACs | COM051000 COMPUTERS / Programming / GeneralCOM060160 COMPUTERS / Web / Web ProgrammingCOM060160 COMPUTERS / Web / Web Programming |
Highlight
This book contains 25 short programs that will challenge your understanding of Go. Like any big project, the Go developers had to make some design decisions that at times seem surprising. This book uses those quirks as a teaching opportunity. By understanding the gaps in your knowledge, you’ll become better at what you do. Some of the teasers are from the author’s experience shipping bugs to production, and some from others doing the same. Teasers and puzzles are fun, and learning how to solve them can teach you to avoid programming mistakes and maybe even impress your colleagues and future employers.
Description
Programmers love the Go (golang) programming language because of its efficiency and simple tooling. But that doesn’t mean programming in Go is without challenges, like hidden dependencies that trip up the compiler and interesting string type conversions that differ from languages like Python. Work your way through 25 short brain teasers, and learn the nuances of Go in one of the most fun and creative ways around.
Challenge yourself and challenge your assumptions to gain a more in-depth understanding of integers, strings, Unicode, compiler behavior, and a variety of subtle programming gotchas that might otherwise trip you up. Just read a short program written in Go, try to guess the output, run the code yourself, and then go to the next page for an explanation of the solution. By working through these brain teasers, you’ll tighten up your Go programming skills and have lots of fun at the same time.
Taken from real-world, programming problems, conference talks, and meetup quizzes, these brain teasers provide an effective learning tool that’s as enjoyable as it is educational.
Contents and Extracts
- Preface
- Foreword by David Cheney
- Dedication
- The Brain Teasers
- 1. A Number π
- 2. Empty-Handed
- 3. When in Kraków
- 4. I’ve Got Nothing
- 5. A Raw Diet
- 6. Are We There Yet?
- 7. Can Numbers Lie?
- 8. Sleep Sort
- 9. Just in Time
- 10. A Simple Append
- 11. What’s in a Log?
- 12. A Funky Number?
- 13. Free Range Integers
- 14. Multiple Personalities
- 15. A Tale of Two Cities
- 16. What’s in a Channel?
- 17. An Interesting String
- 18. A Job to Do
- 19. To Err Or Not To Err
- 20. What’s in a String?
- 21. A Double Take
- 22. Count Me a Million
- 23. Who’s Next?
- 24. Fun with Flags
- 25. You Have my Permission
- Thanks
- Epilogue
- Index