Archive for March 25, 2019

Task-specific programming languages: People aren’t dumb. Programming is hard.

I’ve been thinking a lot about task-specific programming languages lately.  I’m inspired by the work on domain-specific programming languages (e.g., see blog post here), and have been wondering whether we can reduce the cognitive load even further by focusing on programming languages for specific tasks. I’m thinking that we should be applying HCI design techniques (e.g., user centered design) and apply them to the design of small, task-specific programming languages.

But that got me wondering: Surely this is not a new idea.  What do we know about task-specific programming languages? Do students learn generalized ideas about programming from learning a task-specific programming language? How does it change affect or cognitive load if students start with a programming language tuned especially to their task?

I did some literature searches, and found a highly relevant paper: “Task specific programming languages as a first programming language.”  And the lead author is…me.  I wrote this paper with Allison Elliott Tew and Mike McCracken, and published it in 1997.  I honestly completely forgot that I had written this paper 22 years ago. Guzdial-past knew things that Guzdial-present does not.

The paper doesn’t answer any of my questions.  It talks about some surveys and comparisons we were doing, but offers no results.  I have no idea where the data from those surveys and comparisons are today.

Abstract: This research investigates whether there is a difference in the acquisition of programming skills and knowledge as a function of a student’s first language. Our research is concerned with the comparison of task specific languages and general programming languages. In many engineering programs students are first exposed to the principles of computational solutions to problems by means of task specific languages, such as MatLab. They are then either expected to be able to use, or are specifically taught programming using more general purpose languages, such as C. Our question is whether there is a developmental preference for learning a task specific language first, or a general purpose language first. Historically, educators have emphasized fundamentals prior to application. A case could therefore be made that a student should be taught general programming skills in the context of a general purpose language before solving problems in a task specific language. More recently, contextualized educators would prefer the initial learning of task specific languages. Our research anticipates answering the question of the effectiveness of transfer of programming skills as a function of first language learning. The dimensions of this question include but are not limited to, how the languages are used, what types of problems are presented to the students, is transfer prompted between the languages, do students look for surface or structural similarities, and what are the assumptions and expectations of the faculty who teach these languages.

Here’s my favorite paragraph in the paper. Yup, still have all those same questions.

We have developed a comparison of task specific languages and general purpose languages to allow us to investigate ontological boundaries between languages and their impact on transfer. For example, MatLab essentially has no typing. It uses built in types. Whereas, general purpose languages have various types, including enumerated types, and support the construction of complex data structures around those types. Does this difference cause a boundary to transfer? If a student learns MatLab first, will data types be more difficult to learn? If a student learns a general purpose language first, will they be able to transfer their skills to a language that prevents them from constructing many of the structures they have previously used?

I’m still catching up on podcasts that I missed during my move.  One of those was a rebroadcast of an interview with Richard Thaler, one of the founders of behavioral economics and a recent Nobel prize winner in Economics.  He explains the central idea of behavioral economics: “People aren’t dumb. The world is hard.”

So, we don’t think people are dumb. We think the world is hard. I mean, figuring out how much to save for retirement is a really hard cognitive problem that very few economists have solved for themselves. And it’s not only cognitively hard, it involves delay of gratification, which people find hard. It’s just like navigating in a strange city is hard. So, why not try to help? When I first was working with the U.K. Behavioral Insight Team, the first “Nudge unit,” the phrase I kept saying in every meeting with some minister was, “If you want to get people to do something, make it easy. Remove the barriers.” That’s what we’re about.

If we want people to program, make it easy. Remove the barriers. That’s what we’re about. People aren’t dumb. Programming languages are hard.  If we can fix that, we should. That’s what I see task-specific programming as being about.

 

March 25, 2019 at 7:00 am 22 comments


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

Join 8,988 other followers

Feeds

Recent Posts

Blog Stats

  • 1,869,005 hits
March 2019
M T W T F S S
 123
45678910
11121314151617
18192021222324
25262728293031

CS Teaching Tips