What are the benefits of (or Why should we be) learning Java, Javascript and Python for processing?

edited October 2015 in General

My current understanding of why processing is written in all three languages are the following:

  1. 15 years ago the easiest way of showing graphs in web is through Java's applet, that's why we use Java for processing
  2. now Javascript is much more powerful in manipulate graphs in web browser, so we start to invent p5.js
  3. python is popular and expanding in programming beginners and they like to use python for processing, that's why we have processing.py

However, I am not satisfied with the reasons above. For example, python and processing, should not python's huge libraries in data analysis and machine learning be a reason for people who want to combine data analysis and machine learning with processing to learn python for processing? or Java and Javascript can easily do the same on data analysis and machine learning?

In other words, can using python for processing easily combine python's powerful data analysis or machine learning functionality or libraries with processing? It seems that p5.js is extensively explore and make use of Javascript's libraries on the perspective of manipulating web browser and animation with the web for processing, am I right? How about Java on its own unique or strength areas?

are people leaving Java and going for Javascript and python for processing?

What are each language's uniqueness and benefits in doing processing? What do you think?

Thanks a lot

kenny

Tagged:

Comments

  • Different language ports exist, because people like to code in different languages. Also, the unified syntax of Processing allows one to port a sketch from Windows to OSX to Android to Python or to web with Processing.js.

    I don't think there is a much deeper reason for their existence.

    My advice is to code in a language that you feel most at home - for some it's Java, to someone else it's C#. To some it's Assembly.

    It's all just ones and zeroes at the end.

  • I see what you mean, thanks

  • Are you questioning why there are versions of Processing supporting different base languages or why you would choose one variant over another?

    The fact that there's choice is great - and we should be grateful for that! What to choose is perhaps more complex and depends on several factors. The fact that Processing transpiles to different platforms means you can in theory learn the one syntax and output applications, web apps etc. on any platform.

    In practice it's not quite so simple. Transpiled applications may have limited library support; p5js (and to a lesser extent ProcessingJS) currently has weak performance - meaning it may not be appropriate for large, complex applications - and there are other factors to consider like your preferred career path. For example if you want a career in front-end web development p5js is a no-brainer and JS is becoming more common on the server-side. If you want to write enterprise level applications Java seems more sensible; though there is some convergence with the rise of NodeJS and platforms like Atom Electron...

    I'm certainly interested to see how p5js pans out as a teaching tool. JavaScript is a really flexible language which you might think makes it a good choice for beginners. In practice I think it's more problematic than a language like Java. The strictness of Java can mean less flexibility and more code to write; but it also means bugs are caught early, often at compile time. JS has some really useful, but dangerous, features that mean bugs can all too easily creep into production code and can be very difficult to spot. Type coercion, function variable hoisting, and so on are very difficult concepts to grasp for a beginner and lead to very unpredictable behaviour.

    Still now that I'm used to the flexibility and power of JS that's usually my first choice :)

  • @blindfish, thanks a lot. Your replies are quite informative and helpful to my question :)

  • I created Python Mode for Processing based on my observation that younger learners have trouble with Java syntax, and that they find Python easier to learn and understand.

  • @JonathanFeinberg Thanks for your great work on processing.py and congratulations for completion of the Python Mode for Processing 3! I am downloading it now.

Sign In or Register to comment.