A Study of Grammar-Concept Understanding Problems For Web Client Programming With JavaScript

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

A Study of Grammar-Concept Understanding Problems for Web Client

Programming with JavaScript

Khin Thet Mon1), Nobuo Funabiki2), Soe Thandar Aung3), Khaing Hsu Wai4),
Khin Sandar Lin5)
1) Department of Electrical and Communication Engineering, Okayama University, 3-1-1 Tsushima-
Naka, Okayama, 700-8530, Japan (p3x78b2r@s.okayama-u.ac.jp)
2) Department of Electrical and Communication Engineering, Okayama University, 3-1-1 Tsushima-
Naka, Okayama, 700-8530, Japan (funabiki@okayama-u.ac.jp)
3) Department of Electrical and Communication Engineering, Okayama University, 3-1-1 Tsushima-
Naka, Okayama, 700-8530, Japan (soethandar@s.okayama-u.ac.jp)
4) Department of Electrical and Communication Engineering, Okayama University, 3-1-1 Tsushima-
Naka, Okayama, 700-8530, Japan (khainghsuwai94@gmail.com)
5) Department of Physics, Pathein University, No.3 Quarter, Kan Thone Sint Estate, Pathein,
Myanmar (khinsandarlin93@gmail.com)

Abstract— Nowadays, web client programming with JavaScript is a powerful motivator for first-time
HTML, CSS, and JavaScript has become common in web programmers since it can very easily translate raw data
application systems on both desktop and mobile devices. to interactive and engaging visualizations [2]. It can be
However, few universities offer the full courses, although introduced in the early years of STEM (Science,
the study may not be easy for novice students due to Technology, Engineering and Mathematics) education
complex composing elements. In this paper, we study the curricula to expose students to basic programming
Grammar-Concept Understanding Problem (GUP) for concepts.
self-study of the web client programming by novice
students. In GUP, a question describes the definition of a Under the above-mentioned situations, a lot of
predefined word for a method, a tag, an attribute, or an people have now started to interest in learning
event, and requests to answer the corresponding word in JavaScript for web client programming. Then, high-
the given source code. It is expected a student naturally quality learning tools have been highly demanded for
learns the basic grammar concepts while touching their students, especially for self-study at home since many
usages in codes by understanding the questions and students have no opportunities of taking the courses at
answering the key words in the code. For evaluations, we schools. Currently, most universities are teaching
generated 25 GUP instances with 209 questions using JavaScript in a part of a web programming course.
source codes in websites and books and confirmed the
effectiveness through applications to 26 university students Previously, we have developed Java programming
in Okayama University. learning assistant system (JPLAS) to assist self-study of
Java [3]. To cover various learning levels, JPLAS
Keywords— PLAS, JavaScript, HTML, web, grammar- provides several types of exercise problems, including
concept understanding problem the grammar-concept understanding problem (GUP) [4],
the value trace problem (VTP), the element fill-in-blank
I. INTRODUCTION
problem (EFP), the code amendment problem (CAP),
Nowadays, the web client programming with HTML, the code modifying problem (CMP), and the code
CSS, and JavaScript has become common in web writing problem (CWP). For any type in JPLAS, the
application systems on both desktop and mobile devices. answer from a student is marked automatically, to
Among the three languages, JavaScript plays key roles support the self-studies by the students. By extending
in detecting browser types, customizing webpages, the works, we have been developing JavaScript
enhancing security, checking forms, and causing special programming learning assistant system (JSPLAS) [5].
effects in the webpage. As a result, JavaScript is the
most popular programming language [1]. To learn programming effectively, it is suggested
that students solve simple problems for code reading
JavaScript has remarkable features compared with and grammar concept studies first, and then practice the
other major programming languages. 1) It is easy to get coding problems using code modifying ones. Therefore,
started with by abstracting away most of the complex students are expected to solve the programming
details of programming and to focus on learning how to exercises along this order of problem types in JSPLAS.
program. 2) It allows coding and testing on a web
browser without setting up any development In this paper, we study the grammar-concept
environment. 3) It becomes the essential web understanding problem (GUP) as the first step problem
technology along with HTML and CSS to build to study web client programming with JavaScript. A
interactive websites. 4) It has many prewritten GUP instance consists of a source code, a set of
functionalities to help programmers develop complex questions, and their correct answer strings. A question
systems easily. describes the definition of a predefined word in basic
grammar concepts representing a method, a tag, or an
attribute that appears in the given source code, and
requests to answer the corresponding one in the code. C. Generated GUP Instances
The correctness of any student answer is marked Table 1 shows the grammar concept, the number of
through string matching with the correct string. To lines (LOC) in the source code, the number of questions,
generate a new GUP instance automatically, the and the average correct answer rate of the students for
generation program for Java in [4] is modified for web
the 25 GUP instances.
client programming. The keyword list and the question
list are newly presented.
Table 1 Generated GUP Instances.
For evaluations, we generated 25 GUP instances ID # of Avg
with 209 questions using source codes for basic web Grammar concept LOC ques- correct
client programming in websites and textbooks and tions rate
1 Output by using 11 5 100%
assigned them to 26 master students in Okayama innerHTML
University who have not studied JavaScript in schools 2 Output by using 13 10 99%
before. Then, it was found that all the students correctly innerHTML
solved all the questions except for two instances where 3 how to change the label 14 8 100%
99% of them were solved. Thus, we confirm the of the button
4 Get the ID of the clicked 21 7 100%
effectiveness of the proposal in studying basic concepts button
of web client programming with JavaScript by novice 5 Get the HTML elements 33 12 100%
students. by Query selector
6 How to use the alert 14 6 100%
The rest of this paper is organized as follows: message
Section II presents GUP for web client programming. 7 How to use event 14 3 100%
Section III evaluates them. Section IV presents the handlers
8 How to change the 10 7 100%
related literature works. Finally, Section V concludes HTML attribute values
this paper with future works. 9 Event handler when user 27 10 100%
leaves from input field
II. GUP INSTANCES FOR BASIC GRAMMER CONCEPTS 10 How to use on-submit 19 11 99%
function to redirect other
In this section, we present 25 GUP instances for page
studying basic grammar concepts. 11 How to use the select 17 8 100%
event handler
A. Design Goals of GUP 12 How to use the reset 17 5 100%
The design goals of GUP are as follows: event handler
13 How to use the key-up 17 8 100%
1) A new GUP instance can be automatically and key-down event
generated by find the proper source code. handler
2) A variety of source codes effective in 14 How to use confirm 20 7 100%
programming study are depicted with full forms to window object
15 How to use prompt 15 7 100%
novice students. window object
3) A student can memorize the keyword definitions 16 How to use open window 14 5 100%
by carefully reading and understanding the codes. object
17 How to use open window 17 7 100%
4) Any student answer can be marked through string object (time out setting)
matching automatically. 18 Validate form 25 10 100%
B. GUP Instance Generation Procedure 19 JavaScript retype 27 10 100%
password validation
A GUP instance can be generated by: 20 Email validation 26 12 100%
1) It modifies the program (GUP generator) to How to show date 15 10 100%
21
generate the text file for a new GUP instance that
describes the questions and the correct answers by 22 Digital clock 37 13 100%
updating the keyword list and the question list. 23 Eval function for 52 14 100%
calculation
2) It selects a source code that is suitable for studying 24 Timer 35 9 100%
basic grammar concepts by containing the Error handling 26 5 100%
25
important keywords.
Average 21.44 8.36 100%
3) It runs GUP generator with the source code to Total (SD) 9.82 2.81 0%
generate the text file.
4) It runs another program (Interface generator) D. Example GUP Instance
with the text file in 3) to generate the The following Source Code is used in ID=1. It uses,
HTML/CSS/JavaScript files for the answer innerHTML, and contains five keywords, script,
interface on a browser. document, getElementById, innerHTML, and id, which
5) It assigns the generated GUP instance to students. must be understood by the students.
In this section,
Source Code III. EVALUATION
<html> In this section, we evaluate the 25 GUP instances
<head> through applications to 26 first-year master students in
</head> Okayama University. Before the application, there was
<body> no class of the web client programming.
<h1>Output by using innerHTML</h1> A. Correct Rate Results
<p id="msg"></p> As more details of the solution results in Table 1, 23
<script> students among 26 achieved 100% correct rates, one
document.getElementById("msg").innerHTML="HelloWorld"; achieved 98%, and one achieved 99%. Thus, the
</script>
generated GUP instances are at the proper level for
novice students to start studying web client
</body> programming.
</html>
B. Submission Times Results
The following five questions with the correct Then, the number of answer submission times for
answers are selected for Source Code by GUP
each instance is analyzed. JSPLAS allows the students to
generator:
repeatedly submit their answers for marking. Table 2
(1) What is the main tag to define the JavaScript part in shows the number of students for each range of
this program? (script) submission times. In Table 2, one student achieved the
(2) What is the pre-defined object that represents the best result of 26 submissions for the 25 GUP instances
whole HTML document in this program? (document) and the 100% correct rate. On the other hand, three
students did nearly 400 submissions, which is 16 times
(3) What is the pre-defined method to return the html of the number of instances and twice of the number of
element that has the value for the id attribute in the questions. This means that these students submitted
argument in this program? (getElementById) answers 16 times for one instance and two times for
(4) What is the pre-defined property to set or return the each question on average.
HTML message or contents of an element in this Table 2 Student Result for GUPs
program? (innerHTML)
Group # of submissions Size
(5) What is the attribute to specify a unique id for an 26
I 1
HTML element in this program to access and
manipulate the element with the specific id? (id) II 27-50 6
III 51-100 6
E. User Interface of GUP
IV 101-200 7
Figure 1 illustrates the user interface for this instance.
V 201-300 3
After filling in the answer form, the student clicks the
“Answer” button. If the answer is correct, the VI 301-400 3
background color will stay in white. Otherwise, it will
become red. The student can submit answers repeatedly. IV. RELATED WORKS IN LITERATURE
By clicking the link noting “Click here to download the In this section, we discuss related works to this study
source code” that appears between the source code and in literature.
questions in the interface, the student can download the
code to run or edit it. In [6], G`omez-Albarr`an reviewed several tools to
support teaching and learning of programming, and
categorized them into four groups, 1) tools including
simple development environments, 2) example-based
environments, 3) tools based on visualization and
animation, and 4) simulation environments.
In [7], Brusilovsky et al. presented QuizPACK that
asks the value of a particular variable or a string with a
fragment of a program. They demonstrated that it
significantly improved the knowledge of semantics.
In [8], Kordaki presented a computer-based problem-
solving environment named LECGO (Learning
Environment for programming using C using
Geometrical Objects) for learning C programming by
beginners. It emphasized: (a) multiple external
representations in student learning, (b) motivations
through performing problem-solving activities from the
familiar and meaningful context, (c) active participations
Figure 1: GUP answer interface. of students by using hands-on experiences, (d)
appropriate feedbacks to aid self-corrections, and (e) International Association of Engineers onferences
holistic, activity-based, multi-media, multi- 2016 (Volume II)," pp. 517-530, World Sci. Pub.,
representational and multi-layered contents for learning
2018.
basic concepts of C programming.
[4] S. T. Aung, N. Funabiki, Y. W. Syaifudin, H. H. S.
In [9], Lee et al. presented a game called Gidget Kyaw, S. L. Aung, N. K. Dim, and W.-C. Kao, “A
where the eponymous robot protagonist is cast as a
proposal of grammar-concept understanding
fallible character that blames itself for not being able to
correctly write codes to complete its missions. Players problem for Java programming learning assistant
learn programming by debugging problematic codes. system,” to appear in J. Adv. Inform. Tech., Oct.
2021.
In [10], Li et al. presented a game-based learning
environment to support novice students learning [5] K. T. Mon, N. Funabiki, H. H. S. Kyaw, M. P. P.
programming. It exploits game construction tasks to Zaw, and E. E. Myat, “A study of value trace
make the elementary programming more intuitive and problems in JavaScript programming learning
comprises concept visualization techniques to allow assistant system,” in Proc. FIT, vol. 1, pp. 33-36,
students to learn key concepts in programming through
Aug. 2021.
game object manipulations.
[6] M. G`omez-Albarr`an, "The teaching and learning
In [11], Hwang et al. proposed the web-based of programming: a survey of supporting software
programming assisted system called WPASC, designing
tools," Comput. J., vol. 48, no. 25, pp. 130-144,
learning activity for facilitating cooperative
programming learning, and investigated cooperative 2005.
programming learning behaviors of students and [7] P. Brusilovsky and S. Sosnovsky, "Individualized
relationships with learning performances. exercises for self-assessment of programming
In [12], Cazzpla et al. proposed an approach to knowledge: an evaluation of QuizPACK," ACM J.
gradually teach programming to students. It will permit Edu. Res. Comput., vol. 5, no. 3, pp. 1-22, Sep.
to expose them to few programming concepts at a time 2005.
with the support of an incremental development [8] M. Kordaki, "A drawing and multi-representational
framework. They experimented this model by teaching
computer environment for beginners’ learning of
JavaScript programming.
programming using C: Design and pilot formative
V. CONCLUSION evaluation," Comput. Edu. vol. 54, pp. 69{87, 2010.
The paper studied the Grammar-Concept [9] M. J. Lee and A. J. Ko, "Personifying programming
Understanding Problem (GUP) for web client tool feedback improves novice programmers
programming study by novice students. 25 GUP learning," in Proc. ICER, pp. 109-116, Aug. 2011.
instances with 209 questions were generated using [10] F. W. B. Li and C. Watson, "Game-based concept
source codes for basic grammar concepts with visualization for learning programming," in Proc.
combination of HTML, CSS, and JavaScript. Their MTDL, pp. 37-42, Dec. 2011.
application results to 26 university students in Okayama [11] W.-Y. Hwang, R. Shadiev, C.-Y. Wang, and Z.-H.
University confirmed the effectiveness of them, where Huang, "A pilot study of cooperative programming
every student achieved the 98% or higher correct rate for learning behavior and its relationship with students’
any instance. In future works, we will generate GUP learning performance," Comput. Edu., vol. 58, pp.
instances for studying advanced grammar concepts, 1267-1281, 2012.
common libraries, and web application systems, and [12] W. Cazzpla and D. M. Olivares, "Gradually learning
assign them to students in JavaScript programming programming supported by a growable programming
courses. language," IEEE Trans. Emerg. Topic. Comput., vol. 4,
no. 3, pp. 404-415, Sep. 2016.

REFERENCES
[1] JavaScript is the most popular programming
language: StackOverflow survey,
https://fossbytes.com/javascript-most-popular-
programming-language
[2] L. A. Abriata1, J. P.G.L.M. Rodrigues, M. Salathé,
and L. Patiny, "Augmenting research, education
and outreach with client-side web programming,"
Trends Biotech., vol. 36, no. 5, pp. 473–476, May
2018.
[3] S. L. Ao, et al. ed., IAENG Transactions on
Engineering Sciences -Special Issue for the

You might also like