Bill Gates: I Coded While I Hiked as a Teenager. Was I on the Spectrum? Probably. -- WSJ

Dow Jones
25 Jan

By Bill Gates

When I was around 13, I started hanging out with a group of boys who met up for regular long hikes in the mountains around Seattle. We got to know each other as Boy Scouts. We did plenty of hiking and camping with our troop, but we very quickly formed a sort of splinter group that went on our own expeditions -- and that's how we thought of them, as expeditions. We wanted more freedom and more risk than the trips the Scouts offered.

There were usually five of us -- Mike, Rocky, Reilly, Danny and me. Mike was the leader; he was a few years older than the rest of us and had vastly more outdoor experience.

Over the course of three years or so we hiked hundreds of miles together. We covered the Olympic National Forest west of Seattle and Glacier Peak Wilderness to the northeast and did hikes along the Pacific Coast. We'd often go for seven days or more at a stretch, guided only by topographic maps through old-growth forests and rocky beaches where we tried to time the tides as we hustled around points.

During school breaks, we'd take off on extended trips, hiking and camping in all weather, which in the Pacific Northwest often meant a week of soaked, itchy Army surplus wool pants and pruney toes. We weren't doing technical climbing. No ropes or slings or sheer rock faces. Just long, hard hikes. It wasn't dangerous beyond the fact that we were teenagers deep in the mountains, many hours from help and well before cellphones were a thing.

Making our own decisions

Over time we grew into a confident, tightknit team. We'd finish a full day of hiking, decide upon a place to camp, and with hardly a word we'd all fall into our jobs. Mike and Rocky might tie up the tarp that would be our roof. Danny foraged the undergrowth for dry wood, and Reilly and I coaxed a starter stick and twigs into our fire for the night.

And then we ate. Cheap food that was light in our packs but substantial enough to fuel us through the trip. Nothing ever tasted better. For dinner we'd chop up a brick of Spam and mix it with Hamburger Helper or a packet of beef stroganoff mix. In the morning, we might have Carnation Instant Breakfast mix or a powder that with water transformed into a Western omelet, at least according to the package. My morning favorite: Oscar Mayer Smokie Links, a sausage billed as "all meat," now extinct.

We used a single frying pan to prepare most of the food, and we ate out of empty #10 coffee cans we each carried. Those cans were our water pails, our saucepans, our oatmeal bowls. I don't know who among us invented the hot raspberry drink. Not that it was a great culinary innovation: just add instant Jell-O mix to boiling water and drink. It worked as dessert or as a morning sugar boost before a day of hiking.

We were away from our parents and the control of any adults, making our own decisions about where to go, what to eat, when we slept, judging for ourselves what risks to take. At school, none of us were the cool children. Only Danny played an organized sport -- basketball -- and he soon quit to make time for our hikes.

I was the skinniest of the group and usually the coldest, and I always felt like I was weaker than the others. Still, I liked the physical challenge and the feeling of autonomy. Though hiking was becoming popular in our part of the country, not a lot of teenagers were traipsing off in the woods for eight days on their own.

Adventures in computing

That said, it was the 1970s, and attitudes toward parenting were looser than they are today. Children generally had more freedom. And by the time I was in my early teens, my parents had accepted that I was different from many of my peers and had come to terms with the fact that I needed a certain amount of independence in making my way through the world. That acceptance had been hard-won -- especially from my mother -- but it would play a defining part in who I was to become.

Looking back now, I'm sure all of us were searching for something on those trips beyond camaraderie and a sense of accomplishment. We were at that age when children test their limits, experiment with different identities -- and sometimes feel a yearning for bigger, even transcendent experiences. I had started to feel a clear longing to figure out what my path would be. I wasn't sure what direction it would take, but it had to be something interesting and consequential.

Also in those years, I was spending a lot of time with a different group of boys. Kent, Paul, Ric and I all went to the same private school, Lakeside, which had set up a way for students to connect with a big mainframe computer over a phone line. It was incredibly rare back then for teenagers to have access to a computer in any form. The four of us really took to it, devoting all of our free time to writing increasingly more sophisticated programs and exploring what we could do with that electronic machine.

On the surface, the difference between hiking and programming couldn't have been greater. But each felt like an adventure. With both sets of friends I was exploring new worlds, traveling to places even most adults couldn't reach. Like hiking, programming fit me because it allowed me to define my own measure of success, and it seemed limitless, not determined by how fast I could run or how far I could throw.

The logic, focus and stamina needed to write long, complicated programs came naturally to me. Unlike in hiking, among that group of friends, I was the leader.

No turning back

Toward the end of my sophomore year, in June 1971, Mike called me with our next trip: 50 miles in the Olympic Mountains. The route he chose was called the Press Expedition Trail, after a group sponsored by a newspaper that had explored the area in 1890. Did he mean the same trip on which the men nearly starved to death and their clothes rotted on their bodies? Yes, but that was a long time ago, he said.

Eight decades later it would still be a tough hike. That year had brought a lot of snow, so it was a particularly daunting proposition. But since everyone else -- Rocky, Reilly and Danny -- was up for it, there was no way I was going to wimp out. Plus, a younger Scout, a guy named Chip, was game. I had to go.

The plan was to climb the Low Divide pass, descend to the Quinault River, and then hike the same trail back, staying each night in log shelters along the way. Six or seven days total. The first day was easy, and we spent the night in a beautiful snow-covered meadow.

Over the next day or two, as we climbed the Low Divide, the snow got deeper. When we reached the spot where we planned to spend the night, the shelter was buried in snow. I enjoyed a moment of private elation. Surely, I thought, we'd backtrack, head down to a far more welcoming shelter we passed earlier in the day. We'd make a fire, get warm and eat.

Mike said we'd take a vote: head back or push on to our final destination. Either choice meant a several-hour hike. "We passed a shelter at the bottom; it's 1,800 feet down. We could go back down and stay there, or we could continue on to the Quinault River," Mike said. He didn't need to spell out that going back meant aborting our mission to reach the river.

"What do you think, Dan?" Mike asked. Danny was the unofficial second in command in our little group. He was taller than everyone and a very capable hiker with long legs that never seemed to tire. Whatever he said would sway the vote.

"Well, we're almost there, maybe we should just go on" Danny said. As the hands went up, it was clear I was in the minority. We'd push on.

A few minutes down the trail I said, "Danny, I'm not happy with you. You could have stopped this." I was joking -- sort of.

A coding puzzle on the trail

I remember this trip for how cold and miserable I felt that day. I also remember it for what I did next. I retreated into my own thoughts. I pictured computer code.

Around that time, someone had lent Lakeside a computer called a PDP-8, made by Digital Equipment Corp. This was 1971, and while I was deep into the nascent world of computers, I had never seen anything like it. Up until then, my friends and I had used only huge mainframe computers that were simultaneously shared with other people. We usually connected to them over a phone line or else they were locked in a separate room.

But the PDP-8 was designed to be used directly by one person and was small enough to sit on the desk next to you. It was probably the closest thing in its day to the personal computers that would be common a decade or so later -- though one that weighed 80 pounds and cost $8,500. For a challenge, I decided I would try to write a version of the Basic programming language for the new computer.

Before the hike I was working on the part of the program that would tell the computer the order in which it should perform operations when someone inputs an equation, such as 3 (2 + 5) x 8 - 3, or wants to create a game that requires complex math. In programming that feature is called a formula evaluator.

Trudging along with my eyes on the ground in front of me, I worked on my evaluator, puzzling through the steps needed to perform the operations. Small was key. Computers back then had very little memory, which meant programs had to be lean, written using as little code as possible so as not to hog memory. The PDP-8 had just six kilobytes of the memory a computer uses to store data that it's working on.

I'd picture the code and then try to trace how the computer would follow my commands. The rhythm of walking helped me think, much like a habit I had of rocking in place.

For the rest of that day my mind was immersed in my coding puzzle. As we descended to the valley floor, the snow gave way to a gently sloping trail through an old forest of spruce and fir trees until we reached the river, set up camp, ate our Spam Stroganoff and finally slept.

(MORE TO FOLLOW) Dow Jones Newswires

January 24, 2025 19:00 ET (00:00 GMT)

Copyright (c) 2025 Dow Jones & Company, Inc.

Disclaimer: Investing carries risk. This is not financial advice. The above content should not be regarded as an offer, recommendation, or solicitation on acquiring or disposing of any financial products, any associated discussions, comments, or posts by author or other users should not be considered as such either. It is solely for general information purpose only, which does not consider your own investment objectives, financial situations or needs. TTM assumes no responsibility or warranty for the accuracy and completeness of the information, investors should do their own research and may seek professional advice before investing.

Most Discussed

  1. 1
     
     
     
     
  2. 2
     
     
     
     
  3. 3
     
     
     
     
  4. 4
     
     
     
     
  5. 5
     
     
     
     
  6. 6
     
     
     
     
  7. 7
     
     
     
     
  8. 8
     
     
     
     
  9. 9
     
     
     
     
  10. 10