The Elephant in the Syntax: A Comparative Study of Semantics‑First, Block‑Based, and Textual Programming

Programming Education & Computational ThinkingK-12 Digital Education ToolsK-12 TeachersUniversity Professors & Researchers

Paper Title

The Elephant in the Syntax: A Comparative Study of Semantics‑First, Block‑Based, and Textual Programming

Publication Info

  • Topic area: Comparative evaluation of programming paradigms for novice learners in secondary education.
  • Keywords: semantics-first programming, block-based programming, textual programming, computational thinking, cognitive load, Karel-like environments, programming education, conditionals, novice programmers, direct manipulation.

Background and Problem

  • Problem / challenge: Syntax remains a major barrier for novice programmers, even in block-based systems where conditionals are particularly challenging due to their implicit semantics.
  • Significance: Addressing these challenges can improve programming education by making it more accessible and effective, particularly for secondary school students.
  • Motivation and related work: Prior systems like Scratch and Stagecast Creator have attempted to simplify programming for novices, but conditionals remain difficult to grasp. Recent systems like Algot have shown promise in making program semantics visible, but adoption in K-12 education remains limited. This paper builds on these ideas to explore a unified programming platform.

Solution

  • Proposed approach: The Elephant system, a unified Karel-like programming platform supporting three paradigms: semantics-first programming, block-based programming, and textual programming.
  • Novelty:
    1. Introduction of a semantics-first programming mode that emphasizes state visibility and direct manipulation.
    2. Development of a unified environment (Elephant) that ensures consistent task semantics across programming paradigms, eliminating cross-tool confounds.
    3. Empirical evidence showing the effectiveness of semantics-first programming in improving task performance for secondary school students.
  • Procedure and key techniques:
    • Semantics-first programming: Users define rules by directly manipulating a visual representation of the program state.
    • Block-based programming: Implemented using Blockly with semantics consistent with the other modes.
    • Textual programming: JavaScript interface with simplified syntax and helper functions.
    • Two within-subjects studies with secondary school students (N=39) to evaluate task performance, cognitive load, and usability.

Results

  • Concrete findings:
    • Semantics-first programming significantly outperformed textual programming (p = 0.016, Cohen’s d = 0.56) and block-based programming (p = 0.016, Cohen’s d = 0.76) in task performance.
    • Cognitive load was lower for semantics-first programming compared to block-based programming (p = 0.026, Cohen’s d = 0.60), but not significantly different from textual programming.
    • Usability of semantics-first programming was rated higher than block-based programming (p = 0.033, Cohen’s d = 0.57).
  • Advantage over baselines:
    • Higher task performance across both studies.
    • Moderate reduction in cognitive load compared to block-based programming.
    • Fewer misconceptions and errors in semantics-first programming compared to block-based programming.
  • Experiments / evaluation:
    • Study I (N=22): Compared semantics-first and textual programming.
    • Study II (N=17): Compared semantics-first and block-based programming.
    • Metrics: Task performance, cognitive load (Paas scale, NASA-TLX), usability (SUS), enjoyment, and computational thinking (CTt).
    • Tasks: 10 progressively challenging grid-based tasks requiring conditionals and sequencing.
  • Limitations and future work:
    • Small sample size and gender imbalance.
    • Limited to grid-based tasks, which may not generalize to broader programming contexts.
    • Short intervention duration (5 hours) insufficient to measure long-term learning outcomes.
    • Future work includes extending Elephant for advanced topics (e.g., graph search) and studying its role as a primer for textual syntax.

Summary

This paper introduces Elephant, a unified programming platform designed to teach conditionals and sequencing to secondary school students using semantics-first, block-based, and textual programming modes. Across two studies, semantics-first programming demonstrated superior task performance compared to the other modes, with moderate reductions in cognitive load and higher usability ratings. The findings suggest that semantics-first programming can help novices grasp conditional logic by making program semantics visible. Future research should explore its long-term impact and applicability to broader programming contexts.

Quick Actions

Share

Share this page

ios_share

https://hci.top/en/papers/chi/222226/2026

AdRecommended

Learn AI Coding at CodeNow

open_in_newOpen DOI Link
DOI: https://doi.org/10.1145/3772318.3791667
At a Glance

Paper Snapshot

fact_check
dataset
Source
CHI
calendar_month
Year
2026
emoji_events
Award
No award tagged
group
Authors
5 authors
sell
Subtopics
Programming Education & Computational Thinking, K-12 Digital Education Tools
work
Professions
K-12 Teachers, University Professors & Researchers
article
Content Status
Full text indexed
hub
Related Papers
10 related papers