读书摘要-程序开发心理学


Chp 2 What makes a good program

    There are indications from other situations that it is not the mean length of estimated time that annoys people but, rather, the standard deviation in the actual time taken.

    Fisher's Fundamental Theorem:

        The better adapted a system is to a particular environment,the less adaptable it is to new environments.

    Asking for efficiency and adaptability in the same program is like asking for a beautiful and modest wife.



Chp 3 How can we study programming

    Forcing programmers to work in isolation is like trying to study the swimming behavior of frogs by cutting off their legs and putting those legs in the water to watch them swim.

    Faith, as Bertrand Russell pointed out, is the belief in something for which there is no evidence.



Chp 4 The Programming Group

    Egoless Programming


    Cognitive Dissonance(认知失调):


        The human eye has an almost infinite capacity for not seeing what it does not want to see.



Chp 5 The Programming Team


    Nothing is more sure to dampen the team enthusiasm and make them feel that they are "mere coders."


 
Chp 6 The Programming Project

    Indeed, the ability to survive its members can be one of the strong points of a team organization.

    In a sense, a programming project or team is like a river which remains the same river even though its water is undergoing constant change.

    If a manager wants to run a stable project, he would do well to follow this simple maxim: If a programmer is indispensable, get rid of him as quickly as possible.

    Information, in this sense, is carried by a report to the extent that it carries surprising news.

    devil's advocate

    If a programming project is going to overcome the psychological pitfalls inherent in progress evaluation, some sort of separation between doing the work and evaluating it is essential.Probably the most serious weakness of the hierarchical organization lies in its inability to achieve this separation



Chp 7 Variation in the programming task


    The better his system does its job, the less its users know of its existence.
   
    And speaking of managers, they can be the most amateur of amateurs when it comes to programming.

    It is an occupational disease of programmers to spend more time on those program parts that present, for some reason, the most intellectual challenge rather than on those that require the most work.

    Each program has an appropriate level of care and sophistication dependent on the uses to which it will be put. Working above that level is, a way, even less professional than working below it

    Just as we could not say in absolute terms what is a "good program," we cannot say what is a "good programmer" or "a good programming manager"


Chp 9  Intelligence ,or problem-solving ability


    Psychological Set(心理定势)

    For certain types of error location activities, psychological set proves a major impediment. Numerous experiments have confirmed that the eye has a tendency to see what it expects to see.

    psychological tests have shown a tendency for initial and final letters to be more significant in making distinctions.

    For one thing, one of the most common reasons for problem difficulty is the overlooking of some factor. Once we have discovered or been told that this factor is significant, working out the solution is trivial.

    Overlooking a factor in a problem is just one special case of assumptions leading us astray.

    People who spend much time debugging other people's programs soon learn not to listen to explanations before tackling the problem,for these explanations tend to put the listener on the same false track of assumptions that prevented the speaker from finding the bug for himself.

    There is no doubt that memory is one of the most important aspects of intelligence for a programmer
   
    Slow and steady may not win the race, but programming is not a race.

    Good programmers are made, not born


Chp 10 Motivation,training and experience


    The first important question about motivation, then, is how motivated is the programmer already. The answer to this question tells whether to look for ways to increase or to decrease the driving force. Overall, it has been my experience that programmers as a group are over-motivated, which is a major reason why so many programming projects fall apart as the pressure grows.

   
    When faced with a problem arising out of some unfamiliar situation,there are two general errors we can make---either we think the problem is harder than it really is or we think it is easier than it really is.   

    The first step in learning how to learn anything is to learn your own assets and liabilities-"know yourself."

    All too often the program that "works" is mistaken for the program that is finished, frequently because of management pressure to "produce."



Chp 11 Programming Language

   
    A programmer would not really be a programmer who did not at some time consider his program as an esthetic object.

    The more pleasing to the eye and mind, the more likely to be correct.

    Beauty is truth, truth beauty.

    Programming languages are attempts to adjust the raw computer to better fit human propensities and limitations

    Humanists often contend that machines tend to dehumanize people by forcing them to have rigid personalities, but really, the contrary is true.

    Because the machines are rigid, the people who use them must——if they are to be successful-supply more than their share of flexibility.

    people don't think the same way that computers do——that's why we use computers.Programming is at best a communication between two alien species

    To make progress in programming languages, we must first give up the holy grail of trying to program in a "real" language, for programming languages can never be the same as human speech.


Chp 12 Some Principle for programming language design

    Uniformity

    Roughly speaking, the principle of uniformity in programming language design might be stated thusly: "The same things should be done in the same way wherever they occur."

    Another important aspect of uniformity is that the same syntactic construction should not mean different things in different contexts.

    Syntactic non-uniformity definitely discourages semantic exploration, for it renders the programmer uncertain about his power with the language.

    The major source of programmer non-uniformity remains the choice of mnemonic names.


    Compactness

    In psychology, this information processing ability of human beings that combines several small units into one large unit, which is just as easy to handle as its individual parts, is called chunking.


    Zipf's law:the most frequently used words tend to be the shortest words.


    Iteration is the most basic of the compression steps possible in programming-----it was known to Lady Lovelace, and without it modern computers would essentially not be possible.


    Locality and Linearity &&
   "Synesthetic" and  "Sequential" memories

    Synesthetic memory is the faculty that enables us to recognize a face, a neighborhood, or the layout of a page in a book-without recourse to specific details.Our synesthetic memory, then, is that part of our memory that enables us to remember things as a whole, all taken in one glance.

    The sequential memories we have seem to be constructed like uni-directionai chains in which each link's appearance triggers the memory of the next.

    In a program, the concept of "locality" corresponds to synesthetic memory, and the concept of "linearity" corresponds to sequential memory.

    Experiments with problem solving in programming-like situations indicate that a series of decisions arranged in a strictly linear sequence is typically easier to handle than a branching or looping sequence


    Tradition and Innovation

    One of the most important ways that a programming language can achieve ease of expression with a minimum of error is by being "natural".

    If the languages are slightly different, then the psychological phenomenon of inhibition will occur. Inhibition comes in two forms——retroactive and proactive.

    Inhibition, therefore, is the price we pay for making two languages similar but not identical in some feature. It might be better, when identity is not possible, to make the two more clearly dissimilar, so that inhibition will have less force.


    Special-purpose,Multi-purpose and Toy language

    Limitation of the universe of discourse is so important for the design of special-purpose languages that it should be the first and most carefully considered step

    Programming is not a branch of mathematics, it is a unique form of communication in which human beings take an active role and machines often a passive one.


Chp 12 Other programming tools

    Program Testing

    It is in the nature of people in our society to believe that things are as they want them to be, so a program testing tool must struggle to show us things as they are.

    A good testing tool might be designed on the principle of destroying confidence-- a confidence that can be restored when necessary.

    Overconfidence by the programmer could be attacked by a system that introduced random errors into the program under test.

    Whether we get this uniformity from our programming language or from our particular conception of the program structure, the effect is the same: For a given amount of testing, we receive a greater amount of confidence in the program. Thus, the best possible testing tool must be based both on a language and a program structure with a high degree of uniformity.

    In a similar way, we can argue that lack of locality and lack of compactness make a program more difficult to test

    Operating Systems

    One of the persistent controversies in programming language design is this: What is the proper place for debugging tools- in the language or in the operating system?

    Documentation

    The value of documentation is only to be realized if the documentation is well done. If it is poorly done, it will be worse than no documentation at all.

    The only hope for producing good documentation is to convince the programmer that it will benefit him to do so.

    "Depth" is one of the most important documentation concepts, especially for large systems.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值