Jump to content

Should I learn JavaScript?

Cy-Fy

Hello guys, I've noticced that many people these days want to learn how to program. I don't know how to do any of this but I would like to start learning something online to see whether I like this type of thing or not. My friend is learning JavaScript at his school but they don't do that in my school, so I was thinking that maybe I could learn this online or something.

 

Now the questions are,

 

1) Is it worth it earning JavaScript?

 

2) Is it useful for making high end pieces of simple software - like games/apps etc? 

 

3) Is it very hard to learn and make good use of it?

 

Thanks very much guys for all of your advice!! :)

Dell XPS 15 9560 - Nikon Z5 - Galaxy S10+

Link to comment
Share on other sites

Link to post
Share on other sites

Python is way easier for beginners :)

NEW PC build: Blank Heaven   minimalist white and black PC     Old S340 build log "White Heaven"        The "LIGHTCANON" flashlight build log        Project AntiRoll (prototype)        Custom speaker project

Spoiler

Ryzen 3950X | AMD Vega Frontier Edition | ASUS X570 Pro WS | Corsair Vengeance LPX 64GB | NZXT H500 | Seasonic Prime Fanless TX-700 | Custom loop | Coolermaster SK630 White | Logitech MX Master 2S | Samsung 980 Pro 1TB + 970 Pro 512GB | Samsung 58" 4k TV | Scarlett 2i4 | 2x AT2020

 

Link to comment
Share on other sites

Link to post
Share on other sites

i think that javascript is the most fun language to use at 'noob' level, because

  1. it's easy to show to people: you just need a free webspace and you can spam links to your experiments all over the social networks
  2. you have a lot of prebuilt stuff to play with, and i'm talking in particular about the DOM and canvases

by 'playing with DOM' i mean create and destroy visual things really really easily, like you can make tables and images and balls pop out and move around the screen, then disappear and reappear again and you will enter an endless set of stupid things you can do with a webpage

 

canvas is an HTML5 element on which you can draw using javascript, and do any animation on

doing 2d drawings is so easy, it's great

 

now combine the 2: make canvases pop out of everywhere and move them around and holy crap man you'll stay up all night to debug your lame but cool scripts, promise

 

you also can super easily make your things look cool using CSS3 which can be easily used as well

 

and if that's not enough, it's also so easy to code: you just need a browser and a text editor, you can basically create and edit your awesome scripts on any computer, even on your grandmother's

 

also, once you learned js you can create [awesome] extensions for your browser

run! go learn javascript!

 

answering your questions

1) yes, it's awesome. and learning any language is generally worth it, it's experience

2) nope apparently yes

3) there is a lot of material on the interwebz, and well just practise and do things step by step

Link to comment
Share on other sites

Link to post
Share on other sites

Dont listen to him lol ^^^

 

Here is an example of how much more confusing javasript is over python. These two pieces of code do the same thing, list the numbers from 0 to 9. Which one looks easier to you?

 

 

Javascript:

 

function foo() {

    for (var i=0; i<10; i++) {

        console.log(i);

    }

}

 

 

Python:

 

def foo():

    for i in range(10):

        print i

 

 

Plus the python community has a ton of documentation for the language, and there are thousands of people who can help you if you have a problem.

NEW PC build: Blank Heaven   minimalist white and black PC     Old S340 build log "White Heaven"        The "LIGHTCANON" flashlight build log        Project AntiRoll (prototype)        Custom speaker project

Spoiler

Ryzen 3950X | AMD Vega Frontier Edition | ASUS X570 Pro WS | Corsair Vengeance LPX 64GB | NZXT H500 | Seasonic Prime Fanless TX-700 | Custom loop | Coolermaster SK630 White | Logitech MX Master 2S | Samsung 980 Pro 1TB + 970 Pro 512GB | Samsung 58" 4k TV | Scarlett 2i4 | 2x AT2020

 

Link to comment
Share on other sites

Link to post
Share on other sites

-snip-

i don't see the problem

1. the javascript syntax is the same style as C, C++, C#, PHP, Java, do you really think that it is inferior?

2. the python syntax makes completely unclear what the start value of i is

3. python uses indentation as syntax. 'nuff said

4. code doesn't have to be readable to anybody to be good. if you studied js for more than 3 minutes, that syntax is crystal clear

Link to comment
Share on other sites

Link to post
Share on other sites

i don't see the problem

1. the javascript syntax is the same style as C, C++, C#, PHP, Java, do you really think that it is inferior?

2. the python syntax makes completely unclear what the start value of i is

3. python uses indentation as syntax. 'nuff said

4. code doesn't have to be readable to anybody to be good. if you studied js for more than 3 minutes, that syntax is crystal clear

Everything in javascript is at least 2x more characters than python. Everyone knows the start value is 0, that is one of the first things you learn. I never said javascrip was inferior, i know that you can do more advanced things with it, and it is used in more places, but for someone who is trying to start programming and has no previous experience it is much simpler to learn python because of it's 'readability' and how similar it is to the english language. Everyone has their personal preference, but if you look on the internet there are hundreds of other people that recommend python as a starting language.

NEW PC build: Blank Heaven   minimalist white and black PC     Old S340 build log "White Heaven"        The "LIGHTCANON" flashlight build log        Project AntiRoll (prototype)        Custom speaker project

Spoiler

Ryzen 3950X | AMD Vega Frontier Edition | ASUS X570 Pro WS | Corsair Vengeance LPX 64GB | NZXT H500 | Seasonic Prime Fanless TX-700 | Custom loop | Coolermaster SK630 White | Logitech MX Master 2S | Samsung 980 Pro 1TB + 970 Pro 512GB | Samsung 58" 4k TV | Scarlett 2i4 | 2x AT2020

 

Link to comment
Share on other sites

Link to post
Share on other sites

2) nope

A bunch of professional game engines such as Unity use JavaScript for scripting, tho I wouldn't call games "simple" so I dunno what he was really asking.

 

4. code doesn't have to be readable to anybody to be good. if you studied js for more than 3 minutes, that syntax is crystal clear

Could say the same about Python making points 2 and 3 moot.

1474412270.2748842

Link to comment
Share on other sites

Link to post
Share on other sites

Dont listen to him lol ^^^

 

Here is an example of how much more confusing javasript is over python. These two pieces of code do the same thing, list the numbers from 0 to 9. Which one looks easier to you?

 

 

Javascript:

 

function foo() {

    for (var i=0; i<10; i++) {

        console.log(i);

    }

}

 

 

Python:

 

def foo():

    for i in range(10):

        print i

 

 

Plus the python community has a ton of documentation for the language, and there are thousands of people who can help you if you have a problem.

 

 

ctrl+c

ctrl+v

 

someone can post the equivalents in os x and linux.

 

 

let's be frankly honest, your point isn't valid.  a beginner spends almost all of their time copying, not making original material.

Link to comment
Share on other sites

Link to post
Share on other sites

ctrl+c

ctrl+v

 

someone can post the equivalents in os x and linux.

 

 

let's be frankly honest, your point isn't valid.  a beginner spends almost all of their time copying, not making original material.

You do not learn anything from copy pasting. If you check out all the different python tutorials on the internet, it is a step by step process to help people learn one step at a time. Have you gone to school? Do you learn everything in school from copy pasting stuff from wikipedia and handing that in to the teacher? Obvioisuly not.

NEW PC build: Blank Heaven   minimalist white and black PC     Old S340 build log "White Heaven"        The "LIGHTCANON" flashlight build log        Project AntiRoll (prototype)        Custom speaker project

Spoiler

Ryzen 3950X | AMD Vega Frontier Edition | ASUS X570 Pro WS | Corsair Vengeance LPX 64GB | NZXT H500 | Seasonic Prime Fanless TX-700 | Custom loop | Coolermaster SK630 White | Logitech MX Master 2S | Samsung 980 Pro 1TB + 970 Pro 512GB | Samsung 58" 4k TV | Scarlett 2i4 | 2x AT2020

 

Link to comment
Share on other sites

Link to post
Share on other sites

You do not learn anything from copy pasting. If you check out all the different python tutorials on the internet, it is a step by step process to help people learn one step at a time. Have you gone to school? Do you learn everything in school from copy pasting stuff from wikipedia and handing that in to the teacher? Obvioisuly not.

 

what on earth did you just say?.....

 

the act of typing teaches nothing.

 

it's the act of changing variables that makes you learn.  eg making a loop run 20 times instead of 10.

 

 

memorizing syntax is the only reason for shorter syntax when learning.

 

memorizing syntax is an alternative to copy/pasting.  like you JUST said, copypasta is NOT learning.

 

 

i've done lab TA duties before,  trust me, everyone copy/pastes and there is nothing wrong with that for the above reasons.

Link to comment
Share on other sites

Link to post
Share on other sites

what on earth did you just say?.....

 

the act of typing teaches nothing.

 

it's the act of changing variables that makes you learn.  eg making a loop run 20 times instead of 10.

 

 

memorizing syntax is the only reason for shorter syntax when learning.

 

memorizing syntax is an alternative to copy/pasting.  like you JUST said, copypasta is NOT learning.

 

 

i've done lab TA duties before,  trust me, everyone copy/pastes and there is nothing wrong with that for the above reasons.

If you understand what you are copy pasting then yes it is fine, but that means you are not really learning anything new. If you copy paste something and have no idea how it works or why it works then there is 0 learning involved. If you research the modules you need to make something work, then put everything together in your own code (aka in your own words) then you learn a lot more. The main point is understand the code you are writing, and python is much easier for a starting language because of all it's similarities to the english language.

NEW PC build: Blank Heaven   minimalist white and black PC     Old S340 build log "White Heaven"        The "LIGHTCANON" flashlight build log        Project AntiRoll (prototype)        Custom speaker project

Spoiler

Ryzen 3950X | AMD Vega Frontier Edition | ASUS X570 Pro WS | Corsair Vengeance LPX 64GB | NZXT H500 | Seasonic Prime Fanless TX-700 | Custom loop | Coolermaster SK630 White | Logitech MX Master 2S | Samsung 980 Pro 1TB + 970 Pro 512GB | Samsung 58" 4k TV | Scarlett 2i4 | 2x AT2020

 

Link to comment
Share on other sites

Link to post
Share on other sites

If you want to be a web developer JavaScript is a must, along with CSS and HTML to name a few.

JavaScript is a scripting language so you will also need to know HTMl at least. JavaScript and HTML are a good way to start off since they will teach you a lot.

As a beginner I would recommend Visual Basic over Python as well, since I find it easier and a bit more fun due the 'visual' UI editor.

Link to comment
Share on other sites

Link to post
Share on other sites

If you understand what you are copy pasting then yes it is fine, but that means you are not really learning anything new. If you copy paste something and have no idea how it works or why it works then there is 0 learning involved. If you research the modules you need to make something work, then put everything together in your own code (aka in your own words) then you learn a lot more. The main point is understand the code you are writing, and python is much easier for a starting language because of all it's similarities to the english language.

 

 

cp is a replacement for typing when dealing with boilerplate code(a loop is boilerplate).  there is only one difference between them: typing takes longer.

 

they have the exact same amount of learning potential: 0.

 

you are not a better programmer because you memorized how to type a loop.

 

how on earth can someone disagree with what i just said?

Link to comment
Share on other sites

Link to post
Share on other sites

cp is a replacement for typing when dealing with boilerplate code(a loop is boilerplate).  there is only one difference between them: typing takes longer.

 

they have the exact same amount of learning potential: 0.

 

you are not a better programmer because you memorized how to type a loop.

 

how on earth can someone disagree with what i just said?

I don't think we're on the same page here...

I'm trying to explain that you only learn when you understand what a code is doing. If you don't understand what you are copy pasting, there is no way you will learn what it is.

If you instead figure out how to do it yourself then you can actually begin to understand how the code works.

 

For example:

 

A new programmer c/p this:

for x in range(10):

    print x

 

it will print numbers 0 to 9 but he will not learn anything from it.

 

If instead he learns what a 'for' loop is, then learns what 'range' is, then learns what 'print' is, he will be learning the programming language, and will be able to do this himself ^^^ without needing to copy and paste.

NEW PC build: Blank Heaven   minimalist white and black PC     Old S340 build log "White Heaven"        The "LIGHTCANON" flashlight build log        Project AntiRoll (prototype)        Custom speaker project

Spoiler

Ryzen 3950X | AMD Vega Frontier Edition | ASUS X570 Pro WS | Corsair Vengeance LPX 64GB | NZXT H500 | Seasonic Prime Fanless TX-700 | Custom loop | Coolermaster SK630 White | Logitech MX Master 2S | Samsung 980 Pro 1TB + 970 Pro 512GB | Samsung 58" 4k TV | Scarlett 2i4 | 2x AT2020

 

Link to comment
Share on other sites

Link to post
Share on other sites

^ Please, don't make people start learning Python; It's a pointless language unless you want to make tiny, albeit sometimes fun, projects. It does nothing better than any other moderately modern language, it just hangs around in the background with Ruby. It will also cause unnecessary confusion when he decides to progress into real programming languages, because it will not work the same way much of the time.

 

JavaScript, on the other hand, is much closer in syntax to "traditional" programming languages such as C# or C++, so it's a great stepping stone. JavaScript is also becoming a very important piece of misc. operating systems, where you can write entire apps in JavaScript. So definitely, if you want to start somewhere, it could just as well be JavaScript.

 

JavaScript is also super simple to learn once you grasp the basics of programming, and is used in tons of game engines.

Cheers,

Linus

Link to comment
Share on other sites

Link to post
Share on other sites

^ Please, don't make people start learning Python; It's a pointless language unless you want to make tiny, albeit sometimes fun, projects.

Python is a great language that handles large projects fine, please try to go tell that to Google who use it a ton and not just in web stuff.

 

 

It does nothing better than any other moderately modern language

Is C++ a moderately modern language? Go compare loading an image, parsing a json or xml file or even something simple like creating a socket in those 2 languages.

 

 

JavaScript is also super simple to learn once you grasp the basics of programming, and is used in tons of game engines.

 

Can say the same exact thing for Python.

 

 

Yes Python is slower than C or Java but for most of the things people do especially when just starting out, taking 1 second instead of half a second isn't a problem.

1474412270.2748842

Link to comment
Share on other sites

Link to post
Share on other sites

PYTHON DEFENDERS ASSEMBLE!

 

^ Please, don't make people start learning Python; It's a pointless language unless you want to make tiny, albeit sometimes fun, projects. It does nothing better than any other moderately modern language, it just hangs around in the background with Ruby. It will also cause unnecessary confusion when he decides to progress into real programming languages, because it will not work the same way much of the time.

 

JavaScript, on the other hand, is much closer in syntax to "traditional" programming languages such as C# or C++, so it's a great stepping stone. JavaScript is also becoming a very important piece of misc. operating systems, where you can write entire apps in JavaScript. So definitely, if you want to start somewhere, it could just as well be JavaScript.

 

JavaScript is also super simple to learn once you grasp the basics of programming, and is used in tons of game engines.

 

If by mean pointless, you mean growing exponentially in popularity and in wide usage throughout Silicon Valley and other tech hubs, then sure.

 

Python is great for beginners conceptualizing the ideas of programming for the first time. Ruby is also good, but in general for more advanced users and for different reasons.

 

The reasons to use Python start with its focus on readability and its overall syntactical simplicity.

 

EDIT: Wait, you don't want people learning programming to be having as much fun as possible? Why not? They won't be making large projects for at least a few years anyways.

"You have got to be the biggest asshole on this forum..."

-GingerbreadPK

sudo rm -rf /

Link to comment
Share on other sites

Link to post
Share on other sites

Python is a great language that handles large projects fine, please try to go tell that to Google who use it a ton and not just in web stuff.

 

 

Is C++ a moderately modern language? Go compare loading an image, parsing a json or xml file or even something simple like creating a socket in those 2 languages.

 

 

Can say the same exact thing for Python.

 

 

Yes Python is slower than C or Java but for most of the things people do especially when just starting out, taking 1 second instead of half a second isn't a problem.

 

 

PYTHON DEFENDERS ASSEMBLE!

 

 

If by mean pointless, you mean growing exponentially in popularity and in wide usage throughout Silicon Valley and other tech hubs, then sure.

 

Python is great for beginners conceptualizing the ideas of programming for the first time. Ruby is also good, but in general for more advanced users and for different reasons.

 

The reasons to use Python start with its focus on readability and its overall syntactical simplicity.

 

EDIT: Wait, you don't want people learning programming to be having as much fun as possible? Why not? They won't be making large projects for at least a few years anyways.

 

Oh boy, I knew I should have worded myself better. Python lovers tend to be a peculiarly defensive group of people. :)

 

Let me re-iterate on my points:

 

• I defend my position on not learning Python as your first language, that's a crippling strategy, since it doesn't have much in common (syntax-wise) with most other languages used today.

• I'll change my point about Python being "pointless" to "is useful in certain situations". The only place where I would ever find Python useful is on a back-end server, where someone wants to run scripts with Python, instead of Java or Ruby, for example. Anywhere else? No, it's not very useful. Feel free to enlighten me with your own experience here, have you found any special use for Python on any locally run application?

• One of the OPs questions where, allow me to quote: "Is it useful for making high end pieces of simple software - like games/apps etc?" — Would you consider Python to fit in there? No, hence my rejection to the people telling him to learn Python first.

 

Now, do you understand my point better? I don't shun the use of Python where it is useful, but in most cases, it's not the language you should chose firsthand (unless, of course, you mainly do service-related work in a server environment, and hate Java).

Cheers,

Linus

Link to comment
Share on other sites

Link to post
Share on other sites

Yes, JavaScript is far superior to any other of the languages that people consider "noob friendly".

 

You can make 2D and 3D games in JavaScript and HTML5.

 

Python will just confuse you further when you come to learn useful languages.

Link to comment
Share on other sites

Link to post
Share on other sites

Oh boy, I knew I should have worded myself better. Python lovers tend to be a peculiarly defensive group of people. :)

 

Let me re-iterate on my points:

 

• I defend my position on not learning Python as your first language, that's a crippling strategy, since it doesn't have much in common (syntax-wise) with most other languages used today.

• I'll change my point about Python being "pointless" to "is useful in certain situations". The only place where I would ever find Python useful is on a back-end server, where someone wants to run scripts with Python, instead of Java or Ruby, for example. Anywhere else? No, it's not very useful. Feel free to enlighten me with your own experience here, have you found any special use for Python on any locally run application?

• One of the OPs questions where, allow me to quote: "Is it useful for making high end pieces of simple software - like games/apps etc?" — Would you consider Python to fit in there? No, hence my rejection to the people telling him to learn Python first.

 

Now, do you understand my point better? I don't shun the use of Python where it is useful, but in most cases, it's not the language you should chose firsthand (unless, of course, you mainly do service-related work in a server environment, and hate Java).

Python is used in commonly in Academia, so it must have some sort of appeal.

 

I agree though. The syntax is just dumb and causes lots of confusion.

Link to comment
Share on other sites

Link to post
Share on other sites

Python is used in commonly in Academia, so it must have some sort of appeal.

 

True, it's mostly used for easy graph-plotting etc for physics and maths, although MATLAB is a more common solution I think.

Cheers,

Linus

Link to comment
Share on other sites

Link to post
Share on other sites

 Feel free to enlighten me with your own experience here, have you found any special use for Python on any locally run application?

I guess that depends on what you mean by special. The last thing I made for personal use was a Twitch plays bot which consisted of an IRC bot, mouse/keyboard emulation (can JavaScript even do that?) and a nice GUI for the stream. Sure I could have written it in C# and had a nice GUI editor or Java and used the built in Robot class for input but it probably took me half the time to make than either of those languages by writing it in Python.

 

 

• One of the OPs questions where, allow me to quote: "Is it useful for making high end pieces of simple software - like games/apps etc?" — Would you consider Python to fit in there? No, hence my rejection to the people telling him to learn Python first.

As far as games it's in the same place as JavaScript, it's used for scripting in a bunch of engines.

For "apps" I would say it's much more useful than JS. I don't think I've ever seen a desktop app written in JS.

 

 

 but in most cases, it's not the language you should chose firsthand (unless, of course, you mainly do service-related work in a server environment, and hate Java).

But why not?

For me it is the first language I go to for 99% of the things I do, it's easier and faster to write than C++ or Java while still being able to do the same things (or more if you don't want to go running around finding C++ libraries that won't even compile). Unless something is overly performance critical (which is pretty much never the case in my personal programs other than games) I see no reason not to use Python.

1474412270.2748842

Link to comment
Share on other sites

Link to post
Share on other sites

Python is used in commonly in Academia, so it must have some sort of appeal.

 

I agree though. The syntax is just dumb and causes lots of confusion.

I believe Java and Haskell are the 2 major academic languages for now.

And if you find the syntax dumb or confusing, that's just a personal problem, I'm sure there are plenty of people who feel the same way about C style syntax and much prefer Pythons.

1474412270.2748842

Link to comment
Share on other sites

Link to post
Share on other sites

I guess that depends on what you mean by special. The last thing I made for personal use was a Twitch plays bot which consisted of an IRC bot, mouse/keyboard emulation (can JavaScript even do that?) and a nice GUI for the stream. Sure I could have written it in C# and had a nice GUI editor or Java and used the built in Robot class for input but it probably took me half the time to make than either of those languages by writing it in Python.

In terms of "what they can do", JavaScript and Python are very similar, so,  yes, of course, JavaScript has a whole range of ways to emulate hardware, just like Python.

 

While typing that, a thought struck me—Can you run Python scripts natively in browsers? That'd be a big advantage to JS, when more and more things are turning into browser-based applications, if Python can't do that. I have no idea though, I never tried.

 

 

As far as games it's in the same place as JavaScript, it's used for scripting in a bunch of engines.

For "apps" I would say it's much more useful than JS. I don't think I've ever seen a desktop app written in JS.

Any hints as to what those engines could be? A big point for JS is that Unity has full support for it, in case the developer doesn't want to go with C#.

The default language for Windows 8 Apps (the ones integrated in Modern UI), is JS (well, more precisely, HTML5, which heavily relies on JS).

 

 

But why not?

For me it is the first language I go to for 99% of the things I do, it's easier and faster to write than C++ or Java while still being able to do the same things (or more if you don't want to go running around finding C++ libraries that won't even compile). Unless something is overly performance critical (which is pretty much never the case in my personal programs other than games) I see no reason not to use Python.

I agree with you, Python is a very quick language to use. But you seem to fail to notice my main point: It's not similar to other languages in terms of syntax. This is a huge point for someone like OP who wants to make games. He's better of learning how languages usually works with a "normal" language, and then pick up on Python if he feels like it's a fancy language to learn for quick prototyping. I don't advice against learning Python in general, but I advice against learning it as a first language.

 

In the end though, unless a situation dictates a certain language, it's better to just go with whatever language fits your way of programming the best.  :)

Cheers,

Linus

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×