DEV Community

Cover image for The Secret Life of Go
Aaron Rose
Aaron Rose

Posted on

The Secret Life of Go

Chapter 1: The Archives Below

The rain arrived without warning, as rain in Manhattan so often does—one moment the October sky was merely gray and brooding, the next it was releasing sheets of water that sent pedestrians scrambling for awnings and doorways. Ethan, clutching a laptop bag that was definitely not waterproof, ducked into the first open door he found.

The Whitmore Branch of the New York Public Library occupied a narrow Beaux-Arts building on a quiet street in lower Manhattan, wedged between a Korean grocery and a law office. Ethan had walked past it a hundred times during his four years at NYU and had never once gone inside. He stood now in the small foyer, water dripping from his hair onto the marble floor, and took in the unexpected grandeur: coffered ceilings painted in faded gold, brass light fixtures gone green with age, tall arched windows that even on this gray day filled the space with soft light.

A woman at the circulation desk looked up from her book. She was perhaps sixty-five, with silver hair pinned in an elegant twist, reading glasses perched on her nose, and the sort of posture that suggested either decades of ballet training or a spine made of steel. A silk scarf in deep burgundy was draped over her shoulders.

"You're dripping," she observed, not unkindly.

"Sorry—I—yeah." Ethan looked down at the small puddle forming around his sneakers. "I just graduated. From NYU. Computer science. I mean, that's not why I'm dripping, I just—it started raining and—"

She raised one hand, a gesture of such graceful authority that Ethan immediately stopped talking.

"There are paper towels in the restroom. Down the hall, second door on your left." She returned to her book—Ethan caught a glimpse of the title, something about distributed systems—then added, without looking up, "When you've made yourself less aquatic, you're welcome to explore. We have a rather remarkable technical collection downstairs that most people don't know about."


Twenty minutes later, marginally drier and increasingly curious, Ethan found himself descending a narrow staircase he'd discovered behind a door marked "Archives - Staff Only." The woman at the desk had nodded when he'd pointed questioningly at it, as if granting permission to enter a secret world.

The basement was larger than the building above seemed to allow—one of those spatial impossibilities that old New York buildings sometimes contained. Rows of oak shelving stretched back into shadows, filled not with the crumbling volumes Ethan expected but with books that looked well-maintained, even recent. Hand-lettered signs marked the sections: ALGORITHMS, SYSTEMS DESIGN, LANGUAGE THEORY.

And there, in a reading alcove illuminated by a green-shaded banker's lamp, sat the woman from upstairs. A porcelain cup of coffee steamed beside her, and she was typing on a laptop that looked incongruously modern against the antique surroundings.

"You found it," she said, still typing. "Most people don't bother."

"What is this place?"

She finished whatever she was writing, closed the laptop with a soft click, and removed her reading glasses. Her eyes, Ethan noticed, were a sharp gray-blue that seemed to take his measure in a single glance.

"The Whitmore Technical Archive. Established in 1923 by Cornelius Whitmore, who made his fortune in telegraph equipment and believed that every great city needed a sanctuary for technical knowledge." She gestured at the shelves. "We've kept pace with the times. Barely. The public library system would have closed us years ago, but the Whitmore endowment is remarkably stubborn."

"I'm Ethan," he said, then felt immediately foolish for the obviousness of it.

"I'm Eleanor." She did not extend her hand, but the introduction carried a weight of formality, as if she were granting him her name rather than simply stating it. "You mentioned computer science. What brings a recent graduate to wander the streets of lower Manhattan in the rain?"

"Job hunting," Ethan admitted, dropping into a chair across from her. "I had an interview at a startup on Fulton Street. They're building some kind of real-time messaging platform. They asked me if I knew Go."

"And do you?"

"I said yes." He winced. "I mean, I've written a few things in it. Hello World. A to-do list app that mostly works. But they started asking about goroutines and channels and interfaces, and I just kind of..." He made a vague gesture that suggested drowning.

Eleanor Ashworth's expression did not change, but something in her eyes softened—the way a master chess player might look at a novice who had just blundered into a beautiful position without understanding why.

"Go," she said, "is perhaps the most honest programming language ever designed. It does not pretend to be clever. It does not hide its mechanisms behind layers of abstraction. It simply says: here is what I am, here is how I work, and here is what I expect of you."

"That sounds..."

"Refreshing?" She smiled for the first time, and it transformed her face from regal to warm. "I worked at Bell Labs in the nineties. Not in the same department as Ken Thompson and Rob Pike, but close enough to watch them struggle with the same problems every programmer struggled with: C was powerful but dangerous, C++ was powerful but incomprehensible, and everything else was too slow or too strange for systems work."

She rose from her chair with the fluid grace of someone who had been rising from chairs elegantly her entire life, and moved to one of the shelves. Her fingers traced along the spines until she found what she was looking for: a slim volume with a gopher on the cover.

"Go was born in 2007, announced in 2009, and reached version 1.0 in 2012. It was created by Rob Pike, Ken Thompson, and Robert Griesemer—three people who had spent decades watching programmers make the same mistakes over and over." She set the book on the table between them. "Do you know what they decided?"

Ethan shook his head.

"They decided that the problem wasn't the programmers. The problem was that languages kept giving programmers too many ways to be clever, and cleverness is the enemy of clarity." She tapped the book. "Go has no generics—well, it didn't until recently, and even now they're conservative. No inheritance. No exceptions. No implicit type conversions. Every design decision was made by asking: does this make programs easier to read and understand?"

"That seems kind of..." Ethan searched for the right word. "Limited?"

"Focused," Eleanor corrected gently. "A hammer is limited. It is also remarkably effective at driving nails. Go is a hammer for building networked services, concurrent systems, and tools that need to be fast and reliable. It does not try to be a Swiss Army knife."

She returned to her chair and took a sip of coffee, her movements precise and unhurried. "Would you like to learn? Properly, I mean. Not the way they teach it in boot camps—here's the syntax, now go build something. But the way it was meant to be understood."

Ethan looked around the archive, at the rows of books and the soft light and this extraordinary woman who spoke about programming languages the way other people spoke about poetry.

"Yes," he said. "Please."


Eleanor reached into a drawer and produced a second laptop—older than hers but clearly well-maintained—and set it in front of Ethan.

"We begin at the beginning," she said. "Not with Hello World—that tells you nothing useful—but with the fundamental unit of Go: the package."

She opened a terminal and typed with the easy speed of long practice:

package main
Enter fullscreen mode Exit fullscreen mode

"Every Go file begins with a package declaration. This is not optional, not configurable, not subject to debate. The language insists upon it." She paused. "Why do you think that might be?"

"Organization?" Ethan guessed.

"Partly. But more than that—it's about identity. Every piece of Go code knows what it is and where it belongs. There's no ambiguity, no orphaned code floating in the void." She typed another line:

import "fmt"
Enter fullscreen mode Exit fullscreen mode

"The fmt package—format—is part of Go's standard library. When you import it, you're saying: I need the tools that fmt provides. Go will not let you import something you don't use. Try it—import a package and don't call any of its functions."

Ethan typed, adding an import for the os package but not using it. When he tried to run the code, the compiler rejected it immediately.

imported and not used: "os"
Enter fullscreen mode Exit fullscreen mode

"In Python," Ethan said slowly, "you can import whatever you want. Nobody cares."

"In Python," Eleanor replied, "you can also create variables you never use, call methods that don't exist until runtime, and generally make a mess that only reveals itself when the program is already running in production." She did not say this with contempt—merely as a statement of fact. "Go refuses to compile if there is unused code. The philosophy is simple: if you wrote it, you should need it. If you don't need it, why is it there?"

She gestured for him to continue typing:

func main() {
    fmt.Println("Hello, Ethan")
}
Enter fullscreen mode Exit fullscreen mode

"There," she said. "Your first complete Go program. Let's examine it."

She pointed to each element in turn, her finger hovering just above the screen.

"The func keyword declares a function. The main function in the main package is special—it's where execution begins. No arguments, no return value. Just the starting point." She traced the line. fmt.Println calls the Println function from the fmt package. Notice the capital P."

"Is that important?"

"Profoundly." Eleanor's eyes gleamed. "In Go, capitalization determines visibility. A function, type, or variable that begins with a capital letter is exported—visible outside its package. Lowercase means private, visible only within the package."

"So Println is public because it starts with P?"

"Exactly. No keywords like public or private. No decorators or annotations. The name itself carries the information." She smiled. "This is what I mean by honesty. The language does not hide things from you. Everything is visible in the code itself, if you know how to read it."

Ethan ran the program. The words appeared on the screen, simple and clean.

Hello, Ethan
Enter fullscreen mode Exit fullscreen mode

"It's fast," he said, surprised. "Like, really fast. Python takes a second to start up."

"Go compiles to native machine code. No interpreter, no virtual machine, no just-in-time compilation. The binary that runs is the binary you built." Eleanor gestured at the terminal. "Run go build and look at what it produces."

He did. A single executable file appeared, about two megabytes.

"That file contains everything. Your code, the fmt package, everything the program needs. You could copy it to any computer with the same operating system and it would run. No dependencies to install, no runtime to configure."

"That's..." Ethan stared at the file. "That's really convenient, actually. I've spent so many hours debugging Python environment issues."

"The Go team understood something important: the time a programmer spends fighting with tools is time not spent solving problems. So they built a language that compiles in seconds, produces self-contained binaries, and includes formatting, testing, and documentation tools in the standard distribution." She paused. "Speaking of formatting—"

She reached over and deliberately misaligned Ethan's code, moving the brackets around, adding random spacing.

"Hey!" Ethan protested.

"Run gofmt on it."

He did. The code snapped back into perfect alignment—braces in the right places, consistent indentation, clean spacing.

"There is one correct way to format Go code," Eleanor said. "Not a style you prefer, not a team convention, not a debate to be had. One way. The gofmt tool enforces it. Every Go programmer in the world writes code that looks the same."

"That seems kind of authoritarian."

"It is gloriously authoritarian." Eleanor's smile was serene. "And it means that when you read someone else's Go code, you can focus on what it does rather than how it's formatted. No more arguments about tabs versus spaces. No more pull request comments about brace placement. The machine decides, and we are all liberated from the tyranny of choice."


The rain had stopped by the time Ethan looked up from the laptop, though he couldn't have said how much time had passed. The light through the basement windows had shifted from gray to the amber of approaching evening.

Eleanor was watching him with an expression of quiet satisfaction, the way a gardener might watch a seedling that had just broken through the soil.

"We've barely begun," she said. "Variables and types. Functions and methods. Structs and interfaces. And beyond all that—" Her voice took on a note of something that might have been reverence. "—goroutines and channels. The heart of what makes Go special."

"Can I come back?" Ethan asked, then immediately felt presumptuous. "I mean, if it's okay. If you have time."

Eleanor rose and moved toward the stairs, her silk scarf trailing like a banner.

"The archive is open Tuesday through Saturday, ten to six. I am here most days." She paused on the first step and looked back. "Bring coffee tomorrow. Good coffee—there's a roaster on Murray Street called Bluestone Lane that knows what they're doing. I take mine black, single origin if they have it."

"I usually just get whatever's at the bodega—"

"Yes," Eleanor said, with infinite patience. "I know."

And then she was gone, ascending the stairs with the unhurried grace of someone who had never rushed anywhere in her life.

Ethan gathered his things, his mind buzzing with packages and exports and the strange, compelling honesty of a language that refused to let you write code you didn't need. He looked around the archive one more time—the oak shelves, the banker's lamp, the sense of hidden knowledge waiting to be discovered.

Tomorrow, he thought. Good coffee. Single origin.

He had a feeling this was going to be worth it.


Key Concepts from Chapter 1

Package declarations: Every Go file begins with a package declaration. The main package with a main function is where program execution begins.

Imports: Go requires you to explicitly import packages you use—and won't compile if you import something you don't use. This enforces clean, intentional code.

Visibility through capitalization: Uppercase names are exported (public), lowercase names are package-private. No keywords needed—the name tells you everything.

Native compilation: Go compiles directly to machine code, producing fast, self-contained binaries with no external runtime dependencies.

gofmt: The standard formatting tool that enforces one canonical style for all Go code, eliminating style debates and making all Go code visually consistent.

The Go philosophy: Simplicity over cleverness, clarity over flexibility, and explicit behavior over implicit magic. Go was designed to make programs easier to read and understand.


Next chapter: Variables, Types, and the Art of Declaration—where Ethan learns that Go's type system is both simpler and stranger than anything he learned in school, and Eleanor explains why explicit is almost always better than implicit.


Aaron Rose is a software engineer and technology writer at tech-reader.blog and the author of Think Like a Genius.

Top comments (0)