The eclectic musings of a bitter software engineer.

Let the code speak for itself

Monday February 11, 2008 @ 11:16 AM (PST)

According to Steve Yegge’s latest epic blog rant, I’m a n00b because I like pretty code. But apparently my love for dynamically-typed languages makes me less of a n00b. I’m so confused!

Joking aside, I couldn’t agree more with his main point, which is:

I think we can learn some lessons from code-commenting: don’t try to model everything! You need to step back and let the code speak for itself.

Hear, hear!

Comments

I think your example code doesn't come quite to the level that his "storybook comments" reach... it's informative and compact enough, I think.

I agree with letting code speak for itself. Another reason I alias :to_s :soliloquy. ;-)

Tuesday February 12, 2008 @ 02:23 PM (PST) Posted by Aphyr

I got this from “Code Complete” IIRC, years ago. Write pseudocode, then the real code. The pseudocode becomes high-level comments describing intent. You can speed read through the code when you come back later.

I’ve seen some really bad code (some even with comments) where you had no clue what the authors original intent was.

Tuesday February 19, 2008 @ 11:30 AM (PST) Posted by dar512
Post a comment

Basic XHTML (including links) is allowed, just don't try anything fishy. Your comment will be auto-formatted unless you use your own <p> tags for formatting. You're also welcome to use Textile or Markdown.

Don't type anything here unless you're an evil robot:


And especially don't type anything here:

Copyright © 2002-2008 Ryan Grove. All rights reserved.
Powered by Thoth.