Novice Programmer = (Sourcecode) (Pseudocode) Algorithm

: Difficulties in learning programming often hinder new students as novice programmers. One of the difficulties is to transform algorithm in mind into syntactical solution (sourcecode). This study proposes an application to help students in transform their algorithm (logic) into sourcecode. The proposed application can be used to write down students’ algorithm (logic) as block of pseudocode and then transform it into selected programming language sourcecode. Students can learn and modify the sourcecode and then try to execute it (learning by doing). Proposed application can improve 17% score and 14% passing rate of novice programmers (new students) in learning programming.


Introduction
Programming language is a language used by programmers to write commands (syntax and semantics) that can be understood by a computer to create a program (TechTerms, 2011). The development of today's technology has encouraged the public interest to learn programming that becomes the prospect and business opportunity (Microsoft, 2015). Based on Developers Survey in 2015 (Stack Overflow, 2015), most of them study programming languages by self-learning or autodidact (41.8%), bachelor in CS (37.7%), magister in CS (18.4%), work training (36.7%), industry certification (6.1%), boot camp (3.5%), doctoral in CS (2.2%), mentorship program (1.0%) and others (4.3%).
Garner research shows that there are 3 obstacles or difficulties in learning programming (Shuhidan et al., 2011). First is errors in writing syntax like missing semicolon and curly bracket. Second is difficulties in understanding and designing a program. Third is difficulties in understanding the basic structure of a program. These three difficulties often hinder new student as a novice programmer to learn programming (Layona et al., 2017).
Novice programmers need some tools to overcome those difficulties (Yulianto et al., 2016a;. This also applies to early semester students in some universities that are new to programming and have not mastered it. In addition, some universities (especially in rural areas or with limited budget) do not have tools that can help their new students in learning programming (Yulianto et al., 2016b).
Previous researches shown that there are several educational tools to support students in starting learning programming (Yulianto et al., 2013). All are operated in offline, online, or both ways (Brandão et al., 2012). Some popular applications are Scratch, Alice, Blockly and Pencil Code (Ebrahimi et al., 2013;Bau et al., 2015). Scratch can help novice programmers to learn algorithm by using animation or game (Brandão et al., 2012;Ebrahimi et al., 2013). Alice can improve novice programmers' motivation in learning programming by using 3D concept and its interactivity. Blockly and Pencil Code implement block of pseudocode to help novice programmers in transforming their algorithm into pseudocode (Bau et al., 2015). Block of pseudocode is a concept of presenting pseudocode in a block-based rather than in text-based (Weintrop, 2015). Unfortunately, those applications don't generate the pseudocode into sourcecode to let novice programmers try to modify and learn from it.
Pears and Jordine apply game tool named RoboCode to help their students in sharpening logic (Pears et al., 2007;Jordine et al., 2014). RoboCode is a Java and .NET programming game for developing a robot tank to battle against other tanks. The robot battles are running in real-time and on-screen (http://robowiki.net). Hundhausen and Vivian use LightBot to let their students solve a puzzle by using programming logic (Hundhausen et al., 2009;Vivian et al., 2014).
Other tools have been applied to help their students, such as Jeroo (Pears et al., 2007), Kodu (Sentance andSchwiderski-Grosche, 2012), Pencil Code (Vivian et al., 2014), Cargo-Bot and Move the Turtle (Grantham, 2011). Jeroo is an effective classroom-tested tool that helps novices learn fundamental concepts of object-oriented programming (www.jeroo.org and http://home.cc.gatech.edu/dorn/jeroo). Kodu lets students to create games on PC and Xbox via a simple visual programming language (https://www.kodugamelab.com). Pencil Code is used for learning professional programming languages by using an editor that lets students work in blocks (https://pencilcode.net/). Cargo-Bot is a puzzle game to teach a robot how to move crates (https://twolivesleft.com/CargoBot/). Move the Turtle teaches students the basics of programming (http://movetheturtle.com/). Unfortunately, those tools don't provide a feature of conversion to programming language source code to lets students modify and execute it in real environment (learning by doing).
Based on that problems, this study proposes an approach by using application for new students to convert their algorithm in mind into block of pseudocode, then generate it into a selected programming language (sourcecode). After that, students can try to modify and execute the generated sourcecode (learning by doing) . By this method, students can overcome the difficulties in transforming their algorithm into programming language.
Converting a data type to another in a programming language is called 'type casting' and symbolized with round brackets '()'. That's why this study is titled "Novice Programmer = (Sourcecode) (Pseudocode) Algorithm", which means converting algorithm in mind into pseudocode and then into sourcecode for novice programmers.

Data Collection
Software development method used in this study is Rational Unified Process (RUP). This study is not focusing in RUP discussion since it's a common method and easily to be learned. Data collection is gathered by distributing questionnaire to 129 students. Questionnaire results will be a foundation in developing the purposed application. Based on the results, most respondents learn C or C++ in early semester (Table 1). After early semester, most respondents learn PHP, PL/SQL, HTML/JavaScript, Java, or C# in next semesters. Most respondents recommend C, C++ and Java as first programming languages to be learned by new students (Fig. 1). This application provides C, C++ and Java to be selected by students when converting pseudocode into a programming language. Students can select which programming language to be used.  12 77 1 Learn in the early semester and continue 2 Learn in the early semester but not continue 3 Learn in next semester (after first programming language) and continue 4 Learn in next semester (after first programming language) and not continue 5 Never learn 20 39 0 e.g., for, do-while, while 1 Often happens at the beginning, but less in next 2 Often happens at the beginning and next 3 Rarely happens at the beginning 4 Never happen Half of respondents often make more errors at the beginning of learning programming, but make less in the next learning. Another half respondents make less errors at the beginning of learning (Table 2). This means that they can overcome the errors along the time of learning. However, this application will provide features to help student in minimizing those errors. Some features that are needed by novice programmers to help them in learning programming are also listed on Table 3. Topics are sorted based on chapters in text books (Table 4). Basic topics (top 5 from average, symbolized with 'X') will be converted as application features in creating block of pseudocode. This average method is used to rank which ones to be basic topics based on smaller score.

Proposed System
System is proposed as a web-based application. Main window is divided in 4 sections (Fig. 2). First section (top left) provides students to create new project or open existing one (on Project tab). Students can also choose a provided pseudocode template, so they don't need to start from blank. On Program Control tab, students can declare variable, add input/output, selection, repetition and assignment statement. Second section (top right) provides tutorial (PDF type) for students. So, they can choose and read the tutorial during creating the block of pseudocode. Third section (bottom left) displays the results of block of pseudocode. Students can also edit, move and delete block of pseudocode and generate it into sourcecode of a selected programming language. Last section (bottom right) will display generated source code and students can download it. There are also options to generate block of pseudocode into textual pseudocode form (downloadable as a text file) or flowchart image (downloadable as a JPG on Flowchart tab on third section).
When students create a repetition (for) statement, a pop-up window will be displayed for step 1 (variable source). Student selects a variable source (from existing code, or creating new one), data type, variable name and value (Fig. 3). Student can select variable value from existing variable or insert new value (custom). On step 2 (condition), student selects a variable to be compared to another variable or a value. Student can also add additional conditions in this step. On step 3 (increment/decrement), student selects a variable and set as increment or decrement. Student can go back to previous step. After all steps done, block of pseudocode is displayed. Student can generate it into a programming language. It is also able to create a 'do-while' or 'while' statement besides 'for'.
When student creates a text (output) statement, a popup window will be displayed (Fig. 4). Student inputs a text to be displayed and can be combined with ASCII code or escape sequence. After that, block of pseudocode is displayed and student can generate it into a programming language. .
(e) When a student creates an arithmetic statement, a pop-up window will be displayed (Fig. 5). Student selects an existing variable, operand 1, operator and operand 2. Each operand can be dropped down into a sub arithmetic expression (also consists of operand 1, operator and operand 2). After that, block of pseudocode is displayed and student can generate it into a programming language.

Evaluation
Evaluation is conducted by doing an experiment to 260 first semester students in computer laboratory (divided in 2 groups of 130 students). All are new students who have learned basic Java programming theory (I/O, variable, data type) and introductory of selection and repetition structure. Group 1 is for traditional learning without using this application and Group 2 is using. By giving same pretest (an arithmetic case), both groups are statistically indicated as normal and homogeneous population and have same average of score. Average pretest score for Group 1 is 53.53 and Group 2 is 54.24.
Due to limitation of computer laboratory capacity, each group is divided in 4 class sessions of 32-33 students. Instructor (same for all sessions) provides a demo of using the application for Group 2 and then the students try.
Next, instructor gives same posttest (arithmetic case, different from pretest). All students for both groups are given time for thinking the solution (algorithm) in 5 min and write on white paper. After that, students in Group 1 are writing the code directly by using TextPad. Students in Group 2 start to transform their algorithm into block of pseudocode by using the application and then generate it into Java programming languages (source code). The source code is downloaded and then compiled by using TextPad to check its accuracy for both error free and algorithm correctness. Both groups are given the same duration of 30 min to finish the posttest. After the session, questionnaire is distributed to students in Group 2 to evaluate the application subjectively. Results are shown on Table 5.  At the end, instructor collects all source code files from both groups and compile it one by one. All source code files from Group 2 are error free (in line with the questionnaire results). After that, scoring of all students from both groups is done by checking syntax, I/O, data type, conditional expression, selection, etc. Average score of Group 1 is 70.95 from 100 (with lowest score is 50 and highest is 88). Average score of Group 2 is 87.16 (with lowest score is 59 and highest is 100).

Conclusion
Based on the experiment conducted on this study, it can be concluded that this proposed application can help novice programmers in writing their logic (algorithm) in the form of block of pseudocode, then generate it into source code. Generated source code can be downloaded according to the provided programming language and then students can modify and learn from it (learning by doing). Additionally, this application is also accessible on various devices, both PC and mobile.
This study has limitation of comparing the duration of finishing the posttest (how many students finish the posttest earlier). Further research can include the time calculation, effectiveness in learning or improving programming or problem-solving skills and easiness of learning or migrating the new programming languages.