A Go Developer's Notebook
A Go Developer's Notebook
$7.00
Minimum price
$25.00
Suggested price
A Go Developer's Notebook

Last updated on 2016-12-24

About the Book

This is the book that I wish had existed when I first started exploring the Go language, built around code examples I could have played with at my own pace.

It's also like the book I wish had existed when I first started programming - an amalgam of the magazine articles which taught me to code and the wisdom (or not) conferred by thirty-plus years of doing just that. I hope it's as readable to the interested teenager taking their first steps into hacking as it is the university graduate armed with a wealth of theory but looking for practical insight.

It's also more generally a book about reading and writing code, and about many areas of computing which fascinate me. Perhaps they'll fascinate you too!

One thing this isn't is a professional book, by which I mean that it's not concerned with helping a professional developer quickly transition from another programming language to Go. There are plenty of those already in print, written by much better teachers than me. Instead my aim in this text is to provide a much deeper exploration of subjects I'm interested in through the lens of Go, teaching the language almost as an after-thought.

The didactic style is brutally simple and old-school: write code, explain code, modify code, explain changes, repeat as necessary. Along the way I'll do my best to explain what each example is trying to achieve, and the thinking which evolves it towards its final form.

Each chapter is built around a particular programming task which I use to demonstrate how various features of the Go language can be used as well as to share many of the things I've learned during several decades of coding. Some of these programming tasks may appear deceptively simple, others totally irrelevant to the life of a commercial developer. I intend to disabuse you of both notions, whilst at the same time keeping this a Hacker's Notebook: depending on your outlook this is either a logbook of experiments undertaken and rabbit-holes delved in pursuit of knowledge, or a grimoire of the esoteric and unutterably unconscionable.

If the choice of subject matter at times seems eccentric, remember that my target audience is my teenage self, hunched starry eyed and clueless over an 8-bit micro, not the fortysomething code diva I've since become. My teenage self knew nothing about reading code, testing, refactoring, the scientific method, clean coding style, or academic theory.

As the reader you don't need to know any of these things either, though if you do I hope you'll still find some useful nuggets to add to your toolkit.

So in essence this is a book inspired by my love of programming for the sake of programming, my disillusionment with the widespread desire to teach professional programming at the expense of exploration and fun, and my hope that readers of all ages will find the same pleasure in reading this book that I've experienced in researching and writing it.

There's a google plus community for discussions and a public github repo with the code for each completed narrative section.

To further whet your appetite I provide a free sample comprising an introduction to concurrent network programming with Go that includes practical encryption and is probably sufficient for a professional developer to get up to speed with the language. If that's all you're after, enjoy this free gift.

I've also given a brief presentation on the philosophy behind this living book.

Table of Contents

  •  
    • Preface
  • Introducing Go
    • Hello World
      • Packages
      • Constants
      • Variables
      • Functions
      • Encapsulation
      • Generalisation
      • Startup
      • HTTP
      • The Environment
      • Handling Signals
      • TCP/IP
      • UDP
      • RSA obfuscated UDP
      • Error Handling
      • Exceptions
    • Echo
      • Arguments
      • Flags
      • Command-line Boilerplate and Standard I/O
        • Conditional Flags
      • Errors
      • Files
      • Regular Expressions
      • Interactive
      • Pipes
      • Encryption
  • Going Loopy - Adventures in Iteration
    • Going Loopy Part I
      • The for {} construct
      • A functional approach to iteration
      • Iteration and maps
      • Iteration and structured types
    • Going Loopy Part II
      • Closures
      • Concurrency
        • Synchrononus channels
        • Asynchrononus channels
        • Channel buffering equivalence
      • Duck-typing
        • The empty interface
        • Reflection
      • User defined types
        • Definite types
        • Interface types
  • Odds & Sods
    • Software Machines
      • memory
    • Maps and Hashes
      • Go maps
      • A simple Map implementation
    • Functional Programming
      • First-Class and Higher-Order Functions
      • Pure Functions
      • Currying and Partial Application
      • Lazy Evaluation
      • Recursion
      • Immutable Values
        • Values vs References
      • Immutable Container Types
        • The Cons Cell
        • Singly-linked Lists
        • Spaghetti Stacks
        • Queues
    • Types
      • Primitives
      • Methods
      • References
      • Object Orientation
      • Structures
      • Embedding
        • User defined types, pt 2
        • User defined types, pt 3
        • Testing types
        • Type embedding
        • Benchmarking types
      • Interfaces
        • Interfaces, pt 1
        • package adder
    • Pretty Pictures
      • Basic Mandelbrot
    • Phong Shading
      • synchronous
      • asynchronous
      • map/reduce
      • map/reduce
    • Errors, Exceptions & Flow Control
      • Catch & Throw
      • Stack Traces
      • Exceptions
    • Software Machines
      • timers
      • Instruction Set
      • processor core
      • accumulator machine
      • stack machine
      • register machine
      • vector machine
    • Duck Typing, Reflection and Type Manipulation
      • package generalise
      • raw
      • Immutable Structures
    • Beyond Go
      • Encryption and Privacy
      • Accessing System Services
      • Interfacing with Dynamic Libraries
        • SQLite 3
        • Ruby?
    • Network Adventures

About the Author

Eleanor Loughlin-McHugh
Eleanor McHugh

London-based hacker Ellie has a passion for the esoteric corners of programming stretching back to her misspent teenage years. During the course of her career she's worked on mission critical systems ranging from avionics to banking security and now devotes her time to writing digital romances in Ruby and Go.

As a responsible parent she enjoys polyhedral dice, home brewing and gothic music.

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Write and Publish on Leanpub

Authors and publishers use Leanpub to publish amazing in-progress and completed ebooks, just like this one. You can use Leanpub to write, publish and sell your book as well! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub