You are on page 1of 24

A reader's guide to

teaching beginners to
code
Table of Contents:
Introduction
Pg 3
Chapter 1
Pg 4, Object-Oriented Vs Component-Oriented
Programming
Chapter 2
Pg 9, Programming languages
Chapter 3
Pg 17, Teaching Styles
Conclusion
Pg 21
Citations
Pg 22
Introduction
This guide was compiled as a source for future research into how to teach beginners
to code. I wish for you to use this guide as a way to delve deeper into the argument
surrounding the best way to teach a beginner to code. Following is a collection of
scholarly articles, videos, papers, books, and interviews. These will help explain how coding
has been taught and how each approach affects the student.
This guide will address many different ways in which one can teach coding. The
first chapter brings you through the differences between object-oriented programming and
component-oriented programming. Chapter two explores the different programming
languages commonly taught to beginners. Finally, chapter three will discuss the different
ways of learning to code from the difference between teaching top-down and bottom-up
to in a classroom with a peer.
This reader’s guide is not the end to all discussion on teaching beginners to
program but merely just another resource for future researchers. A bias to my research
that I may have is I have already learned java and some C++ two languages that are
object oriented and I was taught in a top-down approach. Not only this but my research
was focused in a way that I personally found interesting there are other ways in which
one may research this topic and many directions one may take with it. I hope this guide
will aid you in your studies and that it will possibly build on the current information on
this topic.
Chapter 1
Object-Oriented Vs Component-Oriented Programming

Learning through object-oriented or component-oriented programming

gives the coder different paths depending on which one they are taught

through. This chapter will explore the similarities and differences of these

types of programming as well as the most well known programming

languages which branch off of each. For this chapter, I will be discussing the

following two sources:

1. “Objects never?: well, hardly ever” (2010) by Ben-Ari, Mordechai. This


article goes over object-oriented programming. It discusses the advantages
of object-oriented programming and how it is used in the real world. Not
only this but it delves into how nitpicky object oriented programming can be
and how this makes it challenging for new users to learn to code with it.
2. “Twenty-eight years of component-based software engineering”(2016) Vale,
Tassio, and Crnkovic, Ivica de Almeida and Eduardo Santana, Silveira
Neto and Paulo Anselmo Da Mota and Cavalcanti, Yguaratã Cerqueira
and Meira, Silvio Romero de Lemos. In this article it discussed component
based programming. The article describes how object-oriented programming
focuses on the relationships between classes that are combined into one large
binary executable. Verses how component-oriented programming focuses on
interchangeable code modules that work independently and don’t require the
programmer to be familiar with their inner workings to use them.
Mordechais’(2010) article shows how sometimes because there are so many

warnings and errors like “unfriendly environment” in object-oriented coding a

beginner may become frustrated and find it challenging. He goes over how

although learning to code with an object oriented language like java or C++ is

difficult, in the long run the person learning to code will be better off when they go

to learn their next language. By learning through object oriented programming the

user will have already met with some the most difficult issues they will face. Not

only this but he asks the reader if OOP (object-oriented programming) is truly the

more prevalent than component-oriented. He argues that by:

Assessing the dominance of OOP, we have to watch out for proxies. The
extensive use of languages that support OOP proves nothing, because
languages are chosen for a myriad of reasons, not necessarily for their
suitability for OOP, nor for the suitability of OOP itself. Similarly, the use of
a CASE tool that supports OOP is another proxy; these tools might just be
convenient and effective for expressing the software design of a system,
whether OOP is being used or not. Furthermore, many practices associated
with OOP, such as decomposing software into modules and separating the
interface from the implementation, are not limited to OOP; they are simply
good software practice and have been supported by modern programming
languages and systems for years. (Mordechai, 32)

In the quote above Mordechai discusses why he believes that OOP is commonly

considered the most common. He describes how many of the languages that branch

off of OOP are supported because of good software practice instead of the

programmer themself. By doing this he opens the reader up to question OOP and to
listen to his arguments about the matter. He believes that programming languages

are chosen for a multitude of reasons and that one should not write some off just

because they do not fall under OOP.

Later on in this article Mordechai discusses one of the most promising

arguments for OOP. He says that OOP facilitates reuse. Since OOP may be reused

by the user this means that one will not need to spend countless hours rewriting the

same code to get the same output just with different objects. He also discusses the

drawbacks in reusing code with OOP he explains how when one encapsulates

everything in their code it

becomes nearly

impossible to reuse the

code.

Vale, Tassio, and

Crnkovic, Almeida and Santana, Neto and Paulo Mota and Cavalcanti, Cerqueira

and Meira, Lemos’(2016) article discusses primarily component-based or

component-oriented programming. It describes some component-oriented

programming languages like COM, J2EE, CORBA, and .NET. It also discusses

how these languages give the infrastructure to connect binary parts seamlessly.

Finally, the article describes how the main difference between the component-

oriented languages is the ease in which they allow the user to connect the binary
components.
Component-oriented programming is a technique of developing software by

combining pre-existing and new components, the writers use the example of how

this is much like how automobiles are built from other components. Software

components are self-contained, self-describing packages that can functionality

contain definitions of types

that expose both behavior and

data. The writers discuss how

the programming language

C# supports component-

oriented programming

through the concepts of

properties, methods, events, and attributes thus, allowing self-contained and self-

describing components called assemblies. Component oriented programming

heavily relies on: polymorphism, encapsulation, late binding, inheritance (through

interfaces) and most importantly binary re-usability. With this being said some may

argue that it functions much like OOP just without objects to throw the program

off. The writers believe that if a beginner is taught Component oriented

programming early on in their career as a programmer it may make it easier for

them in the future when expanding their knowledge and when learning they will

encounter fewer errors due to objects.


Both of these sources properly describe their topics and have strong

arguments for either OOP or component oriented programming. In the first article

the writer brings the reader to his side by bringing up a negative about OOP then

arguing for how that negative may aid the argument for OOP. He makes the reader

think more in depth about the topic he is presenting and then he convinces them to

side with him. In the second article the authors took a more studious approach to

presenting their information about component based programming. They, unlike

the first article, primarily presented their ideas on which type is better through facts

and not arguments. Both articles presented information on both OOP and

component based then went off with the style they prefered for their articles.
Chapter 2
Programming languages

In the first chapter you learned more about object oriented

programming and component based programming. Not only did you learn

about those you also heard of some coding languages that branch off of

them. In this chapter, with help from four sources a article, two books, and a

video, I will go more in depth on the different languages commonly taught to

beginners and if it is object oriented or component oriented.

1. “Introduction to Programming with MATLAB.” (2018) Fitzle LLC. This


video comes from vanderbilt university, it contains two professors
describing why they choose to teach the language that they do. The language
that they are discussing is MATLAB throughout the video they discuss why
they chose that language instead of a more common language like java or
C++.
2. “Teaching and Learning Computer Programming : Multiple Research
Perspectives.” (1988) Mayer, Richard E. This book although older still
covers topics that teachers of computer science face today. What I found
interesting was that even during the 1980’s when most of the big computing
languages still had not been invented yet, computer scientists have been
looking for ways to teach the next generation.
3. “Hacking Secret Ciphers with Python ; Beginner's Guide to Cryptography
and Computer Programming with Python” (2013) Sweigart, Al. This book
describes why one should learn to code with Python. How it is most popular
implemented as an object-oriented programming language called CPython
and is written in C. While the other implementation is IronPython which is
written in .NET, .NET is an component-oriented programming language.
4. “Teaching Java with Robots and Artificial Life.” (2007) Leeman, R. Mark,
and Glass, H. David. This article delves into the programming language of
java. It discusses different ways it it taught along with why it should be
taught to beginners. Through the use of simulated robots and an artificial life
simulation Leeman and Glass teach their first year students. With this hands
on approach they show the students the most appropriate ways to code.

Fitzle (2018) They describe how it integrates computation, visualization, and

programming in an environment where everything is in a familiar mathematical

notation. It is typically used for application development, including Graphical User

Interface building. They touch on how it uses variables throughout the language

and how they are defined using the assignment operator, =. The professors do note

that MATLAB is a weak programming language because types are not directly

converted.

"Variables within this language can be assigned without declaring their type,
unless they are to be treated as symbolic objects, and that their type can
change. Values can come from constants, from computation involving values
of other variables, or from the output of a function.“ (Fitzle 2018)
They accept that the language does have faults but they stick to their view of it

being the best language for beginners to learn to code on. The professors argument

was persuasive in the sense that it got the audience thinking about why they should

use their program and the language that they chose. Some points on why they

chose this language were compelling because they showed how easy it is to use

this language and also how easy it is to learn it. Below is an example of a simple

MATLAB program called Hello World!.


classdef hello End
methods And the commands to execute the
function greet(this)
code
disp('Hello World!')
>> x = hello;
end
>> x.greet();
end
Hello World!
One thing that this video does not touch on as much as I had hoped was the

difference between learning to code in MATLAB vs. learning to code another

language. This unlike the other sources for programs did not specify whether the

language is object-oriented or component based. Because of this the reader has to

assume what the language is and from what I gathered, this is a component based

programming language.

Mayers (1988) book helps the reader to better understand LOGO and the

syntax of it. This book looks into coding being taught in a typical school

environment along with issues the teachers will face when attempting to show

students how to code. Mayers argues

that the language was created to

teach concepts of programming

where students could understand,

predict and reason about the turtle's

motion by imagining what they would do if they were the turtle. He believed that

by allowing the student to have a visual it would help them better understand how

every line of code affects the turtles output. By allowing the student to see this

depiction as they code they don’t have to guess and hope that the final product is

correct mathematically along with bug free. Below is an example of LOGO and to

the right is the output from that code.


Repeat 100
{
Forward 100
RT 60
Forward 25
Forward 25
RT 60
RT 60
Forward 25
RT 60
Forward 100
Forward 50

Forward 90
Forward 55
RT 66
Forward 24
Forward 24
RT 65
RT 65
Forward 23
RT 62
Forward 123
Forward 54
}

I found it interesting how the primary language in the 80s was C# which LOGO

came from, LOGO was a programming language that was taught using turtles that

outputted lines kind of like drawings. I found this interesting because the UNCC

Computing department uses java and we initially learned to code using depictions

of turtles that drew lines on the screen. This book was useful because the

programming language C# allows LOGO to work so it is a C language meaning it


inherits much of its syntax from C++. C# is Microsoft’s version of Java, it was

developed because Microsoft failed to produce an implementation of Java that tied

developers to Windows. If it were not for finding this book I would not have had as

much insight into how interconnected each of the languages are. This book

Sweigart's (2013) book describes what Python is and how one may learn to

use it. Not only does this book discuss what Python is it also shows the reader how

to hack with it but that part I will not be discussing this within this readers guide.

Sweigart's explains how

“Python is a functional and flexible programming language that is


powerful enough for experienced programmers to use, but also simple
enough for beginners. Python is a well-developed, stable and fun
programming language that is adaptable for both small and large
development projects.” (Sweigart, 2013)
By explaining Python in this way it makes the reader question why would they not

want to learn Python. Not only does he show the positives of Python but he also

discusses some disadvantages. He explained that Python programmers have cited

several issues with the design of the language in the past. Because it is dynamically

typed, it requires more testing and has errors that only show up at runtime. By

pointing out flaws of Python the reader will be able to make a sound decision on a

programming language. Below is an example of the Hello, world! program in

Python.

# This program prints Hello, world!


print('Hello, world!')

The output being:


Hello, world!

This source is biased towards Python in the sense that the writer believes that

Python is the best language for beginners to learn how to program because it is

simple and readable. Not only this but it is also a powerful programming language

used by professional software developers. With the writer being so focussed on

Python he fails to discuss other languages like many of my other sources. This

poses a question to whether or not he may be exaggerating the positives of the

language to get more people interested. This book changes my view on Python

because before reading this I had not heard anything about this language. By

reading about how Python can be both an object-oriented and component-oriented

programming language it changes how I view the two.

Leeman and Glass (2007) their article discusses how they investigated the

use of the simulated robot environment and an extended artificial life simulation

using the same environment in teaching of Java programming to first year students.

They did this by setting a series of programming exercises in each of these

environments for students who were taking a first year object oriented

programming module and, with the exception of these exercises, had been set more

traditional exercises in previous practical sessions. They also discussed why they
chose java as the language the students would learn in these exercises. Leeman and

Glass discussed how Java was designed to be relatively beginner-friendly, it

assumes the programmer is not that smart or careful, so programmers will be less

likely to make a mistake when coding Java apps. Below is an example of the java

Hello, World! program:

public class HelloWorld {

public static void main(String[] args) {


// Prints "Hello, World!" to the terminal window.
System.out.println("Hello, World!");
}
}

Output
Hello, World

They also discussed some difficulties beginners may face when learning this

language. Java is very stubborn, which means the coder needs to write a lot of code

trying to convince the language to build a feature. Thus, one may need to spend a

lot of time coding before they can get a working app. This is found to be

demotivating for coding beginners and can cause them to give up. This study along

with my other sources in this chapter focused not only on the language but also the

way that they had decided to teach the students how to code.

In conclusion for this chapter it doesn't really matter what language one

starts with, because the principles of programming are the same, and as long as one

learns those, they can learn other programming languages later. Yes, each of the
languages that were discussed in this chapter all have their own quirks that may

make it easier for a student to learn to code on but all and all they will learn the

same skills. The only difference or issue that may arrive could possibly be what

was discussed in chapter 1 object-oriented vs component based programming. One

can easily learn java after first learning C++ sure one language may be more

popular in the workforce, but the programmer will still learn the proper way to

code.
Chapter 3
Teaching Styles

In the last two chapters you learned more about object oriented

programming, component based programming, and some languages. Not

only did you learn about those you also heard of some ways that these

languages are taught. In this chapter, with help from four sources two

articles, a newspaper, and interviews, I will go more in depth on the different

ways that beginners are taught.

1. “Workshop Teaches Computer Coding Skills.” (2016) Michael Lea,


Postmedia Network. This newspaper goes over a non-profit teaching
beginners how to code. This non-profit teaches men and woman an
introduction to JavaScript. They focus was on improving the digital literacy
of participants along with helping them with learning technical skills in a
hands-on, social and collaborative way.
2. “Applying the Top-down Approach to Beginners in Programming
Language Education.” (2014) Saito, Daisuke, and Tsuneo Yamaura. This
article I found through Atkins library. This article delves into top down vs
bottom up programming and discusses their study on which method is best
to teach beginners trough. This article explains the difficulty in teaching
beginners how to code it properly explains all the aspects that go into it
especially how beginners must “fully understand the language grammar as
well as how to implement quality in the source code” to be a successful
programmer.
3. “Coders at Work Reflections on the Craft of Programming.“ (2009) Seibel,
Peter. This contains many interviews with many people in the field of
computing. Each person describes how they learned to code along with what
language they first learned on. These interviews not only go over how each
person learned to code it also went over things like pair programming and
how they felt about working on a project with others.
4. “Learning Java: a Programmed Instruction Approach Using Applets.”
(2000) Emurian, H. H. This article discusses how to teach beginners
through the use of Java Applets and tutoring system available over the
internet. Data was collected and presented to show how an individual
progresses through various tasks in computing through this tutoring
system. The data collected from the study is presented to show the
responses of a class of students to the use of the tutoring system.

Michael Lea (2016) This newspaper article goes into how they teach the

participants in the short period of time they are there to learn. Not only do they

discuss how they help the participants how to code using JavaScript but they also

show the hands-on, project-driven aspect of it. They feel that by showing how one

can have fun with programming it will encourage the participants to seek out

programming in the future. There is not really an argument in this newspaper

article it is more of an informative piece on what the non-profit is doing to help

teach beginner coders. The most compelling part about this piece is how much of a

difference their program is making for the participants. This article much like some

of the others I have looked into is primarily focused on one language and how they

teach the language.

Daisuke and Yamaura (2014) This article is persuasive through their study

on teaching beginners and they show the difference between the quality of the code

from the top-down and the bottom up approaches. By being able to see the
differences in the students code helps the reader know how each method teaches

the student different skills. Some of these skills are only picked up by the top

down, one being how comments and spacing should look like. Through the top

down approach the student can visually see how the code is supposed to work. The

bottom up approach typically showed the student the proper syntax of the language

but missed the visual

component. One thing that I

wish this article went into would

be how implementing both

approaches would impact the

student.

Seibel (2009) One of the interviewees Fitzpatrick finds pair programming

fun. He believes it is good for lots of things. He described how sometimes you just

need to think and want to be left alone and not have to worry about working with

someone else. But overall he argument is persuasive for peer programming.

Through these interviews my overall opinion on programming languages and

teaching styles did not change much but now I have a better insight into teaching

oneself how to code without a teacher. I found some of the tips that the

interviewees had would be helpful for beginner programmers. As informative as

these interviews are there are some things that are missing like what they would
personally recommend for beginner coders.

Emurians (2010) study into students using online resources to learn to code

The data collected from the study is presented to show the responses of a class of

students to the use of the tutoring system. He argues that by adopting this

computer-based tutoring system as one component including lectures and

collaborative learning experiences the student is more likely to succeed. His

argument was persuasive because he backed up all his points with data. Just as he

discussed java and the outcomes of his teaching style he did miss some important

aspects like a data set that properly showed who was a true beginner vs someone

with some basic knowledge on coding.

In conclusion, all four of these sources discussed the way they each believes

to be the best way to learn to code. Some discuss personal examples on how the

way they learned how to code affected them. Others showed data on how their way

of teaching beginners to code went up against others. I found it interesting that all

of these sources chose object oriented programming to teach the beginners.


Conclusion
In the end, learning to code is difficult and there is no one way to learn. Yes, some learning

styles or languages are more common but that doesn’t mean that that one way is the way that the

student should learn to code. In the end beginners just want to learn how to do something that they

were not able to do previously and the method that they learn it doesn’t impact them that much.

There is still much to be researched in

regards to what is the best way to teach beginners to code. For example, I wonder if females working

with other females and males working with other males would impact how fast they learn to code? I

also wish to find more information about the difference between the top-down and bottom-up

approaches. I hope that the topics discussed in this reader’s guide has allowed you to think about

some of the languages, approaches, and techniques to consider when teaching a new student how to

code.

Citations
Ben-Ari, Mordechai. Objects never?: well, hardly ever, Communications of the
ACM, 01 September 2010, Vol.53(9), pp.32-35

Emurian, H. H. “Learning Java: a Programmed Instruction Approach Using


Applets.” Computers in Human Behavior, vol. 16, no. 4, 2000, pp. 395–422.
Fitzle LLC. “Introduction to Programming with MATLAB.” Online video clip.
YouTube, 31 March 2015. Web. 27 October 2018.

Leeman, R. Mark, and David H. Glass. “Teaching Java with Robots and Artificial
Life.” Innovation in Teaching and Learning in Information and Computer
Sciences, vol. 6, no. 4, 2007, pp. 23–34.
Mayer, Richard E. Teaching and Learning Computer Programming : Multiple
Research Perspectives. L. Erlbaum Associates, 1988.

Michael Lea, Postmedia Network. “Workshop Teaches Computer Coding Skills.”


Kingston This Week (Ontario, Canada), 2016, p. A4.

Saito, Daisuke, and Tsuneo Yamaura. “Applying the Top-down Approach to


Beginners in Programming Language Education.” Interactive Collaborative
Learning (ICL), 2014 International Conference On, vol. 3, no. S4, 2014, pp. 311–
318.

Seibel, Peter. Coders at Work Reflections on the Craft of Programming. Apress,


2009.

Sweigart, Al. Hacking Secret Ciphers with Python ; Beginner's Guide to


Cryptography and Computer Programming with Python. [Al Sweigart], 2013.

Vale, Tassio, and Crnkovic, Ivica de Almeida and Eduardo Santana, Silveira Neto
and Paulo Anselmo Da Mota and Cavalcanti, Yguaratã Cerqueira and Meira, Silvio
Romero de Lemos. Twenty-eight years of component-based software engineering,
The Journal of Systems & Software, January 2016, Vol.111, pp.128-148.

You might also like