• No results found

Extending Code Puzzle Completion Problems

Chapter 6: Summary & Future Work

6.2 Extending Code Puzzle Completion Problems

The code puzzle completion problems that we developed in this work are limited in their breadth of computing concepts and in their context. The introductory curriculum only exposes novices to elementary repetition, parallelism, and sequential execution in a 3D animated storytelling context. Further, the code puzzle completion problems we developed are only based on blocks (i.e. lines) of code. There are many potential avenues to extending code puzzle completion problems beyond this initial approach. In this section, I share my thoughts on how code puzzle completion problems can be extended into other programming contexts, how we can extend the curriculum to better support independent learners, and how alternative completion strategies may support the expanded curriculum.

6.2.1 Alternative Contexts

Our approach to code puzzle completion problems depends heavily on 3D animated program output. We specifically developed code puzzles that produced animations where learners can recognize any programming construct behavior. We further supported learners, by adding live feedback that complements the executing animation. In other contexts, like traditional text based output, our scaffolding for feedback may not be sufficient. However, it is likely that

many of the lessons we learned by providing incremental, ambiguous, and grouped feedback can be adapted to other programming contexts.

Outside of 3D animations, I believe that code puzzle completion problems will likely work well in many contexts that produce graphical output. Text based approaches like Parsons problems [48, 148], may be difficult to develop into code puzzles, given that the context may not be as compelling. Many of these text based problems currently resemble uninspiring programming homework problems, like sorting numbers or fixing out-of-bound arrays, rather than producing rewarding output. However, other contexts like event-driven user interface programming, statistical modeling and graphing, responsive web programming or even gaming can likely be adapted into code puzzles that goal-oriented learners will find motivating. Future exploration is necessary to determine how code puzzle completion problems can benefit independent learners in other motivating contexts.

6.2.2 Curricular Content

There is much more to programming than the three programming constructs and their nested variants we used in our evaluations. Future work is necessary to extend the code puzzle curriculum to cover the greater depth of programming concepts and skills used by experienced programmers.

Conditional Statements & Expressions While repetition and simple parallelism are

important for animation, few interesting programs can be written for other contexts without conditional logic. Conditional statements and expressions should be added to the code puzzle completion problems curriculum. However, conditional statements and expressions are distinctly different skills that may each require unique treatments or approaches in the

code puzzles. Future work must investigate how to create puzzles that both demonstrate conditional execution while also helping develop learners’ schema for how expressions function.

Organization & Abstraction Likewise, very few complex programs can be written

without methods. Methods are critical for reusing functionality and organizing programs. Code puzzle completion problems should support novices in using and authoring methods. An initial approach may be to have users place statements in both the main and in a separate method.

Additionally, objects and abstraction can further help organize programs and reduce program maintenance. Future work might investigate how to promote these ideas by having users place statements in abstract methods or add properties to objects. For example, in an animation with three dancers, learners would reassemble the abstract dance animation to make two dance, while the third dancer has a overridden method that the learner also reassembles.

Programming Syntax & Skills Blocks based programming is useful for novices because

it likely reduces extraneous cognitive load when learning to program. Eventually, goal- oriented learners may desire to learn how to write programs using syntax. Code puzzle completion problems should be able to support this given that all known Parsons problem implementations are syntax based. However, future work is necessary to explore how to transition learners from blocks to syntax and how to adapt the puzzles or mechanics to effectively support program syntax.

Additionally, programmers often use many skills when writing code that would benefit goal-oriented learners, like refactoring. Code puzzle completion problems may be able to be adapted to support the development of refactoring skills. Programmers also often incrementally write and test code. During our evaluations we observed that many users do

in fact use this approach when solving puzzles. A future evaluation should study whether this incremental write-a-bit, test-a-bit approach is transferred to users’ own projects. An evaluation may provide insight into the other types of programming skills learners develop beyond programming constructs from using code puzzle completion problems.

The curriculum should also be modified to include more advanced programming concepts like recursion. Especially because recursion is often completely misunderstood by inexperienced programmers. In fact, novice programmers in Looking Glass accidentally created recursive function calls frequently enough that we added a warning to prevent users from making recursive calls. Code puzzle completion problems can likely be adapted to demonstrate recursion, given that many of recursive applications are graphical in nature. However, this is an area for future exploration.

Programming Paradigms In this study we exposed novices to programming constructs

in the imperative programming paradigm. Other paradigms, like event-based programming will likely also benefit goal-oriented learners. Goal-oriented learners may desire to create games or apps, which both require an understanding of event-based programming. Functional programming may also be desirable given an appropriate context, like statistical modeling and graphing. Future work might investigate how to use other paradigms in code puzzle completion problems. For example, having novices reconstruct user interface events, like button clicks.

6.2.3 Alternative Completion Approaches

Adding the new curricular content discussed above likely involves authoring new code puzzles, but also adapting the puzzle interface and mechanics. In this work, we used a blocks-based approach as our completion strategy; learners reassemble just lines of code. Future work

should investigate other mechanics for changing the completion strategy of code puzzle completion problems, especially to support new curricular content.

For example, in our code puzzle completion problems we asked learners to reassemble the entire animation. For introducing a new programming concept like conditional execution, it may be desirable to fix or lock all statements in the puzzle solution except for the lines inside of the conditional statement. Learners would then place just the statements for the if and else blocks into the solution. This may help highlight to novices that there are two executing paths in the program without having to impose additional cognitive load for reassembling the entire program. Likewise, refactoring skills might be encouraged by locking all statements in the solution and having novices drag and drop constants to replace literals in the code. Additional completion approaches may simply ask learners to reassemble just an expression while learning conditional logic.

There may also be a nice opportunity to gradually transition from blocks to syntax using the completion strategy. One approach may fix all the statements in the program, but leave out the brackets. Learners would then just insert the brackets to recreate the familiar “blocks” structure. Other transitional approaches for using syntax for just a part of a code puzzle, like using syntax for method calls, parameters, or loop indices, may also be worthwhile to explore.

Related documents