• About
  • Publications
  • Public Speaking
  • Press
  • Blog
  • Newsletter

Felienne's blog

So… what is a notional machine?

July 10, 2019 by felienne

We are here for three days now, so let’s discuss the actual top: notional machine. We were asked in groups to consider this and our group came up with this answer:

“A notional machines is a model between the source code and an actual machine meant to help a learner”

We see two different types of notional machines, one being stories we tell about code, like ‘a variable is like a box’ or, this nice example from the LOGO manual explaining a list like a stack of boxes that hold values.

But, they can also be representations of source code a a higher level of abstraction:

Mark Guzdial asked an interesting question about this last one, namely: is this the notional machine, or it is a representation of one? That seems to be an open question 🙂

Research questions

Breakout groups also thought about what research questions we could ask and answer about notional machines. I have grouped them into different categories for all breakout groups and added some notes here and there.

How to gather notional machines?

  • Observe teachers and see what models they use, both in plenary instruction and during one or one
  • Analyze video’s/textbooks/course slides and see what notional machines they use
  • Have students read code and record a video of them explaining what the code does
  • Observe what students talk about in class, do they use notional machines? Are their explanations consistent with the notional machines teachers have? What terms do learners use when, for what types of code and tasks.
  • Think alouds while tracing, debugging, writing code etc.
  • Understand not only the notional machines that teachers use, but also which ones they prefer and why

How do we change learner notional machines?

  • Have students practice simulating program behavior in a certain way, enforcing a certain machine

How do we organize nm’s?

  • How do we sequence notional machines? In what order should they be presented (prescriptive)
  • Look at syllabi of courses and see when they use what machines (descriptive)
  • Should there be a set of sample notional machines?

About lying

Probably because of Ben duBoulay’s talk on Monday, the topic of lying is present in many groups. Maybe lie is not the right word, but it is introduced now so hard to get people to stop using it. It leads to interesting questions though. For example: how open are we to learners about the limitations? Should we say “it actually does not work this way but… for now it will do”. Robert remarks that there are some psychology results that show that it might be better to tell people that you are lying, and Colleen added that it might be more memorable if a statement is prefaced by “this is a lie”.

Someone compared this with physics too, where they use simplified models too. Is Newtonian gravity a lie? No, it is a simplification that has a use, and will do just fine until learners are at the level of quantum.

Sally adds that this reminds her of the concept of ‘semantic waves’:

Image result for semantic waves
You start with the abstract concept, bring it down to the level of the students, and then come back up. Image from Maton 2013.

Colleen now adds that models can be correct, but for a limited subset of the language. For example, the box metaphor works well, as long as you only have single assignments to a variable (which is exactly what our wipsce 2018 paper found). The nice thing about programming is that we can control the world that learners learn in (contrary to the real world where we cannot really remove complexity.

A word from the organizers

After these breakouts sessions updates, Shriram and Mark will share their perspectives on notional machines. Shriram start by making a distinction between understanding what a program does and what a language does.

Something like PythonTutor helps a student understand what a single program does but not the language as a whole perse (although it might help to understand what the language does).

For Shriram a notional machine is the answer to the question: “What is Python?”

Mark will now show some examples of notional machines, from a historical perspective. As far as Mark knows, this is the first OO lesson in the history of mankind, talking about “Joe the box”.

When Alan Kay taught Smalltalk, this is what he would say “everything is an object” to explain what Smalltalk is, which according to Mark is a notional machine. But it are more design decisions that a useable notional machine. What he would do now is talk more about how the machine executes code. He would say something like: an object gets a message, and checks whether it has a corresponding method, and if so executes it.

So where does this notional machine break (because they are all models, so incorrect)?

For example, for 3+ 4 there is no message passing in Smalltalk, it is just simple addition. A more complicated example is 3 + 4 * 5 – 7 How that works depends on the Smalltalk version!

Now it is Shriram’s turn, and he is going to give some examples from his book How to design programs using Racket. His perspective on notional machines is different, he says it is more like semantic rules defining (so not illustrating) what happens within the machine.

For example:

You can also express parts of the machine in terms of other parts. For example you can say that (and e1 e2) is short for (cond [e1 e2] [else #false]).

Here the model breaks down because the rules do not cover the entire language, but the learner will never really see the lie break down, because in the online lesson method that Shriram uses, students can only use the part of the language that has been explained.

Matthias asks what the difference is between a notional machine and semantics. Shriram says that for him, there is not really a difference, but a formal semantics is not very accessible to most students, so we need simpler things (this relates to Sally’s semantic waves, Sally adds that a notional machine can be seen as a way to make that ‘dip’ happen.

To summarize this discussion, for me a notional machine is a way to tell students what to ‘do’ with a program, how to execute a program in their heads. That can have the form of a formal rule, the form of a story, or (Colleen adds) the form of an example helping a learner to know what to do.

Mark now makes the valuable addition that a notional machine can function as a scaffold, a way to help students understand. If students do not need it (for example because they are coming from a different programming language, or because your notional machine is very aligned with their prior knowledge) you can skip a few, or all of them. That ties into the research questions we described above, about understanding a sequence of notional machines and when to use which, and when students use which.

Share this:

  • Click to email a link to a friend (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Pocket (Opens in new window)
  • Click to share on Mastodon (Opens in new window)

Related

Posted in: Live blog, Uncategorized Tagged: #dagstuhlnm

Taal/Language

  • English

Recent Posts

  • I don’t like the new ov-bike October 11, 2023
  • Teaching is the best job in the world! October 7, 2023
  • Unbelievable AI September 20, 2023
  • The robots are coming… September 20, 2023
  • A Framework for the Localization of Programming Languages September 12, 2023
  • Digital rights for kids September 4, 2023
  • Tools for teaching versus tools for learning March 29, 2023

Tags

#dagstuhlnm academia ACCU15 Andrei Alexandrescu benevol2012 c# code clones dagstuhl Desiderius education empirical software engineering Eusprig f# feminism FSE14 fsharp haskell icpc16 icse15 icse16 icse17 icse2012 icse2013 icsm2012 icsm2013 icsme15 laser ppig16 programming education refactoring saner16 scala SCAM2012 scam2013 scratch sems14 sems15 source code analysis Spreadsheets strata2012 technical debt testing tweetprop VLHCC15 vlhcc16

Postal address

Vrije Universiteit
Faculty of Science – Computer Science
De Boelelaan 1105
1081 HV Amsterdam
the Netherlands

 

Postal address

Vrije Universiteit
Faculty of Science – Computer Science
De Boelelaan 1105
1081 HV Amsterdam
the Netherlands

 

Copyright © 2024 Felienne's blog.

Omega WordPress Theme by ThemeHall

 

Loading Comments...