More on this book
Community
Kindle Notes & Highlights
Programming is, among other things, a kind of writing. One way to learn writing is to write, but in all other forms of writing, one also reads. We read examples—both good and bad—to facilitate learning. But how many programmers learn to write programs by reading programs? A few, but not many. And with the advent of terminals, things are getting worse, for the programmer may not even see his own program in a form suitable for reading.
· Flag
Brian Rosenblat
There are many reasons why programs are built the way they are, although we may fail to recognize the multiplicity of reasons because we usually look at code from the outside rather than by reading it. When we do read code, we find that some of it gets written because of machine limitations, some because of language limitations, some because of programmer limitations, some because of historical accidents, and some because of specifications—both essential and inessential.
many ways code gets to be the way it is, frequently not the original programmer's ideal approach...though it may appear that way years later
If this observation holds true for programming, then any studies of the effect of certain programming practices should measure the effect on variability in production time—not
first, correctness, then minimize variance in dev time of subsequent projects, then minimize dev time of subsequent work, then efficiency
In his mathematical studies of genetic systems, R. A. Fisher derived a law that has often been called Fisher's Fundamental Theorem, a very significant name in view of the importance of Fisher's many other theorems. Fisher's Fundamental Theorem states—in terms appropriate to the present context—that the better adapted a system is to a particular environment, the less adaptable it is to new environments. By stretching our imagination a bit, we can see how this might apply to computer programs as well as to snails, fruit flies, and tortoises.
adaptability and efficiency often direct tradeoffs with one another. genetic algorithms research supports this hypothesis.
The passing years have validated the importance of variance in managing for quality. We are doing much better in the mean, but the variance remains, or has even grown, and customers are still dissatisfied.
mean dev time down for a given task, but variance the same or even worse. more frustrating to management than 25 years ago.
As a rough rule, three programmers organized into a team can do only twice the work of a single programmer of the same ability—because of time spent on coordination problems. Moreover, three groups of three programmers can do only twice the work of a single group—or four times the work of a single programmer—for the same reason. Thus, an eight-month project for a single programmer might be done in four months if we are willing to put three people to work on it or in two months if we are willing to allocate nine.
Back when I first wrote this book, I predicted "...attention to the subject of personality should make substantial contributions to increased programmer performance—whether that attention is paid by a psychological researcher, a manager, or the programmer himself." Even though I knew next to nothing about personality at the time, this turned out to be one of my most successful predictions.
As a matter of good practice, the test program should be constructed before the "fix" is made to the production program. In the first place, there will be an all too human tendency to forget about the problem once the production program is working correctly, so we must impose a little discipline on ourselves. Possibly more important, however, is the chance that by the mere act of constructing the test case we shall discover the problem.
In another study—one designed to compare the efficacy of two different programming languages—several of the participants complained that the turnaround was too good! They had been given special priority in order to facilitate the study, with the result that the measured average turnaround was 31 minutes from the time the job was passed through the window until the time the output was placed on the output table. The complaint was that if turnaround had been a little poorer, they would have spent a bit more time in making corrections and in perusing their output for additional errors. In a way,
...more
on duration/delay in test run and effect on behavior: too fast and we get careless, don't scrutinize code as much. too long and we go crazy (or don't test enough)
The machine is, and always will be, the court of last resort on documentation disputes.

