How Programmers Read Regular Code: A Controlled Experiment Using Eye Tracking ICPC 2015 Ahmad Jbara and Dror G. Feitelson The Hebrew University of Jerusalem,

Slides:



Advertisements
Similar presentations
Continuity and Change Over Time Essay
Advertisements

Rectangles On scrap paper, each sketch or draw a rectangle
Experiments and Variables
Personal style Scenario 3: Maintaining standards of behaviour Behaviour Scenarios Resources to support Charlie Taylor’s Improving Teacher Training for.
What ’ s New? Acquiring New Information as a Process in Comprehension Suan E. Haviland & Herbert H. Clark.
Probing Magnetic Reconnection with Active Region Transient Brightenings Martin Donachie Advisors: Adam Kobelski & Roger Scott.
Fundamentals of Python: From First Programs Through Data Structures
Software Quality Ranking: Bringing Order to Software Modules in Testing Fei Xing Michael R. Lyu Ping Guo.
20/05/2015Dr Andy Brooks1 MSc Software Maintenance MS Viðhald hugbúnaðar Fyrirlestrar 19 & 20 The Benefits of Design Patterns.
Chapter 3 Producing Data 1. During most of this semester we go about statistics as if we already have data to work with. This is okay, but a little misleading.
Scientific Method. Steps in the Scientific Method Observation Observation Hypothesis Hypothesis Experiment Experiment Data Collection Data Collection.
Influence of Detailed Photographs of Product on Customer’s Purchase Decision Sanjay Kumar Ranganayakulu Nikhil Bendre Shaunak Natu.
Gazing the screens Using eye-tracking for evaluating visually complex TV programming Author: Amund Berg Supervisor: Frode Volden Gjøvik University College.
Chapter 2: Algorithm Discovery and Design
Tracking multiple independent targets: Evidence for a parallel tracking mechanism Zenon Pylyshyn and Ron Storm presented by Nick Howe.
Memory Management A memory manager should take care of allocating memory when needed by programs release memory that is no longer used to the heap. Memory.
Iris localization algorithm based on geometrical features of cow eyes Menglu Zhang Institute of Systems Engineering
Administrivia Turn in ranking sheets, we’ll have group assignments to you as soon as possible Homeworks Programming Assignment 1 due next Tuesday Group.
IMPROVING THE PERFORMANCE OF JPEG-LS Michael Syme Supervisor: Dr. Peter Tischer.
Chapter 2: Algorithm Discovery and Design
Chapter 2: Algorithm Discovery and Design
Quantitative Genetics
The Research Process. Purposes of Research  Exploration gaining some familiarity with a topic, discovering some of its main dimensions, and possibly.
What information are people “seeing” when your web page pops up? By Shirley Retz.
Reading Comprehension Skills
Business Memo purpose of writer needs of reader Memos solve problems
MATH1342 S08 – 7:00A-8:15A T/R BB218 SPRING 2014 Daryl Rupp.
Statistical Process Control Chapters A B C D E F G H.
Abstract Matthew L. Bowe Dr. Christopher Hlas (mentor) Department of Mathematics University of Wisconsin-Eau Claire Background iNformation Methods Results.
: Chapter 12: Image Compression 1 Montri Karnjanadecha ac.th/~montri Image Processing.
Invitation to Computer Science, Java Version, Second Edition.
1 Technical Communication A Reader-Centred Approach First Canadian Edition Paul V. Anderson Kerry Surman
CS Learning Rules1 Learning Sets of Rules. CS Learning Rules2 Learning Rules If (Color = Red) and (Shape = round) then Class is A If (Color.
1 Introduction to Flowcharting. 2 Writing a program Defining the problem –Write down what the program will do Planning –Write down the steps, draw a flowchart.
Time Series Data Analysis - I Yaji Sripada. Dept. of Computing Science, University of Aberdeen2 In this lecture you learn What are Time Series? How to.
CIALDINI, R., et al Culture and Compliance. Personality and Social Psychology Bulletin 125, 1242–1253. KAHNEMAN, D. AND TVERSKY, A Prospect.
AP World History Continuity and Change Over Time Essay.
Lecture 4 Software Metrics
Analytical Thinking What is analysis and how does it work?
Calibration Guidelines 1. Start simple, add complexity carefully 2. Use a broad range of information 3. Be well-posed & be comprehensive 4. Include diverse.
Nonparametric Statistics
Close Reading Intermediate 2. Time The Close Reading exam paper lasts for one hour. (Date and time for 2011: Friday 13 May, 1.00pm to 2.00pm.) NAB: Friday.
SRI & Lexile Measures. Using Lexile Levels and SRI Data for Improving Reading Instruction.
Eye Tracking In Evaluating The Effectiveness OF Ads Guide : Dr. Andrew T. Duchowski.
CSc 461/561 Information Systems Engineering Lecture 5 – Software Metrics.
CCT 333: Imagining the Audience in a Wired World Class 8: Quantitative Methods.
An Analysis of Advertisement Perception through Eye Tracking William A. Hill Physics Youngstown State University Zach C. Joyce Computer.
CS851 – Biological Computing February 6, 2003 Nathanael Paul Randomness in Cellular Automata.
An Eyetracking Analysis of the Effect of Prior Comparison on Analogical Mapping Catherine A. Clement, Eastern Kentucky University Carrie Harris, Tara Weatherholt,
De-anonymizing Genomic Databases Using Phenotypic Traits Humbert et al. Proceedings on Privacy Enhancing Technologies 2015 (2) :
INVITATION TO Computer Science 1 11 Chapter 2 The Algorithmic Foundations of Computer Science.
Quality Is in the Eye of the Beholder: Meeting Users ’ Requirements for Internet Quality of Service Anna Bouch, Allan Kuchinsky, Nina Bhatti HP Labs Technical.
Distinguishing humans from robots in web search logs preliminary results using query rates and intervals Omer Duskin Dror G. Feitelson School of Computer.
Chapter 2: Algorithm Discovery and Design Invitation to Computer Science.
CS223: Software Engineering Lecture 21: Unit Testing Metric.
BITS Pilani Pilani Campus Data Structure and Algorithms Design Dr. Maheswari Karthikeyan Lecture1.
Measurement Chapter 6. Measuring Variables Measurement Classifying units of analysis by categories to represent variable concepts.
Examining the Conspicuity of Infra-Red Markers For Use With 2-D Eye Tracking Abstract Physical infra-red (IR) markers are sometimes used to help aggregate.
Statistical Experiments What is Experimental Design.
Vocabulary Acquisition in a Second Language: Do Learners Really Acquire Most Vocabulary by Reading? Some Empirical Evidence Batia Laufer.
The Validity of Astrology.
Etrics XP Metrics.
Algorithm Discovery and Design
Huan Luo, Xing Tian, Kun Song, Ke Zhou, David Poeppel  Current Biology 
Workshop 4 Planning next steps.
TECHNICAL PAPER PRESENTATION By: Srihitha Yerabaka
Rapid Formation of Robust Auditory Memories: Insights from Noise
Volume 99, Issue 1, Pages e4 (July 2018)
Dror Feitelson The Hebrew University of Jerusalem
Presentation transcript:

How Programmers Read Regular Code: A Controlled Experiment Using Eye Tracking ICPC 2015 Ahmad Jbara and Dror G. Feitelson The Hebrew University of Jerusalem, Israel.

Regular Code Repetitions of the same basic pattern

Regular Code Repetitions of the same basic pattern

Regular Code Repetitions of the same basic pattern

Previous Work Regular function can be as easy to comprehend as the non- regular function of the same problem. This despite being  Longer (LOC)  More complex (cyclomatic complexity) Speculation  Leveraging the understanding of the first instances to ease the understanding of repeated ones

This Work We use eye tracking to measure time and effort spent reading and understanding regular code. Questions:  Do developers follow any pattern when they are required to comprehend regular code?  Are their efforts equally divided between regular segments?  Assuming there is such a pattern. Which model might fit this pattern.

The Experiment Two different problems – image processing domain Two implementations for each problem: regular/non-regular. Comprehension task was “understanding functionality“ Each subject performed one comprehension task on one implementation. Each regular function was divided into areas of interest (AOI)  One AOI for each repeated instance Dependent variables (AOIs)  Fixation count  Total fixation time  Average pupil dilation

Regular Versions Diamond program Median program

Results – Correctness and Time These results follow those of our previous work.

Difficulty of Programming Style Asked the subjects to rank difficulty of their function.

Results and Analysis – Heat Map Diamond program Median program We used heatmaps to identify regions with special attention We see that subjects largely fixate on the first instances (red spots) Attention is not reduced with length (focus was renewed. Left map)

Results and Analysis– AOI Same as pervious with all measures and clear separation between AOIs Measures show high values in the earlier instances and low in the other ones.

Results and Analysis– AOI Same but for the diamond program

Verifying the Results – a post-experiment question We asked the subjects about their approach and effort allocation to the different parts in the code. We showed them with their heatmaps and asked if they match their impression. More than 70% stated clearly that they spent more time in the first instances. One subject said: I spent much efforts at the beginning, tried to understand the loops at the beginning because I saw that they repeat themselves. In particular I realized that the differences are vey small so it is easy to infer about other.

Verifying the Results – a post-experiment question

Modelling Effort in Repeated Instances Not all code segments should have equal weight (have same structure) But, many metrics present high measurements and are not sensitive to code context.  MCC : conditions in the 10 th instance are counted just like those in the first. Misleading! Purpose  Build a model that predicts efforts needed to understand a repeated instance based on its ordinal number.

Modeling Effort in Repeated Instances Shows the models found by curve fitting of fixation data as a function of AOI. All models are significant (except one).

Modeling Effort in Repeated Instances

Characteristics of Functions One may claim that the exponential is the best ( considering functions characteristics ) Others are bad because they grow to positive/negative infinity for larger xs. Theoretically that is right but the number of repeated instances does not grow to very large values. So for some thresholds other model could be a good fit.

Conclusions

Thank you!