+ Auto-Testing Code for Teachers & Beginning Programmers Dr. Ronald K. Smith Graceland University.

Slides:



Advertisements
Similar presentations
Don’t Type it! OCR it! How to use an online OCR..
Advertisements

Computing Science Software Design and Development SOFTWARE DESIGN AND DEVELOPMENT USING PYTHON.
Programming Types of Testing.
Java Chapter 22 - Student. Why Java? ADVANTAGESDISADVANTAGES Has _____________ capabilities__________ ( times) than languages compiled directly.
1 Web Wizards Guide To PHP David Lash Chapter 1 Introduction to PHP.
CIS101 Introduction to Computing Week 11. Agenda Your questions Copy and Paste Assignment Practice Test JavaScript: Functions and Selection Lesson 06,
 2002 Prentice Hall. All rights reserved. 1 Chapter 2 – Introduction to Python Programming Outline 2.1 Introduction 2.2 First Program in Python: Printing.
Chapter 6: An Introduction to System Software and Virtual Machines
CIS101 Introduction to Computing Week 09 Spring 2004.
Recitation 1 Programming for Engineers in Python.
Computer Science 101 Introduction to Programming.
Java: Chapter 1 Computer Systems Computer Programming II Aug
1 Chapter One A First Program Using C#. 2 Objectives Learn about programming tasks Learn object-oriented programming concepts Learn about the C# programming.
A First Program Using C#
CS110/CS119 Introduction to Computing (Java)
IPAD Set Up. Gmail Account First, you need to set up a free gmail account with your name. If you have an existing one you may use that as long as: – A)
I. Pribela, M. Ivanović Neum, Content Automated assessment Testovid system Test generator Module generators Conclusion.
The NetBeans IDE CSIS 3701: Advanced Object Oriented Programming.
Moodle (Course Management Systems). Assignments 1 Assignments are a refreshingly simple method for collecting student work. They are a simple and flexible.
AlgoTutor Tutorial (4) Using the Virtual Machine Component of AlgoTutor J. Yoo, S. Yoo, C. Pettey, S. Seo, and Z. Dong MTSU Computer Science Department.
General Programming Introduction to Computing Science and Programming I.
1 Chapter 2 First Java Programs Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
Goals of Course Introduction to the programming language C Learn how to program Learn ‘good’ programming practices.
10/5/2015CS346 PHP1 Module 1 Introduction to PHP.
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
Computer Science 101 Introduction to Programming.
Week 1 - Friday.  What did we talk about last time?  Our first Java program.
Just as there are many human languages, there are many computer programming languages that can be used to develop software. Some are named after people,
Program Design and Coding
Invitation to Computer Science 5 th Edition Chapter 6 An Introduction to System Software and Virtual Machine s.
INVITATION TO COMPUTER SCIENCE, JAVA VERSION, THIRD EDITION Chapter 6: An Introduction to System Software and Virtual Machines.
CHAPTER 3 GC Java Fundamentals. 2 BASICS OF JAVA ENVIRONMENT  The environment  The language  Java applications programming Interface API  Various.
Guide to Programming with Python Chapter One Getting Started: The Game Over Program.
Problem Solving using the Science of Computing MSE 2400 EaLiCaRA Spring 2015 Dr. Tom Way.
9/2/ CS171 -Math & Computer Science Department at Emory University.
Object-Oriented Program Development Using Java: A Class-Centered Approach, Enhanced Edition.
Python – May 11 Briefing Course overview Introduction to the language Lab.
Making Good Code AKA: So, You Wrote Some Code. Now What? Ray Haggerty July 23, 2015.
Programming with Visual C++: Concepts and Projects Chapter 2B: Reading, Processing and Displaying Data (Tutorial)
Pseudocode Simple Program Design Third Edition A Step-by-Step Approach 2.
Algorithms  Problem: Write pseudocode for a program that keeps asking the user to input integers until the user enters zero, and then determines and outputs.
Computer Security coursework 1 Dr Alexei Vernitski.
The Report Generator Viewing Student Outcomes. Install the Report Generator In a browser, go to Click.
Introduction to Python Dr. José M. Reyes Álamo. 2 Three Rules of Programming Rule 1: Think before you program Rule 2: A program is a human-readable set.
An Introduction to Programming with C++ Sixth Edition Chapter 10 Void Functions.
9/2/2015BCHB Edwards Introduction to Python BCHB524 Lecture 1.
Inheritance and Class Hierarchies Chapter 3. Chapter 3: Inheritance and Class Hierarchies2 Chapter Objectives To understand inheritance and how it facilitates.
The single most important skill for a computer programmer is problem solving Problem solving means the ability to formulate problems, think creatively.
การเขียนโปรแกรมภาษา จาวา Java Programming อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา Chapter 1.
ITP 109 Week 2 Trina Gregory Introduction to Java.
Introduction to Programming Python Lab 7: if Statement 19 February PythonLab7 lecture slides.ppt Ping Brennan
OCR A Level F453: The function and purpose of translators Translators a. describe the need for, and use of, translators to convert source code.
CHAPTER 3 COMPLETING THE PROBLEM- SOLVING PROCESS AND GETTING STARTED WITH C++ An Introduction to Programming with C++ Fifth Edition.
Invitation to Computer Science 6th Edition
Fundamentals of Programming I Overview of Programming
Why don’t programmers have to program in machine code?
Lecture 1b- Introduction
Development Environment
Introduction to Computing Science and Programming I
Key Ideas from day 1 slides
Algorithms Problem: Write pseudocode for a program that keeps asking the user to input integers until the user enters zero, and then determines and outputs.
IF statements.
The Selection Structure
Java programming lecture one
Learning to Program in Python
Python I/O.
Learning to Program in Python
Introduction to Python
Reverse Shell.
Week 1 - Friday COMP 1600.
Presentation transcript:

+ Auto-Testing Code for Teachers & Beginning Programmers Dr. Ronald K. Smith Graceland University

+ Introduction My story

+ Beginning Programmers 1....seldom understand the importance of writing robust code generally believe the programming task ends with the first syntax–error free run 3....have no idea how to design good test data sets.

+ Beginning programmer teachers 1....spend inordinate amounts of time grading code that either doesn't work or works only on one specific example don't have time to run student programs on multiple sets of data often end up testing student programs on non-uniform data sets.

+ Wouldn't it be nice if......teachers had an easy way to design and save data sets for testing programs?...graders could test programs on multiple sets of data simultaneously?...students could "blind test" programs on good data sets, getting helpful feedback without seeing the actual data sets?... programs worked before being submitted for grading?

+ AutoTest System overview

+ AutoTest MasterGraderStudent Designs Problems & Data Sets Grades Student Programs Writes Programs "Blind tests" Data

+ Master View The master Writes problem specs, including input and output. Writes a master program. Designs multiple test data sets. AutoTest Generates a master file containing each data set and its corresponding output.

+ Student view A Student Writes a program to meet I/O specs. Tests the program with the sample data set and corresponding output provided with the problem. AutoTest Matches a master file to the student program and compares output from each master data set to the output in the master file in a summary table.

+ Grader View Grader Chooses a master file Sets the comparison level (strict, ignore white space, etc.) Selects the folder containing student program folders. Autotest Displays the student program, student output on each data set, and a summary table.

+ Example

+ Problem Specs

+ Master Program

+ Data Sets Sample Data Zero Lines Blank Lines Single line Names hint at aspect tested.

+ Master View "File Input" opens existing master file. "File Output" generates output. "Save Master" encodes all the info into a single text file.

+ (Coded) Master File This file is distributed to student machines along with a compiled student version of AutoTest. I2VjaG8gNQojU2FtcGxlIERhdGEKSGVsbG8gV29ybGQhCiNOdW1lc mljYWwKNDIKI0VtcHR5IExpbmUKCiNFeHRyYSBJbnB1dApMaW5lIDE KTGluZSAyCiNlbmQgaW5wdXQKI1NhbXBsZSBEYXRhCkhlbGxvIFdvc mxkIQoKI051bWVyaWNhbAo0MgoKI0VtcHR5IExpbmUKCgojRXh0c mEgSW5wdXQKTGluZSAxCgojZW5kIG91dHB1dA==

+ Grader View Current Program Current Output Comparison Level Summary

+ Some Programs have small errors. Student left out a required space after line numbers. Rerunning at the "letters" level shows formatting is the only error. At the "Exact" level, only one set is error free.

+ Some bugs cannot be ignored. This program had an undefined variable name in the print statement.

+ Student View Comparison Level Summary Student View = Grader Vew –( Program & Output)

+ Implementation

+ Some Nuts and Bolts A compiled version (.pyc) of AutoTest along with a script (.bat) file with which to execute it is distributed to each computer in the CSIT lab. Students make a shortcut to the AutoTest program and store it in a folder in which they will be testing programs. AutoTest uses digits in the program name to match appropriate master files. Finished programs are uploaded using my.graceland.edu. When downloaded, each program is in a folder with the student name, ready for batch processing with AutoTest. New Master files are distributed each time an assignment is made.

+ Security AutoTest is written in Python, so it is virtually platform independent. I used to distribute copies to the lab machines, and did not tell the students about the master files (which were base 64 coded). Last year, one of my students asked me about base 64 coding, having gone through the code to hack the system! We considered a web-based solution, but allowing any Python program to run from the web is very insecure.

+ Summary

+ AutoTest Is a GUI interface to a system with 3 views: Master Grader Student Facilitates testing/grading of programs with multiple data sets simultaneously.

+ Advantages Beginning students are encouraged to write more robust code. Students can verify that I/O specs are met before turning in their programs. Program are tested on multiple data sets. Program grades are based on uniform tests. Files containing multiple data sets with input and output are easily made and edited. Program output can be checked with various matching criteria. Most programs turned in work! Grades can be based on other criteria. Everyone wins

+