Posts tagged ‘precalculus’

Making the Case for Adaptive Parsons problems and Task-Specific Programming: Koli Calling 2019 Preview

I am excited to be presenting at the 19th Koli Calling International Conference on Computing Education Research (see site here). Both Barbara Ericson and I have papers this year. This was my third submission to Koli, and my first acceptance. Both of us had multiple rejections from ICER this year (see my blog post on ICER), so we updated and revised based on reviews, and were thrilled to get papers into Koli.

Investigating the Affect and Effect of Adaptive Parsons Problems

By Barbara Ericson, Austin McCall, and Kathryn Cunningham.

Barb is presenting the capstone to her dissertation work on adaptive Parsons problems (see blog post on her dissertation work here). This paper captures the iterative nature of her study. Early on, she did detailed think-aloud/interview protocols with teachers to understand how people used her adaptive Parsons problems. At the end, she looked at log files to get a sense of use at scale.

Abstract: In a Parsons problem the learner places mixed-up code blocks in the correct order to solve a problem. Parsons problems can be used for both practice and assessment in programming courses. While most students correctly solve Parsons problems, some do not. Un- successful practice is not conducive to learning, leads to frustration, and lowers self-efficacy. Ericson invented two types of adaptation for Parsons problems, intra-problem and inter-problem, in order to decrease frustration and maximize learning gains. In intra-problem adaptation, if the learner is struggling, the problem can dynamically be made easier. In inter-problem adaptation, the next problem’s difficulty is modified based on the learner’s performance on the last problem. This paper reports on the first observational studies of five undergraduate students and 11 secondary teachers solving both intra-problem adaptive and non-adaptive Parsons problems. It also reports on a log file analysis with data from over 8,000 users solving non-adaptive and adaptive Parsons problems. The paper reports on teachers’ understanding of the intra-problem adaptation process, their preference for adaptive or non-adaptive Parsons problems, their perception of the usefulness of solving Parsons problems in helping them learn to fix and write similar code, and the effect of adaptation (both intra-problem and inter-problem) on problem correctness. Teachers understood most of the intra-problem adaptation process, but not all. Most teachers preferred adaptive Parsons problems and felt that solving Parsons problems helped them learn to fix and write similar code. Analysis of the log file data provided evidence that learners are nearly twice as likely to correctly solve adaptive Parsons problems than non-adaptive ones.

Task-Specific Programming Languages for Promoting Computing Integration: A Precalculus Example

By Mark Guzdial and Bahare Naimipour

This is my first paper on the work I’m publishing on the new work I’m doing in task-specific programming. I mostly discuss my first prototype (see link here) and some of what math teachers are telling me (see link here). We also include a report on Bahare’s and my work with social studies educators A good bit of this paper is putting task-specific programming in a computing education context. I see what I’m doing as pushing further microworlds.

Typically, a microworld is built on top of a general-purpose language, e.g., Logo for Papert and Boxer for diSessa. Thus, the de- signer of the microworld could assume familiarity with the syntax and semantics of the programming language, and perhaps some general programming concepts like mutable variables and control structures. The problem here is that Logo and Boxer, like any general-purpose programming language, take time to develop proficiency. A task-specific programming language (TSPL) aims to provide the same easy-to-understand operations for a microworld, but with a language designed for a particular purpose.

Here’s the abstract:

Abstract: A task-specific programming language (TSPL) is a domain-specific programming language (in programming languages terms) designed for a particular user task (in human-computer interaction terms). Users of task-specific programming are able to use the tool to complete useful tasks, without prior training, in a short enough period that one can imagine fitting it into a normal class (e.g., around 10 minutes). We are designing a set of task-specific programming languages for use in social studies and precalculus courses. Our goal is offer an alternative to more general purpose programming languages (such as Scratch or Python) for integrating computing into other disciplines. An example task-specific programming language for precalculus offers a concrete context: An image filter builder for learning basic matrix arithmetic (addition and subtraction) and matrix multiplication by a scalar. TSPLs allow us to imagine a research question which we couldn’t ask previously: How much computing might students learn if they used a multiple TSPLs in each subject in each primary and secondary school grade?

Eventually the papers are going to appear in the ACM Digital Library. I have a preprint version of Barb’s paper here, and a longer form (with bigger screenshots) of my paper here.

November 18, 2019 at 7:00 am 5 comments

Task-specific programming for and about computing education (Precalculus TSP Part 5 of 5)

I am exploring task-specific programming as a direct outgrowth of my work on GaComputes, ECEP, and ebooks. I’ve worked hard at helping computing education to grow in the US, but it’s not growing much (see my September Blog@CACM post for stats on that). There are too few people learning with the power of computing. It’s because we make programming so hard. We need to make programming more accessible, and one way to do that is to make it easier.

Why do we need to make it more accessible? My answer is: in order for people to use computer science for learning everything else. In 2009, when Matthias and Shriram wrote “Why computer science doesn’t matter” (see paper here), I hated it. Of course, computer science matters! Now I realize that they’re right. Nobody gets turned away from college admissions because they didn’t have high school CS. MANY students get turned away because they can’t pass Algebra 1. Other students don’t finish their degrees because they can’t get past Calculus. This other stuff really matters. I believe that we can use programming to help learn the stuff that really matters.

A key insight for me is that what students really use in Bootstrap:Algebra or even in Scratch is a small piece of programming. (I talked about this a good bit in my SIGCSE keynote.) We can reduce how much of programming we teach and still get huge benefits. Essentially, the students in Scratch and Bootstrap:Algebra are doing task-specific programming. I’m just going one step further to strip away even the trappings of a more general programming language. I’m making it as small as I can (but large enough to cover a learner’s task), so that we can increase usability, and thus increase the probability that we can apply programming to improve learning outcomes in other disciplines.

But it’s still programming, so the insights and theories of computing education research (CER) deeply influence this work on task-specific programming. In turn, task-specific programming offers the opportunity to ask some of our CER questions in new contexts. Here are two examples.

Notional Machines

At the Dagstuhl Seminar on Notional Machines (see post by Ben Shapiro), there was a key moment for me. Someone said something there about “Part of the notional machine for algebra.” I stopped and went all academic on them. “Wait a minute — if that’s a real rule used for evaluating algebra, then it’s not a notional machine. Notional machines are simplifications. That’s real algebra, not a notional machine.” There was a bit of a fight after that. It’s kind of a blur now.

In my two prototypes, I want the mathematics to be the notional machine. The notional machine for the image filter builder is matrix arithmetic and scalar multiplication. Underneath, it’s doing something more complicated, but I want students to completely understand what’s going on in terms of matrices.

The notional machine for the texture wave builder is a bit more complicated. My goal is for the notional machine to be just the wave function, but it’s a bit more than that. It’s also how the wave function maps to RGB values in a picture, and I’m actually not sure I have it right yet. If you have a wave where you just manipulate red here, and a wave that manipulates gray there (where red=green=blue at all pixels), then how do I combine the red component with the gray component in some reasonable way? I’ve tried a few ways already. I’ve thought about adding another task-specific language, just to let the students specify the mapping.

Of course, these are really simple programming models (no variables, no user-defined functions), so the notional machines are really simple, too. As much as possible, the notional machine is the context itself — math, or math+graphics. When does learning this notional machine help you learn other notional machines later?

And what have you learned if you learn those? Does task-specific programming help you learn more within the task domain? I hope that learning the matrix notional machine for image filters helps you with matrix manipulation later. Do students really learn precalculus from these prototypes?

If you learn the notional machine for task-specific programming, does that help you learn other notional machines later? There still is a computational notional machine embedded in there, e.g., about controlling the computational agent, about order of execution, and so on. Does that knowledge transfer to other computational contexts?

Structure-behavior-function models

My student Katie Cunningham is studying the use of structure-behavior-function (SBF) models for understanding how students come to understand programs. (I defined SBF models here). In short, this theoretical framing helps us understand the relationships between students learning to read code, to write code, to trace code, and to explain code in plain English.

Task-specific programming doesn’t fit the same way in that model. There is no writing of code. There is structure to the programs, but more of it is embedded in the environment than in the textual language. One of the insights from the participatory design sessions that we’ve had with teachers is that the environment is so much more powerful than the language. Consider the statement in my wave texture generator Set Gray to 4sin(5(x-3))+0. That does completely define the structure and transformation. However, the below picture is is so much more powerful and is what students really see — multiple, linked representations that explain that one line of code:

Behavior is complicated. As I said above, I want the behavior to be the notional machine of the mathematics. To trace the operation above, a student might plug in values for X to see what Y is generated, and check the plot and the wave to see if it makes sense. But it’s not like variable tracing.

But the explain in plain English task of figuring out the function is still there. Check out this image filter program:

Readers who know Media Computation or graphics will likely recognize that as the program to compute the negation of an image. How do we help students to do that? How do we help students to see the program and figure out what it does at a macroscopic level? I built tools into the wave texture builder to make it possible to see the role of each wave in the overall texture, but if you were to describe a texture as a “tightly-woven red and green plaid,” I’m not sure how you’d get that purpose/function from the definition of the waves The problem of figuring out the function is pretty much the same in task-specific programming.

Where to go from here

So this is the end of the series. I’ve described two prototypes for task-specific programming in precalculus (matrix transformations and wave functions), and explored the implications of task-specific programming for research about programming, in education, and in relation to computing education research (this post).

I did these as blog posts, in part, because I’m not yet sure where I might publish and fund this work.

  • Most learning sciences work focuses on students. I’m focusing on teachers first.
  • Most CS education work focuses on learning about CS, especially programming. I’m focusing on using CS programming for learning something else.
  • Most programming languages work focuses, well…on languages. I’m focusing on programming where languages are a second-class citizen.
  • Most work on CS in K-12 is focused on either computational thinking or teaching standalone CS classes. I’m focusing on integrating computing into classes with a goal of reducing computational thinking as much as possible.
  • Most NSF funding in CS Education is tied to work with schools and districts (RPP), and is about CS integration in elementary school and CS-specific classes in high school (STEM+C).  I’m doing design work with teachers for CS integration at the high school level.
  • There is funding (like NSF DRK12 and Cyberlearning) for developing interesting technology for learning, but I’m at the design stage. DRK12 has exploratory grants, but the funding level is too low to pay for my collaborators and my students. How do you get something like this started?

I’m seeing more clearly the point that Greg Nelson and Amy Ko talked about at ICER last year (see paper here). This is design-first work. It’s hard to find a home for that.

I’d appreciate your advice. Where is there a research community that’s concerned about these kinds of things? Where should I be publishing this work? Where should I be looking for funding?


October 4, 2019 at 7:00 am 2 comments

Task Specific Programming will only matter if it solves a user’s problem (Precalculus TSP Part 4 of 5)

This is the fourth in a five part series about Precalculus Task-Specific Programming. I presented two prototypes in Parts 1 and 2, and discussed what I’m exploring about programming in Part 3.

I’ve shown my prototypes to several teachers — some computer science (e.g., I presented the first prototype at the Work In Progress Workshop at ICER in Toronto) and a half-dozen math teachers. The computer science teachers have been pretty excited, and I have had several requests for the system to try out with various student groups.

Why am I looking at precalculus?  Because it’s what leads to success in college calculus. I’m influenced by Sadler and Sonnert’s work showing that high school calculus isn’t the critical thing to support success in undergraduate calculus (see article here). It’s precalculus. Undergraduate calculus is a gatekeeper. Students don’t get STEM undergraduate degrees because they can’t get through calculus. So if we want more students to succeed in STEM undergraduate, we want high school precalculus to get better, in terms of more inclusive success.

Precalculus is a pretty abstract set of topics (see an example list here).  For the most part, it’s foreword looking: “You’ll need this when you get to Calculus.”  My idea is to teach precalculus with concrete contexts made possible by computing, like image filters. I want more students to find precalculus more engaging and more personally meaningful, leading to more learning.

So, might my prototypes help students learn precalculus?

Math teachers have generally been, “Meh.”

I’ve had four teachers tell me that it’s “interesting*.” One math teacher was blunt and honest — neither of these tools solve a problem that students have. Basic matrix notation and element-by-element matrix operations are the easiest parts of matrices. Precalculus students can already (typically) figure out how to plot a given wave equation.

What’s hard? Students struggle with forms of matrix multiplication and determinants. They struggle with what each of the terms in the wave function do, and what influences periodicity. Seeing the graphed points is good, but having the values display in symbolic form like (3*pi)/2 would be more powerful for making a connection to a unit circle. I’m learning these in a participatory design context, so I actually pushed more on what would be useful and what I need to do better — I have a much longer list of things to do better than just these points.

The math teachers have generally liked that I am paying attention to disciplinary literacy. I’m using their notations to communicate in the ways that things are represented in their math textbooks. I am trying to communicate in the way that they want to communicate.

Here’s the big insight that I learned from the mathematics teachers with whom I’ve spoken: Teachers aren’t going to devote class time or their prep time to something that doesn’t solve their problems. Some teachers are willing to put time into additional, enrichment activities — if the teacher needs more of those. As one teacher told me, “Most math classes are less about more exploration, and more about less failure.” The point of precalculus is to prepare students to pass calculus.  If you want more diverse students to get into STEM careers, more diverse students have to get through calculus. Precalculus is important for that. The goal is less failure, more success, and more student understanding of mathematics.

This insight helps me understand why some computational tools just don’t get a foothold in schools. At the risk of critiquing a sacred cow, this helps to explain why Logo didn’t scale. Seymour Papert and crew developed turtle geometry, which Andrea diSessa and Hal Abelson showed was really deep. But did Logo actually solve a problem that students and teachers had? Turtle graphics is beautiful, and being body syntonic is great, but that’s not the students’ problem with math. Most of their real problems with mathematics had to do with the cartesian coordinate system, not with being able to play being a turtle. Every kid can walk a square and a triangle. Did students learn general problem-solving skills? Not really. So, why should teachers devote time to something that didn’t reduce student failure in mathematics?

It would be hard to be disciplinary literate when Logo and turtle geometry was invented. Logo was originally developed on teletype machines. (See Cynthia Solomon’s great keynote about this story.) The turtle was originally a robot. Even when they moved Logo to the Apple II, they could not match the representations in the kid’s textbooks, the representations that the teachers were most comfortable with. So instead, we asked student to think in terms of fd 200 rt 90 instead of (x,y). Basic usability principles tell us to use what the user is familiar with. Logo didn’t. It demanded more of the students and teachers, and maybe it was worthwhile in long run — but that tradeoff wasn’t obvious to the teachers.

I have a new goal:

I want to provide a programming experience that can be used in five minutes which can be integrated into a precalculus class to improve on student learning.

I want to use programming to solve a learning problem in another domain. Programming won’t enter the classroom if it doesn’t solve a teacher’s problem, which is what they perceive as the student’s problem. Improving student learning is my users’ (teachers’) goals. Good UI design is about helping the user achieve their goals.

I’ve started on designs for two more precalc prototypes based on the participatory design sessions I’ve had, and I’m working on improving the wave texture generator to better address real learning problems. The work I’m doing with social science educators is completely driven by teachers and student learning challenges. That’s one of the reasons why I don’t have working prototypes there yet — it’s harder to address real problems.  My precalc prototypes were based on my read of literature on precalculus. That’s never going to be as informed as the teacher-in-the-classroom.

Now, there’s another way in which we might argue that these prototypes help with education — maybe they help with learning something about computer science? Here’s a slide from my SIGCSE 2019 keynote, referencing the learning trajectories work by Katie Rich, Carla Strickland, T. Andrew Binkowski, Cheryl Moran, and Diana Franklin (see this blog post).

You’re not going to learn anything about #1 from my prototypes — you can’t write imprecise or incomplete code in these task-specific programming environments. You can learn about #2 — different sets of transformation can produce the same outcomes. You definitely learn about #3 — programs are made by assembling instructions from a (very) limited set. If I were to go on and look at the Rich et al. debugging learning trajectories (see paper here), there’s a lot of that in my prototypes, e.g., “Outcome can be used to decide whether or not there are errors.”

So here’s the big research question: Could students learn something about the nature of programming and programs from using task-specific programming? I predict yes. Will it be transferable? To text or blocks language? Maybe…

Here’s the bigger research question that these prototypes have me thinking about. For the moment, imagine that we had tools like these which could be used reasonably in less than five minutes of tool-specific learning, and could be dropped into classes as part of a one hour activity. Imagine we could have one or two per class (e.g., algebra, geometry, trigonometry, biology, chemistry, and physics), throughout middle and high school. Now: Does it transfer? If you saw a dozen little languages before your first traditional, general-purpose programming language, would you have a deeper sense of what programs did (e.g., would you know that there is no Pea-esque “super-bug” homunculus)? Would you have a new sense for what the activity of programming is about, including debugging?

I don’t know, but I think it’s worth exploring task-specific programming more to see if it works.

Request to the reader: I plan to continue working on precalculus task-specific programming (as well as in social studies).  If you know a precalculus teacher or mathematics education researcher who would be interested in collaborating with me (e.g., to be a design informant, to try out any of these tools, to collaborate on design or assessment or evaluation), please let me know. It’s been hard to find math ed people who are willing to work with me on something this weird. Thanks!

* In the South, if you hear “Bless your heart!” you should know that you’re likely being insulted.  It sort of means, “You are so incompetent that you’re pitiful.”  I’ve learned the equivalent from teachers now.  It’s “That would make a nice enhancement activity” or “We might use that after testing.”  In other words, “I’d never use this. It doesn’t solve any of my problems.”


September 30, 2019 at 7:00 am 9 comments

Task Specific Programming vs Coding: Designing programming like we design other user interfaces (Precalculus TSP Part 3 of 5)

In the last two posts, I described a prototype task-specific programming tool for building image filters from matrix manipulations, and for building textures out of wave functions.

So, let’s tackle the big question here: Is this programming?

These are both programs. Both of them are specification of process. Both of them allow for an arbitrary number of operations. In the image filter example (second example), the order of operations can matter (e.g., if you change the red matrix through scalar multiplication, then add or subtract it with another matrix, versus the reverse order). The image filter is also defining a process which can be applied to an arbitrary input (picture).

Wil Doane pointed out that this is not coding. No program code is written — not text, not blocks, and not even by spreadsheet formula. This is programming by layering transformations which are selected through radio buttons, pull-down menus, and text areas. It’s really applying HCI techniques to constructing a program.

Probably the big sticking point here is just how limited the programming language is here. Notice that I’m using the term task-specific programming and not task-specific programming language in this series. The programming language is important here as a notation: What transformations am I using here, and what’s the order of execution? If you didn’t get the effect you wanted, the language is important for figuring out which card you want to change. I’m working on more prototypes where the language plays a similar role: A notation for explanation and rationalization. Amy Ko has a paper I like where she asks, “What is a programming language, really?” (See link here.) I’m not sure that the use of programming language here fits into her scheme. Overall, the focus in these two prototypes is on the programming not the programming language.

I spent several months in Spring and Summer reading in the programming language literature — some research papers, but more books like the Little series (e.g., The Little Prover), Shriram Krishnamurthi’s Programming Languages: Application and Interpretation, and Beautiful Racket. I started a Pharo MOOC because it covered how to build domain-specific programming languages. I plan to return to more programming languages research, techniques, and tools in the future. I have a lot to learn about what is possible in programming, about notations for programming, and about alternative models of programming. I need better tools, too, because I’m certainly going to need more horsepower than LiveCode.

But as I started designing the prototypes, I realized that my focus was on the user interface, not the language. Of course, text and blocks are user interfaces, but they use few user interface mechanisms. Even what I’m doing here is a far cry from what’s possible in user interfaces. I am using common UI widgets like buttons, menus, and text areas in order to specify a program. I realized that I didn’t need programming language techniques for these prototypes. By any measure of programming language quality, these are poorly-designed languages. My real focus is on the design process. This approach worked for getting prototypes built so that I could start running participatory design sessions with teachers.

The goal of task-specific programming: Usability for Integration

Here’s the goal I set out for myself:

I want to provide a programming experience that can be used in five minutes which can be integrated into a precalculus class.

In the small sessions I’ve had with 1 or 2 people, yeah, I think it worked.

  • I believe that this user interface is easier to learn and use than the comparable user interface (to do the same tasks) in text-based languages or even a block-based programming language like Snap! or GP.
  • I’d even bet that the language itself (seen in the above screenshots) would be less usable if it wasn’t embedded in the environment, e.g., those two examples above are not that understandable outside of the two prototypes. The environment (e.g., visualizations, UI elements, matrix displays, etc.) are providing more information than the language is.

There are some interesting usability experiments to explore in the future with task-specific programming.  The empirical evidence we have so far on task-specific programming is pretty impressive, as I described in my June 2019 Blog@CACM post (see link here) and which has been published in the September CACM on the topic of “designing away Computational Thinking” (see link here), which is what I was trying to do. Sara Chasins’ published work showed that she had people solving real programming problems in less than 10 minutes. Vega-Lite is amazing, and we’re finding social studies teachers building visualizations in it in less than 20 minutes.  I’m curious to explore other directions in improving usability through these tiny, task-specific languages. For example, it is very easy here to represent the language in something other than English words. Perhaps we might use task-specific programming to make programming more accessible to non-English speakers by targeting languages other than English as the notation.

There’s a cost to that ease of use. There’s a commensurate loss in generalizability. This is laser-focused on TASK-SPECIFIC programming. My prototypes are not Turing-complete. There are no loops, conditionals, or variables. There is decomposition (e.g., which matrix transformations and wave equations do I need for my desired goal), but no abstraction.

I’m inspired by Amy Ko’s blog post: Programming languages are the least usable, but most powerful human-computer interfaces ever invented (see post here).

  • Most attempts to improve on the usability problem are about making programming languages more usable, e.g., less complicated text languages or shifting modality to block-based languages. In general, though, the languages are just as powerful — and are still harder to understand than most students and teachers are willing to bear.
  • There have been attempts to embed programming languages within applications, e.g., VBA in Office applications or JavaScript to script Photoshop. Again, these languages tend to be just as powerful, and not much more usable.
  • I’m explicitly starting from an application (e.g., an image filter) and adding a programming language that only provides a notation for the facilities. It’s less powerful. I hope it’s more usable. I’m designing to be more like Excel and less like C.

Here’s the big idea here: We should design programming languages as we design other user interfaces. We should involve the users. We should aim to achieve the users’ goals. We should empower users. We should reduce their cognitive load.

Task-specific languages certainly can include more programming languages features.  For example, including variables with types makes sense for data science tasks (as in Bootstrap:Data Science). Those are part of data science tasks, and can help students avoid errors.  The critical part is including the components that help the learners with their tasks. My use of task-specific programming is really about learner-centered design of programming languages.

I have submitted two NSF proposals about building task-specific programming for precalculus and for social studies, both rejected. I spoke to both program officers. One told me it was impractical to propose a new programming language, and especially multiple languages. The officer pointed out that a language is hard and requires all kinds of infrastructure around it, like a community and a literature. I built these prototypes to explain what I meant by a “programming language.” It doesn’t have to be big. It can be little, be easy to learn and use, and fit into a one hour lesson in a precalculus class.

Alan Kay has argued for using the “real thing” as much as possible, because students might imprint on the “toy” thing and use it for everything. The concern is that it’s then hard to move on to better notations. I hope to avoid that fate by providing a notation that is so task-specific that it can’t be used for anything else. There is no support for abstraction here, alternative decompositions, or any kind of system design at all. It’s at the very lowest end of the Rich et al. learning trajectories.

Talking about trajectories is the segue to the next post.

I welcome your comments. Do you buy task-specific programming as a kind of programming?

September 27, 2019 at 7:00 am 6 comments

Building Textures from Waves: Debugging in Task-Specific Programming (Precalculus TSP Part 2 of 5)

The second prototype I built for Task Specific Programming in Precalculus is about using wave functions for building textures. As I mentioned in my last blog post, my goal is to use computing to make precalculus less abstract and more relevant. I want to provide a programming experience that can be used in five minutes which can be integrated into a precalculus class. In this prototype, I explicitly designed for inquiry and debugging. What would debugging look like in task-specific programming when the goal is learning precalculus and not programming or computer science?

I’m going to describe this one bottom-up. Wave functions are a common topic in a precalculus class (like in this YouTube lecture). These are typically taught in the form:

A sin(B(x-C)) + D


Amplitude sin(frequency(x-horizontalShift)+ verticalShift

I built a tool where the student specifies a wave function, then that wave is used to define a texture in terms of gray, red, green, or blue components.

This equation is plotted (lower right hand corner) where the X-axis controls the darkness. Each pixel is evaluated left-to-right, and it’s X-position is plugged into this formula. The Y value mapped to a gray scale. The plot should (if it all worked right, and it doesn’t really in this example) line up with the texture so that darkness and lightness maps to rise and fall in the darkness level of the texture.

Let’s set the “Challenge” section aside for just a few minutes.

We can map equations to other colors, and swap sine for cosine, and use the X or Y components of the pixel to determine the color. Like in the first prototype, each wave function appears on a separate card in a deck.

You can have an arbitrary number of these cards. When you get to the front page of the deck, you have a program of all the wave functions. These are then composed to create a more complex texture.

What does debugging look like here?

With this prototype, I thought more about the student’s process than I did with the image filter tool. In my work with both precalculus and social studies teachers, I’m increasingly thinking about inquiry, and I see debugging as a form of inquiry. You have some output, and you’re trying to understand it — and by “understand,” I mean being able to explain how the parts constitute the whole. The impetus to inquire (i.e., to debug) is that the output you have is not the output you expect or want. So, if we want to support inquiry as debugging, we have to support starting from a goal — an example, a requirement, or a set of tests.

I’m inspired by Diana Franklin’s group’s work on La Playa, a Scratch-like programming environment for 4th-6th grade students (see paper here). In La Playa, the programming tool opens up onto a starter file. The student could ignore it and just do open-ended programming, but more likely, the starter file guides the student and serves as a scaffold.

I made a prominent Challenge texture on the front page (and the challenge image appears on every wave card afterward). Can you make this? If you need a Hint, press the Hint button for a suggestion about is needed to make this texture.

In general, my challenge textures don’t really work. I built a bunch of cool textures to use as hints, like below, but the composition of color waves is one of the more complicated parts here — I talk more about it in Part 5 of the series.  But on the other hand, I showed some of these textures to researchers in culturally-relevant curricula who said that they reminded them of woven cloths from the cultures that they study.  Could we use wave functions in a form of culturally-relevant curriculum that blends precalculus and computing?

Imagine that you have a texture that you generated on the first page, and now you want to understand how your existing waves contribute to this texture, e.g, to figure out which equations need to be changed. One tool is the Pop button on the front Texture Program page. This pops out the texture into a separate window.

Now, you can drag the texture over the individual wave textures to understand how the pieces compose into the whole.

Each wave has a checkbox, so that the wave can be removed from the texture (without deleting), then put back in.

The idea is that a student can apply basic debugging principles: Compare to the example, find how this statement/computational-unit impacts the final outcome (like a print statement), and remove the statement/unit (like with a comment) to see the effect on the final outcome.

Multiple-linked representations

As I’ve shown this to math teachers, one of the things they like here are the multiple linked representations. We’ve got the equation:

When the student hovers, they get an explanation for each of the terms:

The plot and the texture, and if you press the “Points” button, you see exactly which points were plotted — both x,y on the graph, but also the computed x and y before they were mapped to the discrete points:

When I showed this to teachers, they wanted it to support more exploration. For example, they told me that students struggle to understand the difference between 3sin(x) and sin(3x). I was thinking that a useful addition to this tool would be a Bret Victor inspired scrubbing gesture over each of the terms in the wave function (as in his fabulous Learnable Programming essay, or in the Scrubbing Calculator). I want to be able to click on the “3” above, drag up, then move the cursor left or right to make that number less or more. As I scrub, I want to see the plot change and the texture change — but with some kind of shadow/echo so that I can compare the “3” plot/texture to the new values for “C.” Students can’t generally keep the original curve “in their head” when seeing the new one, so they need both to be visible to understand the effect of the equation change.

I built these in Livecode. The source file is available here. I’m also making binaries available for Macintosh and for Windows. (Yes, I can provide Linux, if someone’s interested.) These are provided with no warranty or guarantee — these barely do what I describe, and probably have lots of other mistakes, holes, weaknesses, and vulnerabilities. They’re slow as molasses. I strongly discourage you from using my prototypes with students. As I describe in Part 4 of this series, this is nowhere near where it needs to be in order to be useful.

September 23, 2019 at 3:00 am 10 comments

Precalculus Task-Specific Programming for Building Image Filters from Matrix Operations (Precalculus TSP Part 1 of 5)

This is the start of a five part series of blog posts on Task-Specific Programming in Precalculus, subtitled “What Mark Did This Summer.” I wrote several blog posts in the Spring (last in May, linked here) about “task-specific programming languages.” I’ve been thinking a lot about them over the summer, and built my first prototypes for two task-specific programming environments. In these blog posts, I’m describing the two prototypes, and then considering the interaction with research on programming, on education, and on computing education research.

Both of my prototypes are built around teaching precalculus. My goal is to use computing to make precalculus less abstract and more relevant. I am inspired by Phil Sadler and Gerhard Sonnert’s work supporting the argument that precalculus is the most important set of concepts for students to succeed at college calculus (even more than high school calculus).  I want to provide a programming experience that can be used in five minutes which can be integrated into a precalculus class.

The first prototype is for constructing image filters from simple matrix manipulations that are part of many precalculus texts. In a digitized picture, each pixel has a red, green, and blue component (or channel) for its color. All the red values from the pixels can be described as a matrix for the red channel in the picture.

This is the opening screen for the prototype.

The image being manipulated is on the left. The list of matrix manipulations appears in the upper left. The manipulated image is on the upper right.

Across the bottom appear the matrices for the red, blue, and green pixels of this picture. A text description explains where these matrices come from. I tried hard to get the matrix representation close to what students might see in a precalculus textbook. That’s part of being able to be “integrated into a precalculus course.” The teachers I’ve shown this to have appreciated that attention — they don’t want to have to explain differences between the user interface and the textbook.

Changing the picture (see the button under the source picture), updates the matrices, the description, and re-runs the matrix transformation steps on the new input picture.

The lower right hand corner is an inspector to check individual pixel values. This was a suggestion from Line Have Musaeus from Aarhus when I demonstrated this prototype at ICER in Toronto. Precalculus teachers want students to understand how the math is working at the matrix-element level, so I give them a way to check individual matrix values. That’s when I added the block-color picture into the picture set — it makes it easier to understand the four quadrants, what the base colors are, and how the transformations change them.

Each of the matrix transformations appears on a separate card in a deck. Here’s one:

This transformation does a scalar multiplication of 0.5 (which the user sets by changing the text field in the statement). A pull-down lets the user pick which matrix they want to modify. When the user picks a matrix, the display in the lower left updates to show the new matrix. Again, I’m trying to get the formatting for scalar multiplication right from the textbook. The text description on the right updates to describe the selected transformation, and the text and matrix displayed on the lower right updates to show how that matrix is being transformed by this operation.

Here’s the other possible transformation (selected by radio button):

Here, we’re changing one of the channel matrices (pull down for red, green, or blue) to basic element-by-element arithmetic (addition or subtraction) of two selected matrices: red, green, blue, or a matrix of all-255’s. (I’ve had several suggestions to also provide the option of having a matrix of all the same number — all 1’s, all 0’s, or something like all-7’s).

I’m using a semi-transparent gray graphic to “hide” the unselected operation on the card. I want students to know that they can do either operation, so I don’t want it to disappear, but I want to show that it’s not selected.

Currently, the user presses the “Do It” button to process the individual transformations, or to do the whole program of transformations. You can have an arbitrary number of operations, and you can do some interesting transformations, like image negation:

Or making a scene look like it’s nearing sunset:

Press the Change Picture button to get a different input picture. So, the list of operations specifies a process which can be applied to an arbitrary input. It’s a program (for a specific task), but it’s not coding (an important distinction that Wil Doane pointed out to me at ICER this year).

I built these in Livecode. The source file is available here. I’m also making binaries available for Macintosh and for Windows. (Yes, I can provide Linux, if someone’s interested.) These are provided with no warranty or guarantee — these barely do what I describe, and probably have lots of other mistakes, holes, weaknesses, and vulnerabilities. They’re slow as molasses. I strongly discourage you from using my prototypes with students. As I describe in Part 4 of this series, this is nowhere near where it needs to be in order to be useful.

September 20, 2019 at 3:00 am 7 comments

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 9,004 other followers


Recent Posts

Blog Stats

  • 1,875,349 hits
September 2021

CS Teaching Tips