Coding education has increased considerably in recent years. A 2021 Brookings report found that 43% of high-income countries require students to be educated in Computer Science in primary and/or secondary school. For low-middle income countries, this statistic was only 5%, although 58% offer some kind of Computer Science education depending on the educational institution. As a relatively young discipline, the best ways in which we teach code effectively are still being figured out. We have gathered some key tips for teaching programming.
Know your audience
The most important factor in teaching coding is the who! Who are you teaching? Obviously, the manner in which you teach will differ vastly depending on your audience. From a group of third-year CS university students, supplementary self-paced business analytics courses to a K-12 class's very first programming course - there is no one size that fits all!
As coding is set to become a part of everyone’s future, the type of coders have diversified. Now, Computer Science courses are not reserved for the future software developers. In a previous blog post, we talked about the three types of coders and how they differ (read it in full here!): those coding to understand, those learning coding as a skill and those learning to code as a career.
The first group are those who use coding to understand. These are learners who won’t work in coding-heavy job roles, but will require basic knowledge of coding. For example, a consultant in a tech company can use coding to understand their revenue models and risks. These novice coders will need to become familiar with basic coding concepts, as you have to start with the foundations. Beginners can easily get overwhelmed by the coding environment - downloading a program, installing packages and compiling and running the programming language are all necessary before you even start to code! These are very useful skills, but may be too much to grasp as a novice coder, who just wants to understand the basics of coding. A user-friendly environment lets students focus on the assignment at hand.
The second group are those coding as a skill. This group will code regularly but alongside other skills. Examples of this are those in the applied sciences field - data scientists, analysts and engineers. This group applies their basic knowledge of coding in a specific domain. They should be familiar with domain-specific libraries and be able to write small scripts and programs to solve problems, create dynamic models or automate processes. As these coders grow more confident with programming, the environment should be usable outside of school or university, allowing them to improve and use their coding skills on their own time as well. This group also benefits from being able to use specialized libraries, as they are familiar with, but not restricted to, certain frameworks.
The third coder group consists of those coding as a career. This group will code daily and learn to apply domain knowledge to build efficient and reliable software. They are proficient in multiple programming languages and paradigms, they can implement testing, organize code and deliver it to a high quality. Also, this group should be able to set up and optimize their programming environment themselves, whereas Group 1 will benefit more from a web editor.
The type of coder you are teaching also influences what tools are most needed. Novice programmers benefit from fast feedback and a non-distracting coding environment, whereas more experienced coders need to use specialized libraries and tools, such as git. Figure 1 highlights some of the key assessment features that benefit each different group.