Wednesday, January 18, 2017

Learning The Real Value Of Programming

The information age needs and will need a growing number of people with tech and programming skills - demand for IT skills is expected to grow at nearly five times the UK average over the next decade, digital tech skills have been added to Shortage Occupation Lists for UK and Scotland and a tech talent shortage is holding back business. The education sector has responded to business and economic needs with schemes and provisions to teach people how to program - its good for the business and the economy and for those learning how to program as there are good jobs available. Programming is a very useful skill to learn and to have but the real value of programming goes a lot deeper.

Programming is about problem solving, communication, creativity and invention. Teaching programming is an excellent way of teaching generic and transferable soft skills for jobs that don't even exist yet. Programs usually don't work first time and there is an iterative cycle of debugging them - trying out ideas, testing hypotheses, learning how to design things that are easier to support, maintain and develop. Teaching programming is an excellent way to teach people how to learn and how to adapt for an uncertain future - it need not be about working with computers at all.

The best way to learn is to teach and it was when I started teaching programming as a part of general IT courses to young people in 1981 that I fully appreciated the real value of teaching and learning programming.

The early 1980s was such a very exciting time in computing - microcomputers made computing accessible to people for the first time and there was an incredible "cambrian explosion" of diverse activity and a sense of optimism about what might be possible. In 1980 Seymour Papert published the inspirational and classic book "Mindstorms: Children, Computers and Powerful Ideas" and his ideas about learning in combination with accessible computing made for what seemed at the time like a revolution in education.

Mindstorms has two central themes: that children can learn to use computers in a masterful way and that learning to use computers can change the way they learn everything else ... even outside the classroom.

Program or be programmed

Papert understood that teaching is the best way to learn and that children should be programming the computer rather than being programmed by it. 

In Mindstorms Papert wrote:

"The child programs the computer. And in teaching the computer how to think, children embark on an exploration about how they themselves think. The experience can be heady: Thinking about thinking turns the child into an epistemologist, an experience not even shared by most adults."

"I began to see how children who had learned to program computers could use very concrete computer models to think about thinking and to learn about learning ad in doing so, enhance their powers as psychologists and as epistemologists. For example, many children are held back in their learning because they have a model of learning in which you have either :got it or :got it wrong." But when you learn to program a computer you almost never get it right the first time. Learning to be a master programmer is learning to become highly skilled at isolating and correcting "bugs," the parts that keep the program from working. The question to ask about the program is not whether it is right or wrong, but if it is fixable. If this way of looking at intellectual products were generalized to how the larger culture thinks about knowledge and its acquisition, we all might be less intimidated by our fears of "being wrong." This potential influence of the computer on changing our notion of a black and white version of our successes and failures is an example of using the computer as an "object-to-think-with." It is obviously not necessary to work with computers in order to acquire good strategies for learning. Surely "debugging" strategies were developed by successful learners long before computers existed. But thinking about learning by analogy with developing a program is a powerful and accessible way to get started on becoming more articulate about one's debugging strategies and more deliberate about improving them."

Papert’s research in the 1970s convinced him that children learned more efficiently if they could see a tangible result and for educational computing he developed the turtle - an "object to think with" - a robot that could be programmed by Logo commands to move around with a pen and draw shapes.

Programming in 1982 with BBC Micro, LOGO programming language and Turtle

Program and open your mind

I count myself as fortunate to have had access to a BBC Micro with Logo and a turtle robot to teach programming to young people in the early 1980s - its an experience that has stayed with me and inspires me to this day. Papert's ideas about having objects to think with and to program were spot on - I saw first hand how students turned from being programmed to programming. I saw how they became deeply engaged in thinking about what they were doing and about communication - that they couldn't program the computer to do something unless they could understand and do it themselves.

Most of all programming theTurtle robot was fun and seeing their programming actions in the real world was impactful. We often used to start out programming each other - writing programs for others to follow (a sort of dry run) before running the program on the computer. A common early exercise was to program ourselves and then the Turtle to draw things. We would start with a very basic vocabulary: 

fd x      forward x steps
bk x     backward x steps
rt x       right x degrees
lt x       left x degrees

We would start out creating the program and calling out to partners the instructions to walk  a square of a certain size. Already this introduced the idea of a variable (x steps) and debugging if their partner didn't walk a square and arrive back at the place they started. 

We could add a little more vocabulary to develop some powerful ideas - procedures and repetition. Seeing how the instructions to make one square could be repeated with variables to make a house shape with square windows and each window with square panes was a real "mind opener"  
LOGO program to draw a square
Where pd = pen down and pu = pen up

FD 100 RT 90

Using repetition
PD REPEAT 4 [FD 100 RT 90] 

The challenge then was to work out how to move the turtle to a new position within the square to make a window etc and then program it!

This physical or tangible programming was so incredibly powerful and mind opening it left a lasting impression with me
Building a ladder 

Programming teaches practical life skills

Programming is often misunderstood as a purely intellectual and academic type of activity but it's really quite practical, its about making and building things - no wonder in software we have terms like architect and engineer. However, programming doesn't have the deep rigour of engineering - programming is as much art and craft as it is science - to be a good programmer you need to balance both systems thinking and design thinking - you need to balance what wanted with what is feasible.

KISS"Keep It Simple Stupid"
"Simplicity is the ultimate sophistication" ~ Leonardo Da Vinci
"Less is more” ~ Ludwig Mies Van Der Rohe
This is like a version of Occam's razor and ‘cutting away’ of unnecessary material. Possibly the most important lesson you learn from programming (and you learn this early) is to reduce complication - to keep refining your program so that it is as simple as possible - this makes it easier to solve problems and develop a program, fix problems (bugs) and to change, update and develop a things later. KISS is useful in so many areas of life and at work KISS is a useful antidote to its antonym KICC (Keep It Complicated Creep) the form of ritualised creeping bureaucracy we often see in so many systems and organisations that seem to operate as Rude Goldberg machines.
Rude Goldberg toothpaste dispenser
While you may not be able to reduce complexity KISS can reduce complication can help you deal with it.  

Design and design thinking
Design permeates all stages in the programming cycle from initial design through programming to coding. Good design is like "pushing against an open door" and programming teaches you to spend time in the initial planning and design stages to save time later and make your work easier overall so that development can flow forward and progress relatively easily by making later problems easier to fix.
Design thinking process
Programmers recognise the rational of the Waterfall method (that initial design errors are more expensive to fix "downstream") and the necessity of Agile methods (that develop a solution adaptively through continuous improvement) because, as Seymour Papert said, "when you learn to program a computer you almost never get it right the first time".

Programmers recognise the importance of exploring the feasibility of alternative solutions at an early stage and then creating a design that can be flexible, adaptive and easy to change - using modules that can be more easily changed, re-used and re-purposed for example.

Science and scientific thinking
Programming teaches you to be like a scientist experimenting and testing ideas and hypotheses both to learn more about programming and to get your programs to work properly.  When a program isn't working and we have no idea what the problem is we set up observations to gain information to help us form ideas about why its not working and try to narrow down the problem. We learn to think about and explore problems using testable experiments.
Museum of Science Nano Days
Programmers make programs as if they were babies ... they want the best for them, they want them to succeed but this confirmation bias causes all sorts of problems. Programmers must be aware of this and just like science programming teaches us the dangers of experimenter bias and the importance of peer review and falsifiability. For programs tough love is best and like scientists programmers must use critical thinking and try to break their own programs if they are to succeed - often the best way to do this is to put a program into the hands of as many people as possible and ask them to use it and better ask them to try and break it - its a hard thing to do but its essential.

If you can’t explain it to a six year old, you don’t understand it well enough.” ~ Einstein

Programming teaches communication skills. In order to program a computer to do something you have to understand it yourself, be able to do it yourself and then be able to tell the computer how to do it in a language and way that it can follow. 

Programming as a communication skill applies in everyday life - communicating with people and machines means understanding the parameters involved - yourself, the other, the shared language and that which is being communicated. If the other cannot understand what you are communicating then its not communication - programming teaches us to package communication so that it can be received by the other in a way they can understand and with everything they need to understand it.
5 Ways to Encourage Communication with a Non Verbal Child Diagnosed with Autism
Programming teaches us the importance of good documentation both for ourselves and for others. Its easy to rush to code and then scratch your head later trying to work out the code when it doesn't work or you want to change it and in wondering why you made certain design decisions and did things in a particular way. Documenting a program is important for ourselves but essential when working with others - you might be able to read your mind and have an inclining as to what a bit of code does but others can't read your mind and code is not natural human language so for  so can be time consuming and difficult for other people to understand - good documentation helps others as well as yourself.  

Managing to get things done
KISS, communication, science and design these are the things that learning to program can teach us and these things can help us get things done in everyday life.

Looking for the essence of things to make them simpler helps understanding. Approaching big problems in a scientific way and breaking them down into smaller more manageable bits helps avoid decision paralysis and helps us organise, plan and get on and do things. Recognising the importance of understanding things ourselves and being aware of the other person helps us communicate better. But most of all .. being adaptive and continuously improving helps us keep learning through our lives.

KISS, communication, science and design - learning to programming helps us get things done in everyday life. 

Learning to program helps us learn.

Don't just learn to program .... program to learn
For more information and examples of LOGO programming visit the Logo Tutorial from Brown University 

No comments:

Post a Comment