Although greater emphasis is placed on the task of computer program composition, debugging and modification often consume more time and expense in production environments. Debugging is the task of locating syntactic and semantic errors in programs and correcting these errors. Modification is the change of a working program to perform alternate tasks. The factors and techniques which facilitate debugging and modification are poorly understood, but are subject to experimental investigation. Controlled experiments can be performed by presenting two groups of subjects with two forms of a program or different programming aids and requiring the same task. For example, in one study we presented an 81 line FORTRAN program containing three bugs to distinct groups of subjects. One of the groups received a detailed flowchart, but our results indicated that this aid did not facilitate the debugging procedure. Similar negative results were obtained for a modification task. In other experiments, comments and meaningful variable names were useful in debugging and modularity facilitated modification. Other potentially influential factors, which are subject to experimental study, include indentation rules, type of control structures, data structure complexity and program design. These and other human factor experiments in programming have led to a cognitive model of programmer behavior which distinguishes between the hierarchically structured, meaningfully acquired semantic knowledge and the rotely memorized syntactic knowledge. Errors can be classed into syntactic mistakes which are relatively easy to locate and correct and two forms of semantic mistakes. Semantic errors occur while constructing an internal semantic structure to a representation in the syntax of a programming language. Modification is interpreted as the acquisition of an internal semantic structure by studying a program, followed by modification of this structure and revision of the code.