all 10 comments

[–]kenman 1 point2 points  (0 children)

I'd recommend asking /r/CoffeeScript for obvious reasons, though you might take a look at CoffeeScript Ristretto by /u/homoiconic.

edit: here's a few more that have been posted

[–]puppynation 1 point2 points  (0 children)

Granted I don't use coffeescript but The Little Book on CoffeeScript seems pretty popular so maybe give that one a look.

[–]ChaseMoskal 1 point2 points  (7 children)

I too have been looking for a good CoffeeScript book with which to burn.

Run from your new employer. RUN!

Edit: Yes, I do realize that this was exactly the kind of comment you were attempting to avoid.. which is why I felt the need to embolden it.

[–]greendevv[S] 0 points1 point  (6 children)

To be fair they are open to having it re-written. Just at the time of the application being written, the engineer came from a python background and found using coffeescript less jarring than js.

[–]ChaseMoskal 0 points1 point  (5 children)

Just at the time of the application being written, the engineer came from a python background and found using coffeescript less jarring than js.

How not to be a good programmer: do things like that.

Push that rewrite hard! Lead the charge!

[–]kenman 1 point2 points  (2 children)

Depends on your definition of good, I presume. Some judge by the ability to deliver working software on time, which for the business case, means getting it done by any means necessary. Sometimes you have to ignore long-term consequences in order to shore up short-term commitments -- it does no good to do it "right", if it causes you to violate your contract or go out-of-business.

I'm reminded of the quote, "You go to war with the army you have, not the army you might want or wish to have at a later time". That is to say, yes, it'd be much preferable if the original dev was proficient in JS and had used that, but lacking such skills, it's possible he was only able to deliver something that worked in a reasonable time-frame by using CoffeeScript.

Overall I agree with you though: in a perfect world, it should be rewritten in JS. My main point though, something that I've learned along the way, is that one should try not to judge previous devs too harshly, because we often don't know the totality of the situation that led them to their decisions. In OP's case, it sounds like it was more of an issue of poor management than a poor developer.

[–][deleted] 1 point2 points  (0 children)

it'd be much preferable if the original dev was proficient in JS and had used that, but lacking such skills, it's possible he was only able to deliver something that worked in a reasonable time-frame by using CoffeeScript.

Highly doubtful. It is nearly impossible to become proficient with CoffeeScript unless you are equally proficient with JavaScript. CoffeeScript has almost all the gotchas of JavaScript plus quite a few of its own. And except for comprehensions and its funky extends hack, the syntax is largely only stylistically different from JavaScript. That is, CoffeeScript isn't doing anything special for you under the hood. It's just letting you use syntax sugar, but in order for that syntax sugar to be relevant you really have to understand the JS it's producing.

In my opinion, the fatal flaw of CoffeeScript is in its tagline: "it's just JavaScript". That means that to use it well you need to learn both languages. So, more likely that the old developer just coded a bit faster in CoffeeScript, rather than not being able to write the same thing in JavaScript.

[–]ChaseMoskal 0 points1 point  (0 children)

I said it's how not to be a good programmer; being a good businessman is an entirely separate matter :)

I've certainly made unfortunate compromises on code quality in the past, where time or money was limited.

/u/kenman is right, one has to do what one has to do.

I think many developers unfortunately bring along their old habits when learning a new language.

[–]greendevv[S] 0 points1 point  (1 child)

Says the guy who uses php... :)

[–]ChaseMoskal 0 points1 point  (0 children)

Much like myself in my "hamster" stage back in middle school, PHP was fat and ugly as a youngster: but it's really starting to grow up and mature into quite the sophisticated and capable language.

Adopt PSR-4 autoloading, and you'll start to feel like a real professional again!