Teaching coding in schools is a growing effervescent trend. The late Steve Jobs of Apple stated, “Everybody in the country should learn how to program a computer... because it teaches you how to think.”
But not only Mr Jobs had something to say; the supporters of this phenomenon are increasing endlessly. The BBC, among others, has launched a campaign in favour of learning coding (http://goo.gl/AHvVpV @Wired). In the same way, many governments have made up their minds to follow the lead; for instance, in Spain’s capital city, Madrid, the Education Department (@educamadrid) decided to include one hour a week to teach it as a mandatory subject last year, having achieved the initiative a great impact (http://goo.gl/Jp3qg6@elpais_espana). In the USA, political parties joined to support the Hour of Code some months ago http://goo.gl/THaKfi @theverge). Even the world of fashion has been spreading the word actively with the help of some top models, like Karlie Kloss (@karliekloss), encouraging girls to learn coding (#KodeWithKarlie). And recently, the giant Microsoft has partnered with the CoderDojo Foundation.
WHY TEACHING AND LEARNING CODING
If you want to command a computer, then you have to speak and think like it. That’s called computational thinking, and it requires multiple skills.
On the one hand, you need to learn how to analyze problems, break them down, and look for computer friendly solutions. This examining usually involves both processes and data, expressed through diagrams. Such steps really make your mind work hard and in different ways, as you need to show an important level of abstraction to know what’s relevant, how subsystems are connected, and what flows of information are included.
On the other hand, you need to design problem solving strategies. For example, if you want to make up a way to win at tic-tac-toe game, you’ll need to squeeze your mind to find out the best possible strategy. The result will be an algorithm, which is a set of instructions based on sequences, repetitions and conditions. Knowing how to design an algorithm is not just a Computer Science task. We use them intuitively in our daily lives all the time. This means that through coding you can enhance your life, starting to be conscious of your actions, their results and the changes needed; that is, you develop mindfulness.
The final step of all this process is coding per se. This is a crucial stage, as the coder is about to experiment with their creation, and the outcomes will be instant. During this work you must be strict, ordered and follow protocols to test and debug the code. Thousands of things can happen, because even the simplest piece of code creates a huge universe inside the computer. Thus, you are in charge, you are responsible of your creation and you have to make it work according to the prerequisites.
As you can see, computational thinking conducts a detailed analysis of problems. This helps not only in coding, but also in being able to analyze and thoroughly understand problems, identify patterns and extrapolate solutions.
Coding and creativity go hand in hand. Problem solving usually needs blasts of creativity in every field, especially when designing games or multimedia related stuff.
The chosen programming language also imposes its own creativity requirements (you need to be creative when analysing, when designing and when coding; all the time). For the object oriented ones (as Java), for example, you’ll need to think about ecosystems of objects; for the graphical ones (as Logo), geometry aspects will keep the focus; or for the procedural ones (as Scratch), conditions and loops will gain in protagonism.
If something is true about coding is that a problem can have hundreds of solutions, from the worst to the best possible ones. Consequently, merely writing lines doesn’t represent coding, but taking in count: proper resource usage, loop improvement, speed, amount of lines of code, reusability, scalability, clarity, etc.
As a teacher, you can focus on those quality measures, use tools to analyze them, and, thereby, extend the benefits of teaching coding farther than that simple “it works”. That’s called competitive programming (http://en.wikipedia.org/wiki/Competitive_programming). Inside this competitiveness, you can encourage excellence organizing challenges to make your students compete for prizes inside, for example, a gamified framework, granting badges and maintaining a leaderboard.
Small programs can be way complex. Just introduce a bunch of variables, loops and coditions, and the cyclomatic complexity can rocket (http://en.wikipedia.org/wiki/Cyclomatic_complexity), making your code slow and hard to debug if badly designed.
Hence, a coder needs to see clearly what variables are taking part, what value ranges they have, how they’re combined, and how they can be simplified (Boole’s algebra is key http://en.wikipedia.org/wiki/Boolean_algebra).
This work in logic helps incredibly in developing your students’ minds. They no longer get scared about expressions like “if A and if not B or C”, once they’ve learnt how to put them in tables, analyse the outcomes and discover how to simplify the whole picture.
Special needs students
Mainstream schools embrace all sort of students. Sometimes some of them can’t just follow the rhythm of common lessons, creating imbalances inside the classroom. But with coding this is not a problem anymore.
In order to reach the majority of your students, you should design your coding lessons where different levels can be attained. This means you can use the very same exercises, but varying the difficulty of the process.
For example, calculate the first 10 odd numbers (from easy to hard):
- Just print them (with some printing command).
- Print them using a loop.
- Calculate them.
- Improve the code to be as fast, use as less memory and lines of code as possible.
- And so on…
According to some figures, by the year 2020 there will be more than 1.4 million computer programming jobs available in the United States, but less than 400,000 computer science students to fill these jobs. Why is job opportunity rocketing? The coming technology trends have a lot to say (http://edtechreview.in/trends-insights/trends/1832-edtech-trends-for-the-coming-years).
Then, do you have to polish your curriculum? Not really. When seeking a job, old-fashioned interviews don’t have to be the only way to get hired anymore. There are tons of sites where you can show your coding skills and maintain a high profile in the market, as in http://www.topcoder.com/. Or you can just test your coder abilities in http://coderbyte.com/, or in http://www.codechef.com/.
Added to these valuable sites, you can also develop a public curriculum vitae as an expert. For the Google Apps case (and Google Scripts), there are many forums where you can take part (https://productforums.google.com/forum/), and assisting others with their problems will help you earning badges and building up recognition.
During decades, many companies have been releasing their products with the ability to extend their functionality by their clients. For example, Google Apps, among others, offer a clean and rapid method for new moduledevelopment. If you aren’t satisfied or you just can’t find the solution you need, you are empowered to develop yours. Moreover, you can code, debug and execute it online, and even share it with others.
Scratch and other similar coding systems offer engaging modes to work with. It is not surprising to find out that game development is the prefered task in school for the ICT lessons (http://www.gamecodization.com), and Scratch gives you precisely what you need to rapidly create your games. If not them, you are also given tools to put in scene a vast array of characters performing funny things, being dances, songs or crazy stuff. This way, students get really engaged, and feel their creations as their own, putting all the effort in the coding task.
But things can go farther. Sites like http://www.codingame.com offer an engaging ludic layer to the coding process, so you get enrolled in different missions where you have to type specific lines inside a block of code to make you win in the assigned game. It is so visual that you can see the game running to check whether your algorithm was accurate enough or not. Other sites, as http://codecombat.com/, work in a similar way .
A good thing about coding is that it is a transversal subject. Once you have learned the basis and started writing lines of code you can solve a variety of problems from other subjects. Some ideas:
- Maths: solve and draw an equation, calculate areas and volumes, explore fractals, calculate Pi’s decimals.
- Physics: use formulas, simulations.
- Chemistry: adapt chemical reactions, create valency and symbol tests.
- Social studies: apply statistical analysis to sets of data.
- Languages: statistical analysis of a corpus, vocabulary exams.
- Technology: AI systems, games.
- Biology: cell simulators, game of life and similars.
It is a fact that students usually use technology to zombiely play games, consume multimedia and to connect in social media networks. Coding opens up new ways in this landscape, transforming their laptops/gadgets in more than vain leisure.
As it is observed, women tendency to study in technological fields isn’t strong enough. Teaching coding might help doing the trick to infuse them some passion for science and technology, along with narrowing the gender gap, and inspiring them to excel in technical careers.
There are dozens of sites supporting women who want to code. Check them out: http://learntocodewith.me/posts/13-places-women-learn-code/
Next Page: How to Choose the right resources
HOW TO CHOOSE
The ever present question is what language to choose before starting inside the classroom. The answer is complex, as it depends on the level you’re teaching, your school resources, whether to choose an online/offline coding system, and how comfortable you feel with coding, among others. Check out this article which covers the topic in deep: http://andonisanz.blogspot.com.es/2014/06/programming-languages-for-secondary.html
And this other one with online resources by Vicki Davis (@coolcatteacher):
In any case, it is easy to realize if something is wrong, specially when your students:
- Have difficulties to understand or focus.
- Get bored.
- Can’t work by themselves.
- Experience too many technical difficulties.
There are three main platforms you can use: web, mobile and computer based. Some companies provide support for all of them, so you can choose freely. Others don’t, and that makes you be tied to a specific device. That might be a problem for your school activity, as you would not like to let your students bring their devices to the classroom (BYOD).
An interesting -and common sense- solution is to use laptops:
- Computer-based applications: you’ll find most of the compilers for Linux, Windows and MacOS.
- Web-based ones: using your browser and, optionally, ad-hoc plugins.
- Mobile-based ones: Android apps are now executable on your computer, using the new ARC Welder (Chrome application).
Teaching programming, as other subjects, requires didactic lessons. Then, it must be clear what aspects of coding are to be taught, what exercises to be solved and how the grades will be measured. It is easy to design some units for the whole school year, because the algorithmic part of coding is always the same in spite of the language you use (not the same for the syntax). And remember the constructivist aspects of education: belief explicitation, content presentation, acquisition, use and mastery, where contents have to be practical and linked to your students’ close reality.
Well prepared teachers
For coding and computer related subjects, there is no need to say that the best prepared teacher is a computer scientist. If you don’t have one in your school, hire them!
The other option is to find a geek teacher with some coding experience, and who knows a number of programming languages (procedural, object oriented and 4th generation -sql-, to say the least), including the most sought ones (C, Java, .NET, HTML5 or Google Scripts).
As a last resort, a proactive teacher could learn by themselves through these MOOCS: