Jump to content

Program for writing & compiling JS

I'm learning to write JS.

 

I love Adobe's Dreamweaver for HTML and CSS, since it suggests code, has snippets, tools for quickly inserting/removing comment blocks, colors different commands, and corrects my terrible spelling etc. 

Unfortunately this functionality is not fully supported for JS.

 

Please recommend a program that would help me write and learn JS, especially helping with debugging since I'm still learning.

As a hobby, I want to write a board-game into computer game, so I'm expecting it to get quite big.

 

Link to comment
Share on other sites

Link to post
Share on other sites

6 minutes ago, Ryujin2003 said:

Eclipse or IntelliJ?

I had a quick look and it seems InteliJ has a free and paid version, the free one does not support JS, only Java. But Eclipse seems nice, will have a look at it. Thanx.

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, Spikkel said:

I had a quick look and it seems InteliJ has a free and paid version, the free one does not support JS, only Java. But Eclipse seems nice, will have a look at it. Thanx.

I like Eclipse. I know there are some others out there, but I haven't had experience to recommend any of them.

 

Edit: https://www.slant.co/topics/1686/~javascript-ides-or-editors

 

Might be helpful. Visual Studio isn't bad, and my friends like NetBeans as well.

Link to comment
Share on other sites

Link to post
Share on other sites

I use Sublime Text because it is very minimalistlic and easy to use text editor. Add necessary plugins to it and it will help lint your code.

Another good option is Atom.

 

For full massive IDE, I'd suggest IntelliJ or WebStorm from JetBrains.

 

As for Javascript, you don't compile it. It is interpreted at runtime.

HAL9000: AMD Ryzen 9 3900x | Noctua NH-D15 chromax.black | 32 GB Corsair Vengeance LPX DDR4 3200 MHz | Asus X570 Prime Pro | ASUS TUF 3080 Ti | 1 TB Samsung 970 Evo Plus + 1 TB Crucial MX500 + 6 TB WD RED | Corsair HX1000 | be quiet Pure Base 500DX | LG 34UM95 34" 3440x1440

Hydrogen server: Intel i3-10100 | Cryorig M9i | 64 GB Crucial Ballistix 3200MHz DDR4 | Gigabyte B560M-DS3H | 33 TB of storage | Fractal Design Define R5 | unRAID 6.9.2

Carbon server: Fujitsu PRIMERGY RX100 S7p | Xeon E3-1230 v2 | 16 GB DDR3 ECC | 60 GB Corsair SSD & 250 GB Samsung 850 Pro | Intel i340-T4 | ESXi 6.5.1

Big Mac cluster: 2x Raspberry Pi 2 Model B | 1x Raspberry Pi 3 Model B | 2x Raspberry Pi 3 Model B+

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Spikkel said:

help me write and learn JS, especially helping with debugging

 

The best JavaScript debugger for JS which is embedded into HTML is your web browser. You'll (probably) just have to press F12. You can set breakpoints and evaluate variables there as well.

 

As for writing: http://texteditors.org.

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

I use Atom, though it can be a little sluggish at times and a pain in others if you start loading it with plugins. Notepad++ is always an option.

 

As far as working with the code, for the client side, most of the web browsers already have a very good set of debugging tools available for them. Open it up with F12 on Firefox and Chrome. For the server side, if you do end up using Node.JS, I'll defer you to the options described here: https://spin.atomicobject.com/2015/09/25/debug-node-js/

Link to comment
Share on other sites

Link to post
Share on other sites

11 hours ago, Spikkel said:

I'm learning to write JS.

 

I love Adobe's Dreamweaver for HTML and CSS, since it suggests code, has snippets, tools for quickly inserting/removing comment blocks, colors different commands, and corrects my terrible spelling etc. 

Unfortunately this functionality is not fully supported for JS.

 

Please recommend a program that would help me write and learn JS, especially helping with debugging since I'm still learning.

As a hobby, I want to write a board-game into computer game, so I'm expecting it to get quite big.

 

Hmmm. If you don't mind missing out on learning the APIs for browsers such as Chrome and Firefox, etc. I would recommend using the Sphere Engine. I recommend using the original v1.5 version of the engine if you're unable to figure out the audio functionality on Minisphere

 

As for compiling JS You might be able to use Prepack. It doesn't compile it to say an executable file but it does optimize it. 

 

Minisphere/Sphere: spheredev.org

Prepack: https://prepack.io/

My procrastination is the bane of my existence.

I make games and stuff in my spare time.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

If you want a fully functioned IDE webstorm. It will show you which line of your code has some sort of error. It is really helpful. It is free if you are a student. 

 

If you want a text editor, I recommend sublime. It is light weight, snappy as fuck. Unlike atom.*cough

If it is not broken, let's fix till it is. 

Link to comment
Share on other sites

Link to post
Share on other sites

Wow, I think it is easier to learn the code itself than it is to pick an IDE/game engine/whatever else there is. Ok, I like the idea of Sphere Engine. A lot of people (including other sites) seem to recommend Atom (even though it is slow).

 

The game I want to write will be only 2D graphics, and I doubt any sound at first. And I think running it outside of a browser would be great. Being able to save and load games would also be nice.

Link to comment
Share on other sites

Link to post
Share on other sites

Atom would be a good option while learning. Although the program is basic out of the box you can add linting and auto complete tools for JS that would help you when you go wrong. 

Link to comment
Share on other sites

Link to post
Share on other sites

I really love to use Visual Studio Code, it is available for Windows, Mac and Linux. I it based on simular concepts like atom, but it is much faster, smoother and has more functionality like Debugging, and (better) IntelliSense. Especially it JS support is great, as for its usual environment like npm & co, for many packages even typed IntelliSense is available (due to included typescript definitions).

 

And btw Javascript is not interpreted is it compiled at runtime, this principle is called JIT (Just in time). Your code is parsed on execution first, then it is compiled as you use the code. The advantage is that the JIT compiler already knows the values which will be used in the code, which leads to better optimization than in a classical compilation process. So in some Cases JS can even be faster than C or other compiled languages.

Link to comment
Share on other sites

Link to post
Share on other sites

25 minutes ago, lal12 said:

I really love to use Visual Studio Code, it is available for Windows, Mac and Linux. I it based on simular concepts like atom, but it is much faster, smoother and has more functionality like Debugging, and (better) IntelliSense. Especially it JS support is great, as for its usual environment like npm & co, for many packages even typed IntelliSense is available (due to included typescript definitions).

Out of curiosity, since I'm feeling lazy at the moment: how's its linter and does it have something like Pigments for Atom?

Link to comment
Share on other sites

Link to post
Share on other sites

17 minutes ago, M.Yurizaki said:

Out of curiosity, since I'm feeling lazy at the moment: how's its linter and does it have something like Pigments for Atom?

The linter is built in, for some languages you might need to specify the path to an interpreter (e.g. PHP), but for JS it is all builtin, also it includes IntelliSense (autocompletion, depending on context and types + documentation and parameter showing). IntelliSense of course is hard for dynamic typed language like JS, but with TypeScript definitions it works very well at least for used packages, but also surprisingly well without those definitions.

Something like pigments is built in, even much better readable (displayed as little box), at least for css. I am not much developing for the web currently, so I haven't used sass & co with vscode, but I guess it is supported there too.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, lal12 said:

The linter is built in, for some languages you might need to specify the path to an interpreter (e.g. PHP), but for JS it is all builtin, also it includes IntelliSense (autocompletion, depending on context and types + documentation and parameter showing). IntelliSense of course is hard for dynamic typed language like JS, but with TypeScript definitions it works very well at least for used packages, but also surprisingly well without those definitions.

 

 

Something like pigments is built in, even much better readable (displayed as little box), at least for css. I am not much developing for the web currently, so I haven't used sass & co with vscode, but I guess it is supported there too.

 

I might have to give it a try then since Atom's sluggishness and aggressive "new project" thing is starting to bug me. 

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

×