Live data from Hacker News

From Ruby to Node: Overhauling Shopify’s CLI for a better developer experience

shopify.engineering

81–90 of 109 posts

Re: From Ruby to Node: Overhauling Shopify’s CLI for a better developer experience

#81
post #30

Earlier quoted context omitted.

Honest question: Why is it a bad pattern? And what are some better alternatives from other ecosystems?

The singleton pattern generally tends to be hard to write tests for. Singletons are basically a global object with static methods. The dependency injection pattern fits better. DI is basically passing around objects which conform to an interface. This way you can mock out those objects more easily.

I agree in general, but Ruby is flexible enough to handle mock/stab everything so it's not tend to big issue.

Re: From Ruby to Node: Overhauling Shopify’s CLI for a better developer experience

#82
post #79

I just find working with Node to be gross. Look at this: https://github.com/Shopify/cli/blob/main/package.json but wait...this too: https://github.com/Shopify/cli/blob/main/packages/app/packag... https://github.com/Shopify/cli/blob/main/packages/cli-hydrog... https://github.com/Shopify/cli/blob/main/packages/cli/packag... https://github.com/Shopify/cli/blob/main/packages/create-app... etc, etc, etc VS https://github.…

The dozens of ESLint dependencies are really what frustrate me... I wonder when someone will make a "batteries-included zero-config" JS linter with the most useful rules included, since that's what people seem to want in JS crazy land. See: Vite, Parcel, and the endless complaints about Webpack configs. Of course, people will inevitably want plugins and extensibility and you end right back up with Webpack again.

xo and eslint-config-xo

https://github.com/xojs/xo

Re: From Ruby to Node: Overhauling Shopify’s CLI for a better developer experience

#84
post #61

Earlier quoted context omitted.

Developers who'll work right out of school, is my guess. Rails is great for the people who used it during that generation, and still is, I'm told. JS offers cheaper and more plentiful talent, and doesn't require as big of a mind shift as rust. If they become more JS centric, given the overlap in JS and Rust ideology, I could absolutely see them involving Rust soon after.

If that's true that a company as big and established as Shopify can't afford to attract, onboard, and train ruby devs, it really feels like the beginning of the end for ruby.

I don't think this has anything to do with what they can afford at all. More like someone in leadership thinks Node is cool and collected a bunch of unvalidated reasons to support it.

Re: From Ruby to Node: Overhauling Shopify’s CLI for a better developer experience

#85
post #47

Questionable decision making. Why not use Go when minimizing runtime dependencies is first priority? I’d probably just have cleaned up the Ruby code and used something like Ruby-Packer to create binaries. When typing is so important why not use rbs? Makes no sense to me.

Or they could have ported their Ruby to Crystal. That would have given the same benefits of Go when it comes to runtime, but with the benefit of only needing to do minor refactoring of the code instead of a full rewrite.

Re: From Ruby to Node: Overhauling Shopify’s CLI for a better developer experience

#86

I just find working with Node to be gross. Look at this: https://github.com/Shopify/cli/blob/main/package.json but wait...this too: https://github.com/Shopify/cli/blob/main/packages/app/packag... https://github.com/Shopify/cli/blob/main/packages/cli-hydrog... https://github.com/Shopify/cli/blob/main/packages/cli/packag... https://github.com/Shopify/cli/blob/main/packages/create-app... etc, etc, etc VS https://github.…

That's not Node's issue but NX's monorepo. Having a mega monster root package.json just makes your ci/cd incredibly slow, one way to solve it, is to have per app package.json

Re: From Ruby to Node: Overhauling Shopify’s CLI for a better developer experience

#87

Earlier quoted context omitted.

Interesting how Shopify went from the most pro-ruby company to what looks like unreasonably rapid divestment from it. Wonder what's going on.

Besides this article, what gives you that impression?

I seem to recall reading recently that Go was showing up in their org. May be mistaken or misremembering.

Re: From Ruby to Node: Overhauling Shopify’s CLI for a better developer experience

#88
post #79

Earlier quoted context omitted.

The dozens of ESLint dependencies are really what frustrate me... I wonder when someone will make a "batteries-included zero-config" JS linter with the most useful rules included, since that's what people seem to want in JS crazy land. See: Vite, Parcel, and the endless complaints about Webpack configs. Of course, people will inevitably want plugins and extensibility and you end right back up with Webpack again.

xo and eslint-config-xo https://github.com/xojs/xo

All they need now is a sexy website!

Re: From Ruby to Node: Overhauling Shopify’s CLI for a better developer experience

#89
post #78

Earlier quoted context omitted.

If that's true that a company as big and established as Shopify can't afford to attract, onboard, and train ruby devs, it really feels like the beginning of the end for ruby.

Ruby will be fine, this is more of an impact on Rails as the centerpiece for getting-to-MVP fastest. It once was the case, and might still be in some capacity, but everyone with that expertise is on years 10-15 in their career and don't come so cheap because they've put in the work to earn more and are well within their rights to say they aren't going to work all nighters.

I wouldn’t say that at all. I know several successful indiehacker types who started in the past five years and have had success with Rails. Several of them started with JS first, but Ruby is still growing on an absolute basis, despite having a smaller portion of the market as a whole than it did a decade ago.

I suspect a part of this is that startups that use Rails (or Phoenix or Laravel) don’t need as many devs as startups doing a mix and match of many libraries instead of a full stack web framework.

Re: From Ruby to Node: Overhauling Shopify’s CLI for a better developer experience

#90
> ”Go and Rust allow distributing a static binary, but at the cost of fewer people at Shopify being inclined to contribute due to the lack of familiarity with the language.”

If learning a language as simple as Golang is a real barrier for Shopify engineers, then I’d say they need to reevaluate their hiring processes. Especially given that they’re talking about CLI apps as opposed to something like distributed systems.

I’ve hired multiple engineers who had zero experience with Elixir at all and it’s generally just taken a couple of days to get up to speed. I’ve had the same experience on client projects, too. I don’t think Elixir is as difficult to learn as JS or Rust, but Golang might even be simpler given how small the language is.

Post reply on HN