SlideShare ist ein Scribd-Unternehmen logo
1 von 10
Downloaden Sie, um offline zu lesen
⼀一 番 の   
プ ロ グ ラ ミ ン グ ア ド バ イ ス
@ S M A G C H
1年くらい前、Rob  Pikeさん
の書いたWeb上の記事を
読みました。
H T T P : / / W W W. I N F O R M I T. C O M / A RT I C L E S / A RT I C L E . A S P X ? P = 1 9 4 1 2 0 6
R O B    P I K E っ て 誰
Job Experience:
I worked at Bell Labs for many years. I was in the
Computing Sciences Research Center, the (surprisingly
small) lab that created Unix, although I was not there
until after the Seventh Edition was released. Since 2002
I've been at Google, working on various pieces of
infrastructure and infrastructure infrastructure.
要 約 す る と 、   
ベ ル 研 究 所 で ⻑⾧長 く 働 い て い て 、   
そ の 後 は グ ー グ ル で 働 い て い る 。
Rob  さん(中央)Ken  Thompsonさん(右)
R O B    P I K E っ て 誰
Most Notable Achievement:
I'm probably best known for my books with Brian
Kernighan, The Unix Programming Environment (still in
print almost 30 years on!) and The Practice of
Programming. The most widespread thing I've done was
develop UTF-8 with Ken Thompson. But I've also done
significant work in computer graphics, operating
systems, software tools, and most recently helped
develop the Go programming language.
Advice:
A year or two after I'd joined the Labs, I was pair
programming with Ken Thompson on an on-the-fly
compiler for a little interactive graphics language
designed by Gerard Holzmann. I was the faster typist, so I
was at the keyboard and Ken was standing behind me as
we programmed. We were working fast, and things
broke, often visibly—it was a graphics language, after all.
When something went wrong, I'd reflexively start to dig
in to the problem, examining stack traces, sticking in
print statements, invoking a debugger, and so on. But
Ken would just stand and think, ignoring me and the
code we'd just written.
P A I R    P R O G R A M M I N G
略して、ペアプロ
ペ ア プ ロ の 様 ⼦子
After a while I noticed a pattern: Ken would often
understand the problem before I would, and would
suddenly announce, "I know what's wrong." He was
usually correct. I realized that Ken was building a mental
model of the code and when something broke it was an
error in the model. By thinking about *how* that problem
could happen, he'd intuit where the model was wrong or
where our code must not be satisfying the model.
Ken taught me that thinking before debugging is
extremely important. If you dive into the bug, you tend to
fix the local issue in the code, but if you think about the
bug first, how the bug came to be, you often find and
correct a higher-level problem in the code that will
improve the design and prevent further bugs.
I recognize this is largely a matter of style. Some people
insist on line-by-line tool-driven debugging for
everything. But I now believe that thinking—without
looking at the code—is the best debugging tool of all,
because it leads to better software.

Weitere ähnliche Inhalte

Andere mochten auch

Sharepoint Server 2010 Product Comparison
Sharepoint Server 2010 Product ComparisonSharepoint Server 2010 Product Comparison
Sharepoint Server 2010 Product ComparisonEvren Ayan
 
International Open Data Day 2014 in 旭川のちょっとした解説と事例紹介
International Open Data Day 2014 in 旭川のちょっとした解説と事例紹介International Open Data Day 2014 in 旭川のちょっとした解説と事例紹介
International Open Data Day 2014 in 旭川のちょっとした解説と事例紹介Tomoya Shimaguchi
 
Sharepoint 2010 Sandboxed Çözümler
Sharepoint 2010 Sandboxed ÇözümlerSharepoint 2010 Sandboxed Çözümler
Sharepoint 2010 Sandboxed ÇözümlerEvren Ayan
 
Silverlight ve Sharepoint 2010
Silverlight ve Sharepoint 2010Silverlight ve Sharepoint 2010
Silverlight ve Sharepoint 2010Evren Ayan
 
Webinar Slides: SharePoint als Drehscheibe fuer ihr Unternehmenswissen
Webinar Slides: SharePoint als Drehscheibe fuer ihr UnternehmenswissenWebinar Slides: SharePoint als Drehscheibe fuer ihr Unternehmenswissen
Webinar Slides: SharePoint als Drehscheibe fuer ihr UnternehmenswissenB-S-S Business Software Solutions GmbH
 
Sharepoint Server 2010 Genel Bilgilendirme
Sharepoint Server 2010 Genel BilgilendirmeSharepoint Server 2010 Genel Bilgilendirme
Sharepoint Server 2010 Genel BilgilendirmeEvren Ayan
 

Andere mochten auch (8)

Technology Entrepreneurship
Technology EntrepreneurshipTechnology Entrepreneurship
Technology Entrepreneurship
 
Print i x yes
Print i x yesPrint i x yes
Print i x yes
 
Sharepoint Server 2010 Product Comparison
Sharepoint Server 2010 Product ComparisonSharepoint Server 2010 Product Comparison
Sharepoint Server 2010 Product Comparison
 
International Open Data Day 2014 in 旭川のちょっとした解説と事例紹介
International Open Data Day 2014 in 旭川のちょっとした解説と事例紹介International Open Data Day 2014 in 旭川のちょっとした解説と事例紹介
International Open Data Day 2014 in 旭川のちょっとした解説と事例紹介
 
Sharepoint 2010 Sandboxed Çözümler
Sharepoint 2010 Sandboxed ÇözümlerSharepoint 2010 Sandboxed Çözümler
Sharepoint 2010 Sandboxed Çözümler
 
Silverlight ve Sharepoint 2010
Silverlight ve Sharepoint 2010Silverlight ve Sharepoint 2010
Silverlight ve Sharepoint 2010
 
Webinar Slides: SharePoint als Drehscheibe fuer ihr Unternehmenswissen
Webinar Slides: SharePoint als Drehscheibe fuer ihr UnternehmenswissenWebinar Slides: SharePoint als Drehscheibe fuer ihr Unternehmenswissen
Webinar Slides: SharePoint als Drehscheibe fuer ihr Unternehmenswissen
 
Sharepoint Server 2010 Genel Bilgilendirme
Sharepoint Server 2010 Genel BilgilendirmeSharepoint Server 2010 Genel Bilgilendirme
Sharepoint Server 2010 Genel Bilgilendirme
 

Ähnlich wie Best

Culture And Aesthetic Revisited
Culture And Aesthetic RevisitedCulture And Aesthetic Revisited
Culture And Aesthetic RevisitedAdam Keys
 
Why I Love Python
Why I Love PythonWhy I Love Python
Why I Love Pythondidip
 
The year was 1967
The year was 1967The year was 1967
The year was 1967John Thomas
 
On Readability of Code
On Readability of CodeOn Readability of Code
On Readability of CodeArun Saha
 
This presentation was generated by GPT-3
This presentation was generated by GPT-3This presentation was generated by GPT-3
This presentation was generated by GPT-3Bemmu Sepponen
 
Documentation for developers
Documentation for developersDocumentation for developers
Documentation for developersMichael Marotta
 
Reverse Engineering in Linux - The tools showcase
Reverse Engineering in Linux - The tools showcaseReverse Engineering in Linux - The tools showcase
Reverse Engineering in Linux - The tools showcaseLevis Nickaster
 
What is a "programmer"?
What is a "programmer"?What is a "programmer"?
What is a "programmer"?Jeff Crockett
 
Software Debugging for High-altitude Balloons
Software Debugging for High-altitude BalloonsSoftware Debugging for High-altitude Balloons
Software Debugging for High-altitude Balloonsjgrahamc
 
The Life & Journey of a Professional Open-Source Developer
The Life & Journey of a Professional Open-Source DeveloperThe Life & Journey of a Professional Open-Source Developer
The Life & Journey of a Professional Open-Source Developerbobmcwhirter
 
Better problem solving through scripting: How to think through your #eprdctn ...
Better problem solving through scripting: How to think through your #eprdctn ...Better problem solving through scripting: How to think through your #eprdctn ...
Better problem solving through scripting: How to think through your #eprdctn ...BookNet Canada
 
A Cup of Tea With Michael Larsen
A Cup of Tea With Michael LarsenA Cup of Tea With Michael Larsen
A Cup of Tea With Michael LarsenMichael Larsen
 
Building an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learnedBuilding an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learnedWojciech Koszek
 
My Linux Job: 21 Linux Pros Tell Us What They Do
My Linux Job: 21 Linux Pros Tell Us What They DoMy Linux Job: 21 Linux Pros Tell Us What They Do
My Linux Job: 21 Linux Pros Tell Us What They DoLibby Clark
 
C# .NET - Um overview da linguagem
C# .NET - Um overview da linguagem C# .NET - Um overview da linguagem
C# .NET - Um overview da linguagem Claudson Oliveira
 
There Are Fates Worse Than Death: The OPW2013 Keynote
There Are Fates Worse Than Death: The OPW2013 KeynoteThere Are Fates Worse Than Death: The OPW2013 Keynote
There Are Fates Worse Than Death: The OPW2013 KeynoteJohn Anderson
 
Trial engineering moving parts
Trial engineering moving partsTrial engineering moving parts
Trial engineering moving partsSV.CO
 

Ähnlich wie Best (20)

Culture And Aesthetic Revisited
Culture And Aesthetic RevisitedCulture And Aesthetic Revisited
Culture And Aesthetic Revisited
 
Why I Love Python
Why I Love PythonWhy I Love Python
Why I Love Python
 
Brucewang
BrucewangBrucewang
Brucewang
 
The year was 1967
The year was 1967The year was 1967
The year was 1967
 
On Readability of Code
On Readability of CodeOn Readability of Code
On Readability of Code
 
This presentation was generated by GPT-3
This presentation was generated by GPT-3This presentation was generated by GPT-3
This presentation was generated by GPT-3
 
Documentation for developers
Documentation for developersDocumentation for developers
Documentation for developers
 
Software development
Software developmentSoftware development
Software development
 
Reverse Engineering in Linux - The tools showcase
Reverse Engineering in Linux - The tools showcaseReverse Engineering in Linux - The tools showcase
Reverse Engineering in Linux - The tools showcase
 
What is a "programmer"?
What is a "programmer"?What is a "programmer"?
What is a "programmer"?
 
Software Debugging for High-altitude Balloons
Software Debugging for High-altitude BalloonsSoftware Debugging for High-altitude Balloons
Software Debugging for High-altitude Balloons
 
The Life & Journey of a Professional Open-Source Developer
The Life & Journey of a Professional Open-Source DeveloperThe Life & Journey of a Professional Open-Source Developer
The Life & Journey of a Professional Open-Source Developer
 
Better problem solving through scripting: How to think through your #eprdctn ...
Better problem solving through scripting: How to think through your #eprdctn ...Better problem solving through scripting: How to think through your #eprdctn ...
Better problem solving through scripting: How to think through your #eprdctn ...
 
A Cup of Tea With Michael Larsen
A Cup of Tea With Michael LarsenA Cup of Tea With Michael Larsen
A Cup of Tea With Michael Larsen
 
Building an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learnedBuilding an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learned
 
My Linux Job: 21 Linux Pros Tell Us What They Do
My Linux Job: 21 Linux Pros Tell Us What They DoMy Linux Job: 21 Linux Pros Tell Us What They Do
My Linux Job: 21 Linux Pros Tell Us What They Do
 
C# .NET - Um overview da linguagem
C# .NET - Um overview da linguagem C# .NET - Um overview da linguagem
C# .NET - Um overview da linguagem
 
Being Observable, Jon Udell
Being Observable, Jon UdellBeing Observable, Jon Udell
Being Observable, Jon Udell
 
There Are Fates Worse Than Death: The OPW2013 Keynote
There Are Fates Worse Than Death: The OPW2013 KeynoteThere Are Fates Worse Than Death: The OPW2013 Keynote
There Are Fates Worse Than Death: The OPW2013 Keynote
 
Trial engineering moving parts
Trial engineering moving partsTrial engineering moving parts
Trial engineering moving parts
 

Kürzlich hochgeladen

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 

Kürzlich hochgeladen (20)

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 

Best

  • 1. ⼀一 番 の   プ ロ グ ラ ミ ン グ ア ド バ イ ス @ S M A G C H
  • 2. 1年くらい前、Rob  Pikeさん の書いたWeb上の記事を 読みました。 H T T P : / / W W W. I N F O R M I T. C O M / A RT I C L E S / A RT I C L E . A S P X ? P = 1 9 4 1 2 0 6
  • 3. R O B   P I K E っ て 誰 Job Experience: I worked at Bell Labs for many years. I was in the Computing Sciences Research Center, the (surprisingly small) lab that created Unix, although I was not there until after the Seventh Edition was released. Since 2002 I've been at Google, working on various pieces of infrastructure and infrastructure infrastructure.
  • 4. 要 約 す る と 、   ベ ル 研 究 所 で ⻑⾧長 く 働 い て い て 、   そ の 後 は グ ー グ ル で 働 い て い る 。 Rob  さん(中央)Ken  Thompsonさん(右)
  • 5. R O B   P I K E っ て 誰 Most Notable Achievement: I'm probably best known for my books with Brian Kernighan, The Unix Programming Environment (still in print almost 30 years on!) and The Practice of Programming. The most widespread thing I've done was develop UTF-8 with Ken Thompson. But I've also done significant work in computer graphics, operating systems, software tools, and most recently helped develop the Go programming language.
  • 6. Advice: A year or two after I'd joined the Labs, I was pair programming with Ken Thompson on an on-the-fly compiler for a little interactive graphics language designed by Gerard Holzmann. I was the faster typist, so I was at the keyboard and Ken was standing behind me as we programmed. We were working fast, and things broke, often visibly—it was a graphics language, after all. When something went wrong, I'd reflexively start to dig in to the problem, examining stack traces, sticking in print statements, invoking a debugger, and so on. But Ken would just stand and think, ignoring me and the code we'd just written.
  • 7. P A I R   P R O G R A M M I N G 略して、ペアプロ
  • 8. ペ ア プ ロ の 様 ⼦子
  • 9. After a while I noticed a pattern: Ken would often understand the problem before I would, and would suddenly announce, "I know what's wrong." He was usually correct. I realized that Ken was building a mental model of the code and when something broke it was an error in the model. By thinking about *how* that problem could happen, he'd intuit where the model was wrong or where our code must not be satisfying the model.
  • 10. Ken taught me that thinking before debugging is extremely important. If you dive into the bug, you tend to fix the local issue in the code, but if you think about the bug first, how the bug came to be, you often find and correct a higher-level problem in the code that will improve the design and prevent further bugs. I recognize this is largely a matter of style. Some people insist on line-by-line tool-driven debugging for everything. But I now believe that thinking—without looking at the code—is the best debugging tool of all, because it leads to better software.