computer science - Stringfest Analytics https://stringfestanalytics.com Analytics & AI for Modern Excel Sat, 25 Jul 2020 16:05:03 +0000 en-US hourly 1 https://wordpress.org/?v=6.9.4 https://i0.wp.com/stringfestanalytics.com/wp-content/uploads/2020/05/cropped-RGB-SEAL-LOGO-STRINGFEST-01.png?fit=32%2C32&ssl=1 computer science - Stringfest Analytics https://stringfestanalytics.com 32 32 98759290 Teaching coding: What is a Parsons Problem? https://stringfestanalytics.com/parsons-problems/ Sat, 25 Jul 2020 14:00:00 +0000 https://georgejmount.com/?p=5796 Do you play word games like crosswords or word searches? Experts say these strengthen the brain because they make you think from unique angles about how words and letters are associated. Turns out we can also build “word games” when it comes to code, and these can also be great mental exercises. Teaching coding: What […]

The post Teaching coding: What is a Parsons Problem? first appeared on Stringfest Analytics.

]]>
Do you play word games like crosswords or word searches? Experts say these strengthen the brain because they make you think from unique angles about how words and letters are associated.

Turns out we can also build “word games” when it comes to code, and these can also be great mental exercises.

What are Parsons problems?

Parsons problems, named after one of the originators of the exercise, are coding challenges where learners must re-arrange a series of lines of code in an order to achieve some purpose.

What are the benefits?

Parsons problems have lots going for them:

  • They are interactive. Students are inclined to move around the blocks and try different answers.
  • It avoids the “blank screen of terror.” With something already on the screen to engage with, students are less likely to give up or skip ahead.
  • It isolates concepts. With a pre-defined problem, students can focus on specific concepts like control flow and code efficiency, rather than naming and assignment variables from scratch
  • It builds good habits. Because the code is pre-defined, the end result when correct will be a well-constructed piece of code. Students play an active role in helping to build good code, rather than haphazardly stumbling through suboptimal code on their own.

Demo: Parsons problem

I have a small demo of how Parsons problems work below. Feel free to download the PowerPoint slide to try it yourself! This problem is in the Python programming language.

A couple of things to notice about the example:

  • Distractors, or incorrect options, are possible.
  • Some programming languages, like Python, are indented. The Parsons problem should accomodate for this.

Building Parsons problems

Parsons problems can be done somewhat effectively with a plain old PowerPoint slide, or even by printed lines of code. There are also ways to auto-grade them: for example, check out the js-parsons JavaScript library.

References

Parsons, Dale, and Patricia Haden. “Parson’s programming puzzles: a fun and effective learning tool for first programming courses.” Proceedings of the 8th Australasian Conference on Computing Education-Volume 52. 2006.
APA

The post Teaching coding: What is a Parsons Problem? first appeared on Stringfest Analytics.

]]>
5796
The PRIMM method for teaching coding https://stringfestanalytics.com/primm-teaching-coding/ Thu, 09 Jul 2020 09:15:00 +0000 https://georgejmount.com/?p=5951 Lots of people want to learn how to code… but what about teaching how to code? Computer science educators for years have come up with concepts and activities for effectively teaching code. It’s a rich and often overlooked body of knowledge. Take, for example, the PRIMM approach for structuring a coding exercise. This five-step acronym […]

The post The PRIMM method for teaching coding first appeared on Stringfest Analytics.

]]>
Lots of people want to learn how to code… but what about teaching how to code?

Computer science educators for years have come up with concepts and activities for effectively teaching code. It’s a rich and often overlooked body of knowledge.

Take, for example, the PRIMM approach for structuring a coding exercise. This five-step acronym takes students from sizing up a piece of code, to modifying it, to finally writing some code of their own. Here’s how it works. I also include an interactive demo showing the approach in action.

The five steps of PRIMM

Predict

The exercise starts with showing the student a piece of code and asking them to predict what it will do, without actually running it.

Run

Now the student actually runs the code, and compares the results to their prediction.

Investigate

At this point, the student and instructor dig in on why the code resulted in the output. This could include activities such as extensive commenting, drawing flowcharts, and discussing questions about the code.

If the original code is returning errors, this is the time to debug and fix it. Students can do this together using pair programming.

Modify

At this point, students are asked to modify the working piece of code. This could be adding a progressive step or two to the code, or adding additonal error-checking capabilities.

Make

Now that students are comfortable debugging and then modifying the code, they will create a similar program from scratch.

From “Not mine” to “Mine”

PRIMM gradually walks students through the process by which code progresses from “not mine” to mine:

From “Computational thinking for youth in practice,” https://dl.acm.org/doi/abs/10.1145/1929887.1929902

This process is common in life: code may be inherited from an older workflow or pasted from the internet, and the coder may need to debug it and/or modify it for some other purpose. PRIMM simulates this process in a classroom setting and encourages students to walk systematically through it.

Slides

See the below slides for a presentation-ready asset on teaching PRIMM in your workplace or learning organization.

Even if you aren’t interested in teaching others how to code, this exercise will give you an excellent framework for teaching yourself. 

This slide deck is part of my resource library, which contains lesson plans, presentations and other assets for data education. For complete access, sign up below to my newsletter.

This download is part of my resource library. For exclusive free access, subscribe below.

Interactive demo: Teaching dplyr with PRIMM

The below is an example of using the PRIMM method for teaching dplyr using DataCamp DataCamp Light.

[insert page=’5771′ display=’content’]

The post The PRIMM method for teaching coding first appeared on Stringfest Analytics.

]]>
5951