Learning Programming Languages as Shortcuts to Natural Language Token Replacements

Category:

Description

The basic knowledge of computer programming is generally considered a valuable skill for educated citizens outside computer science and engineering professions. However, learning programming can be a challenging task for beginners of all ages especially outside of formal CS education. This paper presents a novel source code editing method that assists novice users understand the logic and syntax of the computer code they type. The method is based on the concept of text replacements that interactively provide the learners with declarative knowledge and help them transform it to procedural knowledge, which has been shown to be more robust against decay. An active tokenization algorithm splits the typed code into tokens as they are typed and replaces them with a pre-aligned translation in a human natural language. The feasibility of the proposed method is demonstrated in seven structurally different natural languages (English, Chinese, German, Greek, Italian, Spanish, and Turkish) using examples of computer code in ECMAScript (JavaScript).

Related…