{'fraction_non_alphanumeric': 0.020022246941045607, 'fraction_numerical': 0.0, 'mean_word_length': 5.122448979591836, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
But My Program Runs! Discourse Rules for Novice Programmers

In this article, we present an approach to critiquing and correcting novice programs that “work” (that is, they have correct I/O behavior for all input from the problem space), but are poorly constructed. Poorly constructed working code is often produced by beginning programming students, and it is important but difficult to teach them why some working code is better than others. Traditional explanations of these problems often rest on some kind of efficiency principle. We shall argue that using efficiency as a guiding principle in critiquing working code is inappropriate for novice programmers. Instead, we develop an approach to critiquing working but poorly constructed novice programs based on the principle of program readability. That is, we base our critique of working code on its ability to communicate to program readers.