Hello Ruby — teaching children to write code

Ruby, with a wise penguins, a green robot, and lonely snow leopard. Drawing by Linda Liukas.

Ruby, with a wise penguin, a green robot, and lonely snow leopard. Drawing by Linda Liukas.

A few years ago I remember reading a book advocating that all school children should be taught to program computers. It’s a great discipline for anyone, the author argued, especially children. It teaches patience, persistence, problem-solving, the importance of planning; it can help children improve their maths and logical thinking, and it’s hugely rewarding to see something that you’ve been working on suddenly come to life and work as expected. I wish I still had that book.

A couple of stories about teaching children to write code have caught my eye over the last few weeks.

Year of code

On Newsnight, broadcast on BBC 2 on Wednesday 5 February 2014, Jeremy Paxman presented an article about the Year of Code campaign, an independent, non-profit campaign to encourage people across the country to get coding for the first time.

One of my first experiences of using a computer was in primary 7 when the headteacher brought in a Commodore VIC-20. I took computer studies in high school through to higher level, and half of my university application form was to study computer science (the other half to study divinity, which is what I ended up doing).

I loved coding as a kid. My friends and I would gather around each others home computers, whether a Commodore 64, ZX Spectrum, or BBC B, and we’d design or amend games and programs together.

People are often amazed when I say that I taught myself the web skills that I use now in my day-to-day job in the web team at the University of St Andrews. Except, that’s not entirely true: I do have the experience of those seven or eight years of coding on 8-bit computers as a child and as a teenager. That was a brilliant headstart.

It seems that today ‘computer studies’ in school is more about learning how to be a consumer and user of existing software (how to use Microsoft Word, Microsoft Excel, Microsoft PowerPoint) rather than creating your own software.

I was appalled to learn how some youngsters are being ‘taught’ to code in schools today. A couple of months ago a friend of mine phoned me asking for my help. Her daughter is studying computer studies and she is being ‘taught’ to code using… Adobe Flash!? And I say ‘taught’ because it sounds like she and her classmates were essentially shown the application, given a book and told to get on with it. It sounded like the teacher didn’t know to code either.

Compare that with my own experience in the mid-80s. I had three years of hands-on coding BASIC and machine code by someone who understood how computers worked and what the programs were being asked to do, who could tell a CPU from an ALU from a RAM. And then in my sixth year a group of six of us took ourselves off and taught ourselves Pascal in what would otherwise have been free periods for us in our timetable.

We need to be teaching our children to code so that they can contribute to the next generation of computer applications. Technology has never been more exciting than it is now. I remember my dad (who worked in the electronics and communications industry, who delivered the Faraday lecture on fibre optic communications) telling me in the early 80s that one day televisions would be so thin we could hang them on our walls. It seemed like a space-age dream, it is now reality.

My main concern about that Newsnight piece, however, is the interview with Lottie Dexter, the executive director of Year of Code (at 5′ 32″ on the video).

It’s not her admission that she herself cannot code—good on her for admitting that straight away, and even better that she is committing herself to learning this year, alongside those she is encouraging to take it up. No, it’s comments like,

“You can do very little in a short space of time. For example, you can actually build a website in an hour [...] completely from scratch.”

Well, you know. That’s true. But it’s not going to be a particularly good one, if this is your first. Erm… practice?

Paxman then asks her, “How long does it take to teach to code?”

“Well, I think, you can pick it up in a day.”

My heart sank. I was speechless. In trying to make coding sound more accessible she immediately undervalued programmers everywhere. It really isn’t quite that simple. I’m going to be bold here and state: you simply cannot learn enough about programming in one day to be competent enough to teach it. Is it not comments like that that result in school pupils being ‘taught’ how to program using Adobe Flash?

Hello Ruby

Hello Ruby, a Kickstarter project by Linda Liukas

Hello Ruby, a Kickstarter project by Linda Liukas

Which is why projects such as Linda Liukas’s Hello Ruby are so exciting.

Linda, a founder of Rails Girls, wants to create a children’s book that teaches programming fundamentals through stories and child-friendly activities.

She asked for US $10,000, as I write her total is at US $336,203. (There are currently three days left to get involved.)

I think it’s a hugely exciting project. This is what Linda has to say about it:

Ruby is a small girl with a huge imagination. She stomps and stumbles around her own little world while her dad is traveling. On her adventures, Ruby makes friends with the lonely Snow Leopard, visits castles made of windows, and solves problems with the wise penguins. She bakes gingerbreads with the green robots and throws a garden party with… well, if you like to hear the rest of the story, I need your help.

Ruby’s world is an extension of the way I’ve learned to see technology. It goes far beyond the bits and bytes inside the computer. This is the story of what happens between the ones and zeros, before the arrays and the if/else statements. The book and workbook are aimed for four to seven year olds.

I believe stories are the most formative force of our childhood. Everyone has a book that made the world seem beautiful and full of possibility. My book is about little Ruby.

It’s due out in August. I’ll report back when I receive my copy, and we’ll see how Reuben, Joshua and Isaac engage with it.

How will you get there, Maisy?

How will you get there, Maisy?

How will you get there, Maisy?

Subtitle: How a children’s book sums up yesterday’s snow

According to the BBC News website we’re in for another very cold night.

I drove in to work this morning, but yesterday—which saw Edinburgh and Glasgow airports closed due to the sheer volume of snow; which saw hundreds of motorists spend the night in their cars due to the disruption on the Scottish roads—I worked from home.

Yesterday evening, at bedtime, I sat with Reuben on his bedroom floor and read him book after book.  We read 5 or 6 books in all, including the book above: How will you get there, Maisy? by Lucy Cousins.

It’s an interactive book, which shows one form of transport and by way of clues invites the child to guess by which form of transport Maisy actually used.  For example,

“How will Charley get to the farm…?

[There are images of a saddle, horseshoes, apples and the words "Clip Clop!"]

By motorbike?

[Lift the flap]

“No… by horse!”

And then I turned the page and read this:

How will Maisy get to the airport...? By sledge?

How will Maisy get to the airport...? By sledge?

How will Maisy get to the airport…? By sledge?

Yes!

Transcending CSS

Transcending CSS

Transcending CSS: the fine art of web design by Andy Clarke is one of the best books about cascading style sheets (CSS) that I’ve read in a long time.

As a designer Andy Clarke has produced a book that’s far from the hundreds of other dull books on CSS which are packed full of dry code examples and pages and pages of text. This is a beautiful and colourful book, filled with hundreds of images, that takes a real-life approach to designing sites and writing accessible HTML and CSS code.

While this book isn’t aimed at beginners, it assumes that you have at least a good, working knowledge of XHTML and CSS, it is very easily read and if you’re looking to get into modern CSS layout methods then this book could be an inspirational introduction to the subject. Because of the design of the book it’s also more accessible than Jeffrey Zeldman‘s excellent Designing with Web Standards, now in its second edition.

The book is organized into four main sections:

  1. Discovery
  2. Process
  3. Inspiration
  4. Transcendence

Discovery

In the first part of his book Andy Clarke introduces us to what he calls Transcendent CSS, that is code that looks to the future, building on current web standards to create accessible, cross-browser-compatible websites, rather than relying on outdated layout methods such as non-semantic tables.

He argues for web standards, acknowledges that not all browsers display the same design, advocates that web designers use all available CSS selectors and semantic code, use CSS3 where possible to look to the future, avoid using hacks and filters, and to use JavaScript and the DOM to plug any gaps in CSS.

One particularly useful exercise is where he takes real-life examples and shows how he would present these in XHTML, in a section entitled “translating meaning into markup”. His examples include a horse race, marathon runners, a taxi rank, books on a shelf, and a museum display of mediaeval helmets.

Process

Having set the scene over the first 100 pages (lots of pretty pictures on the way, so don’t worry!) Clarke explores a usable process for designing with web standards. It’s quite a good introduction to certain elements of information architecture, such as wireframing/grey-boxing and usability.

Taking the example of a design for Cookr! (his made-up recipe website) he adds mark-up to the design to show you how to best mark-up and organize the XHTML and CSS code. It’s a very visual and practical approach which is strengthened by excellent explanations of what he’s doing and why.

Inspiration

In the third part of the book Clarke moves away from code and gives us an insight into where he finds inspiration for website designs. And it’s not just from other websites but newspapers, magazines, buildings, streets … anywhere really.

This section offers a good introduction to grid and layout theory, and his advice about keeping a scrapbook of inspiration examples is really helpful, either a real scrapbook or something online like Flickr. He finishes off the section exploring why design is more than just creating attractive visuals.

Transcendence

In the final section Clarke brings it all together in some practical examples of how to take particular designs and mark them up using semantic XHTML and CSS. Of particular note is his extensive and creative use of lists for marking up particular content.

This section has the best explanation of relative and absolute positioning that I’ve read in any book on CSS. It’s really worth buying it just for that.

He finishes off the section with a look ahead to what CSS3 has to offer. I’m looking forward especially to the :nth-child pseudo-class which will make creating zebra-stripes on tables easy (currently available via hand-coding and jQuery), multiple background images for elements, and multicolumn layouts (currently available in Firefox via the -moz identifier).

Conclusion

I found this a really inspiring book which got the balance between code theory and practical design application right. I’d certainly recommend it to anyone who’s looking to improve their CSS coding or simply wanting inspiration about how to take their CSS to the next level.

Available on Amazon UK.

The Present Future

Book cover for The Present Future

While reading around the subject of Jesus saying:

“You hypocrites! You know how to interpret the appearance of earth and sky, but why do you not know how to interpret the present time?”
(Luke 12: 56)

I picked up this book off my bookshelf: The Present Future: Six tough questions for the Church by Reggie McNeal.

Wow! Well there’s an author who doesn’t miss with any of his punches! It’s a book written with courage, insight, humour, honesty, a passion for Jesus Christ and a desire to see the Church move beyond its seeming current obsession with preserving the current status quo and moving towards being a powerful missionary movement: to face the future with imagination and courage.

While his focus is on North America, I’m quite sure that the picture McNeal paints in broad brushstrokes about the “current church culture in North America” can equally be said about the church here in the UK, if I understand correctly what the likes of John Drane have been writing about the situation this side of the Atlantic.

New reality #1: The collapse of the Church culture

Here’s what McNeal says on page one of chapter one:

The current church culture in North America is on life support. It is living off the work, money, and energy of previous generations from a previous world order. The plug will be pulled either when the money runs out (80 percent of money given to congregations comes from people aged fifty-five and older) or when the remaining three-fourths of a generation who are institutional loyalists die off or both.

Please don’t hear what I am not saying. The death of the church culture as we know it will not be the death of the church. The church Jesus founded is good; it is right. The church established by Jesus will survive until he returns. The imminent demise under discussion is the collapse of the unique culture in North America that has come to be called “church.” This church culture has become confused with biblical Christianity, both inside the church and out. In reality, the church culture in North America is a vestige of the original movement, an institutional expression of religion that is in part a civil religion and in part a club where religious people can hang out with other people whose politics, worldview, and lifestyle match theirs. As he hung on the cross Jesus probably never thought the impact of his sacrifice be reduced to an invitation for people to join and to support an institution.

Powerful, challenging but also exciting stuff. As fearful as I was about the Luke 12 passage a couple of days ago, I’m now going to look forward to putting this sermon together in the next couple of days.

You can read a little more on the Amazon UK website; you can currently buy the book on Amazon for as little as £6.15.

I think I’m in a Douglas Coupland novel …

JPod - Meet Generation XBox

Last night I began to wonder if I really am an autonomous, free-thinking human-being and not just the creation of a 20th/21st-century literary genius.

Yesterday, late-afternoon, a few minutes before five, I checked my email. There was one from our Acting Director informing us that today (Thursday) Registry would be running progression. This basically means that all our students will be moving on a year in our databases, awaiting matriculation (that’s ‘enrolment’ if you’re a North American reading this).

To celebrate that fact I decided that today I’d listen to only progressive rock. So I cleared my MP3 playlist and started compiling a playlist of only prog artists (both prog rock and prog metal), amongst whom were:

  • A Perfect Circle
  • Amplifier
  • Faith No More
  • Fish
  • Frost
  • Genesis
  • Iron Maiden – A Matter of Life and Death
  • Marillion
  • Meshuggah
  • Opeth
  • Pink Floyd
  • Rush
  • Tool

I saved the list, shut down my computer, switched out the lights and left the office. Which is when I then began to question my ontological status.

It came as violently and unexpectedly as a Blue Screen of Death. I stopped walking and stared vacantly in front of me, deep in thought. Tourists bustled past me.

“I must be a character in a Douglas Coupland novel!” I muttered disappointedly to myself. “Like someone in Microserfs or JPod. That’s exactly the sort of thing they’d do.”

I don’t remember reading about myself in Microserfs, but as I’ve not finished JPod yet there is still time to read about myself there. Maybe I’m part of a new novel. Maybe I’m just part of some back story, or from a discarded JPod chapter.

Maybe it’s not a Douglas Coupland story I’m in. Maybe this story is much, much bigger. Maybe I’m the creation of an evening bigger genius, whose story started way before the 20th century was even thought of.

On that philosophical note, I’m off to work now to be progressive.

Books of choice

Books on my desk at work.

One of my friends, Kenny, always teases me that no matter where I go my desk always looks the same; in other words, it is always laid out the same way. And he’s right, but there’s a good reason for that: it works for me.

One of the parts of that system-that-works-for-me is a small collection of reference books that I always have to hand. At home they are on a shelf next to me, at work they are on my enormous desk.

At the moment these are my reference books of choice:

At the moment the least used of these are the SQL and PHP Pocket Reference guides, and the most used are the Definitive Guides for XHTML and CSS, and since I’m debugging code for a website launch Celebrating Common Prayer is also getting a look in once or twice!

My close-at-hand collection of books at home is completely different:

A shelf of books at home.

Mostly Scottish Episcopal Church books — Code of Canons, liturgy, and the Red Book (contacts) — a bible (NRSV) and Revised Common Lectionary, an English dictionary and thesaurus, a copy of Getting Things Done and two copies of the Visual Quickstart Guide for WordPress 2.

So now you know! What are your close-at-hand books of choice?

Roy Orbison in cling-film

A roll of cling film.

The telephone conversation began with an apology and ended with news of a new novel, about wrapping Roy Orbison in cling-film.

It was my cousin Alan and he’d called during the Powerpoint Edinburgh band rehearsal yesterday. He was meant to be visiting us in Anstruther today, but he’s has a bad cold for the last two weeks and needed instead to curl up in bed with a good book.

I understood, promised that we’d reschedule and left him to his good book.

That good book, it turned out, was Ulrich Haarburste’s Novel of Roy Orbison in Clingfilm by Ulrich Haarburste (Serapion Books, 2007) ISBN: 978-0-9554602-0-3.

If that sounds like just your cup-of-tea then you’ll be delighted to learn that there’s a website (called, predictably, Ulli’s Roy Orbison in Cling-film site) that contains a few of his early short stories, and that they made me cry with laughter. So much so that Jane had to come through to the study to make sure I was laughing and not weeping my poor heart out.

Here is an excerpt from story #1:

Roy Orbison walks inside my house and sits down on my couch. We talk urbanely of various issues of the day. Presently I say, ‘Perhaps you would like to see my cling-film?’

‘By all means.’ I cannot see his eyes through his trademark dark glasses and I have no idea if he is merely being polite or if he genuinely has an interest in cling-film.

I bring it from the kitchen, all the rolls of it. ‘I have a surprising amount of clingfilm,’ I say with a nervous laugh. Roy merely nods.

‘I estimate I must have nearly a kilometre in the kitchen alone.’

‘As much as that?’ He says in surprise. ‘So.’

‘Mind you, people do not realize how much is on each roll. I bet that with a single roll alone I could wrap you up entirely.’

Roy Orbison sits impassively like a monochrome Buddha. My palms are sweaty.

‘I will take that bet,’ says Roy. ‘If you succeed I will give you tickets to my new concert. If you fail I will take Jetta [Ulli's terrapin], as a lesson to you not to speak boastfully.’

I nod. ‘So then. If you will please to stand.’

Roy stands. ‘Commence.’

I start at the ankles and work up. I am like a spider binding him in my gossamer web. I do it tight with several layers. Soon Roy Orbison stands before me, completely wrapped in cling-film. The pleasure is unexampled.

‘You are completely wrapped in cling-film,’ I say.

‘You win the bet,’ says Roy, muffled. ‘Now unwrap me.’

‘Not for several hours.’

‘Ah.’

I cannot wait until I get my hands on this book, and allow my eyes to wander freely between the words. You can read the author’s description of the book on his Now you may read a novel of Roy Orbison in Cling-film page. It ends with

PS. Film and video game rights are still available

And as if by good fortune PC Plus magazine this month comes with a full copy of The Games Factory on DVD. Budding game writers commence!