I can recommend a good books for you to read for JavaScript. Try find JavaScript: The Good Parts by Douglas Crockford. It's very short (176 pages) for a technical book and makes it a lot easier to understand the language.
What specifically do you hate about JS?
Imposter syndrome is a lie, your only a fraud when you’re intentionally scamming people 😜
There are a ton of resources online, one I recently went did a refresher with and found helpful is JavaScript: the good parts.
https://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742/ref=nodl_
It is relatively cheap and does a great job going over all the essentials.
I don't think there are any good books out there that are bound to node. There seem to be a few JS books worth noting but the only one I ever read was Javascript: The good Parts. It's a fine read but pure JS.
If you want to dig into nodejs just search for talk on youtube and begin to lurk in this sub. Sometimes you find great talks/reads that you'll adapt rather quickly.
The problem is that any book written will be outdated extremely fast.
You should be careful about ragging on JS - while it's sometimes fun, the loudest JS-haters are universally just ignorant or unskilled devs. Which, of course, are very common in webdev...
I'd recommend Crockford's Javascript: The Good Parts if you'd be interested in a more positive perspective.
Yeah and it's probably not fair of me to dismiss JS before reading about The Good Parts. That said I just looked at TypeScript again. Looks interesting and has some IDE support. I'll keep it in mind next time JS makes me want to drink a Gin & Clorox just to make the hurting stop.
Best way to do it is to learn by doing. Bury yourself in a personal project and use Google as your best friend. I'm unsure of what type of code you are looking to write but if you are leaning towards Front End development and would rather read a book first, Javascript: The Good Parts was a good read.
I found that this book was great for improving my knowledge of JavaScript to really jump to the next level in my JS expertise: https://www.amazon.co.uk/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742
I found that after a few years my JS knowledge was still quite limited and it took me reading this book to really understand how little I knew.
It's very easy to fall into the jQuery trap as you have highlighted as well. I use jQuery in my workplace as I have no choice, but I find using things like OOP as well can really help when you start building larger scale applications.
My main advice would be to improve your knowledge on core JS and CSS and avoid being sucked into libraries / frameworks / toolsets, they will come and go whereas JS / CSS will always be around. Many developers burn through time just learning things like bower, webpack, sass, jasmine, react, react-flux etc etc. I tend to stay away from trends and learn only what's popular on the job market. I always find that if you understand JS / CSS, you often can pickup any other framework built on top of it. I also burned a lot of time learning Angular 1.x which I never ended up using (except for side projects), with Angular 2.0 coming out it made me realise I need to be very careful when investing time into something which might not exist a year from now, or at least not have a demand on the job market for.
no can do ... don't actually play eve - just a historian. but good luck, happy to hear you're trying to reinvigorate it. douglas crockford's "Pandemic Legion - the Good Parts" is one of my favorite books
What /u/vikeen said are good resources. If you want to get some books, there are some good ones out there.
Javascript: Good Parts - Goes over some of the concepts of javascript and lingo. Not really a tutorial but its a good start. You might not pick up everything at first but it'll be a good reference to have.
There are a lot of good guides out on the internet. So the books are outdated a little bit. Check the sidebar and look at the Get Started section.
Also for an extra challenge to your example, now try to put in error handling ("Please fill out both boxes") and also instead of an alert, put the message into that extra div you have.
Learn Javascript. There is no point in being a web developer without knowing it. It is the language of the browser. It is a bitch at first, but once you get the hang of its nuances, it is awesome for those reasons. I used to hate it, now I love it.
My suggestion is play with it, have it drive you crazy, learn how to use it. Than read THIS book which will explain all those things that confused you.
This is more "overall front end" related and not so much design related. I would be willing to bet you'll have to do some JavaScript at some point. That being said, this is an essential book for anyone programming any JS at anytime. Def requires some programming experience to read though.
Douglas Crockford's Javascript: The Good Parts is pretty canonical in the world of Javascript. I bought it after completing the Codacademy JS course and have read it a few times since then.
I learned JavaScript by just grabbing a JavaScript pocket guide and then practicing a bunch. I also like the book JavaScript: The Good Parts.
JavaScript can be quirky, but it's also a small language so it doesn't take too long to learn the fundamentals (though it can take years to really 'master').
There are so many resources it's hard to narrow them down, especially since I'm not sure what your current skill level is.
If you prefer books, JavaScript: The Good Parts is a good one.
My biggest suggestion would be to consume anything and everything you can get your hands on javascript wise. When you don't understand something, look it up. It all comes together piece by piece, pretty much on a as-needed basis.
I'm not sure if hardcore Javascript will always be expected but if you want to get up to speed on it, Javascript, The Good Parts is a great place to go. Also (amusingly) very short!
Html5/Css is the future of web. I'd suggest you learn javascript too, It's a must in the current trend. I'll go a step ahead and suggest you this book JavaScript: The Good Parts! I've used GoDaddy on 2 of my sites and I've never had an issue with cookies. I use Godaddy to re-route requests to my hosting provider site. So cookies shouldn't be an issue
If you hate JS because it's confusing at times, spend some time to learn it. Most every web dev started off hating it, so you aren't alone. JS is a beautiful, elegant language if you learn how to avoid the bad parts.
The second generation of Javascript, hopefully. Yet nobody is even talking about it right now, when it's the most sorely needed aspect of moving to a truly open and rich experience.
For more evidence of why Javascript in its current form is "not that great", I urge you to read the "Awful Parts" and "Bad Parts" sections of the book Javascript: The Good Parts.
When I was starting to learn JS which was not that long ago at all and I am still learning I started with this video series: https://www.youtube.com/playlist?list=PLz5rnvLVJX5VdVNddvRTj68X6miAWQ5pz
.then this one https://www.youtube.com/playlist?list=PLz1XPAFf8IxbIU78QL158l_KlN9CvH5fg&disable_polymer=true
.then this one https://www.youtube.com/playlist?list=PL4cUxeGkcC9jAhrjtZ9U93UMIhnCc44MH
.then I read: https://www.amazon.com/gp/product/0596517742/ref=oh_aui_detailpage_o07_s00?ie=UTF8&psc=1
.then I read: https://www.amazon.com/gp/product/1430264489/ref=oh_aui_detailpage_o06_s00?ie=UTF8&psc=1 and https://www.amazon.com/gp/product/1118871650/ref=oh_aui_detailpage_o06_s00?ie=UTF8&psc=1
.then I read: https://www.amazon.com/gp/product/1491904240/ref=oh_aui_detailpage_o04_s00?ie=UTF8&psc=1 and https://www.amazon.com/gp/product/1491904240/ref=oh_aui_detailpage_o04_s00?ie=UTF8&psc=1
.then When I felt like I had a good enough grasp on vanillajs I started a giant project in Angularjs. Where I advanced my skills with git big time. Other resources I used are: Atom: https://www.youtube.com/playlist?list=PLYzJdSdNWNqwNWlxz7bvu-lOYR0CFWQ4I
Rest api with MEN (lol): https://www.youtube.com/playlist?list=PL4cUxeGkcC9jBcybHMTIia56aV21o2cZ8
Docs are great for js: https://developer.mozilla.org/en-US/docs/Web/JavaScript
These were good for angularjs just incase you were interested: https://www.youtube.com/watch?v=FlUCU13dJyo&list=PL4cUxeGkcC9gsJS5QgFT2IvWIX78dV3_v
Honestly I cant link one of this guys videos because they all help sooooo much: https://www.youtube.com/user/shiffman
I would have also included:
https://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742
However at this moment in time I can no longer recommend it... we've just moved too far ahead in the JS world.
https://eloquentjavascript.net/ is a great one that start from zero and covers many interesting topics. It has an online version with interactive code snippets, which is great.
There are many other:
http://speakingjs.com/es5/index.html
https://www.amazon.es/dp/0596517742 (a classic)
https://leanpub.com/composingsoftware (a bit more advanced)
I can definitely relate, this sounds just like me last year! I've done things the hard way and it took me 5x longer. I also prefer screencasts to books. I always need to create a project to solidify those fresh skills, otherwise they'll be gone in a month. Also tutorials for things like Backbone assume you know how to use jQuery, Underscore, and things like REST, and JSON responses... this can quickly get confusing if your not familiar with all of these. My largest regret is not building enough practice apps in the last year. I really should have applied more by doing, instead of staying in the theoretical world.
Here are some insights that i've made and the courses/tuts/projects that helped me the most:
Take some time to start optimizing your development environment, the Paul Irish explains it very well below, but some of the topics are a bit too advanced for now (modules, build tools, etc...).
Setup a jshint plugin (~4min above), read the website/docs for all the options. http://www.jshint.com/
A more entry level talk on setting up your environment Front-end Tools for the Young Developer
Though very cliche at this point, read through this classic. If you don't really understand it all 100%, make sure you hang on to it though as it gets better with age. Try and follow it as close as possible, then later feel free to break the rules. By then you'll know why you can break them.
This is a great library that gives you a lot of cross browser ES5 features and features that should be in JS. Not a lot of tuts on this one, reading the docs and source helps a ton here.
There are lots of these libraries but Backbone is the most popular and easiest to learn. Keep in mind this is a library, not an entire framework like ember. This means in a larger app you will essentially use Backbone to help build you own SPA framework for your app.
I really like Nicholas Zakas's book over the definitive guide. I find that he is able to tell more of a story and makes it easier for me to absorb.
Make sure you're comfortable with everything before moving onto testing... this includes frameworks etc.. Learning testing will only slow down the learning process if you're not comfortable with the rest. Mocha is the newer test runner and is better with async. However, Jasmine is very popular and time tested. The "Lets code javascript" below is an awesome course. Don't let the first sections turn you off, they may seem tedious at first (integration server, etc...) so feel to skip to dom/browser testing and then loop back when testing is more normal.
I just started sketching out a website to try and solve this problem. It has different paths to follow to fill in gaps of JS knowledge quickly (much like hackdesign.org)... unfortunately it's not finished yet! Watch LevelUpJS on Github in the future. I also have some more links on app architecture and things like modules but this list is getting a bit large!
Cheers and good luck!
Javascript: the good parts -- Amazon
Eloquent Javascript -- free ebook
Javascript Allonge -- free ebook
Eloquent Javascript is a great introduction to JS. The Good Parts teaches about what parts of JS to use and good coding practices (though some JS devs disagree with Crockford, every place I've worked that started implementing all his recommendations immediately saw reductions in code issues). Javascript Allonge is the greatest intro to functional JS that I've seen. These three will take you from beginner JS dev to intermediate JS dev. Practice will take you to advanced JS dev and reading lots of nuts and bolts blog posts will take you to JS expert.
I had a great deal of luck with the book "Javascript: The Good Parts". It's a quick read and is aimed at people who are not new to programming.
O'Reilly Publishing: http://shop.oreilly.com/product/9780596517748.do
Amazon: https://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742
https://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742/
Actually that ISBN is on sale for $13.69 :)
Crockford has advocated for "the next language" for the entire past decade.
That next language is already here in the form of "The Good Parts" of JavaScript.
https://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742
Got it.
I recommend continuing to use TOP as your learning framework, but if you don't understand anything they're trying to teach, these resources will explain things better:
https://developer.mozilla.org/en-US/docs/Web/JavaScript
https://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742
"Javascript, The Good Parts" is always worth a read.
https://www.amazon.co.uk/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742
Αγαπω αυτο το βιβλιο. Το διαβασα καποτε οταν ειχε βγει η πρωτη εκδοση, το τσεκαρω οποτε βγαινει καινουρια εκδοση. Οπως βλεπεις δε χρειαζεται να το αγορασεις, δοκιμασε να του ριξεις μια ματια μηπως σε ψησει (αφιερωσε ξερωγω μιση ωρα).
Επισης παρα πολυ χρησιμο οταν εχεις ηδη φτιαξει αρκετα πραγματα (οχι για να μαθεις, αλλα για να μαθεις να κοιταζεις τη γλωσσα πιο προσεκτικα), ειναι τουτο.
Η γλωσσα πλεον αλλαζει γρηγορα, κυριως προστιθενται πραγματα, ο καλυτερος τροπος ειναι να βρεις κατι που σε ενδιαφερει να φτιαξεις και να ξεκινησεις να προσπαθεις. Ε και οταν δουλεψει κοντα στο πως το θες, προσπαθησε να το φτιαξεις καλα.
Οπως και να το πιασεις, να θυμασαι οτι το να γραφεις κωδικα μοιαζει με το να παιζεις ενα μουσικο οργανο. Οσο πιο τακτικα το κανεις, τοσο πιο γρηγορα θα μαθεις. Οσο περισσοτερο το απολαμβανεις, τοσο πιο καλα θα μαθεις. Θελει καιρο, γινεται λιγο λιγο, αλλα οταν περασει ο καιρος ειναι (για καποιους) πολυ πολυ ευχαριστο!
Καλη αρχη με τη js!
I think one of the challenges is that when doing web dev, you've got three separate things to learn:
It can be really easy to confuse yourself if you try to master all three at once. And that's assuming you're already totally solid on HTML and CSS, but there's always more to learn there.
To better understand JavaScript as a pure language, try:
https://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742
After that I'd recommend trying to build some really simple sites using "vanilla JS" to manipulate the DOM. Make heavy use of your browser's developer tools and get comfortable making things move and appear and fill in using JS.
Finally when you're getting the hang of that, add in React or some other front-end framework, which makes your life easier. Ideally you understand the underlying JS at that point so it isn't "magic", it's just a time-saver.
Erről jut eszembe, van egy jó könyv: Javascript: The good parts
https://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742
JavaScript the good parts
https://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742
Di libri riguardo React qualcosa trovi, ma poco di aggiornato; ti consiglio di studiare direttamente le loro doc, sono aggiornate, gratuite e scritte da chi React l'ha sviluppato.
https://reactjs.org/docs/getting-started.html
Su Node.js sicuramente qualcosa in più trovi a livello di libri trovi, prova Mastering Node.js, ma non leggerlo tutto, usalo come documento da consultare nel caso ti vengano dei dubbi mentre realizzi il tuo progetto.
Se poi vuoi provare con Python vai con Python, fai quello che ti attira di più, tanto se la cosa che ti interessa è lavorare, come peschi peschi bene :D
Un libro che invece mi sento di consigliarti è JavaScript: The Good Parts, un classicone di Douglas Crockford (per intenderci il ragazzone che ha tirato fuori dal cilindro JSON). Non parla né di React, né di Node.js, è un libro solo su JavaScript.
If there's any book I absolutely recommend reading, it's Addy Osmani's book on design patterns: https://addyosmani.com/resources/essentialjsdesignpatterns/book/
I really like these books as well:
I can help you a little with identifying your criteria - it doesn't really matter where you get your information as long as it covers some of these topics, as I feel these are the trickiest parts of the language that are paramount to writing good code - so learn them ASAP (some points will be labelled "super important" - treat any point mentioning "asynchronous" as "super important" too):
0.1 * 02
=== 0.020000000000000004
Date
weirdnessArray
is also an Object
this
keyword and function context (fn.bind
, fn.call
, fn.apply
) (super important)Personally, I find I learn best from books but only for two narrow facets: theory and reference.
The books everybody recommends are:
That first one can be read online.
Once you get past the how do I write code basic literacy stuff and really want to step up into architecture you might want to get a little bit of Lisp and Scheme. The fundamental concept to learn in this language is scope. In my experience computer science grads tend to learn things like C++ and Java or C# and work really hard to get really good at OOP. Those techniques of inheritance aren't quite so helpful in this language if you never learn this language's scope model. If you fall in love with the scope model you might find you don't need the OOP/inheritance stuff.
When you are ready to interact with the web here is a quick guide I wrote to teach DOM access: http://prettydiff.com/guide/unrelated_dom.xhtml Could you let me know where this guide fails you so that I can improve it for other people?
Specific questions will be more helpful, but some general good places to start for javascript:
A Javascript Primer for Meteor - https://www.discovermeteor.com/blog/javascript-for-meteor/
This is my favorite introductory document on Javascript as a language, even though it's geared toward building apps with the Meteor framework it applies mostly to the language itself and is a good read even if you don't plan to use Meteor.
Javascript: The Good Parts by Douglas Crockford - https://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742
Very good and to-the-point book by one of the best JS experts out there.
Learn pure JavaScript. It will not only help when learning new frameworks but will also help you to realise that frameworks are not always necessary and by understanding them better, will not rely on them as a crutch.
From my perspective, these two books helped me "level up" from jQuery to full-blown JS developer: https://www.amazon.co.uk/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742 https://www.amazon.co.uk/Learning-JavaScript-Design-Patterns-Osmani/dp/1449331815
I am also a member of Udemy, which has a great selection of courses to work through.
Once you understand JavaScript without frameworks, just pick up a framework and start playing with it. Do the tutorials or pick your own goal/application to build with it. I find I learn more than doing something rather than simply reading about it.
I just started reading the You Don't Know JS series.
I would also second the recommendation of JavaScript The Good Parts.
The first series actually seems to cover everything that The Good Parts avoids. You get the better parts of JavaScript from The Good Parts, and then the You Don't Know JS series goes nitty gritty into all the terrifying places in the language. But seems to cover it more as a whole.
Granted, I haven't finished either the series or the book, but have heard amazing things on both of them.
Douglas Crockford - Javascript: The Good Parts
I thought this was an excellent book when I first started learning Javascript.
This seems like a good follow up. I am currently reading this now.
I'm just starting with this book, but I've heard multiple people / podcasts talk about how great it is.
http://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742
Every company has their own benchmark for junior devs. My one piece of advice here is when you're interviewing really grill the team on how they plan to help you grow, and what mentorship opportunities. It's kind of sad, but there are a lot of startup-y companies out there that like to burn through junior front end devs and then fire them 6mos later because they're "not growing" all while not providing and time or resources to learn.
Frontend is a decent place to start, many backend roles will give you very math/algorithms heavy interviews which can be hard to pass without a CS background. Frontend interviews tend to be more about practical skills.
You're right in thinking angular, react, whatever comes after that are fads. Learn javascript properly, all the ins and outs and quirks, once you know that it's easy to pickup the framework of the month. I highly recommend javascript the good parts and javascript ninja
Probably node.js stuff. Starting with it setup basically just as a JS environment and working through standard programming problems (CodeWars/Project Euler). Then you could go on to larger node projects (although I suppose you'd also be learning node at that point). Oh or there are some good books out there (Eloquent Javascript, JavaScript: The Good Parts)
and while you're there, if functional JavaScript really is what you want : Functional Programming in JavaScript
>However I feel massively underprepared in trying to put all this together.
>It should be such a simple application but I find this very hard to follow what's going on.
You just need to practice more. JS arrays, objects with nested objects/arrays, anonymous functions etc
If you think a stopwatch can be written easier, why not try to do it? Here is an example of an easier one.
Honestly the code in this example is an absolute mess, and I'm not even going to attempt to interpret it. Using javascript, it's really easy to write awful code. So check out this book so you avoid all the bad parts of JS
http://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742
Wow thank you! I really appreciate the time you put into this and the level of detail.
It's encouraging to hear that I still have a chance without the CS degree.
I tried to get into programming on and off over the past year, but recently something clicked and I finally feel comfortable sitting down in front of blank screen and just typing away. Prior to this I'd feel paralyzed at times by the amount of resources available and found myself constantly reading tutorials and never writing anything of my own.
I still bounce around a bit, but it's more directed, or at least feels that way. I had tried CodeAcademy in the past and was disappointed that it mostly just teaches syntax, and never really imparts the sort of conceptual understanding needed to build an application.
Today I've worked through CodeSchool's 3 part course on JS as well as their primer on Angular. I also picked up Crockford's JS: The Good Parts and JavaScript Patterns, which I've been reading and taking notes on.
Other than that, been trying to explore and understand a few other pieces of the puzzle:
And of course trying to build my first project. I'm interested in Lucid Dreaming and am trying to build a basic SPA that allows a user to record their dreams with some additional data, tags, level of recall, stuff that a basic journal application wouldn't support. And eventually provide some interesting statistics / insight. Implementing everything in LocalStorage first to keep things simple and hopefully learning Node and asynchronous programming down the road. I'm sure someone with experience could knock this out in day, but it's been a real learning process and overall enjoyable.
I could stand to learn Git and DevTools better, and will continue to work on those.
Definitely rambling here, but trying to convince myself that I'm on the right track and that I can truly make a career out of this one day. Alternative is a somewhat mundane existence of 50-60k and YOY raises of 3-4% in automotive barring a promotion to management or choosing to grind it out in the financial sector. The lifestyle and benefits of a programming career seem very appealing and I hope to one day even work remotely and travel the world a bit.
So thanks again for taking the time to help out a complete stranger, it means more to me than you might realize.
I recommend reading this book: http://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742
Note: I haven't actually read either of these, but they do have good reviews on Amazon. :-)
Here's a fun video from the author of JavaScript: The Good Parts: https://www.youtube.com/watch?v=hQVTIJBZook&t=2m24s
> Part of the desire to pick up R is due to many of my younger colleagues using it in lieu of SAS and from what I can tell it outputs results tables and fit statistics for your models. I am not aware that python can do the same. In SAS I use a combination of Factor Analysis for variable reduction and Mixed Effects Analysis and I like the iterative model building aspect there.
I believe Python can do the same thing (if you install the appropriate libraries), but if all your younger colleagues are using R, then I think you should definitely go with R instead of Python and stick with what your community is doing. It'll make learning much easier.
> As for PHP v Python I saw a book that said PHP plays well with MySQL which plays well with online databases.
At this point in time, pretty much any programming language that plays nicely with the backend will play nicely with databases by default -- PHP no longer holds any particular monopoly on the topic.
To me, the main advantage of PHP is that you can start off with pure HTML and slowly mix in PHP as needed -- it makes the learning curve much easier. In contrast, if you start off by using something like Ruby or Python, you'll need to learn that programming language in order to be really productive in it.
I think the main downside of PHP is that it tends to be made fun of and disparaged by many programmers -- see PHP: a fractal of bad design for the canonical anti-PHP article. If that sort of thing bothers you, I would avoid PHP. If not, go right ahead. You'll still get a good learning experience either way.
If you do decide to go with PHP, I would definitely make sure to bookmark and constantly reference PHP: The Right Way since a lot of texts and online tutorials on PHP tends to teach and propagate bad practices.
> I don't mind adding JavaScript to my list as I realize this is more than a weekend project.
Cool! Like I said, you can probably add it in a little later, once you get the core of your project down.
I believe CodeCademy and HtmlDog both have tutorials on JavaScript. JavaScript can sometimes be a fuzzy language/difficult to get a handle on, so some good intermediate-level resources I would recommend are Eloquent JavaScript and JavaScript: The Good Parts.
Javascript: The good parts is the holy grail, but if you're not big on reading, CodeAcademy's course takes you up to Object oriented programming basics. Once you've got the basics nailed there are more resources to really get your mind around computer science, programming patterns and so on, such as Addy Osmani's learning javascript design patterns. All of this knowledge is useless without application though, so make things!
That's pretty great that you got it to work! Here's an example of how you can put row and column headers using CSS flexboxes and a bit more JavaScript: http://codepen.io/phantomesse/pen/WbJYam You can click on the row and column headers to select the products in the respective row/column.
I noticed when I was going through your code that event.detail
doesn't exist in the newest version of jQuery UI , so I replaced the part if (event.detail == 0)
with if (event.originalEvent.type === 'mousemove')
. I'm not too familiar with jQuery UI, so I'm not sure if that's bad practice or not. The following block:
if (event.originalEvent.type === 'mousemove') { select_range = true; return true; }
makes sure that you will always select the products if you select by dragging across the products with a mouse. I've commented it out, because I think that it makes sense for someone to want to drag across the products to deselect them.
I haven't really read many books on programming, but I've heard that JavaScript: The Good Parts is very good.
https://egghead.io/ has some nice, short videos in their free section. Also: Javascript, the Good Parts (http://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742) and Eloquent Javascript (http://eloquentjavascript.net/) are good resources
And if you look at the comments attached to that same thread youd see :
> "Good coding practice" should never be sufficient reason in itself. It amounts to "some guys on the internet said this is how my code should look".
And if you bothered to actually read Crockfords notes on this matter :
> All variables should be declared before used. JavaScript does not require this, but doing so makes the program easier to read and makes it easier to detect undeclared variables that may become implied globals. Implied global variables should never be used. Use of global variables should be minimized.
> The var statement should be the first statement in the function body.
> It is preferred that each variable be given its own line and comment. They should be listed in alphabetical order if possible.
Source : http://javascript.crockford.com/code.html#variable%20declarations
Youll see that he never says 'always using var is good coding practice'. He says to declare them before use (and I suggest giving them a value too), but nothing about requiring var or var being part of good practices. And why is this? Because traversing up the scope chain (or not) is a feature of the language, and not a bad one if you bother to watch his video or read his book.
Crockfords video (should be required watching for all javascript devs) His video : https://www.youtube.com/watch?v=hQVTIJBZook
Thank you! I'm a software engineer, created this site in my spare time after work...
I just wanted to learn JavaScript and in the first month I read JavaScript: The Good Parts during commutes to work. In subsequent two months I created my own graph drawing library: VivaGraphJS - it's open source. And just recently I started using it to create something (hopefully) useful.
http://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742 Use async for the ridiculous amount of callbacks you have. Look at some examples on proper form. Always define all variables at the top of a function. Use closures. It is a best practice to use var as least as possible. Example with proper structure; https://github.com/Thuzi/facebook-node-sdk/blob/master/fb.js
off topic for /r/php, sorry
If you're going to learn JavaScript, I highly recommend JavaScript: The Good Parts by Dogulas Crockford. I also have an older edition of JavaScript: The Definitive Guide as well, and I use it weekly at least. Don't know how up-to-date the latest edition is, though.
I also recommend watching Crockford's five-part series on YUI Theater. He's actually quite entertaining.
When you're done with simple little scripts, and you are ready to write full applications in Javascript, read this book.
JavaScript: The Good Parts is also highly recommended,
It's from this book, page 21. I noticed it myself a few days ago
Be careful when learning Javascript, there are lots of poor resources out there that teach Javascript in a completely wrong way. Most of the time, it's because the author has come from a background of a class based language, doesn't really understand whats going on in Javascript, and then writes a crappy book.
Two good resources that I have come across are:
Javascript: The Good Parts, by Douglas Crockford. In addition, Crockford also has several great videos to watch online.
The Mozilla Developer Center is great for both Javascript documentation and learning.
Object Oriented Javascript by Stoyan Stefanov
But CS1371 touched exactly none of these things. They should just fork all that into a new class. Maybe call it Matlab: The good parts or something.
PHP is slow, and has even more broken auto-type-conversion corner cases than JavaScript.
If you follow the JavaScript: The Good Parts approach, you actually end up with a good language (subset). With PHP...you've got the ugliness of a language with poor design without the benefits of the powerful features hidden in JavaScript's design.
And Node gives you an amazingly powerful dependency management system (npm), so including specific features in your app (or in your development toolchain) is trivial. The tools include great build systems and linting tools as well, which get you past a lot of the limitations of using a dynamic language to begin with.
And as another person mentioned, having the same language on client and server is a huge plus.
Highly recommend Javascript: The Good Parts
How's your javascript?
This doesn't sound like a bad way to learn. But I wouldn't recommend using it for live production because you probably don't know about programing design patterns to make good reusable code. And if you learn from tutorials you'll learn a lot of anti-patterns.
If your Javascript skills are poor, you'll need to first learn the basics. So I'd recommend buying Javascript the Good Parts. It'll explain some of the anti-patterns to avoid and how to use JS. If you don't understand all of it, it won't matter at first, so move on to the next read.
Then work through Eloquent Javascript. It's a great tutorial to follow up to use all that stuff you just learned from Douglas Crockford.
Lastly read Learning Javascript Design Patterns and pick a few patterns you like and keep with those.
Now you can make a Javascript Web App using nodejs and raw javascript. Though learning a framework will be very helpful to speed up production.
I recommend these books (in this order):
Javascript is a hopeless morass of kludgey code masquerading as a working language, but here's a shot: read Javascript: the Good Parts by Douglas Crockford. Also note the following: * Javascript has first class functions, unlike java. * Javascript has prototypal inheritance, which will throw you for a heinous loop if you're enamored of classical inheritance. * Javascript arrays aren't arrays, they're dictionaries. * Any object in javascript is a dictionary with some additional sugar. * NEVER use the 'with' key word. It's ill-defined and has multiple possible valid interpretations. * Javascript has no linker, and as such has one global namespace, so it's a good idea to wrap the code in your files in js objects to fake modularity.
Javascript has so many features - many are considered bad. I learned Javascript from reading this book many years ago. It teaches a good foundation that you can build upon after.
https://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742
"Javascript: The Good Parts" https://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742. I think it is must read for any js beginner.