TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Python vs. Processing as a First Language

46 pointsby vgnetabout 13 years ago

12 comments

pdonisabout 13 years ago
One thing that struck me as odd was that the author apparently is not an experienced programmer, but she tried to learn Python from the tutorials designed for experienced programmers; she saw that there was a list of tutorials for non-programmers, but she "didn't look at any of those". Why not?<p>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.<p>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.<p>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 <i>not</i> 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.
评论 #4001931 未加载
评论 #4005890 未加载
评论 #4002177 未加载
评论 #4001755 未加载
aimattabout 13 years ago
From the processing wiki <a href="http://wiki.processing.org/w/Python_Comparison" rel="nofollow">http://wiki.processing.org/w/Python_Comparison</a>:<p>Python:<p>a = [5, 10, 11]<p>if c &#62;= 1 and c &#60; 20:<p><pre><code> # Statements </code></pre> Processing:<p>int[] a = {5, 10, 11};<p>if ((c &#62;= 1) &#38;&#38; (c &#60; 20)) {<p><pre><code> // Statements </code></pre> }<p>Python seems much more English-like and doesn't require the beginner to figure out and memorize what &#38;&#38; 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.<p>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...
评论 #4000984 未加载
评论 #4001414 未加载
zoopabout 13 years ago
I have to say that I feel like this discussion often gets bogged down by thinking about language semantics and how that may help/hinder learning and development as a programmer.<p>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.<p>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.
评论 #4005935 未加载
tikhonjabout 13 years ago
I think the same case can be made for JavaScript. With JavaScript, you are in a familiar environment (the browser) and get to do cool stuff immediately. The distance between knowing no JavaScript and making something appreciable is very small, so you get up and running rather quickly.<p>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.<p>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.
评论 #4001106 未加载
评论 #4005917 未加载
RodgerTheGreatabout 13 years ago
I can't say much about Python, but I can vouch for Processing as a beginner's language- I've used it with great success to teach game programming to middle-schoolers and high-schoolers. In general Processing does a good job of easing beginners into the important parts of Java- sequential code, procedure definitions and eventually classes- without quite as much boilerplate. After a few days of Processing I usually try to cap things off with writing a command-line application in ordinary Java, and usually the only mysterious thing I have to explain at that point is what the "public" modifier does.
mericabout 13 years ago
Processing was my first "real" programming language[1]. It's not bad but it doesn't have anonymous functions! It does provide a language with a small set of API functions for the user to manipulate graphics with; If someone was intending to learn programming because they want to make a game, I'd suggest they learn Processing over Python, but if they wanted to become a learn more about CS concepts, data structures, algorithms, etc, I'd suggest Python instead. (I know... people don't know data structures exist before they know about programming, but I'm saying I might be able to figure it out from what they want to do with programming.)<p>[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.
评论 #4001383 未加载
评论 #4002338 未加载
评论 #4000897 未加载
spacemanakiabout 13 years ago
This conclusion is surprising to me because isn't "Processing" basically some subset of Java? I would have imagined that it would inherit some of the issues with Java as a first language: adding some extra confusion of static typing and a compilation step, plus being relatively verbose. It seems that by choosing Processing you're basically trading the dynamic environment of a Python REPL for ease of starting out with graphical programming. I genuinely don't know which would be more valuable for non-programmers.
评论 #4001790 未加载
评论 #4002004 未加载
reader5000about 13 years ago
I think the element of visual feedback is huge in picking up programming. It's a shame there's no "processing but with python instead of java" type environment.
评论 #4002475 未加载
评论 #4000948 未加载
评论 #4000966 未加载
评论 #4001113 未加载
评论 #4001239 未加载
评论 #4001095 未加载
donaqabout 13 years ago
I cannot comment on the merits of either as a first language, since I don't know Processing and Python was not my first language (although it was really easy to pick up for me), but I do wonder why people think learning stuff should be <i>easy</i> these days. Almost anything worth doing is going to be difficult.
评论 #4005944 未加载
mrjdabout 13 years ago
I realize it's a different language, but how about Ruby-Processing? It's a wrapper of Processing's methods but in Ruby. Here's the link <a href="https://github.com/jashkenas/ruby-processing" rel="nofollow">https://github.com/jashkenas/ruby-processing</a>. It's much less verbose than Java and also has a very handy watch mode which reloads your sketch every time you make a change.
Uchikomaabout 13 years ago
As everyone has an opinion, here is mine:<p>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).<p>Used Java, Perl, Python and C as alternative first languages, LOGO worked best.
评论 #4002038 未加载
评论 #4005950 未加载
darkstalkerabout 13 years ago
wasn't Logo what was used for learning?
评论 #4001388 未加载