Seven Fallacies of Teaching Programming in K-12

picture of Harry KellerBy Harry Keller
Editor, Science Education

[See Harry’s related articles: Is Building Apps for Everyone?, Need More Software Engineers? Teach Thinking Skills Better, and  ‘Computer Science’ Contains Little or No Science. -Editor]

Many educators seem to be promoting the benefits and even the necessities of teaching computer science courses before high school graduation. I have not seen any of these people suggest which courses to eliminate to make room for this new course. Despite this, many suggest that computer science (mostly translates to computer programming) be a required subject.

I have seen some say that writing software should begin in kindergarten. Others decry its absence from middle schools. Finally, quite a few lobby for adding it to high school curricula. As you might expect, the origin of each is from practitioners in each. Exposure to the basic concepts of computers, what you might call the “nature of computing,” is a good idea, but the rising din of voices telling us to add computer programming classes throughout our public education system should be tempered by reality.

Much of the pressure comes from just a few arguments and assumptions. Most of these are fallacies. I list some below and explain them.

1. There is a huge job shortage and high demand for computer programmers.

This may be the most recurrent theme for those promoting computer programming in schools. There are two problems with this argument. Large businesses, the ones making the most noise, are inflating their numbers to further this bit of misinformation. Also, the numbers do not indicate the level of programming skill required for these jobs.

The reason for the inflation is simple: H1-B visas. By importing computer programmers from other countries, these huge companies can keep costs down in two ways. They pay those H1-B programmers very low wages. You’ll find the workers sharing small two-bedroom houses with as many as ten people in them. Secondly, low wages for the immigrants help to keep wages of our citizens low as well. 

Even if those numbers were anywhere near accurate, they do not reflect the specific computer skills required. (See 7 below.)

2. The skills you learn writing software in fifth grade or tenth grade will translate into job success.

Schools are not intended to be job training factories, and today’s fashionable software may soon be obsolete. Learning to write in this or that language can be quite valueless as a specific skill. Just ask the many students who learned PL/I or Algol.

Furthermore, writing the sort of toy programs you’ll see in K-12 courses is not very good training for the real world. A wide variety of skills come into play when you are doing industrial-strength programming.

While you may be able to find some good reasons for teaching programming to young students, making jobs for them is not one of them. Instead, focus on good reasoning and thinking skills, especially critical thinking and communication skills. I like science for these, but nearly any course can provide them.

3. Anyone can become a computer programmer.

You might as well tell me that anyone can become a professional musician or a profession artist or an NFL football player. The capabilities we begin life with plus the abilities we develop in our early years shape our potential. Writing software requires strong analytical abilities, good abstraction, enormous attention to detail, and a personality that can stand lengthy rejection by an impersonal machine.

Creating software is not for everyone. Some may be so disheartened by the attempt that they reject technology in general as a result. We should not be pushing a course onto those who by their innate abilities or their personal inclinations are not suited to it.

This is not to say that teaching some version of computer science is a bad thing. We should be teaching the nature of computing, just not forcing every student to attempt programming.

4. Changing our school curricula will alleviate this demand.

The idea that you can create more computer science majors in colleges by giving them programming classes before then lacks any data to prove the case. Mere exposure to the nature of computing before college should find any students who may be interested in this career path.

Today, we must train our students to think critically above all. Coding does not do that, and it’s not appropriate to take time away from other studies that may in order to satisfy some inflated demand. Those students will be in the workplace for many decades. Do not sacrifice their future for some imagined current crisis.

5. Everyone should learn to write computer software.

Why? That’s the important question you should ask when any such assertion is made.

Who will benefit from this change and how? Writing software requires that, first, you learn the syntax and semantics of a computer language. Any language that can allow serious programs to be written tends to be very complex. Programming requires analysis of a task to be performed by a computer, a time-consuming job by itself. It then requires careful breaking down of the task into small, codable segments. You code the segments and then test. Testing is another entire discipline. Typically, people take years to master this stuff.

I can see teaching a simple form of spreadsheet macros or some trivial pseudo-language, and that’s really enough programming for most students.

Once initiated into software in a small way, some people will just love it and seek more. Others will detest it. These days, the Internet provides more than adequate support for those seeking to learn more about programming. Once in college, they can learn much of the details, theories, and discipline that accompanies software engineering. Actually, someone with no programming experience at all but with an aptitude for it can learn everything necessary to be a programmer in four years of college.

Only one thing is necessary, and that’s for students to understand what computing is really all about. Those with an interest will pursue that interest.

6. A substantial and ongoing computer science graduation rate will help the economy.

If those students have little aptitude for software, attempting to train them in software engineering will not help anything. The least capable graduates will be competing at the bottom of the profession against good students in Russia and India who will work for much less money, possibly even below our poverty level here.

Even if the job market for software professionals is as great as people say and even if our schools can crank out enough graduates to meet this demand, what happens once the demand has been met? The demand will not increase as rapidly as graduates emerge. The machinery will be in place — courses, professors, school recruiting, etc. — and won’t suddenly shut down because the demand has been met. Were all this possible, and I think it ill-advised, you’d create a glut of programmers competing against the world where living costs are significantly lower.

No matter how this problem is addressed in our schools, the results will not be what we seek. Our economy will not boom just because we train more software coders.

7. All computer programmers are equal (interchangeable parts).

No one says this explicitly, but it’s implicit in the remarks made. The available jobs will vary considerably with respect to the talent required. Someone who knows databases will not be doing GUI work. Only those with real-time experience (or geniuses) can jump right in and do real-time programming. Embedded CPUs will be a huge problem for most CS grads. And so it goes.

Another relatively little known fact about programmers is how widely they vary in productivity. In many fields, it’s possible to see ratios of two to one. In some, worker productivity may rise to as high as ten to one in particular areas. Software engineering is unusual in having ratios as high as 100 to one. Due to simple slow coding, errors, time for documentation, and necessity for repetitive testing, some programmers produce only an average of one or two completed lines of code per day. Others can exceed 100 lines per day, tested and documented.

Just because there are a certain number of jobs and a supposedly equal number of grads does not mean that all of the jobs will be filled or that all of the grads will find jobs. In fact, it’s extremely unlikely that even half will match up. It’s like saying that there’s a certain level of demand for teachers without indicating how many ELA, history, math, science, and other subjects the jobs are for. You’d also have to indicate grade level and other information as well. It’s like that for computers as well.

The above are my opinions based on years of following this market and reading the ideas and opinions of many others. I spent a large part of my career in various computer-related jobs. In one, I supervised the creation of a new computer. I have created software in at least a dozen assembly languages and in BASIC, FORTRAN, C, C++, Java, and more. I have built databases in several major relational database programs and even one that was not relational. I have built real-time software, GUI software, drivers, embedded CPU software, and much more. Some of my projects have been for Fortune 500 companies and have included mission-critical software. I have managed, supervised, and worked with too many programmers to count. I write the above so that you will know that I understand this area.

I do welcome comments about the value of including computer programming courses in our public K-12 schools. This is not a trivial matter to be dismissed with a neat column by those in favor or those opposed (like myself). Before committing to a huge investment in people and equipment, all aspects should be aired. My article here intends to help that process.

6 Responses

  1. Thank you, Harry.

    Your post reminded me of the math book that was adopted in my daughter’s grade 2 class three decades ago. Most of it consisted of repetitious exercises in non-decimal bases, on the pretext that kids would need binary base in future for computer programming. So on the left, there was a picture with heaps of little squares the kids had to group by N, then on the right they had to write the number in the corresponding N base.

    Problem: the authors had misunderstood the Piagetian axiom that kids that age can only conceive quantities up to a hundred as meaning they could only understand 2-digit figures. And so for base 2, there were only 3 squares, i.e. 1.1 in binary: pretty daft, no?

    You also made me re-read the documentation – in – produced by the Geneva Department of Education when they opted for the use of free (libre) software in all K-12 public schools. While some teachers who were free software advocates did think of possible programming exercises for students that the availability of free software source would allow, this official documentation does not mention such activities, but insists on the civic value of students learning the importance of being masters of the tools they use instead of vice-versa, of sharing, etc.

    This cautious approach seems wise: there are no “computer science” lessons in Geneva schools, and it’s up to the teachers to integrate the use of computer resources in their classes. So say some math or philosophy teachers want to make students use a source code to understand how formal logic works, they can. But not all teachers are forced to do so.

    • Thank you Claude, for the remarks.

      Computer languages often are open-source today. The market for successful ones is broad, and others will not compete unless they match the price point. :-)

      Note especially the dual assumptions about teaching binary. First, there’s the assumption that binary is necessary to learning programming. That idea became obsolete rather rapidly. The second is that programming is some great career that everyone aspires to or that you must learn programming because it’s the computer age. Did everyone have to learn to make steam engines during the industrial revolution? Too many people use invalid assumptions to justify something they wish to do but cannot convince others to agree.

  2. Harry, programming doesn’t need to be an all or nothing proposition, either master it and become a genius coder or don’t even think about it. Think of it as a continuum like all the other skills that we nurture in our schools. Not all who learn math will become mathematicians, just as not all the students in band class will become great musicians. It’s the exposure that’s important, and some skill, however rudimentary, can still be very useful. If students don’t become professional programmers, they can at least enjoy programming at a personal or hobby level. At the least, they’ll appreciate what the masters can do.

    Your comment, “I can see teaching a simple form of spreadsheet macros or some trivial pseudo-language, and that’s really enough programming for most students,” may be harsh. “Trivial” to a master like you may be the maximum limit for many others. Their efforts to learn programming at some level should be encouraged and applauded rather than belittled. Only one person can win a marathon, yet thousands of others participate. The last person to cross the finish line is still a winner in the eyes of many if not most.

    Programming can be taught and enjoyed at all levels, and I believe this has been Bonnie’s point all along. Young children as well as adults can be taught pseudo-languages to write simple code to manipulate robots or create simple apps and games. It’s like learning how to drive a car — without being able to drive a standard shift or get under the hood to service the valves. Students develop a sense of confidence, of accomplishment, of ownership of the technical world we live in.

    Creating blogs and Facebook pages, routines to manipulate robots, and simple games is a form of pseudo programming. Students learn the connection between what technology does and the “coding” that’s behind it.

    As apps become increasingly difficult to program and maintain, simplified interfaces will become increasingly important, and the task of humans will need to be simplified of necessity. In fact, programming languages are nearly all “pseudo” in the sense that no one codes in ones and zeros.

    Coding is a way to give form and substance to ideas, and in this sense, programing is very much like writing, speaking, composing, art, etc. It’s a basic human skill, a means of expression, of engaging the world around us.

    I think you’re energizing a much needed discussion with this article. What is the continuum of programming? How can we make it a part of nearly everything we do with technology? How can we make humans the masters of the technologies they use every day — instead of the other way around?

    • Thank you Jim. You are making my point. Everyone should understand the nature of computing and computers in today’s world. You do not have to learn real software skills for that to happen — the coding skills that involve knowing the syntax and semantics of an industrial-strength language (e.g. Java) and the ability to analyze design requests and turn them into a complete, coordinated project.

      Building a web page can be illuminating and many can enjoy the creative aspects of doing this. Some will wish to do more, to make their pages more interactive. Those can explore further.

      It’s interesting that many professional programmers aren’t really very good coders. They use IDEs (those drag-and-drop program builders) heavily. Truly high-level software development skill is uncommon, just as with your example of marathon runners. My build is too heavy to succeed in that venue even though I am not overweight.

      I used ‘pseudo’ to distinguish from full-featured or serious. A programming language should have ways to break up a program into pieces and to invoke them from many places. It should have strongly typed variables and other constructs that help to ensure good programming style. Without these, it’s not truly a programming language in the sense that software engineers will use. You might consider the macro language of spreadsheets as a programming language if you take the liberal definition. While it’s enough of a language to introduce you to the basic concepts of programming and computers, it’s not a general-purpose language in which you can write a wide variety of programs.

      Ones and zeroes are not required for a real language. In fact, they are not really a language at all, even though you can program that way. The most basic language is machine language, which may use symbols for commands and hexadecimal or octal for addresses. I have written such programs. They programmer is responsible for a fantastic amount of support such as calling and returning routines with arguments and having to manage the argument stack.

      The next level up is called assembly language and uses a tool called an assembler. The breakthrough here is the ability to assign symbols to addresses and to have argument passing handled automatically. I have written tens of thousands of lines of assembly code in maybe a dozen different assembly languages. Each computer hardware has its own assembly language. They do not port.

      In the earliest days of computing, two languages emerged: FORTRAN and COBOL, the former for scientific calculations and the latter for business applications. These are true languages but of a rather rudimentary nature. A sort of science of computer languages developed, and a Babel of new languages appeared. Most important among these was the C language, still being used today, but usually as a subset of C++. C and its extensive library of support functions because the lingua Franca for computers. It is portable and can be used to write just about anything from drivers to financial systems.

      C++ moved us into object-oriented programming (not the first, but the most successful). I wrote quite a few programs in C++. It was an ornery and relatively intractable language. Its shortcomings led to a better object-oriented language, Java. Java also was the first language to take the Internet seriously.

      You can find quite a few languages for special purposes. SQL is a sort of language for operations in relational databases. Truly mastering SQL requires some effort. Unless you understand inner and outer joins, you don’t know SQL well, and there’s much more to know to use it well.

      Computer language development has mostly been focused on making the number of lines of code required for a task smaller so that larger projects can be done with fewer people in less time. However, beginning with BASIC and PASCAL, some languages were created expressly for teaching programming. BASIC, especially in its original incarnation, was a horrible language for writing large, serious programs. I wrote a modest database program in BASIC. I would not recommend that anyone follow my example. It’s fine for writing small throw-away programs to try out something or do a quick calculation. It’s easier for this purpose than the stronger languages.

      Scripting languages have the same problems as BASIC. They work well for small, a few pages at most, programs but are really hard to work with on larger projects. Javascript may be the most well known of these, although many others exist, and some are becoming even better known. For some webpage operations, you must use Javascript (or used to have to — HTML5 has reduced the necessity of using Javascript, a fact that I applaud.

      Whether you call them toy languages, learning languages, or pseudo-languages, computer languages that are not usable for industrial-strength projects are not true computer languages from my viewpoint. They serve a purpose. One such purpose is introducing people to the nature of computers. Just as everyone should understand the nature of science, so also they should understand the nature of computers. Just as everyone will not become a scientist, so everyone will not become a professional software engineer. You don’t have to use the CERN Collider to learn science. Neither do you have to learn Java or SQL to become familiar with the nature of computers.

      We must ensure that all of our children learn the nature of science and the nature of computers before they graduate from high school. We do not have to turn every student into a practicing scientist or into a practicing software engineer to do that. Both fields require extreme attention to detail, creativity, and knowledge of very complex tools and procedures. Both require that the output be subjected to withering criticism of peers (and of the computer itself in the case of software engineering). These are not for everyone. Not at all.

      You say, “Coding is a way to give form and substance to ideas, and in this sense, programing is very much like writing, speaking, composing, art, etc. It’s a basic human skill, a means of expression, of engaging the world around us.” It may seem that way, but the latter ones have been with us for thousands of years. Except for writing, they’ve been with us for tens of thousands of years. Our brains appear to be wired for language and for pattern recognition that is necessary for art to make sense.

      Computers are completely artificial. They are not a natural outgrowth of our brains’ inherent capabilities. Anyone without physical limitations can learn to speak, draw (at least simple diagrams), and make some sort of musical sound. Natural language can be crude or elegant. We can interpret and understand meaning in either event. Computer language must pass the test of an impersonal, precise machine being able to interpret it. One misplaced comma will destroy that possibility. It’s qualitatively different than writing this essay. I can mess up my grammar quite a bit and still be understood.

      The ideas you convert into computer programs are different than those that you convert into prose. They have a practical purpose. They accomplish something. They are in the realm of engineering.

      So, it may be that you are giving form and (a sort of virtual) substance to ideas, but not just any old ideas and not just any old form and substance. From where I stand, it’s just not the same. Writing software is not a “basic human skill.” Language, art, and music are basic deep down inside of our craniums.

      • Harry, thanks for your detailed response. This is what I actually say in my reply above: “Coding is a way to give form and substance to ideas, and in this sense, programing is very much like writing, speaking, composing, art, etc. It’s a basic human skill, a means of expression, of engaging the world around us.” My main point is captured in the first two lines: “Programming doesn’t need to be an all or nothing proposition, either master it and become a genius coder or don’t even think about it. Think of it as a continuum like all the other skills that we nurture in our schools.”

        • I cannot say whether it’s an actual continuum or a series of plateaus. I don’t think that it matters. I never intended to portray programming as an all or nothing proposition. I do think that there’s a point at which advancement requires a quantum leap, at which the continuum (if one exists) is broken. It’s the reason why programmer productivity can have a 100-to-1 range among professionals.

          It does not mean that people cannot learn any programming skills at all. It merely means that, like gymnastics, not everyone can reach Olympic levels. Not everyone can even reach professional levels. That’s fine. A great many people (probably a majority) will find programming to be tedious, dull, horribly abstract, and excessively demanding. They can get a sense of this by doing some very simple coding in a simple language.

          Our natures, whether inherited or developed or both, put us on life paths that lead to different places.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s