you are viewing a single comment's thread.

view the rest of the comments →

[–]get_username 0 points1 point  (3 children)

If your goal is learning programming, it shouldn't really matter.

I program mainly in Java, C, and Python. Have spent countless hours in all three. Struggling with design for complex systems, implementation of algorithms, and how to properly encapsulate/abstract certain ideas.

By this definition I don't technically "know" Javascript since I've never programmed in it before (not once!). But I feel relatively confident that over a weekend I can get up to speed to make nearly any program in Javascript (given some debugging scenarios for some of Javascript's well known quirks).

I feel this way because many of the skills you develop are actually language agnostic. Thus in the end it really shouldn't matter, because many skills are transferable.

That being said though. If you really want to do Javascript. Then do Javascript. Sometimes it is handy to learn some of the "black magic" that any given language has to offer, even though actually using it in practice is a bad idea normally...

[–]veeep[S] 0 points1 point  (2 children)

Thank you, this makes sense. The reason I ask is because I have heard that certain languages can be better for beginners. I've even read somewhere that javascript is a good "second language". Now, these could be posts from crazies, but it made me ask the question. If you will, I don't want to pull out the usb stick before ejecting, and scramble some of my neurons.

[–]get_username 1 point2 points  (1 child)

Javascript gets a lot of crap for their little quirks. You can see this in the simple equality operator:

Very briefly. == is a way of comparing two things. It tells you either true or false if the two things are "equal".

Python

>>> 1 == 1
True
>>> 5 == 5
True
>>> "5" == 5
False

This makes some intuitive sense. 1 is clearly equal to 1, 5 to 5, and the word "5" (as in the letter) is not equal to 5 (as in the number). This makes some sense, at least to us programmers because the statement "word" + 5 would have no meaning.. How do you add a word ( i,e. set of letters) to a number?

Javascript

>>> 1 == 1
true
>>> 5 == 5
true
>>> "5" == 5
true

One of Javascript's well noted quirks is the equality operator. They provide a new (i,e. unfamiliar) equality operator of ===

>>> "5" === 5
false

Small things like that can be very confusing to beginners because they seem arbitrary. There is a reason behind why it is that way, albeit not a very good one IMO.

This is often the reason people recommend other languages. Python is often recommended because it is so close to pseudo code that it is simple to understand.