Live data from Hacker News

Decaffeinating a Large CoffeeScript Codebase Without Losing Sleep

eng.datafox.com

31–40 of 47 posts

Re: Decaffeinating a Large CoffeeScript Codebase Without Losing Sleep

#31

CoffeeScript was great, and I'm pleased how relatively easy it's been to move away from it now that ES6 offers most of the same benefits. I've recently started moving our existing CoffeeScript + React codebase – it's been okay, though I still miss the terse CoffeeScript syntax. A similar blog post that's helped is Bugsnag's: https://blog.bugsnag.com/converting-a-large-react-codebase-f...

If you miss the syntax, why not wait out for CoffeeScript 2? They're going to add all of the ES6 features, to my understanding.

There are a few reasons we made the switch:

- Familiarity. Most of our team have a little experience with Javascript, but none at all with CoffeeScript. It's not that different, but there's still a cognitive overhead.

- Documentation. Almost all documentation for front-end work, especially with React, is in ES6 now. There's an additional overhead in translating it.

- React – CJSX was IMO awesome, but there's no ongoing support for it. Embedding JSX in CoffeeScript is less satisfactory.

- Webpack. We've had various problems getting features of Webpack 2 to work correctly with pre-2.x CoffeeScript – HMR etc. that only really work with ES6 modules. We could wait for CoffeeScript 2, but it's already becoming a drag on velocity.

In short, CoffeeScript was great, but the benefits are much more marginal now. My preference for terse syntax isn't that high a priority for the rest of my team, so I'm happy to take advantage of the more standard ES6 that we can now use.

Re: Decaffeinating a Large CoffeeScript Codebase Without Losing Sleep

#32
post #8

It's pretty wild having seen CoffeeScript spread like a wildfire in the early 2010s, only to be discarded nearly as fast a couple years later.

It validates my policy of not jumping on every new thing. I loose "nerd cred" for it, but it's better for my clients that way.

The only bandwagon I've ever witnessed explicitly was this "I'll lose nerd points for being so anti establishment" thing, that's been going around forever.

I loose "nerd cred" for it. Please. Give me a break. Half the people here will fall over themselves agreeing with you and you know it. Heck, I agree with you.

Can we please, as a community, get over ourselves? Can we get over this "ermegerd I'm not gonna use the latest JS framework! Guess that makes me 'not cool'! Haha I'm so level headed teehee guiltyyy!" We get it! Most people, the silent majority, don't use new things. We know! We are them. It's ok. Stop. dont humblebrag about how productive you are on Procrastination News.

I've never been on Tumblr but I imagine this is what some of it is like.

Sorry for singling you out. It's just a bugbear, is all. You're probably a solid guy / girl and I do believe you deliver great value for your clients. Honestly.

Re: Decaffeinating a Large CoffeeScript Codebase Without Losing Sleep

#33
post #20

Earlier quoted context omitted.

There's a babel transform for this in case you want to start using it now, before browsers support it: https://github.com/babel/babel/tree/7.0/packages/babel-plugi...

I want to use TypeScript too, which will probably not adopt it until standardization.

We definitely want to implement it! But many parts of that specification are still in flux, so like you said, we'd like to see the proposal stabilize first to avoid problems.

Re: Decaffeinating a Large CoffeeScript Codebase Without Losing Sleep

#34

Earlier quoted context omitted.

If you miss the syntax, why not wait out for CoffeeScript 2? They're going to add all of the ES6 features, to my understanding.

There are a few reasons we made the switch: - Familiarity. Most of our team have a little experience with Javascript, but none at all with CoffeeScript. It's not that different, but there's still a cognitive overhead. - Documentation. Almost all documentation for front-end work, especially with React, is in ES6 now. There's an additional overhead in translating it. - React – CJSX was IMO awesome, but there's no ongoi…

Actually if you still really want JSX in CoffeeScript, it's now built in: https://github.com/jashkenas/coffeescript/pull/4551

Re: Decaffeinating a Large CoffeeScript Codebase Without Losing Sleep

#35
post #8

Earlier quoted context omitted.

It validates my policy of not jumping on every new thing. I loose "nerd cred" for it, but it's better for my clients that way.

The only bandwagon I've ever witnessed explicitly was this "I'll lose nerd points for being so anti establishment" thing, that's been going around forever. I loose "nerd cred" for it . Please. Give me a break. Half the people here will fall over themselves agreeing with you and you know it. Heck, I agree with you. Can we please, as a community, get over ourselves? Can we get over this "ermegerd I'm not gonna use the…

I've been criticized (by other programmers!) for not going for the latest and newest stuff, so I'm a bit sensitive and glad to have some confirmation that I'm right.

I'm not trying to brag (didn't even realize it could be read that way), I'm trying to validate both myself and other people like me.

Re: Decaffeinating a Large CoffeeScript Codebase Without Losing Sleep

#36
post #14

Earlier quoted context omitted.

Wait, why were node devs talking about Coffeescript? Weird.

You can write CoffeeScript to target Node...

The question is, why?

Realistically, everybody who uses Coffeescript is/was a Rails developer at some point since the syntax is very opinionated towards rubyists.

The typical Node dev is more likely to use ES6/7 which fixes a lot of the same js issues as Coffeescript.

Re: Decaffeinating a Large CoffeeScript Codebase Without Losing Sleep

#37
post #8

Earlier quoted context omitted.

It validates my policy of not jumping on every new thing. I loose "nerd cred" for it, but it's better for my clients that way.

The only bandwagon I've ever witnessed explicitly was this "I'll lose nerd points for being so anti establishment" thing, that's been going around forever. I loose "nerd cred" for it . Please. Give me a break. Half the people here will fall over themselves agreeing with you and you know it. Heck, I agree with you. Can we please, as a community, get over ourselves? Can we get over this "ermegerd I'm not gonna use the…

I would guess that nerd cred is not the reason for most people.

It's about competitive advantage. Some people just want an edge over other people in their career. Some don't want to miss the "next best thing". Some people just want to be stay relevant and be employed.

Re: Decaffeinating a Large CoffeeScript Codebase Without Losing Sleep

#38
post #15

It's pretty wild having seen CoffeeScript spread like a wildfire in the early 2010s, only to be discarded nearly as fast a couple years later.

I can relate. I wrote an essay on this a while back: https://www.nemil.com/musings/shinyandnew.html Excerpt: Pity the modern web or mobile app developer on Hacker News. As a full stack startup developer in 2012, you were building websites using Ruby/Rails on the backend, Backbone/Coffeescript/Underscore on the frontend, while deploying your app with Capistrano (or the relevant Python analog). By 2013, you'd transitio…

One minor upside to the rapid change is that I can sit out an entire stack and hop back into relevancy with some totally new stack a year later.

Re: Decaffeinating a Large CoffeeScript Codebase Without Losing Sleep

#39
post #8

Earlier quoted context omitted.

It validates my policy of not jumping on every new thing. I loose "nerd cred" for it, but it's better for my clients that way.

The only bandwagon I've ever witnessed explicitly was this "I'll lose nerd points for being so anti establishment" thing, that's been going around forever. I loose "nerd cred" for it . Please. Give me a break. Half the people here will fall over themselves agreeing with you and you know it. Heck, I agree with you. Can we please, as a community, get over ourselves? Can we get over this "ermegerd I'm not gonna use the…

dont humblebrag about how productive you are on Procrastination News.

Haha that should be written across the header on the main page.

Re: Decaffeinating a Large CoffeeScript Codebase Without Losing Sleep

#40
post #36
post #14

Earlier quoted context omitted.

You can write CoffeeScript to target Node...

The question is, why? Realistically, everybody who uses Coffeescript is/was a Rails developer at some point since the syntax is very opinionated towards rubyists. The typical Node dev is more likely to use ES6/7 which fixes a lot of the same js issues as Coffeescript.

what a facile interpretation. CoffeeScript offered a large number of meaningful improvements over ES5, not including superficial syntax differences. It _still_ offers truly meaningful niceties that can make code _better_ than the JavaScript equivalent.
Post reply on HN