Academic Bug Patterns Stuart Hansen University of Wisconsin - Parkside.

Slides:



Advertisements
Similar presentations
Data Structures.
Advertisements

Programming Paradigms and languages
OOP Design Patterns Chapters Design Patterns The main idea behind design patterns is to extract the high level interactions between objects and.
16/13/2015 3:30 AM6/13/2015 3:30 AM6/13/2015 3:30 AMIntroduction to Software Development What is a computer? A computer system contains: Central Processing.
June 13, Introduction to CS II Data Structures Hongwei Xi Comp. Sci. Dept. Boston University.
Object Oriented System Development with VB .NET
CMSC 132: Object-Oriented Programming II
CSCE156: Introduction to Computer Science II Instructor Stephen Scott Website
© 2006 Pearson Addison-Wesley. All rights reserved4-1 Chapter 4 Data Abstraction: The Walls.
CS350/550 Software Engineering Lecture 1. Class Work The main part of the class is a practical software engineering project, in teams of 3-5 people There.
September 5, Concepts of Programming Languages Hongwei Xi Comp. Sci. Dept. Boston University.
© 2006 Pearson Addison-Wesley. All rights reserved4-1 Chapter 4 Data Abstraction: The Walls.
1 CMSC 132: Object-Oriented Programming II Software Development III Department of Computer Science University of Maryland, College Park.
Chapter 1 Program Design
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Introduction Algorithms and Programming. Computer Programming  A form of problem solving  Or, more accurately, a way to solve problems  What we will.
SM3121 Software Technology Mark Green School of Creative Media.
July 16, Introduction to CS II Data Structures Hongwei Xi Comp. Sci. Dept. Boston University.
OBJECT ORIENTED PROGRAMMING IN C++ LECTURE
Unit Six Assignment 1 Chris Boardley.
By for Test Driven Development: Industry practice and teaching tool Robert Vanderwall, Ph.D. 1 WISTPC-15.
Platforms for Learning in Computer Science July 28, 2005.
Object Oriented Programming CEN 221. Course Description Classes, objects, inheritance, polymorphism, graphical user interfaces, event handling, exception.
CSC207 Software Design Summer 2011 Lecturer: Hesam C. Esfahani
1 CSC 427: Data Structures and Algorithm Analysis Fall 2011 See online syllabus (also available through BlueLine): Course goals:
Design Dan Fleck CS 421 George Mason University. What is the design phase? Analysis phase describes what the system should do Analysis has provided a.
DEBUGGING CHAPTER Topics  Getting Started with Debugging  Types of Bugs –Compile-Time Bugs –Bugs Attaching Scripts –Runtime Errors  Stepping.
CS 350 – Software Design The Object Paradigm – Chapter 1 If you were tasked to write code to access a description of shapes that were stored in a database.
CompSci 230 Software Construction Course Revision: Themes A, B & C S
An analysis of exam results in the Object-Oriented Programming course at „Politehnica” University of Timisoara Ioan Jurca.
Mr C Johnston ICT Teacher BTEC IT Unit 06 - Lesson 01 Introduction to Computer Programming.
Computer Science 240 © Ken Rodham 2006 Principles of Software Design.
1 CSC 427: Data Structures and Algorithm Analysis Fall 2010 See online syllabus (also available through BlueLine): Course goals:
1 Compiler Construction (CS-636) Muhammad Bilal Bashir UIIT, Rawalpindi.
1 CSC 321: Data Structures Fall 2013 See online syllabus (also available through BlueLine2): Course goals:  To understand.
Object-Oriented Design Simple Program Design Third Edition A Step-by-Step Approach 11.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Sadegh Aliakbary. Copyright ©2014 JAVACUP.IRJAVACUP.IR All rights reserved. Redistribution of JAVACUP contents is not prohibited if JAVACUP.
1 CSC 427: Data Structures and Algorithm Analysis Fall 2006 See online syllabus (also available through Blackboard): Course goals:
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Boris Milašinović Faculty of Electrical Engineering and Computing University of Zagreb, Croatia 15th Workshop on "Software Engineering Education and Reverse.
Chapter More on Classes Intro to Computer Science CS1510, Section 2 Dr. Sarah Diesburg.
L10: Model-View-Controller General application structure. User Interface: Role, Requirements, Problems Design patterns: Model – View – Controller, Observer/Observable.
Procedural programming Procedural programming is where you specify the steps required. You do this by making the program in steps. Procedural programming.
Sadegh Aliakbary Sharif University of Technology Fall 2010.
1 Object-Oriented Programming Using C++ CLASS 17 Honors.
Model View Presenter Design Pattern Jay Smith PMO Architect and Evangelist Tyson Foods, Inc.
Design Pattern Introduction in Data Structures Purpose  Natural integration of patterns into data structures education Plan  Cover traditional topics.
Introduction to Programming and App Inventor. Introduction What is a computer program? Introducing App Inventor Getting hands on with App Inventor.
Principles of Programming & Software Engineering
CSC 427: Data Structures and Algorithm Analysis
Coupling and Cohesion Rajni Bhalla.
CSC 321: Data Structures Fall 2016
CSc 020: Programming Concepts and Methodology II
Game Architecture Rabin is a good overview of everything to do with Games A lot of these slides come from the 1st edition CS 4455.
Objects First with Java A Practical Introduction using BlueJ
CSC 321: Data Structures Fall 2015
Lecture 2 of Computer Science II
Chapter 16 – Programming your App’s Memory
Objects First with Java A Practical Introduction using BlueJ
Refactoring Model View Controller
COS 260 DAY 2 Tony Gauvin.
Object-Oriented Programming
Objects First with Java A Practical Introduction using BlueJ
CS 2530 Intermediate Computing Dr. Schafer
Objects First with Java A Practical Introduction using BlueJ
References: Eddie Burris, Rick Mercer
Bellwork 8 minutes 7 minutes 9 minutes 10 minutes 12 minutes
CSCE156: Introduction to Computer Science II
Presentation transcript:

Academic Bug Patterns Stuart Hansen University of Wisconsin - Parkside

Bug Patterns Recurring software defects Term coined by Eric Allen Bug Patterns in Java, APress, 2002 Academic Bug Patterns –Occur in student code –Not only “gotchas”

Motivation Understanding our students’ bugs helps us teach them to –Find and remove them –Avoid them Places empirical data behind our expertise –May give added insights

Object-Oriented Programming New Programming Paradigm → New bug Patterns Does OOP Really Match the Way we Think?, Les Hatton, IEEE Software 1998 –OOP programs are buggier and take longer to debug than procedural programs.

We are Experts Already To a large extent we are already experts in academic bug patterns –CS1 and CS2 “gotchas” –Using symbolic constants –Problem decomposition Textbooks include headings like –Common Programming Errors –Helpful Reminders

Survey Two Classes –Data Structures and Algoritms –Event Driven Programming Two Questions: –What was the most difficult bug/problem you encountered doing the assignment? –What did you do to resolve it?

Survey - continued Intentionally wide open Didn’t want to impose a taxonomy Total of 56 surveys collected on 6 different assignments

Results 19 Language and Tools Bugs 13 Strong Coupling Bugs 11 Local/Instance Bugs 6 Blame the Instructor Bugs

Languages and Tools Pattern 19/56 = 34% of all bugs reported Lots of new stuff still being introduced –Swing –Microsoft.Net Programming –CORBA/RMI Biggest student desire seems to be for brief cogent examples

Languages and Tools Sol’ns Search the Internet Ask someone in class Only 1 student reported reading the text to find the solution!

Strong Coupling Bugs 13/56 = 23% of all bugs reported Event Driven Programming starts with lots of GUI material. –Model-View-Controller –Multi-threading “When I came up one solution to a problem, it often caused new problems in other areas.”

Strong Coupling - Continued Students wrote long paragraphs describing how they solved their problems. No discernable patterns to their approaches. We probably don’t teach enough design patterns early in our curriculum.

Local State/Object State Bug 11/56 = 20% of all bugs reported Students didn’t see whether data should be local, instance or belong to some sort of global data store. Particularly true in game programming –Boggle and Connect 4 –Students have been introduced to recursion, but haven’t applied it much on their own.

Local/Object – Continued Basic truth not in texts is that M-V-C requires redundant state! “When I clicked the Undo button, the screen would clear the last move, but inside the memory the program did not actually clear the data.”

Brief Aside: O-OP is gradually making its way into D.S. and Alg. courses. Many texts still have Pascal look and feel. Tension between O-OP and D.S. and Alg. –RedBlack trees require non-global, but more than local knowledge. –Null design pattern works, but an “if” may be clearer

Polymorphism Bugs 8/56 = 14% of all bugs reported Java GUIs are fundamentally polymorphic –Use inheritance to build interfaces –Register handlers Also in D.S. and Algs. –2D Trees, e.g. BSTs based on (X,Y) points. Registration is easier polymorphism related pattern than others

Blame the Instructor - Bugs 6/56 = 11% of all bugs reported Anonymous survey is good opportunity to let loose on instructor Two main complaints –Instructor code sometimes buggy –Program specs sometimes not clear enough

Summary 1.“See one, do one” is dominant learning model for our students. 2.Languages, tools and libraries are growing more and more complex. 3.Object-oriented design still poses major challenges.

Questions?