5 ms·
I taught a new programmer in my department JavaScript and CoffeeScript. Yesterday he told me he saw Notch coding a 2d version of minecraft in Java at a hackaton
by radagaisus 15y ago
I taught a new programmer in my department JavaScript and CoffeeScript. Yesterday he told me he saw Notch coding a 2d version of minecraft in Java at a hackaton online, and how weird is the difference between CoffeeScript and Java.
Maybe for us there's nothing new in CoffeeScript. Heck, the patterns of programming in javascript, callbacks, functional programming, prototypes, closures, the context of this -- for him it's a lot of stuff to learn and unlearn. Sure, I came with experience in ruby and python, so learning coffee script was just one happy afternoon, but for him it is a language worth learning. keep that in mind.
For me, the web is a wild beast we are training. Rails, Coffee Script, and even more importantly - Twitter's Bootstrap are tools we use to express our products in a higher domain language. Bootstrap gives us a common UI for the web that is both beautiful and usable. The fact that I could strap in a day a snappy ajax file upload with plupload into my coffee script view means I have more time to focus on my product instead of my code. That it is less painful to change stuff. Do you ever look at your PHP code from the old days and you admire it? I admire it. I wrote crazy stuff back then. I wrote wrappers and classes and 10,000 lines of utilities just so I can put up a website half the quality of today's websites in double the time.
1. Coffee Script is a DSL for writing damn good websites.
2. (and imho) Coffee Script is a great language.
- malnourish 15y agoSo I'm going to learn either JavaScript or CoffeeScript over January. I have some experience in VisualBasic (took a high school programming class about four years ago). Which one should I learn?
- DanHulton 15y agoJavaScript, easily. I'm a huge, huge fan of CoffeeScript, but JS will be far more useful to you right away, and your knowledge of JS will help you understand CS more when you learn it later.
- quanticle 15y agoLearn Javascript. Coffeescript is defined in terms of Javascript. If you don't know Javascript, learning Coffeescript will be unnecessarily difficult, because you'll have to go back and learn Javascript in bits and pieces as you learn Coffeescript. If you learn Javascript first, learning Coffeescript will be easier, because Coffeescript will build upon your Javascript knowledge.
- stickfigure 15y agoTo re-emphasize this point, there is no "choice" involved. You cannot understand Coffeescript without understanding Javascript... it almost looks like you can at first, but at soon as you start debugging you're back in "what is this prototype thing?" On the other hand, after you work with Javascript for a little while you quickly start wishing for something like Coffeescript. It's a very natural transition, but you can't short-circuit the process.
- dpritchett 15y agoJS first, and be sure to use this excellent guide: http://eloquentjavascript.net http://eloquentjavascript.net It really covers the how and why of JS in a way that will make your understanding sharper.
- debaserab2 15y agoInteresting that you point out Twitter Bootstrap -- which to me is becoming the great equalizer for new product/startup websites and a hallmark of lack of creativity or any sign of thoughtful design. Sure, the UI is great, much like the design patterns that Coffee script creates -- but what it signifies is a "dumbing down" of design much like Coffee script does to it's programmers. In Java, good design patterns are defined and publicized, but it's up to the programmer to implement the design pattern, not the compiler. It's that sort of freedom that I feel is necessary for anything truly creative and innovative to be created.
- radagaisus 15y agoCreativity is awesome. not in the UI. For me it means less time focusing on my product and more on remembering to make button:active look like it's pressed. for my users it means another UI to learn. Think about trello. After two minutes on the site I was like "hellll no, I ain't gonna learn how to use this!". The UI scared me, it was too different with too little explanations.