Learning JavaScript by reading first or writing first? [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 8 years ago.
Improve this question
I did check (and read) a few similar questions here, but this really applies to everyone differently since no one learns the same.
My question is not on what resources to use, for that I have plenty.
I am working my way through JavaScript: The Definitive Guide (and I have the good parts as well).
I'm reading up on the core language but I don't feel like the information is sticking (or rather I'm not getting much out of it).
My question is should I just write an application in JavaScript and reference my books (I'm a very hands on person, but do enjoy reading), or should I keep reading the book, do the exercises, and then write a program?
In short: should I just write js app first and reference my book, or read the book first doing the examples and then write a js application? I've done some basic programming in PHP/Python (nothing meaningful yet).
I always learn math this way and I suppose, I'm conflicted in how I should tackle learning a language. I feel like I could read many books, but perhaps this isn't the best way for me (I know others learn differently).
For starts, I'm considering writing a simple calculator in JS.

Like for any languages I would suggest to do both.
You have to immediately start applying what you are studying. This way you will focus what you learned and understand better how the language works.
JavaScript is a highly flexible language. You can start soft, then learn new things each day and it will grow with you. You will never stop learning with JavaScript because it's easy to start but difficult to master.
You can start with really small scripts. When you start to feel confident you can create more advanced scripts, start using frameworks, write plugins for them, and ultimately your own library of functions.
I only suggest you to start learning best practices as soon as possible, because there are many things you have to avoid while programming in JS.
Then as a last word, always do what you feel like is better, don't go crazy trying to learn everything immediately. Everyone learns and works at his own pace.

Related

When to use React [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I've been learning part of the MEAN/MERN stack and feel somewhat comfortable using MongoDB, Express, and Node. I'm moving onto the A/R of the stacks and am having a bit of trouble understanding when these are applicable and when they're not.
To try to put my thoughts into words, I would ask this:
Is Angular and React applicable to nearly all web applications or were they built for a certain niche? For instance, one of my first projects will be creating a portal for employees to use for various tools to help them with their work as well as to transition from Excel based forms to web based forms.
When creating a site like this, is Mongo/Express/Node enough?
I'm kind of struggling to explain this as this React course I've been trying to complete is making my brain feel like its over flowing. I've learned HTML/CSS/JS + Mongo/Express/Node over the past few months including ES2015-2017 and such so immediately learning React on top of that feels a bit overwhelming. For some reason my head is having trouble 'Thinking in React'. Not necessarily breaking things down to components, but the props and states aspect of it all.
For instance, I understand what pure functions are but I don't feel experienced enough to know how to refactor a non-pure function to a pure one and be confident.
I hope this is making sense... Coding has been wonderful. Not only am I having fun but it's really given me motivation to better myself and my knowledge and as well as given me a goal to reach.
Any direction on how to tackle React as a newbie would be extremely helpful.
I'd like to share my thoughts on how you can get started with React. Maybe a first look at https://github.com/markerikson/react-redux-links would be nice, if you already familiar basic react and its enviroment. Here the section Data Flow: “State” and “Props” seems to be something you seek for.
Don´t get overwhelmed by all the surrounding libraries, concepts and so on. It actually will get pretty clear after you built your first own react and later redux applications. The don´t have to look nice, just tackle concepts like Higher Order Components, passing data from childs to parents etc.
If you´ve got questions feel free to ask. Im digging in react too.
This is a very wide question, so I will give you a narrow answer: REACT
Seriously, just stop searching for these type of answers because there is no right answer. Angular programmers will tell you angular and vice versa.
Just GO and start coding man :)

Should I use Lua? [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 9 years ago.
Improve this question
I am going to work on my new project where client has demanded to use 'Lua' if possible, I have never used it before and by searching on it I found it is fast compare to javascript and getting popular nowadays.
As I am very confused I had never use it before so I want to know something
Is it really better(in terms of performance and use) then javascript?
Will I get enough resources(because I don't want to move over after starting development due to lack of resources or it becomes hard to me develop)?
Will it needed anything other than C compiler to run?
Please guys it is really important to know about such thing before starting. Any help will be appreciated.
I'm assuming you're writing a standalone application in C or C++, and you're looking for a language to enable people to extend that application by embedding another language. That's pretty much Lua's territory.
Lua's strong point is that it's very easy to embed in your (C) application. It compiles quickly, it's tiny, licensing is liberal and using C functions from Lua is relatively easy. Standard Lua has enough performance for most things you'd use a language like this for; if you need more raw speed you could look into LuaJIT, the JIT-compiler for Lua.
As for your questions:
LuaJIT will probably be pretty much as fast as you can get for a dynamic language. Lua is used in games (Sim City, Far Cry, World of Warcraft), where performance is very important.
If by 'resources' you mean documentation: sure. Lua is a very simple language, much simpler than JavaScript; the manual should help you get started with the language itself, the wiki is tasty for tips about the embedding process. This article has an example you can copy/paste.
Lua pretty much runs everywhere a C program will run. It doesn't even need an operating system, and it doesn't depend on anything at runtime if you bundle it correctly.
Embedding a full JavaScript environment in your application, and interfacing your application to the JS environment, can be a lot of work (even though Google's V8 engine has some functionality to help you; see here).

NodeJS as an avenue towards learning JavaScript [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm a backend programmer who works mainly in Python. I'll probably never want to be a full time front end developer, but with the goal of growing my skill set, I would like to become at least passably proficient in JavaScript. It seems like a language that is wearing a lot of hats nowadays, and if nothing else, I'd like to a little more knowledgable about 'their world' when I'm working with front end guys.
We're using NodeJS for some server side work at my company, and I was curious about it. I've found a few good tutorials and it seems interesting. It seems like it might be a good way to familiarize myself with JavaScript, since it comes at it from an angle that I understand -- server side programming.
But I am also a little worried that if I learn both at once, I won't be able to keep track of what's 'Stock JavaScript' vs features that are particular to NodeJS.
What do you guys think? Is bootstrapping myself into JavaScript familiarity by learning NodeJS a good idea? Or will I just confuse myself if I jump into Node without a solid understanding of the fundamentals of JavaScript?
If anything, the potential problems will be in the reverse: NodeJS is closer to 'true' JavaScript (as in ECMAScript 5) than you can reasonable program on the client side, where lots of native javascript features have to be avoided and re-implemented with libraries.
It's easier to learn Javascript in node because you aren't dealing with HTML, DOM, etc and can treat it like "just another language" - this is what I did.
Node doesn't "add" much to JS, unless you count using CommonJS modules, but that's more of a library and conventions than syntax.

How to learn professional JavaScript in two days? [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 7 years ago.
Improve this question
I really need to learn professional javascript in two days because I am gonna have to hit the
ground running (real world project). I have little which can be approximated to no knowledge of JavaScript or website development. Any help would be appreciated greatly.
Seriously, two days is about enough to get a feel for the basics. It's nowhere near enough time to get to "professional" level (whatever that means exactly). The more experience you have with other languages, the easier it will be, though.
Don't cram for a programming language, especially learning it professionally, unless you have previous programing experience.
http://eloquentjavascript.net/
See also https://stackoverflow.com/questions/4744906/would-you-recommend-starting-from-html5-css3-for-beginners for resources on learning web technologies.
Go through video lectures by Douglas Crockford at http://yuiblog.com/crockford/. You could be able to get rid of some assumptions, misconceptions and pick up some really good concepts in less than 10 hrs of video.
Nevertheless, it is indeed a great place to start.
This article is a great source of up to date, modern JavaScript resources:
http://blog.reybango.com/2010/12/15/what-to-read-to-get-up-to-speed-in-javascript/
If you need to learn JavaScript, you can follow these courses if you have little previous programming experience. They are interactive and you can code all the examples in the explorer (and they are free).
1 - JavaScript Fundamentals
2 - JavaScript
And finally, a library called jQuery to make a little bit easier JavaScript programming.
3 - jQuery
This won't take you to days, but is a good beginning to be a JavaScripter.
Good luck.

Learning javascript [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Currently, I am using Javascript - The Definitive Guide for learning Javascript from scratch. Having learnt Java, PERL and other programming languages, I am in a habit of solving small exercises to check/better understand what I have been learning as well. In case of Javascript, I found the book to be severely lacking in exercises. Infact, I did not find exercises in the only other book [ Beginning Javascript ] I have either.
Is there any source that I can refer to for exercises in Javascript?
Once you get a good grasp on the syntax,
Crockford has a page that compares javascript with Scheme and takes you through a short book The Little Schemer. The article is appropriately named The Little JavaScripter.
After reading the book, I was changed. Or perhaps transformed. Or altered. In a good way. There are very few books that deeply change the way that you think. This is one of those books.
He's gone through the chapters and translated the functions into javascript. As an exercise, you could do the same and compare your solutions.
I learned Ruby using Ruby koans, and they are an awesome way to learn any language. There is a set of Javascript koans.
Try them for a day or two, use it if you like it.
I would suggest reading everything Douglas Crockford has to say about JavaScript, reading The Good Parts, writing as many programs as possible and running them all through JSLint with "the Good Parts" and rewriting them until it stops complaining, and reading the source of jQuery. It also wouldn't hurt to read Dmitry A. Soshnikos' rendition of the ECMA-262 spec. (It's very specific and goes into minute detail but it also covers every possible aspect of the language)
It would probably be good to mention that you don't need to follow Crockford's conventions to the letter if you don't want to (though I would recommend writing for ES5 strict) but limiting yourself to them while you learn the language is definitely the way to go.
Check developer.mozilla.org
I'd try out http://www.codecademy.com/ They are fairly new, and offer a nice step by step lessons that require bits of code for each step. They have some nice challenges too (build a cash register, build a blackjack game). The forums are extremely helpful as well. Best place I've found to learn javascript.
I have checked out so many guides online and came to these conclusions:
Check out Codeacademy for the basics. After you're finished there, go to javascript.info - this guide covers a LOT and is very detailed and well explained, with exercises.
i used http://w3schools.com/js when i first learnt JS - they have a functional but far from great 'try it yourself' editor to modify their examples, not quite the same as exercises but may give you the same benefit (fiddling to better understand)

Categories

Resources