learning ecma script/javascript directly from the reference [closed] - javascript

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I am trying to learn Javascript.There are some excellent books and great authors that became standard in JS world - As I can see, they all have their own way of interpretation of language. It can be sometimes confusing for the novice in Javascript.I wonder, how usefull can be to learn directly from ECMAScript language specification as it was published by the authors of the language ?

It's probably much better to learn from the tutorials, as the specification is designed for people implementing JavaScript parsers/interpreters, not for people learning JavaScript itself.
If you want to learn from a reference, the MDN is a fantastic resource. There are also plenty of tutorials out there.

The specification is optimized for defining the language from the point of view of its implementors. It is not optimized for teaching it to someone that is new to the language.
A good learning reference has also many things that are not covered in the language spec, like common APIs (like the DOM and a JS framework) and common patterns (ex.: the module pattern, namespaces, etc...). While it is true that some people might have some coding practices you don't agree with you should not immetiately dismiss what they say, unless you really want to learn everything and fall into every trap yourself. As long as you have a mental framework of what you consider to be the best practices in general you should be able to identify what you agree with or not.

JavaScript is one of the most controversial languages in existence, there is no clear author and no clear documentation.
The best project I know of is Mozilla Developer Network (or MDN), it's pretty extensive and comprehensive.

Related

When learning ethical web hacking, should I learn javascript, html, or both [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I am learning ethical hacking, mostly with websites. I know the basics of the web but what coding language should I learn first when it comes to website hacking. I want it to help me in not only ctf but in real instances.
Thank you
Understanding HTML and being able to manipulate it to your advantage will be important, as well as being able to interpret what some javascript code is doing. I recommend looking into both as they will both aid you.
You should also be sure to use the developer tools your browser provides you with to your advantage; Google Chrome and similar browsers provide many useful tools such as the network tab, console and source inspector within their developer tools. These can be useful in certain cases, especially where it may not be extremely clear what you must do to exploit a website.
In terms of using knowledge of web hacking for real world uses, I recommend not focusing solely on the client side. You certainly should spend some time learning about the server side. Looking into key concepts regarding programming security, such as input validation will be very useful.
Having an understanding of things such as input validation can lead into being able to perform SQL injection attacks; you should definitely look into SQL injection, as well as command injection, but ensure you are comfortable manipulating HTML and understanding javascript before moving on to this. Grasping these concepts will not only allow you to exploit these vulnerabilities, but also allow you to ensure you have protected any software you write against them.
I recommend having a look at https://overthewire.org/wargames/natas/natas0.html to train your skills and give you good way to actively learn these concepts.
I hope this helps!

coffeescript vs. pure javascript for educational usage [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I am working on an update of a curriculum for teaching non technical students the basics of programming, esp. programming for the web.
I prefer coffeescript over javascript for the (most times) much shorter and - as I think - better readable code.
On the other hand there are thousands of examples written in Javascript which are harder to understand if you know only about Coffeescript.
For the last years I just told my students to use a split screen in the editor, code CS in one frame and see JS in the other to see what is the translation of the CS statements in JS. And I showed the how to use CS2JS and JS2CS converter. The idea behind this is to make things visible like what "for-each" or "for-in" statements of CS do, as they are shown in JS in an unfolded way.
(I know this example leaks a little bit as ECMA 5 is rolled out now for a little time, but I am doing this for didactic reasons for a little while now)
Another problem is that there a not so much code hinter etc. for CS then for JS available.
EDIT
As the community seams to see this question to be opinion based, I precise it:
What toolchain do you use to make an easy entrypoint available for newbees to learn CS?
My pipeline builds on brackets.io as a webservice, node, gerrit, gitlab, ungit, jenkins, jade, less, coffeescript, ...
I have the need to make everything available totally offline so I wrap the tools in docker containers and VMs.
Before this question is closed as opinion-based, which indeed it is, let me comment that I cannot imagine the value in teaching non-technical students about CS vs. JS transpilation issues. They must have MUCH better things to spend their time on. As lovely as CS is, it is a dialect. Teaching it is like teaching Cockney slang in an English class. Furthermore, notwithstanding all the great code written in CS and the great benefits in efficiency it brought to those who used it, for better or for worse it is now on its way out, superseded by ES6 and TypeScript and eventually ES7.

UnityScript vs Javascript [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I know there's a difference between the languages, such as classes etc.
What I wonder is this: If UnityScript is different from Javascript, why does the Unity3D documentation give you the options to pick between C# and JS when you look through it? Shouldn't it be a choice between C# and US?
Meanwhile, here on Stack Overflow, people generally make the effort to correct people who call it Javascript. Why is that?
Unity uses a custom JavaScript variant also known as UnityScript which it historically and still today commonly (but inconsistently) refers to as "JavaScript," including as you note in its own script documentation.
This is incorrect in terms of the meaning of the term "JavaScript" in the programming world at large (i.e. beyond the Unity community). UnityScript is definitely not JavaScript. They are incompatible languages with fundamental differences. From a strict correctness point of view, yes, Unity should use "UnityScript" in its documentation.
The incorrect usage doesn't tend to be problem within the Unity community, within which it is assumed that "JavaScript" means the JavaScript used by Unity. In fact, it's possible that using the term "UnityScript" could cause confusion within the Unity community, because the term "JavaScript" has historically been and continues to be more commonly used, and it's possible many non-programmers within the Unity community don't even realize Unity is actually using a variant JavaScript, as opposed to actual JavaScript.
However, outside of the Unity community, including here on Stack Overflow, using the term "JavaScript" to mean anything other than the actual JavaScript will cause confusion, which is why it's important to say "UnityScript" here.
Incidentally, Unity adds to the potential confusion, both within and without the Unity community, by not being consistent. In its release notes for version 5, it used both "JavaScript" and "UnityScript" interchangeably. In a blog entry about an important scripting change, it used the term "UnityScript-aka-Javascript."
Quote from Juhana, thank you for the answer.
JS and US have enough differences that it's important to distinguish
between them when you ask a question. Otherwise you might just waste
people's time when their answer is incompatible with what you're
actually using. On Unity's site on the other hand there's no danger of
confusion because it's obvious from the context that they're always
talking about Unity and never about non-Unity JavaScript.

Javascript and Jquery essential knowledge for beginner? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
As someone who will be working extensively with JavaScript and JQuery, I hear the community is strong so I figured I would ask what a beginner should been keen in understanding when developing mobile applications. Like any other language, I wish someone would have walked in the first day of class when programming with C and said to me, "if you don't learn everything about malloc() and free() today, you will fail!" Or when I was writing with Java and heard that private and static are essential for every function and variable too late. See what I mean about learning the most important so I don't get frustrated with the details later.
My current attempt at figuring this question out is reading a book, but like most books, they don't expect you to ask what is the high-level re-occurring concepts. I have used CSS and HTML and have not used scripts or Jquery as much when developing websites.
Read "JavaScript the Good Parts" by Douglas Crockford http://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742/ref=sr_1_1?ie=UTF8&qid=1419857713&sr=8-1&keywords=javascript+the+good+parts
This will give you what you need for JavaScript. I don't know "the best" source for jQuery, but start here: http://learn.jquery.com/
If your new to Javascript Syntax I would highly encourage you to check out the Code Academy's Javascript Track here.
If your new to programming in General I'd also encourage you to learn about functional programming which is very important in Javascript (Very useful especially when you start working with asyncrhonous code). A great resource for this is Eloquent Javascript. The book is posted 100% free on the authors website here. I'd encourage you to read chapters 1-5.

JavaScript design patterns [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
This is a question for general discussion. Are there any good, comprehensive resources for useful JavaScript design patterns. I am trying to avoid references that attempt to coerce JavaScript into, say, Java by imposing patterns more suited to another language. Let's let JS be JS and shape our patterns around the strengths.
Please any discussion would be valued by more than just me, I suspect.
Here's an on-line resource:
Essential JavaScript Design Patterns For Beginners
Here's a good one:
This is an awesome book by O'Reilly. It builds on their "JavaScript: The Good Parts".
It references a lot of the patterns mentioned in the "Gang of Four" book and notes a lot of the problems solved in that book are trivial to solve with JavaScript.
APress has a book called "Pro Javascript Design Patterns" that is probably just what you're looking for. While the author (Diaz Harmes) is certainly not "the gang of four", I think he does a pretty good job; I know I learned quite a bit from it (and it got 4.5 stars on Amazon).
Amazon link: http://www.amazon.com/JavaScript-Design-Patterns-Recipes-Problem-Solution/dp/159059908X
I'm not sure why no one has listed this, but Addy Osmani's JavaScript design pattern book is fantastic and freely available online. He really digs deep to show you the nuts and bolts of each pattern.
http://addyosmani.com/resources/essentialjsdesignpatterns/book/
This is one of the best design patterns resources I've found for JavaScript
http://shichuan.github.com/javascript-patterns/
It's aimed for JavaScript as we know and not necessarily trying only use concepts of other languages.
Peter Michaux has some decent articles
Also see Crockford's articles (and his book)
A new book on the subject by Stoyan Stefanov: Object-Oriented JavaScript: Create scalable, reusable high-quality JavaScript applications and libraries

Categories