Hacker News new | ask | show | jobs
by sams99 4191 days ago
The thing I find depressing and frustrating about this kind of discussion is the fatalism and non-constructiveness.

I really wish it was:

"I set up a server that runs ruby spec on ruby-head daily and automatically reports spec failures to ruby-bugs"

So many companies are making big bucks off Ruby, yet so little are willing to fork out a bit of money and time to make Ruby better.

3 comments

it's unreasonable to expect the dev who has already put a ton of work into developing and maintaining rubyspec and making it work nicely with all the ruby implementations and versions he could to have to put in the additional work to do this as well. I don't blame him for getting discouraged at having to chase a moving target on top of all that - I agree with him that having the MRI devs contribute to rubyspec was a reasonable thing to expect.
Why is it unreasonable to expect the RubySpec dev to do additional work, but reasonable to expect additional work from the MRI devs to comply with RubySpec?

I get that "the implementation is the standard" is frustrating for people who want to make an alternate implementation, but why should that obligate the original developers to accept some third party's definition of what their project should be?

They don't have to accept it. I don't have an opinion one way or another about the rubyspec being some kind of a standard. But if it exists and shows a sigsegv scenario and nobody bothered to run it before a release... that's a failure of developers. It's not even additional work.
It's not a third-party definition, it's their definition, should they want to contribute to it. By writing Ruby specs you're defining Ruby.
> By writing Ruby specs you're defining Ruby.

And presumably the MRI devs would say that by coding MRI you're defining Ruby. What gives RubySpecs the authority to say they are the canonical definition of Ruby and everyone should follow it, when the people who created Ruby disagree?

If that's their attitude, then frankly there's every reason to complain about that. Defining a language by implementation is absolutely horrible practice.
You can't call code a spec. Saying you're defining Ruby by coding it just means you don't have a spec.
In my experience, executable specs are much more useful than their non-executable brethren. They prove their own correctness, and can't gloss over important details.
Throwing away a project that is clearly working is depressing. can't Heroku/GitHub/37 signals or someone sponsor a week of dev time to automate a system that runs the suite on latest?

It's just such a better outcome, nobody needs to change workflows its just that information gets reported upstream earlier in a much more useful time.

> can't Heroku/GitHub/37 signals or someone sponsor a week of dev time to automate a system

Heroku does sponsor Matz, Nobu, and Koichi. We hired them and give them a full time salary to work on Ruby.We don't tell them what to work on (i.e. we don't dictate what features or projects get shipped in what versions) it's more like corporate sponsorship. GitHub hired tmm1. Beyond that CRuby has a host of other non-sponsored contributors that contribute code and doc patches as well as set up tooling. You don't need corporate sponsorship for that, you need a passion and some time. You, in fact, could be the very person that sets up this automated system.

I find the attitude of '<company x> should sponsor <thing y>' a bit misguided. While I agree that companies who profit from a OSS should give forwards to OSS, individual contributors are ultimately they only way progress gets made. If you or someone reading this works for a company making money off of Ruby do that thing! Tell your boss you can't deploy on friday afternoon and have to fix a bug in the Ruby codebase. Ship the project on company time, and then boom...your company just sponsored that thing. It's like magic!

Anywhoo, yes finding out what things are blocking the MRI team from adopting a tool/technology and working around them can be extremely valuable. For example Matz has agreed to move the codebase development to github. This would make contributions a bit easier, however there is a blocker. There are a ton of SVN bots and tooling written around the current workflow. Right now the Ruby core team wants to spend time focusing on pumping out C code to fix bugs, improve performance, and progress the language forwards. They don't want to go off into the woods on tooling. These types of projects could be hugely impactful to the team and don't require C knowledge so most Ruby devs may be able to help. I encourage you and others to reach out to the core team to ask them what tooling projects they need and how we can help them. Understanding why someone isn't using a tool/technology is a really good start.

tldr; Good idea, let's talk to the core team about ways to help with tooling.

The point is that it's not sufficient to run the current 20k tests against head daily; there are so many unplanned variations and 'emergent' design that there's a full time job just in keeping up with the changes to MRI ruby.

And even if there wasn't, @brixen has repeatedly pointed out how the MRI authors have chosen to ignore the RubySpec project entirely. That's really sad.

The Ruby devs attitudes in the discussions linked FTA makes me question the longevity of Ruby as a serious Enterprise language.
I suspect this isn't a goal of those Ruby devs. It almost seems that "Ruby" is more like an ideology rather than a language, at least from comments like "Continuous changes is Ruby."

Note that I'm not trying to criticize this position, rather, I'm pointing out that the core Ruby team seems to have different goals than, say, the community around Java or C#.

When did it become a serious Enterprise™ language? Not being flippant or denigrating Ruby, but when I do work for established enterprises, it's never in Ruby. Java, .NET, PHP, and occasionally Python. Just because startups use it to get off the ground quickly, or to build the front end of their website doesn't make it enterprise.
Ruby (MRI/JRuby) are gaining traction in automated testing at large enterprises. Ruby is easy to learn and integrates well with java.

Cucumber provides better reporting than JUnit/TestNG. For web testing you have watir. For SOAP services you have savon which IMO is much easier than SOAPUI. For RESTful web services you just make direct calls. Then there is sikuli for ad hoc GUIs.

How do you define enterprise? I've been using ruby in projects I wouldn't call 'startup' for the last several years... including with teams up to 80 people (i.e. real enterprise)
yes I don't want to get into a flamewar either, but I am an ex-RoR dev and since switching to enterprise Java I hear almost nothing about it largely due to enormously widespread acceptance of Spring (JavaEE is even re-gaining some traction).

Long story short (and hope my facts are right! not swearing by this, was just some googling...), I had to optimize some old code for an RoR client I freelance for and wanted to add in some more advanced ORM (still fairly simple though, mapping entity results from a stored procedure query). All the solutions I saw for this involved kindof hacking the db connector to execute some raw queries. I was curious as to why such a basic feature wouldn't be natively supported, so eventually I found some forum posts asking why it isnt (it may be by now) and all the responses were in the vein of: "That is not the Rails way and therefore the core team chooses not to support those types of features".

I know people think Java is too bulky & sprawling but after 6 months with JPA, SpringData, Spring JDBC etc. I was kindof left with the feeling "Man, there is a bit of a learning curve to pick up the overarching concepts of the Java ecosystem and its design paradigms at first, but once you are over that hump you can do more, easier with any ORM lib than with ActiveRecord". I know there is another Ruby ORM gaining traction (DataMapper) but it just seems that the opinionated nature of Ruby/Rails core dev teams makes it doomed & dangerous for enterprise use (and indeed maybe its not even their goal).

The Java approach is bulky and design-by-committee for sure but their userbase seems to demand that the fullest possible spectrum of features be supported, and then the library developers try to provide their recommended approach for new projects. Also the specs expand pretty quickly... had to use JPA 2.0 for some projects and found myself constantly frustrated because in the advancement to 2.1 there seemed to be a landslide of awesomeness added to support missing advanced database features.

I guess its one of those things where now it feels like a breath of fresh air thinking "I have more power in my pinky than....". It's a shame too cuz I still get calls from companies in a lurch desperate for RoR devs but philosophically I just can't bring myself to go back in that direction after seeing how unscary & mind-bogglingly powerful the enterprise langs have become. In part thanks to RoR, I'm sure! Wouldn't mind using it for front-end but all that stuff is so interchangeable, the syntax diffs are barely noticed in the development process. I think really the only front-end techs with noticeable differences in feel are the ones with advanced data-binding/component libraries.

Maybe there are some mind-blowing gems out there now though? Who knows....

The main benefit of Ruby seems to be the ability to catch method names and treat them as an argument. I bought "Metaprogramming in Ruby", and the author seems delighted that you can do "mycvsrow.columnname". Several other people have confirmed to me that it is really just being able to drop off quotes around what would otherwise be strings in other languages. I don't get it, at all. Maybe it's a knee-jerk reaction to verbose languages like Java. But I fail to see what Ruby offers over a Haskell or F#-like.

I got excited by seeing how passionate and excited people like patio11 were about Rails. But then seeing how Rails prefers insecure defaults and had exploits because they were essentially eval'ing user posted data really hampered my enthusiasm.

Seeing articles like this reinforces the idea that Ruby is cowboy programming, just making stuff up as they go along. Like PHP but with class.

Although I agree with what you are saying, this is hardly new. (And still disappointing IMO).

Developers in the RoR community have a tendency to say that "Rails is very good for one set of problems (Basecamp), and using it for anything else is problematic". This has been the answer for every attempt that tried to introduce some worthwhile idea to the Ruby community, be it OO design, TDD or something more "enterprisey" like hexagonal architecture. It's not the Rails Way™, move on.

I've heard developers whom I respect (ie. Avdi Grimm, Sandi Metz) shrug this inherent limitation of Rails off, and I find it really weird. It's akin to Stockholm syndrome really.

You are ignoring a decade of history in declaring Rails to be "dangerous for enterprise use". The reality is that Rails apps are used in thousands of enterprises around the world, as well as in "web-scale" businesses like Github, Airbnb, and Groupon.

However, Rails (and specifically ActiveRecord) has a very specific design philosophy (see http://david.heinemeierhansson.com/2012/rails-is-omakase.htm... ) which does not include support for stored procedures (because business logic belongs in the app, not the database).

Of course, there are ways to make stored procedures work with Rails (see https://github.com/leopoldodonnell/uses-stored-procedures ) but they are likely to end in tears, since you are working against the grain of the framework.

The basic argument for Rails is not about support for or against any specific underlying technology (if you can reach Facebook-scale on PHP, then you can make anything work), it is that using a mature and well-crafted framework maximizes developer productivity.

For most startups, as well as most enterprises, that is the critical resource.

DataMapper isn't gaining traction, sadly. v1 is abandonware, v2 forked off to become a different project called ROM (which explicitly "isn't an ORM"). I still use DataMapper v1 because I find it a thousand times nicer than ActiveRecord, but it's a minority taste.
That sounds like a philosophy of RoR, not Ruby. How would adopting RubySpec help with that?
RS needs work contribution from each Ruby to make it sustainable.

It would also show leadership from MRI to encourage a semi-independent Ruby self-test framework that can run on any Rubyish interpreter. (Granted RS has RBX bias, but it would show leadership to coordinate common infrastructure.)

Since RS exists, seems like a good idea to go with that for full up integration testing, but each Ruby should still unit test it's own, low-level bits. (Is MRI doing that at least?)

> So many companies are making big bucks off Ruby, yet so little are willing to fork out a bit of money and time to make Ruby better. <

And why would/should they when there are quite literally dozens (or possibly hundreds or even thousands) of developers who will happily work on "making Ruby better" for no cost to said companies?

A large percentage of software developers will quite happily hack away at projects for nothing in return simply because they enjoy it (and would, quite incorrectly, claim that as compensation itself), in order to gain notoriety, boost their own ego, or any of a number of related reasons.

> reports spec failures to ruby-bugs

But why should the Ruby developers work to fix 'bugs' against an unsupported 3rd party specification?

It's essentially regression testing. Rubyspec specs out the behaviour of Ruby according to what MRI implements, so any failure is a change in behaviour from the initial implementation. Most of the time this is undesirable/unintentional.