Proposed computer programming standards

So this is my first try at creating computer programming standards. Note that these are not general “tech” standards, as tech can mean a lot of things (for example in Montessori it can have little to do with computers). Instead of talking about computers I say “computing machines” to mean any device that is controlled by a processor, which today can mean everything from your car to a fighter jet to your coffee maker. I’ve tried to minimize just learning a particular programming language, which is what most programming classes today do; mostly that is in the “Process and Application” section. I’ve created 8 categories that I think envelop the experience of working with computing machines, but I’ve probably missed something.

The categories I’ve chosen are:

  • Algorithms, meaning developing procedures to solve problems
  • Process & Application, meaning the general rules of procedural programs (loops, conditionals, etc.) and turning algorithms into actual code
  • Data & Classification, meaning the different ways that computing machines store data, such as data types (string, integer, etc.) and more complex data structures (objects) and databases
  • Logic, meaning the rules that apply to booleans and conditionals
  • Environment and Interface, meaning both the input and output devices of computing machines and also the user interfaces of software
  • Network and communication, meaning all the different ways computing machines talk to each other
  • Physical computing and sensing, meaning devices controlled by computers that do work in the world and analyze it
  • Debugging, meaning understanding the kinds of unexpected behavior we get from computing machines and how we can analyze and come up with solutions for them

There are other categories that I’ve debated including. Two specifically are: Hardware and History of Computation. The first is how computers physically work; this should be in here and the whole thing could be expanded to Computer Science standards, but I don’t know exactly what they are yet. The second is how the idea of computation has developed, going from Al-Kwarizmy developing algorithmic processes through Charles Babbage and Ada Lovelace developing the ideas behind doing it with machines, Alan Turing developing the theoretical underpinning of modern computation and John von Nuemann inventing the architecture of the computer, programmers like Margaret Hamilton writing the code for Apollo, and so on. This content is essential to include because it will engage more humanities-inclined students, but I don’t know if it belongs in standards.

The standards have levels ranking from what I might expect a young grade schooler to be able to learn up to what I think a small percentage of advanced high schoolers might potentially learn. The goal is to create an “all-some-few” approach to lesson design in which every level of learner is challenged and engaged.

Here are the complete standards:

  1. Algorithms
    1. Overview: many problems can be solved by a planned procedure of steps that can be carried out in a mechanical predictable way by a person or a machine
    2. Levels:
      1. Students can follow simple sets of instructions with only one outcome
      2. Students can distinguish between a mechanical and non-mechanical process
      3. Students can follow a set of instructions with conditional outcomes
      4. Students can describe algorithms verbally and visually
      5. Students can identify commands in a computer language that apply to steps in an algorithm
      6. Students can write a computer program implementing an existing algorithm
      7. Students can modify existing algorithms to get different results
      8. Students can make original naive algorithms to solve a problem
      9. Students can evaluate an algorithm for correctness and efficiency
        1. “Safe move”
        2. Asymptotic notation
      10. Students can understand proofs about the efficiency and accuracy of an algorithm
      11. Students can create an efficient algorithm
  2. Process & Application
    1. Overview: Machines can be programmed to execute algorithms using various coding interfaces that can be interpreted by the machine.
    2. Levels:
      1. Students can apply existing methods with or without parameters to get an output
      2. Students can match basic method keywords with desired outputs and order them in short functional segments
      3. Students can create simple conditional blocks that respond to hardcoded variable states
      4. Students can create conditional loops responding to hard-coded conditions and match them with loops in an algorithm
      5. Students can use main loops that run during the length of the program
      6. Students can create conditionals of moderate complexity that respond to data input by a user, and match them with branches on an algorithm
      7. Students can create iteration loops to move through collections of data based on loops in an algorithm
      8. Students can combine multiple conditionals and loops to create a single-function program
      9. Students can create simple functions matching a subprocess in an algorithm
      10. Students can create multi-function programs based on algorithms they have created
  3. Data & Classification
    1. Machines that do computations and apply algorithms store data of various types in different ways in order to perform operations on it.
    2. Levels:
      1. Students can identify different kinds of information, such as numbers, dates and text
      2. Students see how primitive kinds of data describe different kinds of real-world objects and situations
      3. Students understand that different kinds of operations and methods apply to different types of data
      4. Students can recognize complex data types that contain a number of primitive types and methods
      5. Students can identify how complex data types apply to real-world objects and problems
      6. Students can describe data types as superclasses and subclasses
      7. Students recognize complex data types that contain other complex types have methods or functions with different types as arguments
      8. Students can make original data classes to model real-world objects
      9. Students can identify and share data classes using a markup language such as JSON or XML
  4. Logic
    1. Computers at their core operate by evaluation of logical statements that follow certain logical rules.
      1. Students can classify statements as true and false
      2. Students can evaluate simple conditional statements based on truth or falsity and use them to make choices
        1. (“stand up if you’re wearing blue.”)
      3. Students can evaluate simple conditionals using conjunctions (AND) and disjunctions (OR)
      4. Students can evaluate multi-level conditional statements with basic operators
      5. Students can create basic conditional statements that can be used to solve real-world problems
      6. Students can apply more advanced operators such as XOR and NAND
      7. Students can apply Boolean operators to binary numbers
      8. Students can create complex Boolean operations to solve problems
  5. Environment & Interface
    1. When a human interacts with a machine there must be an interface through which the user provides data and instructions to the machine and the machine can provide information to the user
    2. Levels:
      1. Students understand the difference between input and output and can give some examples of each (not necessarily in a machine)
      2. Students can identify common input devices such as touchscreen, keyboard, mouse and camera, and can identify common output devices such as screen, speakers and printers
      3. Students can type short inputs and place things using a drag-and-drop interface with a plan for expected output
      4. Students can respond to basic computer requests for information, including username and password forms
      5. Students can interact with a computer in a text-based interface and use advanced GUIs
      6. Students can create text-based interactive environments for other users
      7. Students can used advanced GUI and text-based development environments with an expected outcome
      8. Students can create interactive environments for other users
      9. Students can understand and control how a device interacts with a computer at a machine level
  6. Networks & Communication
    1. Many machines communicate with other machines over different types of electronic connections.
    2. Levels:
      1. Students understand that devices they are using are connecting with other devices locally and over the internet
      2. Students can navigate a simple hyperlink environment
      3. Students can enter network addresses (such as URLs) with an expectation of reaching another device
      4. Students can understand and respond to events that occur through interfaces and distinguish them from events internal to the machine
      5. Students understand basic principles of how computers request, serve and interpret served data (what happens when you “go to” a Web page?)
      6. Students can create client-side interfaces that can be served over a network (such as an HTML page)
      7. Students can create interfaces that send and respond to data from the server during use (client-side programming)
      8. Students can create and interpret network requests at a text level
  7. Physical computing and sensing
    1. Processing machines can control other machines that collect information from the world perform physical work in the world according to a program.
    2. Levels:
      1. Students can identify devices that can connect to a machine and do physical work
      2. Students can identify what kind of physical work a device will be able to do
      3. Students can make a physical device do a simple motion or response, (such as spinning  a motor or turning on an LED)
      4. Students can plan simple motions for a connected physical device and explain it algorithmic fashion
      5. Students can convert an algorithm to control a machine into a simple program
      6. Students can plan a series of actions for a physical machine to solve a problem
      7. Students can plan and write a program that will make a physical machine solve a problem
      8. Students can modify physical machines to make them do different things than they were built for
      9. Students can make a physical machine to solve a problem and program it
  8. Debugging
    1. Often machines don’t do what we expected them to do or want them to do, which can result in an error message or in unexpected output. There are different types of errors that can happen in computing and many different reasons they can happen. Debugging is identifying the type and cause of an error and changing our input or the state of a program or machine so we get the output we expected.
    2. Levels:
      1. Students understand that an error message occurs because a program can’t interpret an input or because it’s in an incorrect state
      2. Students understand that an error can be understood by analyzing and changing input or the state of the computer or program
      3. Students can experiment with different types of input to analyze what is causing an error
      4. Students understand the three main kind of errors that occur when programming:
        1. Syntax or compile-time errors: the compiler won’t even try to run a command because it doesn’t understand it
        2. Runtime errors or exceptions: the compiler understands a command and attempts to run it, but the data it is using lead to an operation the computer can’t perform, causing the program to stop with an error (y=5/x, where x = 0)
        3. Unexpected output: the compiler understands a command and it runs without error, but doesn’t give you the output you were planning for
      5. Students can identify some causes of an error, such as unanticipated input, endless loops, memory overflows and incorrect data types
      6. Students can identify the type of error that’s occurring in a program and consider what kinds of actions might change the outcome
      7. Students can analyze error messages and use this information to find the location and cause of an error
      8. Students can anticipate the kinds of errors that might happen in a program and modify the program to avoid them
      9. Students can write methods that deal with exceptions in a way that records or logs useful information, allows the program to continue and gives a user-friendly output

 

NetBeans: the Missing Step in Coding Education?

NetBeans LogoI’ve been talking about the need for a tool to transition from “move things around the little window by the code” teaching tools like Scratch, Khan Academy coding and Greenfoot. These are all great ways to start kids coding, but they are walled-off playgrounds with no connection to the outside world or even the rest of the computer you’re working on. Is there an accessible tool that allows students to easily do visually interesting things but also gives them access to code that can read and write files, create and connect to databases, and get data off the internet? And then I thought, what was that Java IDE that Sun made back in the 90s with a form builder, is that still around? And so I found myself at Netbeans.org.

Old AOL ScreenNetbeans is anything but a new tool; at 20 or so years old it’s practically geriatric by tech standards. When Netbeans came out Yahoo was the exciting new search engine, Mark Zuckerberg was a working on a media player as a high school project and a large percentage of internet sessions began with loud scratchy modem handshakes to AOL. I feared finding a neglected and forgotten product today, but Netbeans is quite up to date; the standard download comes with JDK 8 and tools for creating pages in Swing or JavaFX, the newer user interface module.
Don’t get me wrong; to do anything in NetBeans you have to know Java. So how does it help? The main way is that it makes creating user interfaces with Swing ridiculously easy using the forms design. To make a window you just select-click on your project, choose new and then choose JFrame form. You’ll see the window in the design view, and to your right you have a bunch of different UI elements like text boxes,  buttons, checkboxes and so on that you can drag and drop right on your frame.

Programming the UI is equally easy. To make an event listener for an element (that’s the code that happens when the button’s clicked or element’s changed or whatever), just double click on the element. You’ll be right UI elementsin the event listener class, so you can just write the code you want it to perform. (You can see more details in my first NetBeans lesson on my YouTube channel).

As I said, you’ll still have to know Java to do actually make the code in the listener, but with NetBeans your students can focus entirely on what they want their code to do rather than dealing with the the clunky Swing UI code or remembering the difference between addGroup() or addContainerGap().

But wait there’s more! NetBeans also makes it easy to create an Entity Class from Database. That means if you have a database connection you can easily make the students connect and start doing SQL commands with Java. It also allows you to create a Web Service Client. I’m not saying either of these are things kids could figure out on their own, but if you do the heavy lifting on the backend you can have kids do some serious programming with data that is not in a little box by the code window.

Apache LogoAfter I got excited about this, I immediately discovered that Oracle is planning on turning NB over to the Apache foundation as an open source project, and a sinking feeling filled my gut. I had experienced something similar before, when I got excited about teaching Microsoft’s fabulous XNA gaming platform in C# right before Microsoft dropped it like a used wad of gum. XNA became Monogame, but at least at the time Monogame was not what XNA had been. So I know well enough that “it’s becoming an open source project” is often the software industry’s equivalent of your parents telling you “the dog is on a beautiful farm where he can run and play all day.”

But Apache is not just any open source foundation; they are behind the most popular *NIX web server and Mozilla one of the most popular browsers – which you may well be viewing this page on – among many other projects like the Thunderbird mail app.

Even more encouraging was the thriving community of NetBeans developers I’ve discovered on Twitter. According to the NetBeans team there are more than a million users of NetBeans today, meaning a lot of commitment to keeping it alive and thriving. I wonder if these people realize NB’s potential as a learning tool for younger students?

I’m not going to get into the debate over whether NetBeans is better than Eclipse. Clearly some developers feel it is, but many more prefer the great purple circle (or one of the other popular IDEs like IntelliJ), and Eclipse may indeed be better for a commercial EE developer. For new students, however, it’s extremely intimidating with not a lot of handholds and no help with sorting out a parallelGroup from a sequentialGroup or a verticalGroup when you’re making a UI.

I’m experimenting now with NB as a teaching tool for students as young as 8th graders. I’ll continue to keep the blog up to date on how it works, and be sure to check out my NetBeans playlist on YouTube as it grows.