Vector Programming Using Structural Recursion

05/14/2018
by   Marco T. Morazán, et al.
0

Vector programming is an important topic in many Introduction to Computer Science courses. Despite the importance of vectors, learning vector programming is a source for frustration to many students given that they feel left adrift when it comes to resolving vector indexing errors. Even though the size of a vector is a natural number, there have been no efforts to define a useful recursive data definition to help beginners design vector processing functions. This article defines the concept of a vector interval and describes how to exploit its recursive structure to design vector processing functions. The described methodology provides a context beginners can use to reason about proper vector indexing instead of leaving them adrift with this responsibility. A key feature of properly using the described methodology is that if students process the correct vector interval then vector indexing errors can not arise. The classroom deployment of this approach is described in detail. Students, to date, have found vector intervals helpful in avoiding out-of-bounds indexing errors when all the vector elements of the interval are processed.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
06/27/2019

Vector Programming Using Generative Recursion

Vector programming is an important topic in many Introduction to Compute...
research
07/26/2022

Introduction to Functional Classes in CS1

Students introduced to programming using a design-based approach and a f...
research
03/10/2023

Visual Studio Code in Introductory Computer Science Course: An Experience Report

Involving integrated development environments (IDEs) in introductory-lev...
research
07/25/2019

The Strong 3SUM-INDEXING Conjecture is False

In the 3SUM-Indexing problem the goal is to preprocess two lists of elem...
research
08/21/2020

Using Video Game Development to Motivate Program Design and Algebra Among Inner-City High School Students

Introducing inner-city high school students to program design presents u...
research
03/01/2021

Morning or Evening? An Examination of Circadian Rhythms of CS1 Students

Circadian rhythms are the cycles of our internal clock that play a key r...

Please sign up or login with your details

Forgot password? Click here to reset