Code Complete (book)

You,architecturebookproductivity

One of the key idea is summarized in:

Measure twice, cut once

Suggests reallocation of resources to prevent defects cheaply instead of fixing expensively. Note: sometimes preventing defects is costly and fixing cheap

About pair programming, he matches notes about (mob)[./mob.md]:

Inspections (can be applied to code reviews):

On testing:

On debugging:

defects as opportunities => helps learn the code, product, how to fix, mistakes made...

Inneffective approaches:

Scientific method:

Self documenting code: comment only informations that cannot be expressed by the code itself. ex:

// computes the square root using Newton-Raphson method
const squareRoot = (n) => {
  // complex code implementation here
}

Another example is commenting on performance tricks that are not obvious and might get simplified if not hinted.

CC BY-NC 4.0 2024 © Shu Ding.