Coding in the Classroom | Programming Languages

Selecting a programming language for students
By: Steven Floyd and Lisa Anne Floyd

As more and more educators in Ontario begin teaching coding concepts and skills to their students, they will be presented with the inevitable question: “What programming language should I use in my classroom?”

This question has always been on the mind of high school and post-secondary educators, and it spurs some interesting (and sometimes heated) debates, but it’s interesting that it is now something that elementary educators will have to consider. Below is a summary of some helpful thoughts related to selecting a programming language. As always, with all pedagogical decisions, think carefully about the experiences and needs of your students and the goals of your program. 

What is a computer programming language?

All programming languages have the same basic logical structure. A programming language is a well-defined set of rules and syntax that are a sort of “middle ground”, between the programmer and computer. The programmer writes instructions to the computer using the rules and syntax of the programming language, and then the computer converts these instructions into 1s and 0s that it can run as a program. 

As an example, the instructions below have been written by a programmer. When the program is run, this line of code will output the words “Hello world!” to the screen, using the Python programming language:

print (“Hello World!”)

The same instruction can be written using the Java programming language – it would look like this:

System.out.println (“Hello World!”);

As you can tell, text-based programming languages require precision, a single missing semi-colon can alter the running of an entire program. Because of this, many educators decide to use a block-based, or visual programming language.

Scratch, developed by the Lifelong Learning Lab at MIT, is the most popular block-based programming language. Students can drag and drop, and connect blocks of code to make their programs. There is much less typing required, as students only have to fill in small components of the blocks of code.

In Scratch, blocks are colour coded and can be “clicked” together to form a program.
Students will have to sometimes type in small components needed for each command
.

Scratch Jr is another block-based programming language, often used with students in the primary grades. Much like Scratch, blocks can be dragged out from a menu bar, and “clicked” together.

In ScratchJr, the blocks click together horizontally, rather than vertically like in Scratch.

While text based languages such as Python and Java are programming languages used in industry, and block-based languages like Scratch and ScratchJr tend to be used for students who are new to programming, there is another alternative – a text-based learning language that might be considered a “bridge” from block-based to text-based programming languages. An example of such a learning language is Lynx, which is based on the learning language Logo. In a learning language like Lynx, students can begin to type commands without having to learn too much syntax.

In Lynx, students can write Procedures (subprograms) and create buttons as they write commands without having to worry about much syntax.

So how do I decide what programming language to use?

Perhaps the first major issues that an educator must consider when selecting a programming language are cost, access, and privacy and security.

Cost: There are some programming languages that require a cost to download or purchase software in order to write and develop the code. Fortunately, this isn’t usually the case, as much of the software associated with programming languages is free to download, or available to use online, at no cost. Before selecting a programming language, consider what the cost might be for your school or board, but also what the cost might be if a student would like to be able to use the programming language on their own devices and at home.

Access: While many languages can now be run online, within a web browser, there are others that might require teachers or students to download specific software applications to the computer. It’s possible that programming languages that are accessible through web-based applications could be more accessible, as no download is required, but it also means that wi-fi would be needed whenever a student would like to program. On the other hand, downloading software could be a barrier to some students if they are using chromebooks or don’t have access to download, but once downloaded, programming can be done while “offline”. These considerations are important for both the teacher and students.

Privacy and Security: Some programing languages that are available to use online may require teachers or students to create a profile and log in. Teachers and students should carefully consider the privacy and security issues when recommending these. Teachers are advised to consult with administrators within their school boards in order to ensure proper protocols are followed, as this is a very important issue. Teachers should also be aware; however, that many online programming suites do not require logins or profiles.

In Scratch, students can create their own accounts to organize and store their work, or they can upload and download projects each time.

Scratch is an example, where students can create a profile and log in, or they can program without logging in, and can download and upload their programs to and from their own computer. The repl.it site allows for students to program using a wide variety of languages, and students can choose to create a profile and log in, or to simply program without logging in and providing their personal details. Students can code in Lynx, but if they log in, they can save their work. 

Other Considerations:

In addition to cost, access, and privacy and security, there are a number of pedagogical considerations that should be taken into account when selecting a programming language for use in class.  In Computer Science in K-12: An A to Z handbook on teaching programming, authors David Weintrop and Shuchi Grover present the following 6 dimensions.

Low Floor: The term Low Floor refers to the amount of experience required before engaging in activities. A programming language with a low floor would mean that novices can begin using the language rather easily, and can begin creating programs and projects right away. The term is often attributed to Seymour Papert, who worked with children and programming languages as far back as the 1970s.

High Ceiling and Expressive Power: While low floor refers to the beginning stages of a novice programmer’s experience, high ceiling refers to how far students can take their programming skills. A programming language with a high ceiling would be one that would allow the student to continue to learn more complex concepts and skills, and would be able to continually create more sophisticated programs.

Wide Walls and Diversity of Artifacts: Wide walls refers to the level of creativity, or different directions, that a student can take their projects using a specific programming language. Students can learn to apply specific programming concepts and skills in a variety of contexts, including using audio or visual components in their program, and even programming physical devices such as a robot, or a small microprocessor.

Social Dimensions: Weintrop and Grover encourage educators to consider whether or not they would like their students to be able to share the projects they create with a wider audience. Some languages allow for easy sharing, and students can even remix the projects of others. What results is a community of learners, where feedback is provided to students by their peers, and where there is social value to programming and project creation.

Access to Curricula and Community/Professional Development: The level of support available, and the number of resources that exist, could be a key criteria for the selection of a programming language. Some educators will have a difficult enough time learning the coding concepts and skills themselves, and the nuance of the languages, and may not have the time to also create their own resources. 

Preparation for Future Learning and Transition to Professional: Perhaps more important in the secondary, or post-secondary grades, the choice of a programming language may also be determined by whether or not students can continue using the language in future education, or in the field of computer programming itself. This idea is often tied to philosophy and goals: is the educator teaching coding in order for students to seek employment of acceptance in a related program? Or is coding being taught in order for students to develop computational thinking or problem-solving skills, or as a way to express their ideas and to be creative? Educators will have their own answers to these questions. 

References:

Weintrop, D., & Grover, S. (2020). Javascript, python, scratch, or something else? Navigating the bustling world of introductory programming languages. In S. Grover (Ed.). Computer science in K-12: An A to Z handbook on teaching programming (pp. 99-112). Palo Alto, California: Edfinity.

Scroll to Top