Should high school programming courses be taught using C++?
The most common programming language being taught in Canadian high schools is currently Java. There are many reasons why Java has become the predominant language. Java is the language used in many high school programming contests and standardized programming exams including the: International Baccalaureate (IB) and the U.S. Advanced Placement programs. From 1999 to 2003 the APCS exam in the U.S. used C++ for their programming problem solving questions, but in 2004 C++ was replaced with Java.
Should standardized programming tests be only available in Java or should there be alternative versions available in Python or C++?
I feel that there are many reasons to chose Java, C++, or Python as an introductory programming language. Therefore, I believe that these standardized examinations should be offered in multiple languages to address the diversity of student interests.
I recently spent a month teaching grade 11 and 12 computer programming courses at a local high school. As a pre-service teacher I continued with the programming lessons and languages used by the primary teacher for the course. I have used many different languages over the years and approaching some of the fundamental computer science such as algorithms, data structures, and logic using C++ examples turned out to be a very rewarding experience.
Why I liked using C++ in the classroom?
- Students know that C++ programs are used to create the world's most powerful computer games
- Students enjoy the freedom provided by C++ (syntax was not overwhelming to students)
- Understanding of standard C++ libraries can be accomplished more easily than other languages
- Debugging C++ programs use deeper understanding of computers and higher order thinking skills
According to the creator of C++, Bjarne Stoustrup:
" C++ is a general purpose programming language designed to make programming more enjoyable for the serious programmer."
Bjarne recently published a new book called "Programming: Principles and Practice using C++".
In my view his book is an excellent teaching resource to aid in lesson planning and guided-programming activities for a rigorous high school computer science course. The text was originally designed to support an undergraduate programming course at Texas A&M, but his approach can be easily adapted to a high school setting.
I would not recommend that Bjarne's book be used "as-is" within a high school course, but his approach to computer science, programming, and testing is refreshing and it provides a scalable model for learning how to program (in any language). It is true that only a few students in high school computer science classes will ultimately pursue careers within the software field, but I feel that for those students who do decide to continue studying software after high school, Bjarne's book can be used to guide them onto more advanced topics.
During my practice teaching in March I also had the opportunity to teach units on the following topics:
I will provide some additional examples of how I approached these activities in upcoming blog entries.
- project management;
- software development lifecycle;
- environmental stewardship (use of toxic materials in the manufacturing of computers, energy conservation, and e-waste / disposal);
- object-oriented programming concepts