Skip to main content Accessibility help
×
Hostname: page-component-8448b6f56d-jr42d Total loading time: 0 Render date: 2024-04-25T03:50:22.658Z Has data issue: false hasContentIssue false

36 - CLEAN CODE: PIPE DREAM OR STATE OF MIND?

Smalltalk Report, June, 1995

Published online by Cambridge University Press:  04 August 2010

Kent Beck
Affiliation:
First Class Software, Inc.
Get access

Summary

As with the previous column, this column has a strong confessional flavor. I like using my mistakes for columns, because I'm sure there is something to learn there.

The meat of the column is good stuff—refactoring and adding stuff becomes easy. I can't imagine how many times and ways I have said this in the last ten years. This is one of my better attempts, because it doesn't just say it, it shows it. (See “Make it Run, Make it Right” for another example.)

When I started writing this, I felt like I was getting preachy. Maybe that's what's so good about demonstrating from my mistakes—I can't be preaching if I'm explaining how I screwed up.

The personal material up front shows that I was aware that my attention was wandering. I'm glad I kept it together enough to say something important here.

Is it my imagination, or are these columns getting harder to write? I think I know exactly what I want to say, but I've started writing three different times without getting anywhere. Maybe this third time will work.

Simply put, here's what I want to say—the best programming style for Smalltalk is to have lots of little methods, and lots of little objects.

That's a pretty broad statement, broad enough that it can't possibly be true in all cases. What are the tradeoffs, the issues that affect programming style?

Type
Chapter
Information
Kent Beck's Guide to Better Smalltalk
A Sorted Collection
, pp. 345 - 354
Publisher: Cambridge University Press
Print publication year: 1997

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

Available formats
×