Writing ember plugins and tutorials in coffeescript is a bad idea


#1

Ember is a javascript framework, only a fraction of javascript coders write in coffeescript, when tutorials and plugins are in coffee script it just adds an extra hurdle to using them for most developers and reduces the usability. It makes no sense. Please don’t do it, it splits the community resources.


#2

I always curse silently under my breath when Ember blogs use Coffeescript. I agree that it muddies the waters and makes tutorials more difficult to understand for the majority of Ember developers and prospective developers. If you’re going out of your way to make an Ember concept easier for people to understand, it doesn’t make sense to add an unnecessary layer on top that readers have to first translate.


#3

Practically, I think you’ll see that the Ember community is already moving on to ES6, so you’ll find less and less Coffeescript anyway. It was a useful stepping stone.

But I will point out there’s an inherent contradiction in the above complaint: we shouldn’t use CoffeeScript because it’s a fringe thing that only some people understand. Yet you’re apparently encountering it so often you felt the need to complain.

It’s like the old saying “Nobody goes there anymore because it’s too crowded.”

If our standard is “being understandable to your typical Javascript developer”, Ember itself is far weirder than Coffeescript. Coffeescript is a very shallow one-to-one translation, whereas lots of concepts in Ember are fairly rich and have no analogs in stock Javascript. So I don’t feel particular sympathy when people complain about the difference between @foo and this.foo while happily dealing with more magical things like Ember.Object.extend.

I think it’s bikeshedding – people complain about Coffeescript not because it’s hard to understand, but because it’s easy to understand. Meanwhile they just accept all of Ember.Object because they don’t know how its internals work anyway and they’re not comfortable arguing for why it’s wrong.


#4

I disagree with the assertion that merely providing the impetus for a forum post means that it’s encountered very often. I can easily imagine that @mgenev encountered one or two tutorials on subjects he was very interested in learning about that Coffeescript made it difficult to understand.

Regardless, I suppose this really just boils down to the ubiquity of Coffeescript, which I know of no good way to measure. Because despite Coffeescript being a very shallow one-to-one translation, I still personally find that it makes code more more difficult to understand (which is obviously due to the fact that I don’t use it very often). If most developers were indeed more comfortable with Coffeescript than Javascript, then it may in fact be a good language to use in tutorials.

I do think it’s important to note however, that accepting Ember.Object.extend is necessary to understand Ember (at least as a beginner), whereas Coffeescript is certainly not.


#5

js2coffee.org is a great (and easy to use) resource for translating coffeescript into javascript (or vice versa)!

Interesting to hear @ef4 say ES6 will replace any need for coffeescript — I guess I need to start learning more ES6! :slight_smile:


#6

I think your point here about the relative difficulty of Coffeescript and Ember is a bit off base. I am new to ember and when tutorials have Coffeescript in them it does throw me off. Ember is what I am trying to learn, and so its particular characteristics, whether difficult or not, are part of that learning process, Coffescript is not. Its just another barrier and does make the whole process harder. When I’m trying to figure something out in Ember I dont really want to go off on some Coffeescript tangent to see what is being done.


#7

As a new ember developer, I couldn’t agree with you more. I started out with just a fundemental understanding of vanilla javascript, so I have multiple hurdles I face all the time… js > jquery > coffeescript > vanilla ember > ember-cli… whew.

In my learning efforts, I turn to blog tutorials a lot, and yes indeed, almost every one I found is written in coffeescript, and most bloggers fail to mention it. I remember running into the first one (not even knowing what coffeescript was) and then being totally stumped why i couldn’t get it to work.

However, I understand the value of the coffeescript, and eventually I will need to bite the bullet and get into the habit to keep production speed up… but at least for tutorials, meant for instruction, I would like to see just some regular javascript please.


#8

You are talking about things people are writing on their own time and sharing for your potential benefit. I have a few example projects out there and if i were constrained to not use coffee, I would definitely do less (and no one is forcing you to look at coffee projects).

If you are willing to try it, you may find yourself pretty fluent in coffee alot sooner than you think.


#9

Being new to ember myself, I think that post should have been phrased a little differently. There is no point trying to force people to not write tutorials in a certain language. The problem simply is that we don’t have enough tutorials. And if you are lucky and find one related to what you are interested in, chances are good it is outdated or it is coffee script (which doesn’t imply that the majority of tutorials are coffee script). But I am pretty sure by the time ember changes less dramatically and the more people using and writing about it, this will improve on its own.


#10

Blogs and tutorials written in Coffeescript is better than no tutorial at all, should it be the case for the write. Tbh. it is not that hard to find a online translater :).


#11

I can understand that Ember is hard to learn.

I can’t understand why some people complain about Coffeescript resources. Learning to read Coffeescript when you know javascript is a no-brainer. It should take roundabout one day and some lookups (http://coffeescript.org/). It will open your mind and improve your skills as a developer. It will help you to understand the pros and cons of JS and maybe one day you will understand, why languages like Coffeescript (CS is not the only one) emerged on top of JS. Furthermore you can use js2coffee to translate it to more or less readable JS.

If you are not a developer (e.g. you can’t distinguish between different languages and are not able to immediately see the difference of JS and Coffeescript) I highly recommend that you stop here, because Ember is a tough framework and needs a lot of developer skills. Ember has a lot of hurdles, but Coffeescript is the tiniest one. As you have seen Ember is relatively new and there are not that much high quality resources for learning. That means you often have to figure out how things work by yourself. If you are not able to use Coffeescript learning resources, then you are not able to use Ember in the near future. Just my opinion as a one year Ember.js and Ember-Data user.


#12

I am not paid to write about ember either here or on my blog. I do it for my own enjoyment, because I enjoy writing and sharing knowledge.

If I want to write in coffeescript, and this isn’t to your liking, please feel free to find a different resource to read. If you don’t want to take 30 seconds to paste the coffeescript into coffeescript.org to translate it then you are not my target audience. I prefer reading coffeescript to JavaScript, but going around demanding things of people providing free resources to me is not something I’m going to do. Your entitled attitude is more damaging to the community than any real or perceived language barrier.

If you had just said “I find this hard to understand, is their any chance you can show the JavaScript as well”, I would feel far more amenable to your request. But your attitude that I am doing something wrong and you are entitled to something different is plain unhelpful and you will not change anyone’s mind with it.


#13

that’s a lot of presumption, nobody’s talking about entitlement, as you can see my post has among the most likes on the first page, a lot of people agree, you can be arrogant and insulting to them, but the point remains


#14

I do hope that calling people names because they do not agree with you makes you feel better, because it will otherwise have very little effect. Of course many people agree with you - but I don’t happen to, and I don’t think you can point to anywhere in my response that was either arrogant or insulting - remember, you are the one here calling people names because their opinion is different to yours and they don’t share your pet peeves, and are demanding other people change their behaviour because of your desires.

I understand completely that coffeescript is not for everyone. If you do not like it, feel free not to write it and not to read it. In the meantime I will continue to write in the language I prefer and if this is not useful to you, no-one is forcing you to use it. Perhaps this can even spur you to do something more productive, like writing your own resources that are in the language that you prefer, and then everyone will benefit.


#15

More presumptions. What name calling? Calling your attitude insulting and arrogant? It is. That’s not name calling.


#16

Please explain how what I have written is either arrogant or insulting by any common definition of those terms, as I fail to see it.


#17

@alexspeller Maybe it’s a difference with an ocean between us, but your attitude does come off arrogant from my point of view. Now, I’m not trying to get into this argument, just thought I’d provide a 3rd party’s view of the situation, of which, I’d just let it go. Opinions have been posted…


#18

@Panman8201 thanks for your comment - I do appreciate a 3rd party point of view and it might be a good time to point out that I have previously had negative interactions with @mgenev in a different context and as such I am inclined to react strongly to his posts to me.

Regardless, I don’t want to be arrogant and it would be very helpful to me to point out why what I say comes off as arrogant as it is not a trait that I would like to exhibit.


#19

it was the exact same context, i made the same point and you reacted even more arrogantly


#20

I don’t think that @alexspeller is arrogant or insulting. He has valid points. He has been giving fair comments and is explaining himself. Nobody should claim that writing stuff in coffeescript is a bad idea if he has no good arguments. And I personally think that blaming coffeescript for missing learning resources is not fair. Saying that you should use option a) only because there are more option a) users is no argument. Before someone starts a post like this he should inform himself about the pros and cons. And if there are valid points, everyone likes to discuss it.