13-Coding-Standards

13-Coding-Standards - CS106X Winter 2008 Handout 13 January...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CS106X Handout 13 Winter 2008 January 18, 2008 Coding Standards Handout written by Nick Parlante. Quite possibly the funniest handout ever. Landmarks in Coding Quality Let's honestly review the conceptual landmarks most programmers use when thinking about how good their code is: Publication Quality Code suitable for publication in an article or textbook. Well-chosen algorithms and data structures, thoughtful overview and inline comments, perfect formatting, all the identifiers make sense, no coding hacks of even the slightest vulgarity. Something you'd be proud for anyone else to see—you'd include it with your Stanford application. By the way, no one writes code like this by accident. It has to be a deliberate goal from the beginning. Peer-Review Quality Some companies have "peer code review" meetings every once in a while where a programmer hands out printouts of whatever they've been working on and walk all their peers through it to give the gist of what's going on. Most programmers dread peer review because much of the code they whip out from day to day is a bit embarrassing. Companies like it because it scares the programmers into avoiding shamefully bad code. So peer review quality code tends to be mostly pretty good, but with occasional lapses that can be rationalized to an understanding audience- "I was going to decompose that, but I didn't have time." "oh yes, ha ha, on page 8 there are some utterly awful looking functions I whipped out to fix that VM leaking bug we had in May. I don't think it will port to the HP anyway. I think we're going to make the summer intern re-write it." "I'm going to go through and write documentation for that module and fix the variable names just as soon as I finish this current project I'm
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/18/2008 for the course CS 106X taught by Professor Cain,g during the Winter '08 term at Stanford.

Page1 / 3

13-Coding-Standards - CS106X Winter 2008 Handout 13 January...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online