Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Why You Need to Learn JavaScript (w2lessons.com)
52 points by mwbiz on Jan 16, 2011 | hide | past | favorite | 24 comments


Why not take a functional approach with JS as opposed to OO?

I do agree with the article in the importance of learning javaScript though as I'm in the midst of a few thousand lines of js (using backbone.js) to bring real power to the browser side (with a Lisp backend).


gibsonf1 I agree that a functional approach is equally powerful as an OO approach. I focused on an OO aproach as this is what I have the most experience with and this is what Dojo is geared towards.

The intent of the post is to entice server side programmers to learn JS and to take a rigoruous approach to writing JS code. Whether it is functional or OO is irrelevant as long as you write great code, so your point is certainly worth mentioning.

Thanks for the feedback


Sorry if this is off topic but how has been your experience with backbone.js. There is some information out there but no first hand account of building a large app with it.


Backbone is working really well so far, an impressive framework.


Would this be better labelled "Why web programmers need to learn JavaScript"? An awful lot of programmers will never need to touch any JavaScript.


Context: It's an a a blog called "Web 2.0 Development and Business Lessons".


Does anyone else find small light-grey text against a slightly darker grey background extremely hard to read? I'm guessing there may be some useful information in there somewhere, but I just can't see it (literally).


That's when you need to use Readability!

Seriously, I spend one second glancing at each page i'm about to read, and decide if i'll click the Readability bookmarklet. I find about 50% of the time I'll need to click, which is an unfortunate number showing how bad the typography is on many of the websites. Common mistakes include: contrast ratio too low (like this one); contrast ratio too high (white on black); fonts too small; text width too wide or too narrow; too much noise on the sidebar; blinking or moving ads in visible reading area; etc.


Thanks for the feedback. I have adjusted the colors to make it more readable, please let me know you still have trouble reading it.


Much more readable now.


Perfect, the feedback is much appreciated.


"After all, you wouldn't want to jump into Scala without learning Java first." Anyone have any opinions on this? I've never learned Scala but I didn't think Dojo : JavaScript as Scala : Java.


I don't think that is implied in the article, so much as the fact(?) that fully understanding one requires a healthy understanding of the other.

Question mark b/c I don't know Scala, but as it is a JVM language my guess is that you would need to know a bit about Java and the JVM to really grok it.


Yep geekfactor is correct. The Scala-Java relationship is not analogous to Dojo-JS and this was not my intention.


this is the sad truth.


I'll argue that not everything about this is "sad". Knowing JavaScript opens new opportunities when it comes to the kinds of products you can develop and kinds of audiences you can reach. You don't have to look at it as a burden. JS might not have the best design, but it's not horrible, either. It's just a tool, and it's up to you how to use it.


I agree with this and the Article, I was a front-end guy who became a good back-end guy, who spotted the opportunity early on for serious development work to be done back on the front end. There are not a lot of really good language guys over on the front end as the article implies, but I think that will change with time.

Just 2 years ago the whole thing was in flux, was Flash or Silverlight going to take the interactive web crown? Was a backend focused toolkit like GWT going to save the day and keep the developers on the back end? I would say that the score was not settled until as late as mid last year.

Around the time that jQuery was crowned king. Their is no doubt now where web development is heading, disconnected browser apps communicating to the server via REST and JSON. (can I take a moment to tell all the haters, I told you so). All kidding aside, now it just remains to be decided what the traditional pieces of that client stack are.

Dojo offers a compelling and robust toolkit, that I personally like very much and recommend to people doing large apps in the browser. Then there is jQuery, the juggernaut, with something like 40% of the mindshare it hard to not declare jQuery the winner and move on.

The problem is for large application jQuery on it's own falls down miserably. It has to be paired with the likes of backbone.js and underscore.js to provide any basis for large app development and even then it is still a little more spartan to develop with the jQuery/backbone stack than it is Dojo.

While it is very easy to just call the game for jQuery, Dojo provide a scrappy underdog and a dark horse in this race. The point is, once "the one" toolkit is decided I think you will see more developer migrate over, and I think jQuery's dominance is starting to become that transition point. Making them feel comfortable about what they are investing their learning time in. This is an area where developers cant afford too many missteps and false starts in, if one wants to remain marketable they must choose the technologies that offer the greatest prospects, until recently that was not very clear on the client side.

For me, as of now, I keep one foot on each side of the fence until the dominate framework of the client side emerges. I think Dojo still has a long shot in this as people come over and realize that Dojo is the most robust toolkit available.


Why sad? Javascript is a great language, way ahead of it's time. Don't confuse browser DOM compatibility disasters for Javascript fail.


> Javascript is a great language, way ahead of it's time.

No. Javascript is at best a nod toward better-designed languages implemented two decades ago, or more. Look at Self, and Lisp before that. It's really appalling that the sort of flexibility Javascript provides is just now reaching the mainstream, in two-thousand fucking eleven.

If I'm missing something (and you're well-versed in the history of programming language design), feel free to tell me otherwise.


This book really convinced me that Javascript can be awesome:

http://oreilly.com/catalog/9780596517748

And of course there's all these fancy new things being built on top of it, like CoffeeScript. I just recently realized that it's not the horrible monster I always thought it was.


The awesome core identified in that book is borrowed from older, better designed, languages. They are new to you if you are from the C/C++/VB/Java world. But that doesn't make them new or original.

Incidentally you can find most of them in any decent scripting language, including Perl, Python, Ruby and Clojure.


Yea but I have to learn Javascript anyway (client side apps) so why hate on it just because it could be better than it is? It's not that horrible of a language, I mean it's not nearly as bad as PHP and loads of people like PHP while almost everyone hates on Javascript.


I was not hating on JavaScript. I was confirming the core of silentbicycle's comment by telling the truth about JavaScript.

As for why so many do hate on it, many workmen come to have strong opinions on their tools. JavaScript is a flawed tool that you're forced to use. So if its deficiencies grate on you, there is plenty of opportunity for them to grate more.

Incidentally your PHP comment is completely irrelevant. Sure, lots of people like PHP despite the fact that it is a horrible language. But on the whole, in my experience, it is a more widely hated language than JavaScript. This despite the fact that people aren't forced to use PHP.


It's not a horrible monster, it's just what happens when you have a brilliant programmer working on an ambitious project, but an early draft version's bugs get frozen as part of a de-facto standard. It could have been a really good language if it had a lot more time to develop.

While _Javascript: The Good Parts_ is good, it's hardly a ringing endorsement.

Lua is a very similar language, but had over a decade longer to develop, with a smaller circle of active users. It's fixed many of Javascript's design flaws.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: