News for hackers. Stuff that matters.
Re:Happy Birthday, Ruby by eropple on Thursday January 10, 2019 @12:36PM (#18875903)
So...eh.

Ruby has the easiest data access tools, between ActiveRecord and Sequel (which I prefer), out there. I don't know too many folks who'd disagree with you about that. But where you're happy with Rails taking a few lines, I am as of late big on Kotlin (because I agree with you regarding Java) encouraging me to be correct. I'm building a new product using Spring Boot, Kotlin, and JDBI and while, yes, there's boilerplate - it's not the thing that slows me down. I liken it to touch typing; I don't worry if a programmer can't touch type because getting text onto a screen is never the slowest part of the process.

The thing that slows me down, as it does whenever I'm programming, is thinking, and I've learned over time that Ruby doesn't really help me with that. (A lot of other toolchains, both statically and dynamically typed--hello, TypeScript!--do.) I just don't worry about writing a query with a join - it forces me to understand my domain while I'm writing it, not when it runs and bombs out with an error because I mistyped something or got the relationship wrong in my head because my IntelliSense doesn't exist.

It depends on what you're prioritizing. I went back to the JVM for this project in part for perf, but also because I have a pretty high bar for correctness and I want to make sure my stuff works without writing in/out tests for something as simple as types.

Horses for courses.

(Also, I would submit that the frontend SOTA for "Java" is React, FWIW, same as almost anywhere else.)

Re:Happy Birthday, Ruby by chc on Thursday January 10, 2019 @01:49PM (#18876687)
The problem with boilerplate is not the typing of it (that can be automated), but the reading of it (that can't really be automated until programmers are replaced with AI). It hides semantically useful code in mountains of noise.

I agree with you about the usefulness of a language that helps in thinking about a problem, but I feel like boilerplate is a kind of tech debt we tend to underrate.

Re:Happy Birthday, Ruby by eropple on Thursday January 10, 2019 @03:56PM (#18878059)
I agree with you regarding the reading of boilerplate; that's in particular why I like JDBI. It abstracts the boilerplate of building out a data access layer; you write an interface and it automatically builds the implementation from parameterized SQL queries on the classpath.

Between that and Spring Boot (which is fairly batteries-included but makes it clear when you're going off the happy path in ways I can deal with), I feel remarkably good about my choices with this and similar recent projects.

Re:Happy Birthday, Ruby by joelbluminator on Friday January 11, 2019 @01:26AM (#18881431)
It's not just code bloat, typed languags and frameworks like spring have to dance through hoops to allow for easy testability. Spring is founded on the idea of dependency injection that's supposed to overcome that. In Rails/Python and friends you just don't need that, and consequently things have much less bloat.
Re:Happy Birthday, Ruby by eropple on Friday January 11, 2019 @10:32AM (#18884162)
...at the cost of globals all over the place and significantly fewer code-to-interface (rather than code-to-implementatation) moments.

I'd rather test a well-factored JVM or .NET application than I would any Ruby application I've ever seen in my life, to be frank. I've never, not once, had to write a mock (awful) for a test in a JVM or a .NET application, and the quality of my tests reflect that.

Re:Happy Birthday, Ruby by TechFiend101 on Friday January 11, 2019 @01:52PM (#18885826)
Yeah you just end up with race conditions everywhere causing corruption and data loss. See active-model-serializers 0.10.8 release that just found a race condition where serializers would share state across threads making the default Rails web server (puma) completely unsafe.
Re:Happy Birthday, Ruby by beforedawn on Thursday January 10, 2019 @04:34PM (#18878438)
> Ruby has the easiest data access tools, between ActiveRecord and Sequel

Not true

Re:Happy Birthday, Ruby by eropple on Thursday January 10, 2019 @05:57PM (#18879262)
OK, put up. What's better for the kind of quick-to-write, developer-friendly access under discussion? Because I'd like to know; I've used a lot of the options out there.
Re:Happy Birthday, Ruby by master_oogway on Thursday January 10, 2019 @05:30PM (#18878978)
It's true for me too. While I love ruby for its beauty and elegance, I love Sequel even more. I find Sequel to be the most powerful and most flexible tool to make RDB queries.