A Code Level Based Programmer Assessment and Selection Criterion Using Metric Tools

this study presents a code level measurement of computer programs developed by computer programmers using a Chidamber and Kemerer Java metric (CKJM) tool and the Myers Briggs Type Indicator (MBTI) tool. The identification of potential computer programmers using personality trait factors does not seem to be the best approach without a code level measurement of the quality of programs. Hence the need to evolve a metric tool which measures both personality traits of programmers and code level quality of programs developed by programmers. This is the focus of this study. In this experiment, a set of Java based programming tasks were given to 33 student programmers who could confidently use the Java programming language. The codes developed by these students were analyzed for quality using a CKJM tool. Cohesion, coupling and number of public methods (NPM) metrics were used in the study. The choice of these three metrics from the CKJM suite was because they are useful in measuring well designed codes. By examining the cohesion values of classes, high cohesion ranges [0,1] and low coupling imply well designed code. Also number of methods (NPM) in a well-designed class is always less than 5 when cohesion range is [0,1]. Results from this study show that 19 of the 33 programmers developed good and cohesive programs while 14 did not. Further analysis revealed the personality traits of programmers and the number of good programs written by them. Programmers with Introverted Sensing Thinking Judging (ISTJ) traits produced the highest number of good programs, followed by Introverted iNtuitive Thinking Perceiving (INTP), Introverted iNtuitive Feelingng Perceiving (INTP), and Extroverted Sensing Thinking Judging (ESTJ) Keywords—computer programs; program quality; class cohesion; programmers; personality traits


INTRODUCTION
Programming is a challenging task, which requires appropriate skills as well as appropriate temperamental suitability.Among the skills often demonstrated by professional and successful programmers are logical and analytical thinking, problem understanding and interpretation, detailed understanding of a programming language's syntax and a good communication ability.Capretz and Ahmed [1] identified some of the skills required in computer programming to include strong analytical and problem solving skills, communication skills, interpersonal skills, ability to work independently, active listening skills, innovative skills, organizational skills, openness and adaptability skills, fast learning skills and team playing skills.Apart from possessing these skills, success as a computer programmer may also be influenced by personality types such as Extroversion (E), Introversion (I), Sensing (S), iNtuition(N), Thinking(T), Feeling(F), Judging(J) and Perceiving(P) (Okike and Olanrewaju [2]; Capretz and Ahmed [1]; Capretz [5]; Da Cunha and Greathead [3]; Tueley and Bieman [6]; Bentley [4]).
Furthermore, the reliability of acomputer software depends on the code level quality of the program which indeed results from programmers coding skill.For this reason, it becomes very necessary to evolve code level measurement of program quality and individual programmer personality traits in the selection process of career computer programmers.Hence matching coding skill with personality traits will enable the identification and selection of good computer programmers.This is the motivation for this paper.

A. Problem Statement
Programmers are widely perceived as Introverts, Sensors and Thinkers (Capretz and Ahmed [1], Sensing and iNtuitionist, (Da Cunha and Greathead [3], Introverts, iNtuitionists, Thinkers and Judges (INTJ) (Tieger,[20] ).These assessments are purely based on personality traits factors without recourse to code level quality of programs or resulting software.The present study seeks to bridge the gap between programmer personality traits and the quality of programs written by programmers by making use of a two level metrics based on both personality traits and code level quality to assess and to select competent programmers who create quality software programs.The Quality of a Program (QoP) in this study is measured in terms of the Cohesiveness of the Program module (CoPm), Coupling Between Object classes (CBO) and Number of Public Methods (NPM).In software development, high cohesion (range [0,1]) and low coupling imply good design.In addition, number of methods (NPM) in a well-designed class is always less than 5 when cohesion is high, range[0,1] and coupling is low [17].The cohesion degree of a component is high if it implements a single logical function, and cohesive component tend to have high maintainability and reusability ((Okike [7], Badri [8], Bieman and Kang [9])

B. Study Ovjectives
The main objective of this study is to create a two level metrics which is based on programmers personality traits and the code level quality of program modules.This instrument should be useful in selecting programmers who create quality programs.Specifically, the objectives of this study are to: www.ijacsa.thesai.org investigate the personality traits of skilled programmers using Myers Briggs type indicator (MBTI)  investigate the code level quality of programs written by programmers using Chidamber and Kemerer Java Metric tool (CKJM)  suggest the personality type indicator(s) of competent programmers.

C. Research Questions
The following research questions are investigated in this study.
 What are the personality traits of good computer programmers?
 Which personality traits designed quality (cohesive) programs?

D. Research Hypotheses
The following hypotheses are tested in this study:  H1: There is significant correlation between personality traits and code quality H0: There is no correlation between personality traits and code quality The rest of this paper is divided into 7 sections.Section 2 is a presentation of the conceptual model of the study.Section 3 is the literature review.Section 4 explains the research methodology.Section 5 presents the result of this study with appropriate discussion.Section 6 is the conclusion while section 7 is the list of references

II. CONCEPTUAL FRAMEWORK
The framework for this study is based on Capretz and Ahmed [1] model : Mapping programmers and skills to personality type as shown in figure 1 below and Okike [7] Metric calculation Process using Chidamber and Kemerer metric tool as shown in figure 2. Arising from these two models is a hybrid adapted from the two to achieve the objectives stated in section 1.3.

III. LITERATURE REVIEW
Code level measurement of program quality have been studied using class cohesion , coupling and other metrics from the Chidamber and Kemerer metric suite [7,8,9,16,17,19].High cohesion, range [0,1] and low coupling imply good design.The term cohesion is defined as the "intramodular functional relatedness" in software [22].Chidamber and Kemerer [19] first defined a cohesion measure for objected oriented software-the Lack of cohesion in Methods (LCOM) metric.Okike [7] studied class cohesion measurement in object oriented systems using Chidamber and Kemerer Metric suite and Java as case study.The study involved 6 different types of Java based industrial systems with over 3000 classes.The result of the study showed that the Lack of Cohesion in Methods metric (LCOM) defined by Chidamber and Kemerer was suitable in measuring class cohesion in the studied systems.In addition the study showed that the LCOM metric satisfy measurement theory conditions, and although the metric is prone to outliers; a new metric was defined which normalizes the LCOM metric such that outliers were eliminated.Furthermore, a pedagogical evaluation and discussion about the Lack of Cohesion in Methods metric using field experiments is presented in Okike [16], while a normalized Lack of Cohesion in Methods metric is presented in Okike [17].In both studies, the usefulness of LCOM metric alongside Coupling between Object (CBO) and Number of Public Methods (NPM) in the evaluation of well-designed classes were clearly established .Hence by measuring cohesion using the LCOM, CBO and NPM metrics in this study, well designed codes by individual programmers were identified Furthermore, the Myers Briggs Type Indicator(MBTI) has been widely used by researchers to measure the personality traits of individuals in various capacities and dimensions.Okike and Olanrewaju [2] investigated problem solving and decision making skills of 30 student programmers using the MBTI tool.A decision problem representing a programming task was given to the students.The students were expected to produce computer programs which solves the given problem.The MBTI, an automated personality traits questionnaire based tool was administered on the students.The responses from students were automatically analyzed in order to identify the personality traits of each student.The program code or codes written by each students was also analyzed using a Chidamber & Kemerer Java Metric (CKJM) tool, and the results matched with their corresponding MBTI to determine the problem solving and decision making skill of each programmer by looking at the quality of the resulting program code.The study concluded that The result of this study indicates that among the various personality traits, the Introverted Sensing Thinking Judging (ISTJ) appear to have the best problem solving and decision making skill followed by Introverted Intuitive Feeling Judging (INFJ) compared to other personality traits.Okike [10] investigated the role of personality traits in students' achievements in Computing Science.Results from the study suggests that the strongest motivator for a choice of career in the computing sciences is the desire to become a computing professional rather a students inherent temperamental ability (personality traits).Equally, students' achievements in the computing sciences do not depend only on personality traits, motivation for choice of course of study, and reading habits but also on the use of Internet based sources more going to the university library to use book materials available in all areas.
Okike [11] studied the bipolar factor and systems analysis skills of 60 students analysts at the University of Botswana.The study evolved a new approach to construct a type matrix from a personality type frequency matrix.This approach was used to select the best systems analyst based on personality traits factors.
Bentley [4] reviewed personality traits and programmer characteristics and presented some of the traits that can be indicators of success or failure in computer programming.Weinberg [13] explored the psychology of computer programming and noted that there could be variations in individual productivity due to personality type factor.Capretz [5] investigated personality types of software engineers based on the combined Jung and Myers Briggs bipolar.The study suggested that they were more (Introvert Sensing Thinking Judging (ISTJ) software engineers than other types in his data.Chung [15] studied the cognitive abilities in computer programming using 523 form four secondary school students in Hong Kong.Test administered to the students included mathematics, space, symbols, hidden figures and programming ability.Results of this study suggested that performance in mathematics and spatial tests were significant predictors in programming ability.Similarly, Bishop-Clark and Wheeler [14] investigated the Myers-Briggs personality type and its relationship to computer programming.Using 114 students, the study sought to know if college students with certain personality types performed better than others in an introductory programming course.In this study, results suggested that sensing students performed significantly better than intuition students in programming assignments while judging students performed better than perception students on computer programs although the results were not significant statistically.

IV. STUDY METHODOLOGY
A set of Java based programming task was given to some 33 student programmers who could use the Java programming language confidently.A Chidamber and Kemerer Java metric tool (CKJM) [18] was used to analyse the quality of program codes written by each participating programmer.In addition www.ijacsa.thesai.org the Myers Briggs Type indicator (MBTI) was used to measure the personality traits of each participating programmer.In this way, a two level metrics based approach was evolved namely: Level 1: Human metric tool (MBTI) Level 2: Code level metric tool (CJKM) The Human metric tool is based on the Myers Briggs Type Indicator tool.Each participating programmer completed and submitted the automated MBTI questionnaire and was subsequently scored by the tool as to the appropriate personality trait.
At level 2, the programmers were given the same programming task, and each of them developed appropriate Java codes.The codes were evaluated automatically by applying the CKJM tool.The CKJM tool calculates for each program class the following six metrics when used in any experiment [18]  WMC: Weighted methods per class For the purpose of this paper, the LCOM, CBO and NPM metrics are mainly considered in the assessment of code quality .This follows from earlier research as shown in [7,16,17].High cohesion range [0,1] and coupling implies good design.Also the number of methods n in a welldesigned class should be less than 5 [17:pg22].Using the MBTI tool, the personality characteristics of the programmers were established as shown in column 2, while the corresponding program quality characteristics of program codes written by the programmers are shown from columns 3-11 as measured by the Chidamber and Kemerer Java Metric (CKJM) tool [18].A comprehensive discussion about the Chidamber and Kemerer suite of metrics is presented in [19].Furthermore, a pedagogical evaluation and discussion about the usefulness of Chidamber and Kemerer's metric suite, particularly the Lack of Cohesion in Methods (LCOM) metric is presented in [7,16,17]  Details about each of this metric have been discussed in [7,18,19].

A. Bipolar Factor Characteristics s of Candidates
Table 2 below presents the personality frequency matrix of the participating programmers [11].From this table, the dominant personality traits are Thinking (T) =21, Judging (J) = 21, Sensing(S) = 20, and iNtuition (N) = 19.Arising from Table 2, a type matrix table is presented in Table 3. Diagonals of type matrix tables must sum up to the total number of participants [11]   Considering the bipolar factors -Extroversion (E ), Introversion (I), Sensing (S), iNtuition (N), Thinking (T), Feeling (F), Judging (J), and Perceiving (P), the number of well designed program codes are shown in Table 5 below Sensing (S) 10 Intuition (N) 8 Thinking (T) 10 Feeling (F) 8 Judging (J) 12 Perceiving (P) 6 Table 5 also provides answers to research questions (bullets 1 and 2) of this study.From this study, introverts appear not have better code design ability than extroverts.In fact, extroverts could be better programmers than introvert (hypothesis bullet 1).Sensors could design better codes than iNtuitives (hypothesis bullet 2).Thinkers could design better codes than feelers (hypothesis bullet 3).Judges could be better code designers than perceivers (hypothesis bullet 4).The study suggests that there is significant relationship between personality traits and code quality (hypothesis bullet 5).This result is also supported in [2] VII.CONCLUSION In this study, a model for measuring both the personality traits of individual programmers and the quality of programs developed these programmers at two levels has been presented.The model could be used when selecting competent computer programmers since the quality of well designed computer program can be measured by the level of cohesiveness of the program module or class [7,8,9,16,18,19].In addition, good computer programmers appear to have strong personality traits such as judging, extroversion, sensing, thinking, intuition, feeling, and could have introversion and perceiving abilities.This conclusion supports previous studies a presented in [1,2,3,20].Further details about the peculiarities of these traits are fully discussed in [22].


H1: Introverts design better codes than extroverts in terms of class cohesion H0: Introverts do not design better codes than extroverts  H1: Sensors design better codes than intuitives in terms of class cohesion H0: Sensors do not design better codes than intuitives  H1: Thinkers design better codes than feelers in terms of class cohesion H0: Thinkers do not design better codes than feelers  H1: Judges design better codes than Perceivers in terms of class cohesion H0: Judges do not design better codes than perceivers


DIT : Depth of Inheritance Tree  NOC: Number of children  CBO: Coupling between object classes  RFC: Response for a class  LCOM: Lack of cohesion in methods  Ca: Afferent coupling  NPM: Number of Public Methods for a class . Using the CKJM tool the following metric were computed for each class or program module written by a programmer: Weighted Method per class (WMC), Depth of Inheritance Tree (DIT), Number of Children (NOC), Coupling Between Object (CBO), Response for a Class (RFC), Lack of Cohesion in Methods (LCOM), Afferent Coupling (CA), and Number of Public Methods (NPM). ijacsa.thesai.org Introverted Sensing Thinking Perceiving (ISTP), and Introverted Intuitive Feeling Perceiving(INFP) are likely to have averagely problem solving and decision making skills while individuals with Extroverted Sensing Feeling Perceiving (ESFP) and Extroverted Sensing Thinking Perceiving (ESTP) traits appear to have poor problem solving and decision making skills.

Table 1
below shows the result of the experiment described above in section 3. The Myers Brigg Type Indicator (MBTI) of each programmer and the Lack of Cohesion in Methods (LCOM) metric of program classes are considered together.

TABLE I .
[21]S DESIGN AND PROGRAMMING ABILITY OF STUDENTS USING CHIDAMBER AND KEMERER METRIC SUITE AND MBTI Adapted from[21]www.ijacsa.thesai.org

TABLE IV .
PERSONALITY TYPE AND GOOD PROGRAM DESIGN

TABLE V .
GOOD PROGRAMS BY BIPOLAR FACTOR