Python vs. Processing as a First Language
compscigail.blogspot.com
compscigail.blogspot.com
One possible answer is that the term "programming" means something somewhat different to the author than it does to, for example, me. When I look at the Python tutorial topics, even those for non-programmers, I see stuff that looks like programming: loops, conditionals, generators, etc. But the author apparently saw a lot of stuff that didn't seem to have much to do with what she was interested in: getting the computer to do something cool. Processing apparently gave her an easier way to do that.
To me, getting the computer to do something cool, in and of itself, is not necessarily "programming". For example, the beginner's tutorial for Processing that the author links to tells you to type the following into the editor: "ellipse(50, 50, 80, 80);". This, of course, draws an ellipse. Cool! But this, to me, isn't "programming"; it's just invoking a magic incantation to get the computer to draw an ellipse. "Programming" is what the person did who wrote the code that interprets that line you typed and figures out what to draw and where.
It's quite possible that this is just me; maybe most people are OK with using the word "programming" to describe something that doesn't seem like programming to me. But word choice aside, I am not trying to say that only what I call "programming" is worth doing. I think the point is more that maybe "programming" is too narrow a term to describe what many people are trying to do when they want to get the computer to do something cool.
While some would think this is a horrible thing to say, I would say when teaching programming, the single most important thing is "amount of work required to do something the user feels is interesting". Once they are interested and understand variables, loops, and functions, then teaching them proper habits and "proper languages" is much easier.
The PADI way gets you into the sea ASAP. It's only really safe to do this in benign conditions (e.g. warm, clear, non-tidal water in the Red Sea). But it quickly gets people hooked on what diving has to offer, and you can add in skills for hostile waters (cold, murky, strong currents, deeper, penetrating wrecks and caves, etc) later if and when you need to.
The BSAC way involves spending 6 months to a year in a training pool. You have to really, really want to dive to stick with it. They've stopped it now, but they used to test people by having them e.g. tread water for 3 minutes holding a weight belt above their heads (the A-test) which you will never ever have to actually do as a diver. It's meant to produce divers who can handle fairly hostile conditions on their very first sea dive (tho' IMHO it doesn't).
When learning Python, I looked at it through the lens of someone just getting started with programming. While it's not really possible to do this in a completely unbiased way, that was where my musings came from.
In terms of your thoughts on programming: I find them interesting. I think it's a reasonable perspective. For the audiences I work with, it can be important to hook students early on with the cool stuff or else you might lose them too early. I personally hope we can then get them into what you define as programming, but even if we can't, at least they leave with something.
No, it wasn't--knowing the context actually makes your post quite a bit more thought-provoking. What languages have you programmed in?
The easiest way to list the languages I know is to share this: http://gailcarmichael.com/work/technical
Python:
a = [5, 10, 11]
if c >= 1 and c < 20:
# Statements
Processing:int[] a = {5, 10, 11};
if ((c >= 1) && (c < 20)) {
// Statements
}Python seems much more English-like and doesn't require the beginner to figure out and memorize what && means or that you have to memorize all the types or at least the ones you want to use for an array and where the brackets go when using an array. I program C and Wiring and early on I remember that I always had a hard time figuring out where the brackets go and whether I needed an array of doubles or float or integers, depending on what I need to do. Also they should warn you, you need to know how many elements are in the list beforehand and you can't resize them later.
The author of the article reminds me of a guy I worked with who still programmed in FORTRAN and said the use of whitespace to denote blocks seemed "icky" and hates it. Just keep an open mind and you'll do a lot better than him in the industry. He is out of work these days...
if 1 <= c < 20:
# statement
I think this is more intuitive for someone first learning a language.For most people who want to learn to code they've experienced or seen something that has excited them in some way. This could be anything from a website, an iphone game, an error on their bank statement, or the tessellated feature on the side of a building. Someone who is excited by the visual feedback of a Processing app may not be excited by the simple high-level magic you can do with NLTK, or the funny things that you can do to a webpage in the developer's console.
That said, I've been following Processing since it's early betas and I think it's a fantastic first programming language -- not just because of the mechanics and ease of use -- but the fact that there is a giant community that fosters and encourages exploration in a way that humans can understand.
I also found the JavaScript model--no classes, functions for scope and very lightweight objects very simple and easy to understand. JavaScript is a very small and mostly elegant language, which I think makes it simpler to pick up.
It has its warts, but so does almost any other language (don't get me started on Python). Besides, a lot of the warts (e.g. no new scope in loops or statements) are only issues if you already know a C-like language; ignoring syntax, scoping that way actually makes more sense. I think its simplicity and being in the browser more than make up for its faults, especially in a didactic role.
My core point about Javascript is that it also comes very well integrated into a familiar environment (the browser) which makes it very easy to write beat programs not tied to a CLI.
In my experience, that is much more difficult to do with a normal GUI toolkit, especially for a beginner but also very exciting. Making a neat GUI program, especially when starting out feels great and really motivates you to learn more. Or, at the very least, that was my experience when starting out.
[1] My first real programming language was BASIC. I moved on to processing when I got sick of it and didn't know why. Now I do, the only data structure in the BASIC I used was the array and there were no functions, just procedures where you have to use boilerplate to get them to return values.
Personally, as a teenager I read some C books but never wrote more than the 10-line examples in the books until I discovered the Allegro graphics/game library and realised that I had all the tools I needed to make a Tetris clone, a 2d platform game, a software synthesiser... (none of which I ever finished, but oh well!)
edit: I meant the Codecademy Javascript classes; obviously they have static CSS and HTML classes too, but last time I looked there were no tutorials to use JS to animate a web page. Maybe there are now or will be soon.
Of course, this is just my opinion, formed from a sample size of 2, so take it with a large pinch of salt. :)
From teaching programming, my take away is LOGO works best as a first programming language. The visual feedback helps with understanding commands, procedures/functions, breaking down larger problems (house) into smaller problems (square) and helps with understanding reuse (square).
Used Java, Perl, Python and C as alternative first languages, LOGO worked best.
http://docs.python.org/library/turtle.html
That said... it really didn't do a big difference for me. As a kid, just having "circle", "line", "ellipse", "plot"(point), etc in BASIC were more intuitive than LOGO, and I tried both around the same time. Keeping track of the turtle and the pen state were a nuisance for me, instead of helping with the world model as teachers claimed. I also found silly text games a lot more fun to both make and play, I guess I was a bit less of a "visual" person than the average kid. I did love sprites and interaction though.
As for Python vs Processing, I don't think the difference is massive as a first language. I'd pick Python so then the student has a wider spectre of development afterwards. Processing if I intended to introduce Java later on. But I won't.
Nowadays we waste a massive amount of time discussing philosophy and nuances instead of getting sh*t done.
I can say that I use Processing all the time because it's so easy to make simple graphical programs. It has been particularly useful for prototyping little game ideas and making applets to explain graphics concepts to students. Depending on what sort of career path someone has, Processing might be really useful far beyond being a pathway to Java.
I think the point about choosing Processing, for most people, is the simple and well-established path to do:
1 - graphic-oriented apps
2 - stuff that can run in the browser (although Java applets are a massive PITA, sadly, and are slowly but steadily being phased out)
3 - not much else (actual feature: the excess of choice is overwhelming for a beginner)
And then I have this concern that many students, when already proficient in an "introductory language" never quite find the motivation to jump to another language with significantly different structure and syntax. Since proficiency in an introductory language is achieved rather early, it becomes a dead end before they can develop a "real taste" for advanced programming. This has happened to a lot of people I know. Many of my friends started in the 80s with Sinclair BASIC or some other BASIC (C64, C128, Oric, MSX, etc). These have, for the most part, enough built-in graphic primitives to toy around a lot and make simple games with little experience, even with the limited hardware of the time. But then, the next step in order to overcome these nice but slow interpreters was usually assembly or complex compiled languages (usually proprietary implementations, expensive and with obscure support). So they stopped right there.
It's not so bad now but the wall is still there.
I cannot reconcile that someone would simply "stop learning" because "the tool does all he or she needs"... I think it's more about being unable to discover any more.
I don't think I'd ever stop learning because I'm content with my knowledge and it's all I need. I think I might get stuck not discovering new interests because of my own limitations or that of my limited environment.
However it's also true that you can have different interests and those be unrelated to programming. It just sounds wrong to me somehow, since programming is so all-inclusive and so practical for virtually any field.
http://computinged.wordpress.com/2012/04/07/we-used-to-know-...