Learning to code
- Published
- comments
Who needs to learn to code? You might think that a knowledge of computer programming is much like plumbing or car maintenance - something of use only to those who are going to make a living from that trade. But suddenly coding is cool - the government is listening to those calling for it to be taught in schools, and executives are signing up for courses.
I spent a day on one such course run by an organisation called Decoded, external. It aims to give people who will probably never need to code for a living a basic grounding, so that by the end of the day they have an insight into what is involved.
So at 09:00 one morning I found myself in a very attractive loft apartment in East London sipping coffee with 10 executives from an advertising firm. Most of them had more experience of coding than me - mainly because they were young enough to have messed around with a BBC Micro or a ZX Spectrum as teenagers.
But, like me, they were unlikely to need these skills in their daily work. So what was the point of sending them on a course with a pretty hefty price tag? They gave me various reasons, from gaining a better understanding of consumers to shaping their firm's digital future, but I thought Tom, a young strategy director from the agency, put it best: "There's this phrase, the geeks will inherit the earth.... when they do I want to be talking the same language as them."
Then it was down to work - first a potted history of code, with an emphasis on the importance of web languages. Alasdair Blackwell, our main tutor and the co-founder of Decoded, is an impressive evangelist for the open web, and the need to give ourselves the tools to make best use of it.
He argues that today's teenage iPad users, far from being digital natives, actually have less understanding of what makes computers tick than his generation, who got their hands dirty with machines like the BBC Micro. "The children playing on iPads, I actually despair for them because they're just using software, not creating software for themselves."
Next, we started to learn about the building blocks of the web apps we were each going to make - HTML, the basic coding language for any website, CSS, for the style and appearance of the site, and Javascript, to make it come to life with all manner of audiovisual tricks.
HTML and CSS seemed reasonably easy to grasp, but by the time we got to Javascript - with its elements, functions and curly brackets - the brain of someone last in a classroom more than three decades ago was beginning to protest. Then we were each set to work to start building our own web apps, which needed to have a location based element, and to work on a mobile phone as well as a computer.
My idea, surprise surprise, was for a news app that would tell you about stories which happened in particular London locations as you arrived there. As we each followed the tutor through the various stages of HTML, CSS and Javascript, there were cries of pain from around the table, as our creations failed to respond in the way we intended.
But what we learned is that coding is a collective pursuit - together with our tutors Alasdair and Monique, we debugged each other's sites so that by 17:30 we all had something basic but rather clever.
By using some smart piece of Javascript found in the free online library Jquery, external, we had inserted some geolocation code on our sites. This meant that a computer - or phone - using the apps at the door of our current East London location would be served an extra piece of content. As each of us refreshed our web apps, and found that they worked, a ripple of quiet satisfaction spread around the room.
Now, like most of those on the Decoded course, I rather doubt that I will ever be asked to code as part of my job - and a few days after the course I'm already struggling to remember which brackets go where in Javascript.
But I came away from my day of coding exhilarated by the experience and with new insights into the development of our digital world. So maybe one day soon I will sit down and start coding for real.