Visual programming tool for educating C programming language

Technical University of Crete
An example C code in Block-C.
Figure 1: An example of a program written in Block-C.

Block-C is an editor for C programming language which uses visual blocks as for writing programs. It was created from scratch as part of my undergraduate thesis.
The problem BLock-C was designed to solve, was the difficulty that first year students face when are first introduced to C language.
Block-C was designed to help them focus on the logic of programming instead of the cumbersome syntax of C.


Block-C was designed based on 4 design principles:

  1. Interaction with understandable concepts: Learners should not be expected to manipulate readily resources or tokens which cannot be easily understood such as libraries and the corresponding #include precompiler directive.

  2. Syntactic error prevention: Syntax guidance should be given for the formation of correct C language expressions in a way that eliminates syntactic errors. This is accomplished by the use of visual blocks that make explicit the structure of language expressions. Furthermore, a restricted sub-grammar is used having only the necessary to introduce a novice to C programming.

  3. Beautified code: Guide learners to writing well-structured code employing automatically paired parentheses, brackets, code block limits etc. This is accomplished through the use of graphical blocks.

  4. Transitivity of the tool: Enable the learners to move from Block−C to ordinary textual C programming. Block−C translates block−based code to C plain text code and provides both viewing options. This way, it promotes the understanding of the correspondence between the command blocks and the actual C statements and their syntax.

 The exported C programme of Figure 1
Figure 2: The exported C programme of Figure 1.


Block-C was evaluated in 3 independent stages; a think aloud evaluation with novices, a think aloud evaluation with experts and one final controlled experiment evaluation with 32 novices.
Between these stages the user interface was refined based on the feedback of each evaluation.

Initial evaluation with novices

The goal of this evaluation was to address the novice users’ perspective and identify usability flaws.
Three university students volunteered to evaluate the interface. A think-aloud protocol was used and the participants were asked to accomplish a set of twelve tasks of gradual difficulty. At the end of the evaluation session the users completed a questionnaire.
Some major usability errors and bugs were detected and subsequently solved. Moreover, the users suggested some extra functionality which was implemented in the second prototype of the tool.

Evaluation with experts

The purpose in this stage was to get feedback from experienced C programming academic teachers. Three lecturers from the department of Electrical and Computer Engineering of the Technical University of Crete participated in the experiment.
The participants were asked to use Block−C and compose a simple C program. During the interview they were asked to explain the difference of some similar syntactic tokens (e.g. assignment operator “=” vs. equality testing operator “==”) using the block commands. They were also asked to reflect on how they would explain the differences of blocks and its connectors to their students.
The results of this evaluation helped in further discover major interface problems. Several bugs were detected and fixed, as well. Furthermore, the users contributed in the addition of extra functionality.

Final Evaluation of Effectiveness
This stage aimed at evaluating the learning effectiveness of Block−C following controlled group experimentation, with the test group used Block−C while the control group used plain text C.
In total 32 first-year students participated. The participants were randomised in control and test group. The evaluation procedure was organized in two sessions.
The first session was introductory and participants of both groups were introduced to the environments used and asked to solve a set of exercises with the help of tutors.
The second stage was the actual evaluation and the participants were asked to solve three tasks of increased difficulty in two hours. Four tutors were present to help participants only with significant logical errors and not syntactical.


Accoring to the results, with the use of Block-C 1.3, 1.8 and 3 times more participants finished the 1st the 2nd and the 3rd task respectively.

Figure 3: The results of the accomplishment time for the three tasks of the evaluation.

The participants of the test roup were also asked about the emotions the had during the use evalaution and asked to complete the emotional response scale.
Almost all of them had a pleasant or a neutral emotion, as presented in Figure 4.

 Figure 4: The emotional response of participants of the test group
Figure 4: The emotional response of participants of the test group.

At the end of the semester and after the examination period, the participants of the test group (Block-C) were asked about their opinion about Block-C retrospectively.
All participants (both those who passed the course and those who fail) thought that Block-C was useful in helping them learn C, thought that Block-C was effective and were positive about suggesting Block-C to other novices.

This work has been published in 2017 IEEE Global Engineering Education Conference (EDUCON) and 9th International Conference “New Horizons in Industry, Business and Education” (NHIBE 2015).