Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Implementation Patterns - Might Answer My LinkedIn Question

 
Michael Finney
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Kent,

I read the book review at http://www.infoq.com/articles/implementations-patterns-br and the review at http://www.coderanch.com/t/93877/Book-Reviews/Implementation-Patterns-Kent-Beck of course.

It strikes me that this may answer the question at LinkedIn I wrote: "How can one learn to read code that other people wrote even faster than they do now?" ( Located at http://www.linkedin.com/answers?viewQuestion=&questionID=142270&askerID=7835122 )

Does this book help answer this question? I think so. In any case, I am grateful for your contributions towards making Computer Science even more humane. I wish you well and look forward to reading the book.

Michael Finney
 
Kent Beck
author
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Michael,

Thank you for the question: How can one learn to read code that other people wrote even faster than they do now? There is an apparent contradiction here: if people write even faster, then they will take less care to communicate with others, so the code will be harder to read (driving up downstream costs, reducing the lifetime of systems, damaging the reputation of our craft, etc.)

The way out of this contradiction was to take a step back and look carefully at the minutiae of how I program. I call this variable "i", but why? What do I intend in this case? How will someone understand "i" when they read it later? Sometimes as a result I would decide "i" was a perfectly good name, sometimes I would find a more communicative name ("i" is a good choice for loop indexes and little else).

Coding this way drove me nuts for a while, because I'd code for 10 seconds and then spend an hour ruminating. However, after a couple of weeks I was revisiting already-examined decisions and the second (third, fourth, ...) time through went much faster than it had before because I had settled my constant internal debate about my overall approach and I could just code. The result was more communicative code written faster.

Regards,

Kent Beck
Three Rivers Institute
 
Michael Finney
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you.

Sincerely,
Michael Finney
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic