I\'m a reasonably experienced programmer trying to learn web developement. I\'m
ID: 649971 • Letter: I
Question
I'm a reasonably experienced programmer trying to learn web developement. I'm trying to develop a client-side web application which uses svg or canvas for graphics. I've decided I'd like to write the application code in Coffeescript. I don't know either Javascript or Coffeescript.
How necessary knowing Javascript to Coffeescript web development? Am I likely to hit some gnarly problem which requires me to understand Javascript? Can I work happily with Javascript APIs from Coffeescript?
Edit: I could easily learn the basics of Javascript in a week. I'm more concerned that Javascript seems to have a lot of hidden sharp edges. In the strangest language feature question on StackOverflow Javascript is one of the most common languages. It has an unusual object and class model. It has non-obvious name scoping rules. I find it takes more than a week for me to really know a language.
I'm going to work on a small simple project to learn web development. Would I be better off to use Javascript or Coffeescript? I think in the long run I'll prefer Coffeescript but I'm willing to start with Javascript if that I'm going to need a thorough understanding of Javascript to use Coffeescript.
Explanation / Answer
I guess it wouldn't be absolutely necessary, but you'd hit roadblocks in the long-run if you don't.
You need to understand what's happening under the hood and what the CoffeeScript compiler transcribes to, as that's what the browsers (assuming we're talking about using CoffeeScript in a browser environment) will need to interpret. Which means it's also what you'll need to debug, especially considering CoffeeScript is fairly recent and we may still come across some rough edges and bugs in its transcription mechanism. Also, if not using any bespoke debugging tools for debugging, you'll need to jump through the generated JavaScript code to debug using Firebug or Chrome Dev Tools or your JS console of choice. In some cases you'll be able to see how the JS error relates directly to the source CoffeeScript statement. In others, as the transcription is non-trivial, it will be difficult to understand.
Take it this way: you can very well develop software in Java and C# without having ever done any low-level development. Yet you'd have a very bad time understanding what's happening and why you hit performance bottlenecks and memory issues if you have no clue and are unable to make an educated guess about what these languages' runtimes need to do for you in the background, and what part of the guesswork they may screw up because they simply cannot pull off miracles.
Additionally, if you learn JavaScript, you'll get to realize how incredibly more difficult it can than it originally seems, and you'll appreciate CoffeeScript for its terse and clean syntax even more :)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.