Discuss Scratch
- DigiTechs3
-
51 posts
JavaScript vs. Python???
very fast. I've heard that Spidermonkey and V8 and Chakra are fast, I don't know how fast.PyPy is
V8 and Chakra are a lot faster than Python's JIT, last I checked.
EDIT: Just did a quick Google search, and this appears to be backing up what I thought.
Either way, if you're doing some heavy calculations, then you probably don't want to be using a scripting language anyway, regardless of speed. You're better off using a compiled language, or at least some C library glue to optimise the calculation at compile-time. Most websites shouldn't need this though, so using something like node.js will be fine.
In general though, I wouldn't recommend doing any of these unless you know how to load balance and cache properly - you really should learn how to do at least mediocre load-balancing and varnish caching, because that's the sort of skill that large corporations are looking for.
Last edited by DigiTechs3 (May 11, 2016 09:08:44)
- DigiTechs3
-
51 posts
JavaScript vs. Python???
Oh bother, I forgot I'm still a new scratcher.
should link to http://karlheinzniebuhr.github.io/en/2015/09/28/C-vs-Go-vs-pypy-vs-Python/
this
should link to http://karlheinzniebuhr.github.io/en/2015/09/28/C-vs-Go-vs-pypy-vs-Python/
Last edited by DigiTechs3 (May 11, 2016 09:10:34)
- herohamp
-
1000+ posts
JavaScript vs. Python???
well website you needI either want to make games or websites. They are all useful languages. Do you have anything specific in mind that you would like to create?
HTML Javascript and CSS

and for games what type? Webgame?
- BookOwl
-
1000+ posts
JavaScript vs. Python???
Your Python is mix of 2 and 3. You should use input instead of raw_input. I'd say that Python is easier to learn than JavaScript (but I prefer JS anyway). I can't speak for ruby, but I've heard it is a really nice language. Python seems much simpler, so I would recommend learning it first.
I guess it is a matter of opinion, so I think you could compare the languages:
…
So that hopefully gave you a quick overview in the differences between the syntaxes of the two languages.
Anyway, I think that Python is better for non-web (except server) usage, and JS for websites.
- BKFighter
-
1000+ posts
JavaScript vs. Python???
If you have no need for a data base, (i.e. games without a login, user data, or highscores,) I would recommend JS. I've only used Python for about ten minutes, but I very strongly prefer JS. Canvas+JS is very powerful for beginning to make games.
- liam48D
-
1000+ posts
JavaScript vs. Python???
Who says your backend/database can't be programmed with JavaScript? If you have no need for a data base, (i.e. games without a login, user data, or highscores,) I would recommend JS. I've only used Python for about ten minutes, but I very strongly prefer JS. Canvas+JS is very powerful for beginning to make games.

- BKFighter
-
1000+ posts
JavaScript vs. Python???
Not I. I just said that if there's no database, the clear cut choice is JS (or Unity, but I've never actually need to (or have) used it).Who says your backend/database can't be programmed with JavaScript? If you have no need for a data base, (i.e. games without a login, user data, or highscores,) I would recommend JS. I've only used Python for about ten minutes, but I very strongly prefer JS. Canvas+JS is very powerful for beginning to make games.
- evilpacman10
-
87 posts
JavaScript vs. Python???
www.nodejs.org).I would recommend javascript because you can program websites, and then program applications and server side software with the same language (
YEESS!!! AMEN WHOO!
GET A PI (They are epic)
- evilpacman10
-
87 posts
JavaScript vs. Python???
www.nodejs.org).I would recommend javascript because you can program websites, and then program applications and server side software with the same language (
YEESS!!! AMEN WHOO!
GET A PI (They are epic)
No wait, sorry, wrong qoute, because of python's ‘pickle’ function it is especially good for games with databases.
- NickyNouse
-
1000+ posts
JavaScript vs. Python???
also, js lets you store stuff on the browser so that might work for some things tooNot I. I just said that if there's no database, the clear cut choice is JS (or Unity, but I've never actually need to (or have) used it).Who says your backend/database can't be programmed with JavaScript? If you have no need for a data base, (i.e. games without a login, user data, or highscores,) I would recommend JS. I've only used Python for about ten minutes, but I very strongly prefer JS. Canvas+JS is very powerful for beginning to make games.
- Icey29
-
500+ posts
JavaScript vs. Python???
There's a lot of technical discussion going on here, so for the purposes of the OP, I'll try and condense this into layman's terms.
Both are incredibly versatile languages and are extremely powerful. Python is similar in syntax to Scratch, so if you haven't learned a “traditional” programming language, you may find this very beneficial. JavaScript is used everywhere- especially in websites, so if you want to create something interactive, it would definitely be your best bet.
As Scratchyone cited, looking into Node.js could be really helpful once you get comfortable with the language.
I think that's it. Have I missed something?
Both are incredibly versatile languages and are extremely powerful. Python is similar in syntax to Scratch, so if you haven't learned a “traditional” programming language, you may find this very beneficial. JavaScript is used everywhere- especially in websites, so if you want to create something interactive, it would definitely be your best bet.
As Scratchyone cited, looking into Node.js could be really helpful once you get comfortable with the language.
I think that's it. Have I missed something?

- Dylan5797
-
1000+ posts
JavaScript vs. Python???
+1 websites – Python with Pyjs
games – Python

- Firedrake969
-
1000+ posts
JavaScript vs. Python???
As much as I like Python for backend, I think JS is better for realtime things.
- Ethan_1
-
100+ posts
JavaScript vs. Python???
Or even better http://transcrypt.org/+1 websites – Python with Pyjs
games – Python
I mean, honestly, if you want to program for the web, it is better to write JS, until WebAssembly is better tooled and more available.
- Bitesh
-
2 posts
JavaScript vs. Python???
WELL I USE PYTHON, BUT JAVA SCRIPT IS USED FOR MORE THINGS SO… REALLY I THINK YOU SHOULD DO JAVA SCRIPT THEN THINK ABOUT MOVING ON TO PYTHON…. Duh I'm going to do it the other way around….. 

- liam48D
-
1000+ posts
JavaScript vs. Python???
JAVA SCRIPT IS USED FOR MORE THINGS SO… REALLY I THINK YOU SHOULD DO JAVA SCRIPT THEN THINK ABOUT MOVING ON TO PYTHON…. Duh I'm going to do it the other way around…..(emphasis mine) WELL I USE PYTHON, BUT
Based on that why would you want to move on from JavaScript to Python?
- Firedrake969
-
1000+ posts
JavaScript vs. Python???
BECAUSE DATA ANALYSISJAVA SCRIPT IS USED FOR MORE THINGS SO… REALLY I THINK YOU SHOULD DO JAVA SCRIPT THEN THINK ABOUT MOVING ON TO PYTHON…. Duh I'm going to do it the other way around…..(emphasis mine) WELL I USE PYTHON, BUT
Based on that why would you want to move on from JavaScript to Python?

- nanaIan
-
8 posts
JavaScript vs. Python???
Even if there is a database, the clear-cut choice is JS.Not I. I just said that if there's no database, the clear cut choice is JS (or Unity, but I've never actually need to (or have) used it).Who says your backend/database can't be programmed with JavaScript? If you have no need for a data base, (i.e. games without a login, user data, or highscores,) I would recommend JS. I've only used Python for about ten minutes, but I very strongly prefer JS. Canvas+JS is very powerful for beginning to make games.

nodejs ftw
- botcrusher
-
500+ posts
JavaScript vs. Python???
You can't “clear cut” that simply. it comes down to preference and what the language is suited for.
For example, In my province (Canada uses provinces, not states) introduction to programming is done via a language called Turing.
Is it useful? no, not really… but it teaches you many of the concepts you will need for later languages.
After Turing, the language of choice is down to the teacher's discretion. In my case this was Python. Python is incredibly powerful, can be compiled to C++, and personally, i'm in love. Python is quite forgiving, there's a passed around ‘rule’ that it is easier to beg forgiveness than ask for permission.
What does this mean?
Well, if you (the coder) makes a mistake, or the system (someone yanked ethernet cable while sending data) and this causes an error the two following lines are your friend:
try:
except:
you try to do something, and if it fails, it moves on to except.
arguably the best way to use this is:
except Exception as e: print(e)
this prints the error so you can catch it, maybe try again, or do something differently. (Tell the user they've just switched to offline mode)
For example, In my province (Canada uses provinces, not states) introduction to programming is done via a language called Turing.
Is it useful? no, not really… but it teaches you many of the concepts you will need for later languages.
After Turing, the language of choice is down to the teacher's discretion. In my case this was Python. Python is incredibly powerful, can be compiled to C++, and personally, i'm in love. Python is quite forgiving, there's a passed around ‘rule’ that it is easier to beg forgiveness than ask for permission.
What does this mean?
Well, if you (the coder) makes a mistake, or the system (someone yanked ethernet cable while sending data) and this causes an error the two following lines are your friend:
try:
except:
you try to do something, and if it fails, it moves on to except.
arguably the best way to use this is:
except Exception as e: print(e)
this prints the error so you can catch it, maybe try again, or do something differently. (Tell the user they've just switched to offline mode)