During one of the intervals at the recent TEDx Oxford conference, after Peter Millican’s session in which he used simple computer programs to gain insights of the world around him, I was approached by a very good friend of mine. She was keen, as are a number of my friends, male and female alike, to learn how to code, but she was struggling with how to get started.

The issue she was having with the currently available classes were too formal, often very demanding on time, and she often found them to be very competitive. This didn’t produce a very supportive or effective learning environment. Online courses on the other hand were often were very simplistic, and were hard to stick to, possibly because they were often worked at in isolation.

As a teacher, she is keen to try and get something short, with a large practical element, which would fit in the few weeks every year that all teachers have free at the same time – the summer break.

How did you learn?

The conversation turned to how I learned to code…

While I had some formal education it is true, which was good to address gaps in my theoretical knowledge, I had learnt the bulk of my coding skills long before I sat in my first Computer Science class at 15. Despite having not been formally “taught” how to code, I had managed to absorb a comprehensive understanding of the subject, so how did this come about?

Through our conversation, I realised that it seemed I had largely learnt through self directed play (aka, pissing about trying to do cool shit), combined by having a couple of more experienced friends, who helped guide me when I got completely stuck. Another aspect that helped was the weekly computer club I attended, together with Ben Werdmuller and a few other friends, where (as well as playing Monkey Island for hours) we demoed our latest code, and exchanged tips hand tricks we had learnt.

This provided a supportive environment in which to sharpen my tools, and the aura of good natured competition the weekly informal show and tell generated didn’t hurt.

What could this look like as a course?

So, could this experience be replicated? Could we put together a course, which would be fun, nurturing, fit in with people’s limited time and allow people to drop in and out without falling behind? I’m assuming this is going to be for adults here, but I can’t imagine it being a significantly different problem for children.

I imagine this working more like a club or craft group, rather than a course, where students play with various bits of kit and work on their own projects. Where they’re encouraged to learn off other students, and where more experienced people are largely there as mentors rather than to set agendas. For complete beginners, perhaps an orientation session covering some of the basic basics would be useful to bring people up to speed, but I think lectures and theory should be minimised – this should be hands on!

What are your thoughts?

22 thoughts on “Learning to code

  1. I learned to code at university when i was 19, but never attended any lesson (and never got graduated). Instead, for me also it happened through personal exchange with other students and by coding my first programs. That was a very long time ago. I was programming in C on Unix and on MS-DOS.

    I went back to coding recently. Programming and languages changed a lot. This time I had a harder time to grab the new concepts and not just because I am older and not used anymore to program. The main reason is because now I am more isolated.

    I suspect that personal interactions, face to face, also channels essential human qualities which are the real engines of learning and creation, as enthusiams, curiosity, steadfastness, even intuition. Observing somebody else resolving a problem is mainly an inner transmission of attitudes.

  2. I think it really do think the hands on “play” approach is the best way to learn coding; if you’re free to chase the rabbit of curiosity, who knows where you’ll end up? 😉

    Works on your own, but with others there it can kick you up a gear as you can riff of other people’s ideas which can take you off in entirely new directions.

  3. I can see a club-type idea working, but I think it is important not to make it too self-directed for beginners. It is difficult to know what can be done, and how difficult something is to implement until you have got started. I wonder whether something along the lines of Broken Spoke Bike Co-op (http://bsbcoop.org) could work? They run regular sessions where anyone can turn up, use their tools and expertise to fix a problem they may have. But they also run courses, both for beginners on basic maintenance of their bike, up to those on things like wheel building for the more advanced.

    I’m imagining a workshop that runs regularly – perhaps one evening a week – as a drop in place. Once in a while (preferably within school holidays) there would be more intensive courses that would run with an end goal and which are there to get people like me started and take the fear out of programming. Everything would be hands on – absolutely no lectures! As a teacher I would then hope to filter what I learn down to the students I see every day.

  4. I think that could be a good format, although I’d want to shy away from writing proof of concept programs, and instead try and solve a real problem. Perhaps throw it open to the floor and ask in the first session what problems in the day to day life could use a program to solve – I liked the guy in the TED talk’s example of analysing statistics.

    Anything done would have to be hands on, and while it’d be necessary to cover some Comp Sci, I think that should be very hands on as well – perhaps take the surgeon’s “Learn. Do. Teach” approach. I also agree with Terence Eden, that the course should focus on understanding, rather than just teaching syntax, as this in the end is going to be much more transferable.

  5. My experiences similar to yours. I started on programmable calculators for statistical and equation solving (the first with program stored on a marked card, physically moved through the machine that the current instruction under the scanner head – the concept of current instruction was very physical!)

    Starting on simple systems meant there was less arbitrary complexity to understand, but of course couldn’t do very much. But this laid groundwork of basic ideas so that when I encountered real computers, I was suitably primed.

    I’m not sure if that could be replicated today, but I imagine something like logo might come close.

    #g

  6. Thanks for sharing your experience Graham!

    You’re right, I’m not sure exactly how you’d capture that today – I wonder whether doing something around/with the RPi, perhaps combined with some basic electronics – take advantage of the GPIO to make real things happen, rather than moving blobs around a screen?

  7. I will try to write something in the next few days for your article. But I wanted to know what I should focus on.. are you principally asking how some total non-coding newbie adults should learn how to code? Because it’ll be very different to how you leant as a child and that’s different to how you might pick up a language now as an experienced developer.

  8. Marcus you are absolutely right. Sitting in a classroom listening to some-one wittering on about code is probably the worst way to learn coding I know. I have a company that designs safety critical software for use on the flight deck of airliners and we discovered an amazing thing, “it is easier to turn pilots into computer programmers than to turn computer programmers into pilots”. The problem is that unless the person designing the system has had experience on the flight deck he or she has little idea of what is needed by the pilots. This is not trivial as performance systems written by non flying computer programmers have been cited as a major cause in a number of aircraft crashes.

    I would like to take this whole debate further with you.

    William Lonergan

  9. Interesting, and I totally get how domain knowledge is really the critical thing in order for what you write to actually be *useful*

    So really, teaching people to code should really be focussed on teaching people to express their ideas in code – it’s more like learning a foreign language, or learning how to paint, rather than a science.

  10. Marcus,

    this is the key point. Computer programming is a tool, a means to an end if you like, simply teaching people to code is about as useful as teaching them “electric drills” or screwdriver technology and is in my opinion a waste of their time and the teachers time. However put coding in the context of building a system to solve a real world problem and now you have something completely different. Let me give you an example; most light aircraft have very poor and inaccurate fuel gauges. Designing a fuel system that is accurate and gives pilots information on both fuel contents and fuel flow uses known electronic technology. getting kids to design such a system and then write the code make make it work will really teach them about systems and coding. RESULT! They will learn about electronic measuring systems, system design and coding all in one go. All the information they need is available on line. Google “Capacitance Fuel Gauges” and you will see what I mean.

    I have been in the computer industry for 45 years and seen numerous failures by both programmers and systems analysts because they lacked Domain Knowledge and System Understanding.

    Try this on a programmer. I want you to build a system to provide guidance to the pilot of a single engine turboprop to a safe landing following an engine failure at night and in cloud. You have three months to produce a working prototype. You can ask anyone anything. By the way it has never been done before.

    (A safe landing is one where the passengers and crew can walk away from the aircraft at the end of the landing run.)

    William

  11. Marcus

    Another point, computing is not a science,

    “There aint no such thing as computer science just as there is no such thing as rocket science”.

    Computer programming is a learned skill, just like carpentry and building rockets is engineering. Science is the study of things we know little about and formulating laws that enable use to then use those laws to do things we want to do. Computing and building rockets are technology and engineering.

    While I am in full flow. Artificial Intelligence is also a myth or an oxymoron, which ever you prefer. To make an artificial anything you have to know what the real thing is. Then you can compare the artificial thing with the real thing and know if you have been successful. Oops! We don’t know what intelligence is. We have some theories but these are not universally accepted by the scientific community. So if we do not know what intelligence is how can we make artificial intelligence? I rest my case m’lud.

    The only known rational definition of AI is “Any computer program that makes the Pentagon drool and reach for it’s cheque book is Artificial Intelligence”

    William

  12. I quite agree with everyone who has said that the motivation of having real problems to solve is key. Certainly it was for me anyway. I started programming at about age 15 when I first learned about the Euler method and thought it was cool, but couldn’t quite imagine having the patience to do it by hand for any non-trivial problem.

  13. Good points all… ok, so it’s looking like an approach would be to perhaps pick a couple of things that the class wants to build and help them build that. Perhaps something using a rPi or similar, giving them a real world hardware edge – something they can physically handle as well as code for.

  14. Marcus

    You are so right. A major cause of computer system failure is the lack of a clear purpose for the system that is being built. Without this it is just coding for the sake of coding. A bit like masturbation, good fun but not like the real thing.

    The purpose must be short, clear and unambiguous. If it’s more than 8 to 10 lines it is wrong! My example of building a system to assist pilots of a single engine turboprop to carry out a safe landing following an engine failure is a case in point.

    Purpose

    To provide a system to give a pilot of a single engine turboprop with flight path guidance to a safe landing following an engine failure during the cruise phase of flight. The computer will have access to GPS information and a database of suitable emergency landing areas.

    That’s it. Clear, concise and unambiguous. The next bit is of course “domain knowledge” but that’s another story.

    By the way, a good landing is one you can walk away from, an excellent landing is one you can walk away from and the aeroplane can be used again.

    Yours aye

    William

  15. Heh heh! I’m well aware of good landing vs great landing, I’m a PPL myself! Only flown on nice days though 😉

    It’s a good example though… I wonder if, depending on the group, we could get a project which people could work on that would be specific AND for which they’d have domain knowledge for… with the two combined it might actually be useful, and so more likely to get the gang engaged.

    So, for example, if there are some keen brewers amongst them (thinking of myself here – another hobby), perhaps some software, combined with some simple sensors, that would monitor the progress of the brew and send notifications if certain criteria were reached. Start simple, but could the specifications could be enhanced week by week depending on progress and input from the class.

  16. Hi Marcus,

    What do you fly? I have a part share in a Beagle Pup 150, G-IPUP, a great aeroplane and a much better trainer than any of the American lumps of soaps with wings. I was lucky enough to learn to fly on the Tiger Moth, Harvard and Vampire, Great aircraft, the Tiger in particular, No Flaps, No Brakes, No Electrics, NO Radio, Grass Airfields and NO Air Traffic Control. Bliss.

    I am just starting to work with a school in South London to develop the students skills in producing proper computer systems. We are planning to do this by setting up an Aviation Club and working with some very senior people in the aviation industry. The aim is to enable the students to design and build commercial standard software to solve some of the problems in the aviation industry. The purpose of the Aviation Club is to enable the students to begin the development of the aviation domain knowledge that they will need to build systems that meet the needs of the industry.

    Incidentally, I am one of the few people who has been a professional flying instructor on Biplanes and Supersonic jets.

    Yours aye

    William

  17. Nothing quite as exciting! Funds are tight, so I mainly fly the club planes – currently qualified (if not current – terrible weather this winter) on a Super Dimona and the club’s Slingsby Venture. The Venture is a tail dragger and is older than I am, and while it’s not fast, and not particularly comfortable in the winter, it has its charms. On a warm day you can throttle right back on the engine and stay up all day on thermals alone.

Leave a Reply