Moving from Scratch to text: Why We Need Sniff

I’m intrigued by this project and would really love to see some analysis. Do students who use Scratch recognize Sniff as being a text form of Scratch? If it doesn’t work well, is the problem in the syntax and semantics of Sniff, and maybe we could do better? Do students transfer their knowledge of Scratch into Sniff?

So if Scratch is so great why do we need Sniff? The problem is that at some point you need to move beyond Scratch. It could be that you want to tackle a different kind of problem that Scratch can’t handle well. Perhaps you’ve realised that graphical programming is a nice idea, and great way to start, but in practise its clumsy. Clicking and dragging blocks is a tedious and slow way to build large programs. It could be you need something that feels “more grown up” – the cat sprite/logo is cute, and even older children will find it fun for a while, but Scratch is designed to look and feel like a toy even though its actually very powerful. For whatever reason at some point you start to look for something “better”.

Thanks for the interest! Totally reasonable and important questions, to which we can only answer “we don’t know yet”. We’re at the stage of rolling out the technology, and working to get it into the hands of as many kids and teachers as possible, so that we can find out.

So far we do know that it works well as a programming language, and fits well with physical computing projects. We’d love to hear from anyone who’s interested in integrating Sniff into their lessons, and find out how it works for them.

Here’s what I think would be cool: Something functional built on top of Google Blockly, where you could take completed programs and flip back and forth between the block format and the equivalent code in a “real” language, like you can do with blockly and Python (or Javascript, but…. please): https://blockly-demo.appspot.com/static/apps/code/index.html

Imagine being able to do several projects in Scratch/BYOB, where you ramp students up to speed quickly. It would need to support fun graphics and easy scripting – the benefit of Scratch is that I can have students producing something where programming is useful in the very first lab period. By the 3rd lab period in my class they’re dealing with abstraction and defining their own functions in BYOB. After, say, 4 labs they could take all their old projects, switch over to the Python tab and see what they’ve done – what THEY have created – in a “real” programming language. Then start modifying those and building new things in Python.

This would require something more functional in blockly (you need sprites and something like the “stage” in Scratch). And then you need a Python environment that similarly supports sprites with an animation library.

THAT would be awesome, but it’s not completely trivial either. If I’m transitioning students to a text-based language, I don’t want a new language. There are equivalent Python constructs for every Scratch construct. Let’s use that. (The only thing that gives me pause is the natural way Scratch handles concurrency and event-driven programming. That might take some more careful thought.)

Since Scratch is very similar to Logo, isn’t Logo the obvious choice? You like data Mark; did you catch Colleen Lewis’ SIGCSE paper comparing her experience introducing programming with both Scratch and Logo? If not, checkout:

I do know that work by Colleen. Sniff is solving a different problem. It’s 1:1 with Scratch. Scratch is not 1:1 with Logo. In Logo, you can define functions, lists, and higher-order functions — can’t in Scratch. Scratch offers parallel processing with its broadcast mechanism — few Logos ever had any kind of parallel processing.

The Lewis paper is interesting, but was dealing with 12 year old students. Repeating the study for much younger (and older!) children would be interesting – you’d expect a levelling off effect: as text based, and abstract reasoning skills increase, the difference between a text based language and a block language should reduce (citation needed! ;-)). However for a 6 year old Scratch is possible, where as any text based task is a stretch.

At least here in the UK, under the “new computing” plan 12 year olds will already have several years of Scratch. For a child who’s only experience is Scratch, Logo isn’t similar at all. Calling Sniff a new programming language is slightly misleading – Sniff is an alternative implementation of Scratch, with a different UI, making it easier to leverage Scratch experience into more complex problems. The aim is to take a class of Scratchers and within one or two sessions have them fully up to speed in text based programming.

For older children without any programming experience Logo is probably a good choice (probably better than Python). It has features which are essential for higher level CS work, which are lacking in Scratch/Sniff. However most of these are beyond what most children are going to achieve at a pre-college level. A solid understanding of iteration, selection, generalisation etc are most important, and they’re present in both languages.

Sniff isn’t affiliated with Scratch or MIT (though we have discussed the work with the MIT team, and they’re very supportive).

Sniff is text based, so a “cloud” solution would essentially be a telnet session. It runs on Raspberry Pi, so a Pi makes a cheap “cloud” server… However you’re missing out on the fun – a bit part of the work is leveraging physical computing – lights and buttons. It runs great on Arduino and Pi, and we’re currently working to support Lego EV3.

I wouldn’t dismiss a cloud solution. It doesn’t need to be a telnet session to a server. Lots of text-based programs run in-browser now – for example, all the stuff the people have done with skulpt – skulpt.org and codeskulptor.org for examples.

Absolutely. Windows is high on the priority list, as obviously a lot of schools are on Windows. Running on Windows would make it a lot easier for a lot of people.

Unfortunately its technically MUCH easier to build compilers, and system tools on Unix based platforms, which then runs on a range of systems with only minor changes (Mac, Linux, Raspberry Pi). Windows requires a LOT more work to support it than any of the other platforms do. Its a small project that we’re in the process of building up and so far we’ve not had the resources to build on Windows.

Windows is a priority, but for now we’d ask you try it out on a Pi or Mac, and let us know how it goes. The more support we have from users, the more resources we can allocate to the project.

When I was at ICER this year, I got to talk to some of the UK teachers about why they like Raspberry Pi so much, and one of the answers was that it lets them avoid their school IT staff entirely. The teachers in the UK (not too dissimilar to the teachers here in the US) have little control over the computing platforms that they have to teach with. Software running on Windows in the UK may mean, “will never be installed.” Software that runs on the Pi (which IT staff generally ignore) can be played with immediately — it’s under the teacher’s control.

“Avoid their school IT staff entirely”. I did not even think of that but it makes sense. I am the IT staff at my school (private) and I support the teachers in anything they want to try. My wife teaches in the public sector. She goes through hell to get IT work done on her computers and heaven forbid if she just wants to try something. She teaches a CS class and has absolutely no admin privileges on her own computers.

Steve Tate wrote “What I think would be cool: Something functional built on top of Google Blockly, where you could take completed programs and flip back and forth between the block format and the equivalent code in a “real” language.

Check out http://pencilcode.net/ – it has bidirectional text-to-blocks transformations, and it implements it for CoffeeScript and Javascript.

I know Mark Dorling ( who works from computing at school) who presented this work showed one slide about his current research at sigcse and a request to the community to join him. He had 3 or 4 universities approach him and he mentioned he had a couple of universities in England who wanted to join him.