Sniff is a "Scratch-like" programming language that's designed to help Scratchers move gently from Scratch to more conventional languages. They can start writing programs, without having to learn a new language because Sniff is based on Scratch. They learn a little more about variables, compiling, syntax errors (!), and they can have fun controlling real hardware while they're doing it.

Monday, 8 June 2015

Release 18: Tabs Vs Dots

Sniff Release 18 is now available for download!

Its main features are:

  • Initial Support for ESP8266
  • Support for Arduino Software V1.6.4
  • Support for Picoboard device
  • Support for max LED Matrix display device
  • Support for PS/2 Mouse device
  • Tabs Vs Dots
Most obviously support for the ESP8266 is a really big step. It's a pretty great chip that does lots of stuff for very little money. Currently the tools and hardware for it are a little limited, so using Sniff with it isn't for the faint hearted, but we're expecting the resources to improve dramatically over the next 6 months, so there's a lot of potential there. We'll have a full post on the 8266 in the next few days.

As part of that we've revamped the way Sniff interacts with the Arduino software to use the latest and greatest Arduino V1.6.4. This particularly changes the way the Due is handled, as it needs to be installed as an additional component from inside the Arduino software. However the main takeaway from this for Sniff users is that now that the Arduino software is stabilising on a single version, rather than being split between the old 1.0, and 1.5 beta versions we no longer bundle a lot of supporting files, which makes the Sniff install much smaller.

We're really excited to have support for the Picoboard. While we initially had doubts about the cost effectiveness of this board, once we got it hooked up and running, we started to see the possibilites. Lots of schools have these to use with Scratch, so there's plenty of potential for re-using them with older kids. Again we'll post more on these in the next few days.

Finally dots vs tabs...

We think dots are a better way of doing indentation. They don't look pretty, but we think there's a fundamental problem with using white space as the basis of syntax - you can't see it. For example in Python "   " means something completely different to "    ". See the difference? No we can't either, but it really does matter. If you're looking at someone else's code (for example a room full of CS teachers in a cpd session looking at a python worksheet distributed by a national coding organisation...), then you'd better know that in the first case you should type 3 spaces, and in the second 4. To make it worse tabs and spaces look the same, but mean something different. Mix them up and your code looks identical, but behaves differently. Worse yet, they're not handled consistantly, so when I type tabs they may (or may not) get converted to spaces (or visa versa). Don't try copying code with tabs in from a regular website - it won't work!

We therefore chose dots. Not because we particularly like them, but because they're a non-whitespace character. You can clearly see how many there are so its possible to type example code correctly, and when you copy code/paste it stays the same.

However there's been a lot of comments that dots "look funny". As an experiment, we've therefore introduced support for tabs as indenting. Rather than using a dot, you can use a tab. We can't argue that it doesn't look better. It looks pretty, but its ambiguous and is dependant on having a workflow in place that will handle tabs constantly (for example I can't even type a tab in to this windows!).

We'll be sticking with dots for the foreseeable future for all the reasons we've outlined, but if you must start using tabs then try it and let us know how you get on. 


No comments:

Post a Comment