It’s getting to the point where I need to make a decision how I’m going to proceed in  September.  I think it’s fairly straightforward to declare that I intend to use Scratch/BYOB to introduce various programming topics, as it’s straightforward to put the code together and the user can focus on structure without worrying too much about typos, syntax etc.

Then I feel I need to move onto a “proper” typed up language, and that’s where I hit the problem.

So far this summer I’ve been dabbling in all sorts of things.  I’ve tried Small Basic, Python and Java mainly, Java being both through Greenfoot and Processing.

Small Basic concerns me because I discovered that it seems to overthink – when I tried adding strings together, because each string consisted of what it recognised as integers, it added them as integers.  I wonder what else it has up its sleeves, and I also feel concerned about teaching a Microsoft-specific language.

Python seems much more straightforward, and I like the way you can work quickly and easily from the command line as well as writing programs.  Getting a basic program up and running is really fast and simple.  There’s no fuss about declaring the type of variables and no worry about semi colons.  Instead, the fuss is moved to layout, and spaces/tabs.  There’s also the issue, though, of Python 2 v Python 3.   This seems to be a matter of preference, but some of my resources are for 2 and some for 3.  This isn’t necessarily a drawback; if I finish working through the resources for version 2, I should know enough to adapt the version 3 resources if necessary, but I’d like to stick to 2 for now because it’s what I’m using in the Udacity courses and with Google App Engine.  It also seems a very viable language to move forward with in either version.

Java has a wonderful tool in the form of Greenfoot, and Processing is another tool using Java as its base that is really quick and easy to start working with.  My reservation with Java comes in the form of not being so easy to work with straightforward input/output.  That’s possibly because I lack recent experience with it: I know I can use tools like Eclipse to write simple programs, but I find it horribly complex and would not like to introduce students to it as a learning tool when they first start programming!

Of the other tools, MIT App Inventor looks wonderful to use, and I would love to use it with key stage 3 who have already worked with Scratch, but again it’s graphic-based and I’m not sure how I would use it for the OCR GCSE computing tasks, which seem in the main heavily console based.  I don’t like the way I’m having to choose tools that are suitable for the assessment rather than tools that are best for learning, but maybe that’s something that will change as the qualification matures and newer assessments are added in.

So in summary, it looks like I need to consider Python 2 as first choice, while continuing to work through Greenfoot and Processing as these are my two favourite options.  As I’ll be using Scratch/BYOB at the start, while ensuring that other software is available on the school system, there is still flexibility for a while longer, and I would like to continue working in both Python and Java for my own purposes anyway.

The bottom line is that the real challenge when programming is knowing the structures to be used and how to use them efficiently, and in the end the choice of language matters little.  The main issue is to be able to form correct syntax and layout for the language.  As with everything, what you say is vital; the form you choose to say it in is less important.



Processing – part 2

simple shapes drawn on screen

A variety of shapes

Time for another look at Processing.  I now have the book Getting Started with Processing, and it seems straightforward so far.  The language is described as a dialect of Java, with custom features for graphic drawing.  The code I’ve used so far can be built up one line at a time, making it feel a little like building up a sketch.  Commands include ellipse, rect, triangle, quad, arc etc, plus beginShape/endShape which draws a shape vertex by vertex.  The stroke, stroke colour, fill colour and transparency can all be set with parameters.

listing for drawing shapes

listing to draw shapes

The code is straightforward, simply the name of the shape followed by parameters which either refer to the on-screen co-ordinates or the dimensions of the shape.  I used a for loop to draw the series of lines – any regular drawing can reuse code in this way, and of course the use of variables can simplify the drawing process as well.

robot drawn with Processing

Simple robot

To draw arcs, the measurement is given in radians, but there is an easy way to convert degrees to radians if you prefer to measure that way.

So far so good; the fun will be learning how to animate the shapes and interact with them.


Processing – another resource

I’d never heard of Processing until a few days ago, and then I came across three mentions of it in less than 12 hours, and that sort of coincidence is what makes me take interest.

circles drawn with Processing

Circles drawn with processing

Processing is a language tailored towards graphic programs, and that’s really all I know about it so far, apart from it being what Tom Scott uses, so it must be fairly useful and versatile.  I’ve now downloaded and installed it and written my first program, which displays circles under the mouse as it moves – black if the mouse button is pressed and white otherwise.

processing editor

Processing editor

I’ll be exploring Processing more over the coming days and weeks, and seeing just what it is capable of and what it’s like to learn. My first reaction was that the editor looks very like the Arduino code editor, and like in arduino coding, the programs are called sketches (on the Processing website, they’re referred to as sister projects).  The code is typed into the main area of the screen, while messages are displayed at the bottom.

Processing will run on all the major platforms, Windows, Linux and Mac, and it’s quick and easy to export the completed program either as an applet to be embedded in a web page or as a stand-alone application for any of the platforms.  The language looks straightforward so far, and the editor uses colour coding and indenting to make structure clear.