Insight | First programs: how Knuth, Carmack, Fadell and Howard fell for computing

November 6, 2026 · 19 min read

Donald Knuth started with a tic-tac-toe program on an IBM 650 in 1957, John Carmack's first program on a TRS-80 printed his name, Tony Fadell discovered programming on punch cards and an Apple II, Todd Howard programmed Star Trek clones on an Apple II, and ThePrimeagen describes falling in love with programming. Their stories show careers that began with small, playful programs on whatever machine was at hand, which is useful to anyone wondering how to start or how to draw a young person into the craft.

Listen to this insight

The Short Version

Donald Knuth, John Carmack, Tony Fadell and Todd Howard all describe falling for computing through a small first program written on whatever machine was in front of them: a number factorer and then a tic-tac-toe player on an IBM 650 in 1957, a program on a TRS-80 that printed Carmack's own name, BASIC on pencil-marked cards in a fifth-grade summer class, and Star Trek clones on an Apple II [1][3][4][5]. None of them started with a grand plan; Knuth says his goal was "to see the lights flashing" and understand the machine [1], and Howard's goal was to write his own video games [5]. What turned play into a career was what came next: Knuth rewriting a bad manual, Fadell patching software for a mail-order company in high school, Howard knocking on Bethesda's door, Carmack shipping a game a month [1][3][4][5]. ThePrimeagen's story is the exception that shows another way in: he fell in love with programming in a college data structures class, and his own climb came from long, stubborn repetition [6].

Table of contents

What They Said

Donald Knuth: lights flashing on an IBM 650

Donald Knuth, the Stanford computer scientist behind The Art of Computer Programming and TeX, gives the most detailed account of a first program in these conversations [1][2]. In 1957 he was a first-year student at Case, earning money by punching cards for the statistics group, when the school took delivery of a new computer [2]. His first look at it was through a window, with its lights flashing; he held a key to the building, so he could let himself in after dark and study the manual [2].

A bad manual as an invitation

The manual mattered more than he expected. Instructions on the IBM 650 were ten decimal digits: two for the operation, four for the address and four for where to find the next instruction [1]. The manual describing them was poorly written, and Knuth drew an unusual conclusion. "If the manual had been well written, I probably never would have gone into computer science," he says [1]. Because he was only a freshman and could write a better one, he figured he must have a talent for it, and he started working at the computer center writing manuals [1].

He wrote in decimal machine language, not assembler, which he says he did not know about until later [1]. The machine was large and loud but feeble by today's standards: its 2,000 words of memory sat on a spinning drum, each word holding ten decimal digits plus a sign, and programmers placed their instructions to suit the time the drum took to turn [2]. Random access memory did not arrive until his senior year, and then only 50 words of it [2].

The factoring program and the discovery of debugging

His first program, in June 1957, factored a number [1]. You set a ten-digit number on the machine's dials, and it punched the factors onto cards [1]. "I discovered debugging, of course, when I wrote my first program," he says [1]. It began at about 20 lines and kept growing: "I had more bugs in it than a number of lines of code" [1]. He had not realized that some ten-digit numbers have more than eight factors, and since each factor took ten of a card's 80 columns, the program had to learn to punch more than one card [1]. A large prime could leave the slow machine spinning for ten minutes, with no way to tell whether it was in a loop [1].

When Lex Fridman asks what he was hoping to find, Knuth corrects him. He was not hunting for a large prime: "my goal was to see the lights flashing and understand how this magical machine would be able to do something that took so long by hand" [1]. Asked whether he thought then about the deeper questions of computation, he says that was way too philosophical: "I was a freshman after all" [1]. Fridman sums it up as a tinkering mindset rather than a philosophical one, and Knuth agrees: "It was just exciting to me to be able to control something" [1].

Tic-tac-toe with three brains

His second program converted numbers from binary to decimal and was much simpler [1]. His third was tic-tac-toe, which he calls "my first experience with machine learning" [1]. It had three parts he named Brain 1, Brain 2 and Brain 3 [1]. Brain 1 chose its moves at random. Brain 2 followed a strategy already known to be optimal. Brain 3 was the learner: it kept a single decimal digit for each board position and nudged the value up whenever that position ended in a win [1]. Memory held just 2,000 ten-digit words, so he made the program fit by treating rotated and mirrored boards as the same position [1]. In his tests with random players, the learner settled into a safe draw after about 600 games; it had learned to avoid errors rather than to play with flair, which he credits to the way he built it [1]. "I don't know how long it's going to be before the name of our field is changed from computer science to machine learning," he jokes [1].

What kind of mind it takes

In a second conversation, Knuth reflects on why the machine grabbed him. He suspects his upbringing wired his brain in a way that resonates with computers; his long-standing estimate is that about two percent of people share this, though he grants the figure may be different today [2]. He names two traits: moving between levels of abstraction without thinking about it, and comfort with non-uniform rules, such as an algorithm whose ten steps each do something different [2]. He thinks Alan Turing had the quality more than anybody: "he was a real hacker" who got his hands dirty [2]. The 650, Knuth points out, was the first computer built in a run of more than a thousand, and IBM leased it to universities on easy terms, so a great many students of his generation learned on one [2].

His advice for young people grows from the same curiosity. Follow what you yourself feel drawn to, not what is fashionable, and find out what that is by experimenting: "Life is a binary search" [1]. And most of all: "the most important thing I learned was how to be interested in almost anything" [1]. Hearing children describe things as boring makes him sad [1].

John Carmack: a TRS-80 and his own name

John Carmack, co-founder of id Software and lead programmer of Commander Keen, Wolfenstein 3D, Doom and Quake, traces his start to a first program on a TRS-80 that printed his own name [3]. From there his path ran through small, fast, constrained work. His early living came from contract work, selling small games to Softdisk, a company that sent subscribers new software every month, and it was a struggle [3]. He ended up moving to Shreveport after meeting John Romero and Lane Roth, the first programmers he had come across who out-knew him [3].

A game every month

At Softdisk's Gamer's Edge division, the team had to put out a fresh game every month [3]. Carmack likens those years to the Beatles sharpening their act before they were famous, with tight deadlines and scarce resources pushing the team to improve fast [3]. Play stayed part of the process. One night, he and Tom Hall rebuilt the opening level of Super Mario Bros. 3 on the PC, named it Dangerous Dave in copyright infringement, and left it for Romero and Jay Wilbur to find; the pair wanted to start a company on the spot [3].

The hacker ethic

Carmack describes Steven Levy's book Hackers as formative [3]. For him the hacker ethic means passing information on, seeing that the game is not zero-sum, and being glad when others succeed; true to that, he pressed id to publish its tools and, in time, the complete source code of its major games [3]. One of Wolfenstein 3D's techniques, compiled scalers, he links back to the precompiled shapes of the Apple II [3].

To young people he says his own route, deep knowledge, does not suit everyone; for those it does suit, there has never been a richer time, and he tells them to accept the grind, build a wide set of tools and stay alert for openings [3]. "You can't know everything but you should convince yourself that you can know anything," he says [3]. He urges people to turn their curiosity even on topics that do not appeal at first, and trusts "the magic of gradient descent," small steps taken locally that add up to spectacular results [3].

Tony Fadell: bubble cards, an Apple II and a basement business

Tony Fadell, who co-created the iPod, the iPhone and the Nest thermostat, fell in love with programming in a fifth-grade summer school class in Grosse Pointe, Michigan [4]. "It was a simple basic programming class, but the basic programming class was not like you might think it was. It was bubble cards," he says [4]. Students marked their program line by line on cards with a number two pencil, and had to make sure the stack was perfectly ordered with no errors [4]. A reader sent the cards off to an IBM computer somewhere else, and the output came back on a Texas Instruments paper terminal; he likens the arrangement to an early form of cloud computing [4].

Earning the machine

The next leap was the Apple II [4]. To pay for one, at roughly $2,500 around 1981, he spent a summer caddying at nearby country clubs, and his grandfather, the man who had taught him to use tools, matched what he earned [4]. He was astonished by Electronic Arts programs such as Pinball Construction Set and Music Construction Set, above all on finding out that a 16-year-old had written the music program in assembly [4]. The lesson he took was that nobody had to be a 40-year-old with a PhD to make something great [4]. He also prized the Apple II for shipping with its schematics and for letting him reach straight into its memory and hardware [4].

From hobby to work

In high school, Fadell joined Quality Computers as its second employee; his friend Joe Gleason had started the mail-order business, which sold Apple II software and accessories, in his parents' basement [4]. Fadell wrote tools that patched programs automatically to work with new memory cards and accelerators, plus a program to optimize hard drives, and he also took support calls and packed boxes [4]. From high school onward, he says, the out-of-box experience was his whole world [4].

His childhood was also lonely. He moved through 12 schools in 15 years, so he was forever the new kid, and he was mocked as the geek with the computer [4]. Bulletin board systems put him in touch with other geeks, and at a time when a long-distance call cost about $2 a minute, he admits he hacked phone codes to call them without paying [4].

For careers, Fadell asks the question he asks every job candidate: "What is it you want to learn?" [4]. To learn, he accepted the most junior job at General Magic and lived just above the poverty line [4]. "The way you find out what you wanna do in life is by figuring out what you don't wanna do," he says [4].

Todd Howard: a Star Trek game in the classroom

Todd Howard, the Bethesda Game Studios director behind the Elder Scrolls series and modern Fallout, grew up with Space Invaders at the pizza place and Pac-Man [5]. The moment he describes as decisive came in fifth grade: "I remember being in fifth grade when the TRS-80 was brought into the classroom when there was a Star Trek game," he says [5]. The class was going to start teaching some rudimentary programming, and when he was asked whether he would like to know how the game was made, he was hooked: "I need to figure out how to make this stuff" [5].

A better clone

Howard taught himself to program, with the goal of writing his own video games [5]. "By sixth, seventh grade, I had written my own much better Star Trek clone," he says, on the Apple II [5]. He thinks the Apple II was the right level of complexity for that age, a machine where you were always learning but could still understand most of the problem [5]. His games drew on things he loved, Raiders of the Lost Ark and Miami Vice among them, and he kept experimenting with new graphical tricks [5]. "I did a lot of art and I did a lot of programming and I was always making games. That was my hobby from the time I was, you know, 10 or 12," he says [5]. Among his first Apple II games was one based on the pen-and-paper role-playing game Traveller, which he never finished [5].

Wizardry, Ultima and Dungeons and Dragons gave him experiences he could not have had any other way [5]. The interest that began with a Star Trek clone came back decades later: Starfield came out of the studio's long affection for space games, including Traveller, Starflight, Star Control 2 and Sundog, a big one in his Apple II days [5].

Knocking on the door

His route into the industry was persistence. After a business degree, he came close to a corporate finance role at Circuit City; when the company rejected him, he settled on making games [5]. Spotting that Bethesda was based in Rockville, Maryland, he turned up at its door on Martin Luther King Day in 1993, still a student, and kept getting in touch afterward [5].

His advice to young people is direct. "Well you have to find something that you love so much that it's never going to feel like a job," he says, and "do not ever underestimate yourself" [5]. "It's going to take hard work but the worst thing that young people do is think they can't accomplish something or they underestimate themselves," he adds [5]. If they love it enough, he believes, they will be resilient through the first failures [5].

Get new summaries by email

The GIST of every new summary in your inbox, daily or weekly. Free, and you can unsubscribe any time.

ThePrimeagen: a linked list, a maze and the hours

Michael Paulson, known online as ThePrimeagen, worked at Netflix for about a decade and then turned to streaming full time, teaching programming [6]. His story of falling in love starts later than the others, in a college data structures class at Montana State University [6]. The instructor put up a node class that held a member of its own type, and in that moment he grasped that a program could describe something without bounds; he felt he could build anything [6].

Recursion was slower to come. For hours he believed he simply was not smart enough, until a lab set him the task of finding a route through a maze; then he saw he had understood recursion the whole time, but every earlier problem he had been given suited a for loop better [6]. Fridman chimes in with his own memories of Lisp, chess engines and cellular automata, in which a few simple local rules produce endless complexity [6].

Repetition before talent

ThePrimeagen's path also shows that a slow start is not a verdict. Pre-calculus beat him twice, and his third attempt earned a C; yet in calculus he completed a two-hour final in 30 minutes and posted the highest score [6]. His method was relentless repetition, working problems until they became automatic: "There's no substitute for the hours," he says [6]. He has no patience for work smarter, not harder, since it presumes you already know what the smart way is; his alternative is work hard, get smart [6].

For complete beginners he suggests JavaScript, since it lets you put things on screen and move them around quickly before adding a backend and a database [6]. He also recommends writing something like an HTTP server yourself when you want real understanding of a concept, and he tells people in their twenties to find the kind of programming that keeps pulling them back each day, without giving up their health, relationships or morals for it [6]. His biggest worry about AI for learners is that people will offload everything, so that "juniors remain juniors forever" [6]. He still wants his own kids to learn to program [6].

Where They Agree, and Where They Don't

Where they agree

The first program was small and personal. Knuth's first program factored numbers and his third played tic-tac-toe [1]; Carmack's printed his name [3]; Fadell's was BASIC on pencil-marked cards [4]; Howard's ambition was a better Star Trek game [5]. None of them describes a first program meant to solve an important problem; Knuth says that question was too philosophical for a freshman [1].

They used whatever machine was at hand. Knuth learned on an IBM 650 because IBM rented them to universities on generous terms [2]. Fadell's cards went to a remote IBM computer, and he bought an Apple II with caddying money matched by his grandfather [4]. Carmack and Howard both met a TRS-80, Howard's in his fifth-grade classroom [3][5], and Howard moved on to the Apple II [5].

Games and play were a doorway. Knuth's third program was a game [1]. Howard was hooked by a Star Trek game and spent his childhood making games [5]. Fadell's mind was blown by Pinball Construction Set and Music Construction Set [4]. Carmack spent his career on games, and one playful night cloning a Mario level helped start id Software [3].

Seeing that ordinary people could do it mattered. Knuth decided he must have a talent because a freshman could write a better manual [1]. Fadell learned that a 16-year-old wrote a famous music tool in assembly, so he did not need to be 40 with a PhD [4]. Howard wanted to know how the game was made and set out to make his own [5].

Bugs and difficulty came early, and they kept going. Knuth had more bugs than lines of code in his first program [1]. ThePrimeagen spent hours thinking he was not smart enough for recursion and failed pre-calculus twice [6]. Howard says resilience through early failure comes from loving the work [5].

Curiosity is the advice they leave. Knuth's most important lesson was how to be interested in almost anything [1]. Carmack urges curiosity even about topics that do not appeal at first [3]. Fadell asks what you want to learn [4]. Howard tells young people to find something they love so much it never feels like a job [5].

Where they don't

Born for it, or made by it? Knuth believes something in his upbringing shaped his brain to resonate with computers, and estimates about two percent of people share this geek mind [2]. He even questions whether any skill can be taught to anyone, pointing out that he cannot picture three-dimensional objects without building a model [2]. ThePrimeagen's story points the other way: he describes himself failing until relentless repetition made the work automatic, and insists there is no substitute for the hours [6]. Carmack sits between them, saying his path of deep knowledge is not for everyone, but that those drawn to it should convince themselves they can know anything [3].

Early or late. Fadell and Howard both began in fifth grade [4][5]. Knuth began as a college freshman [1][2], and ThePrimeagen found his love in a college data structures class [6].

Why It Works

A visible result gives the reward. Knuth wanted to see the lights flashing and watch the machine do in seconds what took so long by hand [1]. Carmack's first program put his own name on the screen [3]. ThePrimeagen recommends JavaScript because beginners can quickly draw and move things [6].

A small problem fits in a young head. Howard says the Apple II let him keep learning while still understanding most of the problem [5]. Knuth's tic-tac-toe player had to fit in 2,000 words of memory, which forced him to use the board's symmetries [1]. Constraint, Carmack adds, is what drove his team's rapid improvement at Softdisk [3].

Debugging teaches the craft. Knuth's first program grew from 20 lines as he found bug after bug, including factors that would not fit on one card [1]. ThePrimeagen's breakthrough on recursion came only when a maze made a for loop useless [6].

Making something you love keeps you going. Howard built games based on Raiders of the Lost Ark, Miami Vice and Star Trek [5]. Fadell's later work grew from his own frustrations and loves, and in high school he was already patching software for real customers [4].

Role models shrink the distance. Fadell's 16-year-old assembly programmer [4], Carmack's first programmers who knew more than he did [3], and Knuth's discovery that he could out-write the manual [1] each turned an expert's world into something they could join.

Sharing spreads the craft. Carmack's hacker ethic of sharing information and releasing source code [3], and ThePrimeagen's decision to make tech welcoming and fun on stream [6], extend the same open door that drew them in.

Where It Applies, and Where It Doesn't

It applies to anyone starting, at any age. Fifth graders [4][5] and college freshmen [1][6] alike describe the moment programming clicked.

It applies best when the first project is personal. A game, a name on a screen, a tic-tac-toe opponent or a better clone of something you already love gave each of them a reason to push through bugs [1][3][5].

It does not promise that talent arrives first. ThePrimeagen failed before he succeeded and credits hours, not ease [6]. Knuth believes some people's minds simply resonate with computers [2].

A playful start is not the whole career. Carmack's improvement came from shipping a game every month under deadlines [3]; Fadell's from working at a mail-order company and then taking the lowest job at General Magic to learn [4]; Howard's from persisting after Circuit City turned him down until Bethesda let him in [5].

The tools change. ThePrimeagen warns that AI could keep learners from building real skill if they offload everything [6]. Knuth learned in decimal machine language from a bad manual [1], Fadell on bubble cards and the Apple II's schematics [4], and Howard on an Apple II that let him understand much of the problem set [5].

What To Do With It

  1. Start with a small program that answers back. Knuth's number factorer [1], Carmack's name on a TRS-80 screen [3] and ThePrimeagen's advice to draw and move things in JavaScript [6] all give an immediate result.

  2. Make a game, or a better copy of one you love. Howard wrote a better Star Trek clone by sixth or seventh grade [5], and Knuth's third program was tic-tac-toe [1].

  3. Use the machine you have. Knuth learned on a rented IBM 650 [2], Fadell on cards sent to a distant computer [4], Howard on a classroom TRS-80 and then an Apple II [5].

  4. Expect bugs and treat them as the lesson. Knuth discovered debugging with his first program, which had more bugs than lines [1].

  5. Show young people that ordinary people build great things. Fadell's discovery that a 16-year-old wrote a famous music program in assembly told him he did not need to be 40 with a PhD [4].

  6. Answer the question how is this made? Howard was hooked the moment someone offered to show him how a game was made [5].

  7. Put in the hours when it does not click. ThePrimeagen failed pre-calculus twice before repetition carried him to the top of his class [6]; work hard, get smart [6].

  8. Turn the hobby into real work. Fadell patched software and answered support calls in high school [4]; Carmack shipped a game a month [3]; Howard kept knocking on Bethesda's door [5].

  9. Ask what you want to learn, and stay curious. Fadell's question for every candidate [4], Knuth's habit of being interested in almost anything [1] and Carmack's advice to convince yourself you can know anything [3] all point the same way.

  10. Love it enough to stay through failure. Find something you love so much it never feels like a job, Howard says, and do not ever underestimate yourself [5].

Sources

  1. Donald Knuth on His First Programs, Literate Programming, Conway and the Giant Component · Lex Fridman Podcast
  2. Donald Knuth on Algorithms, TeX, Faith, and a Lifetime Writing The Art of Computer Programming · Lex Fridman Podcast
  3. John Carmack on Programming, Doom and Quake, VR, Hard Work and the Path to AGI · Lex Fridman Podcast
  4. Tony Fadell on Building the iPod, iPhone and Nest: Painkillers, Opinions and the Why · Lex Fridman Podcast
  5. Todd Howard on Building Skyrim, Fallout and Starfield: Open Worlds, NPCs and the Craft of Game Design · Lex Fridman Podcast
  6. The Primeagen: Programming, AI, ADHD, Productivity, Addiction, and God · Lex Fridman Podcast

Products and resources from this insight

Some of these are affiliate links: if you buy through them, Perfect Summary is paid a commission, at no extra cost to you. As an Amazon Associate, Perfect Summary earns from qualifying purchases.

  • The Art of Computer Programming · Donald Knuth
    Knuth's life work, full of algorithms and hidden jokes
  • Surreal Numbers · Donald Knuth
    Written in one week to teach the joy of mathematical research
  • TeX · Donald Knuth
    The typesetting system he created and still types his books in.
  • Anna Karenina · Tolstoy
    Knuth loves it for the philosophy worked out among its characters.
  • Hackers: Heroes of the Computer Revolution · Steven Levy
    Formative teenage read that shaped his hacker ethic
  • Story · Robert McKee
    Fadell recommends it for storytelling skills useful to designers and engineers.
  • Creation Kit · Bethesda
    Bethesda's free editor for building Skyrim and Fallout mods.
  • Marvel Snap
    Mobile card game Howard called his favorite game of the year.
  • Kinesis Advantage keyboard · Kinesis
    Prime says this ergonomic keyboard saved his career from arm pain
  • Neovim
    His editor of choice, praised for fast keyboard-driven Vim motions

Read next

Report a problem

Something wrong on this page? A mistake, a broken link, audio that won't play? Tell us and we'll fix it.