1
$\begingroup$

I have a basic understanding of javascript, and know hardly any other programming language. Am I bound to face some issues in the field of neural networks and machine learning because of this? Should I learn something else for the sake of avoiding some inherent weaknesses of the language? I am most worried about the capacity of javascript to handle data, rather than its possibilities regarding the textual implementation of the algorithms per se...

Thank you

$\endgroup$
1
  • 2
    $\begingroup$ Try keras.js and neocortex.js. The main issue you will run into is that you will not be able to find much in the way of examples for Javascript, so I recommend learning python on the side. $\endgroup$ – Emre Oct 20 '16 at 21:25
3
$\begingroup$

First of all, learning other programming languages is always a good thing. There are many reasons for this:

  1. Learning new languages makes it easier for you to learn other new languages in the future - and sooner or later in your career you will almost certainly want to or need to.
  2. Learning new languages helps you understand the language you're already working in. If I told you JavaScript is a dynamically-typed language, would that mean anything to you? Probably not so much if you've never used a statically-typed language. If I told you it has first-class functions, would that mean anything to you? It's like telling someone "night is dark" when they've never seen daylight.
  3. Learning new languages teaches you about ideas from other languages that may eventually make it into your language. ECMAScript 6 added "arrow functions" to JavaScript, these are also known as lambdas and would already be familiar to you if you've used C# (from version 3 onwards), Java (from version 8 onwards), Scala, Haskell, or many other languages.
  4. Learning new languages teaches you different ways to think about code. And this can only make you a better coder.
  5. Learning new languages increases your employment opportunities.
  6. Learning new languages is fun!

In addition to these, and other benefits I've surely omitted, there's this which is directly relevant to your question about machine learning in particular.

  1. Different languages have different libraries and different communities of users that use them for different purposes. Most people doing machine learning aren't working primarily in JavaScript. Some are working in Python, some are working in R, some are working with Spark using Scala or Python, etc.

If you already know JavaScript, then learning Python shouldn't be too hard for you, and it has some great machine learning libraries like scikit-learn, with lots of great resources online to help you learn. So I'd recommend starting there. But I also recommend that you eventually branch out and learn some languages that are further outside your comfort zone.

$\endgroup$
6
  • $\begingroup$ Good answer, though number 6 isn't always true, I have found :-) $\endgroup$ – John Powell Oct 21 '16 at 18:13
  • $\begingroup$ @JohnBarça Well sure, like if you learn that the language supports object literals, but then you use one at the start of an expression and it doesn't work as expected, even though when you wrap it in a logging statement it has exactly the value you thought it would, and only after an hour of beating your head against the wall do you realize that by putting it at the start of the expression you caused it to be interpreted as a code block, but simply wrapping it in parentheses for the logging function changed its meaning to what you had intended. :( But the OP has already learned JavaScript. ;) $\endgroup$ – Tim Goodman Oct 21 '16 at 19:06
  • $\begingroup$ On the other hand, ragging on JavaScript (affectionately, honest!) is always fun. :) $\endgroup$ – Tim Goodman Oct 21 '16 at 19:12
  • $\begingroup$ Ha, ha, haaaaa. Actually, I was talking about C++ and Haskell, which are amazing languages, but with a rather brutal learning curve. These days I do no web dev, no JavaScript, almost all Python (numpy, scikit-learn, etc), Postgres and a bit of bash scripting. Happy days. You didn't mention SQL -- not really an ML language, but very much a data engineering one, which in no way has been eclipsed by Hadoop and the like. I find that for all the obsession with NoSQL and unstructured data, to do meaningful work you still need data that is vaguely consistent, with apologies to the twitter/NLP crowd. $\endgroup$ – John Powell Oct 21 '16 at 20:11
  • 1
    $\begingroup$ Yeah, I wouldn't actually call JavaScript hard to learn, just afflicted by some weird gotchas. Whereas transitioning from imperative-style programming to a purely functional language like Haskell is legitimately hard, but in a way that's probably good for the brain. But hard-to-learn languages can still be fun, the fun is just a bit... deferred. :) $\endgroup$ – Tim Goodman Oct 22 '16 at 2:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.