JavaScript Cherry

A place to discuss the implementation and style of computer programs.

Moderators: phlip, Moderators General, Prelates

GangsterFiction
Posts: 11
Joined: Tue Jun 12, 2012 4:36 pm UTC

JavaScript Cherry

Postby GangsterFiction » Thu Jun 14, 2012 10:28 am UTC

I've recently decided I need to learn everything I can about JavaScript (to help with something else I'm working on) but there seems to be a huge range of books and websites on the subject. Where should I start?

Any suggestions would be greatly appreciated.

User avatar
PM 2Ring
Posts: 3713
Joined: Mon Jan 26, 2009 3:19 pm UTC
Location: Sydney, Australia

Re: JavaScript Cherry

Postby PM 2Ring » Thu Jun 14, 2012 11:34 am UTC

The w3schools tutorial's not bad, although it is getting a bit antiquated. OTOH, if you want to "borrow" older JavaScript code from the Web it's a good idea to understand how & why older code was written. :)

JavaScript itself hasn't changed that much in recent years, but HTML and CSS both have evolved quite a bit, and thus modern JavaScript coding techniques have changed as well, both to keep up with the new features and because we can now do things in a much cleaner way that required various stupid tricks in the Bad Old Days.

Some people criticize JavaScript as a poorly designed language. True, it does have some unfortunate "features" that allow (and some might say encourage) sloppy coding techniques, but IMHO it's also possible to write elegantly in JavaScript if you apply some discipline and avoid utilizing those undesirable language features (like "eval" and "with").

Hopefully, Xanthir will read this thread and offer some more modern suggestions re: JavaScript learning resources.

You need to be fairly conversant with HTML and CSS to utilize JavaScript effectively on a Web page. The w3schools site has good tutorials for HTML and CSS, but HTML Dog is probably more up-to-date.

Of course, once you get going, feel free to ask questions here, and to search the forum archives to see if your question has already been addressed. And stackoverflow also has excellent information in its archives.

User avatar
Xanthir
My HERO!!!
Posts: 5410
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex
Contact:

Re: JavaScript Cherry

Postby Xanthir » Thu Jun 14, 2012 5:54 pm UTC

I actually don't know much about good JS learning sites. I learned everything I know from personal practice and varied tutorials and examples everywhere on the web. :/

w3schools is the worst, though. I had to unlearn nearly everything I picked up from them. It's all horrible.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))

User avatar
darkone238
Posts: 111
Joined: Thu Feb 09, 2012 6:37 am UTC

Re: JavaScript Cherry

Postby darkone238 » Thu Jun 14, 2012 7:11 pm UTC

Xanthir wrote:I actually don't know much about good JS learning sites. I learned everything I know from personal practice and varied tutorials and examples everywhere on the web. :/

w3schools is the worst, though. I had to unlearn nearly everything I picked up from them. It's all horrible.

Obligatory link to http://w3fools.com/

I would suggest picking up a framework like jQuery, as it makes a lot of the annoyance of Javascript (such as dealing with cross browser compatibility) less of an issue (and it seems simpler to do most things). There is a lot of good documentation on the jQuery site as well as the broader internet as well (and a buttload of plugins/libraries).

User avatar
b.i.o
Green is the loneliest number
Posts: 2519
Joined: Fri Jul 27, 2007 4:38 pm UTC
Location: Hong Kong

Re: JavaScript Cherry

Postby b.i.o » Fri Jun 15, 2012 1:19 am UTC

PM 2Ring wrote:The w3schools tutorial's not bad, although it is getting a bit antiquated. OTOH, if you want to "borrow" older JavaScript code from the Web it's a good idea to understand how & why older code was written. :)

w3schools is fucking awful. It does a bad job teaching and teaches you bad practices.

Book: JavaScript: The Good Parts is the universally recommended book. I think it's a bit overrated, but it's still the best JS book I've read.
Website: The Mozilla Developer Center (Its JS beginner's guide is okay, it's a good reference in general, teaches good practices, and has good guides to doing some more specific things.)

User avatar
PM 2Ring
Posts: 3713
Joined: Mon Jan 26, 2009 3:19 pm UTC
Location: Sydney, Australia

Re: JavaScript Cherry

Postby PM 2Ring » Fri Jun 15, 2012 3:40 am UTC

Xanthir wrote:I actually don't know much about good JS learning sites. I learned everything I know from personal practice and varied tutorials and examples everywhere on the web. :/


Me, too, although I did get started via an ancient JavaScript book that a friend gave me which is very Netscape oriented.

Xanthir wrote:w3schools is the worst, though. I had to unlearn nearly everything I picked up from them. It's all horrible.

Ah, ok.


darkone238 wrote:Obligatory link to http://w3fools.com/


From the w3fools link:
W3Schools.com is not affiliated with the W3C in any way. Members of the W3C have asked W3Schools to explicitly disavow any connection in the past, and they have refused to do so.

Oh, dear. I wasn't aware of that. IMHO, that's more than a little deceptive...

And

W3Schools offers certifications whose value is highly debateable… No employers recognize or respect W3Schools certificates. Unlike Microsoft’s MCP or Cisco’s CCC, W3Schools has absolutely no authority over the technologies for which they claim to provide certification. Unlike CompTIA’s ANSI/ISO accredited certifications, W3Schools has no support from governing standards bodies.
W3Schools frequently publishes inaccurate or misleading content. We have collected several examples illustrating this problem below.

That's pretty evil.

Thanks for the feedback, people. I promise to never recommend W3Schools ever again, and I'll henceforth avoid using them as a resource myself. FWIW, I've never used them as a definitive reference, and I never liked their JavaScript style. :)

GangsterFiction
Posts: 11
Joined: Tue Jun 12, 2012 4:36 pm UTC

Re: JavaScript Cherry

Postby GangsterFiction » Fri Jun 15, 2012 2:42 pm UTC

Thanks for the helpful replies, guys. It's given me a good starting point, and I'll also be sure to avoid W3Schools like the plague!

webzter_again
Posts: 119
Joined: Sun May 27, 2012 4:37 am UTC

Re: JavaScript Cherry

Postby webzter_again » Fri Jun 15, 2012 4:46 pm UTC

I'm going to suggest something a little odd. It really depends on what you want to learn, how much you want to learn, and what your focus is.

Let's say you really want to do super-cool browser stuff. I'd very much agree with the recommendation for JavaScript the good parts and also jQuery. You can start by learning the absolute basics of jQuery, then advancing to using plugins, then writing your own simple plugins, then forking and changing some more advanced ones. The downside of this is that you're really learning JavaScript within the bounds of jQuery... but, that's ok to start.

From there, branch out into looking at some MV* frameworks and get a little stronger at doing different tasks to build simple browser apps. A really, really good place to start is TodoMVC.

If you can afford to, dropping the money (note, I haven't yet) on a subscription to the very excellent PeepCode. There's also the very free CodeAcadamy and Reddit University (no JS courses that I noticed on Reddit U.. yet). I've also heard good things about Code School (another pay one).

Now, on to my off the wall suggestion. Screw jquery and the browser stuff and all that. Sit down with node.js and write some simple apps from the backend first. Yes, you will still be working with a framework, but, you will be learning a ton about what makes JS awesome in, my opinion, a much quicker fashion.

GangsterFiction
Posts: 11
Joined: Tue Jun 12, 2012 4:36 pm UTC

Re: JavaScript Cherry

Postby GangsterFiction » Fri Jun 15, 2012 10:58 pm UTC

Thanks, webzter, lots of different possible avenues to pursue there. I had a quick poke around node.js (in particular) but I think there I may be in over my head at this particular stage--considering that I'm far from being the programmer 'type', at all. The most I've ever managed is some basic scripting (not entirely unlike the simplicity of basic html) so even thinking about tackling something like JS is a major, major thing for me. I may have to settle for a more orthodox route, but thank you very much for laying out so many intriguing options: I'm sure some others will find it very useful also.

webzter_again
Posts: 119
Joined: Sun May 27, 2012 4:37 am UTC

Re: JavaScript Cherry

Postby webzter_again » Wed Jun 20, 2012 4:03 am UTC

Saw this posted on reddit today; on a brief glance it looks fairly good: http://adamonio.us/wexcode/66/introduct ... avascript/


Return to “Coding”

Who is online

Users browsing this forum: No registered users and 11 guests