News for hackers. Stuff that matters.
Re:The Costs of Keeping Your Rails App Up to Date, Or Not by gaius on Monday January 27, 2014 @12:45PM (#7131784)
Colour me naive, but there are two things in an application in a managed language: the runtime, and the actual app. For example, in Javaland there is the JVM, and maybe something like JBoss, and then there is your code. You can upgrade the JVM or JBoss, and obviously test, but it's not that big a deal, unless you have done something egregiously stupid, your code will "just work". The same if you have used .NET. Hell the same if you have used Perl CGI, you can upgrade Perl and Apache to your heart's content.

So why is everything in Rails so much work? There are entire books written on "deployment". No other language has this.

Re:The Costs of Keeping Your Rails App Up to Date, Or Not by grey-area on Monday January 27, 2014 @02:07PM (#7132384)
Deployment of rails used to be pretty awful (around the time Zed linked by aaronem raged in the ghetto), but for the last few years it's been painless, at least if you use passenger. Deploy is now straightforward, and upgrading Apache/Ruby has not been a problem.

I've upgraded a few apps from 1.x to 4.2 without issues, and with minimal changes (2->3 was the big one, changes were for new features like the pipeline, and bundler), and have some still on 3.x because features took priority over upgrades - the experience has mostly been as you describe for me - you upgrade the framework, and everything in your app just works, modulo a few tweaks for upgrading gems that I use like devise.

There have certainly been glitches for some people though, and regressions, and it's probably on the more experimental end of the frameworks spectrum.

Re:The Costs of Keeping Your Rails App Up to Date, Or Not by j45 on Monday January 27, 2014 @12:56PM (#7131852)
Rails specifically does not prioritize being backwards compatible. Terms like "opinionated" are used to promote this as a feature and benefit by some who border on being apologists. As a polyglot, it's a little baffling.

What concerns me is the ability to have a relationship with a codebase for more than a year or two in Rails without significant refactoring and reworking that Ruby and Rails was supposed to save me in another language.

One of my very smart and experienced friends, a Rails developer, spent most of his time debugging and converting a existing Rails app. I don't think he was creating or adding, just trying to maintain it.

How can one prepare for the reality that some of our projects may stick with us for more than a year or two? I more and more value the ability to deploy code easily, anywhere, without having to keep different versions of virtual machines for different gems/libraries and codebases. I've never experienced some forms of mandatory dev ops like I have in Rails. It's cool and configurable, but it's creating value for making my life easier, not my users.

A reality is, every line of code written today can easily be seen as future "garbage code" in 5 years. The available tools and skills of the same developers generally will be better. Still, I have those half decent scripts and apps written over 10 years ago that I never got back to touching, because they kept working. Buddies of mine that still hack a script in Perl because they need it not to be expensive to keep long term makes more and more sense, except I never learnt Perl too much.

Rails though, remains a reasonably fast way to prototype, but not the only one. If I were a Technical VC, I wouldn't fund a Rails startup because I know how much time they'd be spending re-factoring vs. creating value. Rails is not alone anymore (nor was it the first useful framework), most languages are very decent, and they all have more than capable frameworks. For Ruby, frameworks like Sinatra I've found to be inviting (and more open to making a mess).

Choice and options in all syntaxes is good, along with opinions and preferences that pontificate that every framework is somehow an advantage when MVC, generally is MVC. All of this points to the fact that customers don't care what you code in as long as you don't have to re-code it because the cement will harden in a few years.

Universally, what gets put off now, waits for me later in some form of tech debt, something worth considering in any language and framework.

Re:The Costs of Keeping Your Rails App Up to Date, Or Not by gaius on Monday January 27, 2014 @01:03PM (#7131907)
It sounds like they've gone for "easy to develop" rather than "easy to maintain" but any app in the real world will spend 10-100x longer in maintenance mode than active development.

Or more cynically, they are optimizing for billable hours, but only once the customer is locked in, having being beguiled by the low costs up front.

Re:The Costs of Keeping Your Rails App Up to Date, Or Not by j45 on Monday January 27, 2014 @01:06PM (#7131932)
Exactly.

The emerging perpetual Rails re-factoring cycle is very Microsoft-esq in some ways -- the second you buy in, you'll keep buying if you keep using the software.

To be fair, this is not a problem just in Rails. I see similar issues in the emerging JS world too, where everyone is re-inventing libraries for JS that have existed already for decades in other languages, only with new authors. Reminds me of F. Scott Fitzgerald's Gatsby quote a little sometimes. :)

The strangest thing is after working in several worlds, I'm slowly finding myself looking to the JVM, and wondering if I'm crazy to be considering the Java world (albeit in the form of the JVM) that I was happy to run from after University. Jython, JRuby, Querus under one roof is a strange experience, I'm sitting on a foundation of some of the most performant, scaling libraries in Java.

Re:The Costs of Keeping Your Rails App Up to Date, Or Not by dredmorbius on Monday January 27, 2014 @02:33PM (#7132569)
What's that Gatsby quote if you don't mind?
Re:The Costs of Keeping Your Rails App Up to Date, Or Not by j45 on Monday January 27, 2014 @04:04PM (#7133216)
"So we beat on, boats against the current, borne back ceaselessly into the past."

http://www.sparknotes.com/lit/gatsby/quotes.html

Re:The Costs of Keeping Your Rails App Up to Date, Or Not by dredmorbius on Monday January 27, 2014 @09:46PM (#7134980)
Thanks. Nice.
Re:The Costs of Keeping Your Rails App Up to Date, Or Not by hawleyal on Monday January 27, 2014 @02:18PM (#7132456)
Java deployment is one of the most fragmented and ghetto-like you will ever experience.

If you can always upgrade your platform without modifying your code, you have written a very narrow application with only basic structures and no libraries.

Re:The Costs of Keeping Your Rails App Up to Date, Or Not by spoiler on Monday January 27, 2014 @01:12PM (#7131977)
Rails is not a language, neither a "black box" application.

Rails is a framework.

Also, Rails isn't trying very hard to be backwards compatible, either (which I never found to be a problem).

Re:The Costs of Keeping Your Rails App Up to Date, Or Not by j45 on Monday January 27, 2014 @01:56PM (#7132308)
Differentiating Rails as a framework and not a language is helpful when people compare framework to a language and say that language is inadequate. I'm not sure if that's why you're clarifying this?

Frameworks tend to extend languages to the web/internet, because none of them handle the web very well. I only know of a few languages specifically, and written for the web/internet first.

Re:The Costs of Keeping Your Rails App Up to Date, Or Not by yxhuvud on Tuesday January 28, 2014 @09:52AM (#7137335)
Not caring about being backwards compatible is perfectly fine choice.

Not caring about having reliable guides for updating between versions (which include keeping information around for upgrade between outdated versions. These needed be updated, but they should still be possible to find for people that use old versions) is less ok. The situation tend to be decent if one upgrades between current versions, but that information needs to be kept, which isn't the case today. It is fine not to update them, but they still must be possible to find.

Re:The Costs of Keeping Your Rails App Up to Date, Or Not by aaronem on Monday January 27, 2014 @01:21PM (#7132039)
tl;dr: "Rails: Not even once."

Everything in Rails is so much work because Rails is a rolling disaster; every new major version replaces enormous chunks of framework functionality with enormous new chunks of functionality, which imposes a heavy load on the developer; "convention over configuration", plus major changes to the convention du jour in every major version, equals a necessity to re-learn, at every major version change, where the new magic lurks and precisely how it works. If I'm being entirely fair, I can't say that the Rails developers have no interest in backwards compatibility, but such interest in my experience is both quite spotty and heavily concentrated on obvious and conventional behavior, which means anything non-obvious or unconventional is probably going to need heavy rework. (I have yet to run across a Rails app which did not, at least occasionally, do something non-obvious or unconventional, and necessarily so; no framework can cover every use case, but Rails in particular seems interested in covering only the most common ca. 60%.)

To make matters worse, no one in the Rails community has the slightest interest in yesterday, and even today tends to be neglected in favor of tomorrow. You talk of entire books on the subject of Rails deployment, and while the necessity for such books to exist is certainly a problem, actually having such a book means you're doing better than average; I've recently been fighting my way through an upgrade of a Rails 2.3 app to run under Rails 3.2; it's a difficult enough task to begin with, and is massively complicated by the fact that no real documentation exists on how to perform such an upgrade. What's there is mostly to be found on various Rails devs' Tumblrs, or in IRC logs or commit comments, and these are both poorly curated and evanescent; I've spent quite as much time trying to collate information on how to perform this project as I have actually editing code, and if not for the Internet Archive, a couple of critical Tumblr posts would no longer be available at all, thanks to the Rails dev who wrote them having apparently decided to "reboot" his blog.

The whole process has been enormously frustrating, not to mention slow; I started this project better than six months ago, as a novice Rails developer, and I'm just now getting to a point where I can see the light at the end of the tunnel. I am also strongly convinced that Rails is never the right solution; as long as I'm employed at this organization, it will embark upon a new Rails project only over my metaphorical smoking corpse. There's just too much to go wrong, and the underlying ideas of the Rails community are too wrong-headed to make for a reliable platform; the purpose of a framework is to free the developer from having to rearchitect the same infrastructure over and over, yet Rails not only forces developers to do so during upgrades, but the massive changes to core functionality I mentioned earlier make the rearchitecting task enormously more complicated and painful than it'd be in the absence of any framework at all -- I do not engage in hyperbole when I say that I've led upgrades from PHP 4 to PHP 5 which were both less painful and more quickly completed than the task of upgrading a single, rather small, site, from Rails 2.3 to Rails 3.2 has been.

Rails, overall, is the worst example I've ever seen of the development model which Zawinski calls "CADT" [1]; between that, and the deep-seated and dangerous problems Shaw identifies with the Rails community as a whole [2], anyone other than a Rails core developer, who involves Rails in a project of any sort save perhaps a tiny single-developer throwaway prototype, is borrowing trouble on a potentially catastrophic scale both for himself and for any unwitting organization on which he chooses to inflict the resulting disaster.

[1] http://www.jwz.org/doc/cadt.html

[2] http://harmful.cat-v.org/software/ruby/rails/is-a-ghetto

Re:The Costs of Keeping Your Rails App Up to Date, Or Not by trustfundbaby on Monday January 27, 2014 @05:16PM (#7133716)
I think there is some merit in this, upgrading from Rails 2 to Rails 3 was an absolute nightmare, and after beginning, I had to stop, create a new app from scratch and manually copy files over and edit configuration files to get where I was going ... and that was for a very small Rails app, so I absolutely share your thoughts there.

Upgrading from Rails 3 to 4, though, feels much easier as there haven't been so many fundamental changes in the way Rails does things. And things that have changed have usually been moved to gems that you can include to keep your app working as it was before.

Fundamentally though ... Rails has an attitude that makes it pretty difficult to adopt at big organizations precisely for the reasons that you've mentioned. I'm yet to encounter a Rails version upgrade that wasn't a massive task , and I can imagine having to deal with that as a startup whose life's blood depended on it. (airbnb's experience on this is here http://nerds.airbnb.com/upgrading-airbnb-from-rails-23-to-ra..., and lots of companies don't have the resources or talent that they do). And supporting older versions in the Rails community does get short shrift though it is getting A LOT better these days.

However, I have to take issue with your assertion that

"I am also strongly convinced that Rails is never the right solution"

Which I feel comes from a place of frustration. I think the rewards of using Rails ... developer happiness, productivity and ease of getting from idea to software, make it worth it to put up with some of the warts that it has. Things will only get better (and already are).

Re:The Costs of Keeping Your Rails App Up to Date, Or Not by aaronem on Tuesday January 28, 2014 @03:46PM (#7139589)
More "fury" than "frustration", really. That may make it easier for you to understand why your citing "developer happiness" as a reason to use Rails elicits only a hollow laugh from me.
Re:The Costs of Keeping Your Rails App Up to Date, Or Not by grey-area on Monday January 27, 2014 @05:29PM (#7133795)
I always found that a strange rant from Zed, equal parts bluster, spot on observation (consultancy firms) and bullying and bitching about personal little squabbles he's had with various people (that seems to happen to Zed a lot). It's not particularly relevant nowadays about deployment of rails apps - that's pretty straightforward now. It is amusing in retrospect that he is talking up other frameworks like merb - merb is what became Rails 3, which is what you're complaining about migrating to, and the creator now works on Rails as part of the evil™ core team:

The best part about the whole thing is there’s potentially 10 new web frameworks that can take on Rails. Hell, Mongrel spawned or helped 5 of those. My favorite of those frameworks is Merb which is literally “Mongrel plus Erb”

Also, I'm not sure that the best test case for the ease of rails upgrades is embarking on a major migration of an app you don't know well, written in a previous version of a framework you don't know well. I've been put off frameworks by bad apps before too so I know the feeling - is it possible that your experience is related partly to this app, not just to Rails? Many others have not experienced anything like this level of pain with Rails upgrades. I updated a terrible drupal site once - let's just say that I'll never touch drupal again, but that is not necc. justified, it runs a lot of sites without drama and can probably be used to make good apps in the right hands.

Certainly if you are familiar with the app and gems used minor upgrades are exactly as described above - upgrade, test, deploy, sometimes with no changes. That's not to say there are no problems, but I think you're extending your horrible experience unjustifiably to encompass all possible uses of Rails. I find it not bad as frameworks go, better than many others I've seen internally, particularly > v3, and plenty of other people other than Rails developers use and enjoy Rails, without any resulting disasters, why the hyperbole?

Re:The Costs of Keeping Your Rails App Up to Date, Or Not by zpe on Monday January 27, 2014 @03:28PM (#7132980)
"no one in the Rails community has the slightest interest in yesterday" I think this is pretty disrespectful. The deprecation warnings and online documentation didn't magically appear. For example this section "upgrading to 3.2" from the official docs: http://guides.rubyonrails.org/3_2_release_notes.html#upgradi...

I'm personally very thankful for all of the hard work the community has done to help us upgrade.

If you have found pieces of the upgrading puzzle that are missing, then please consider contributing back. 2.3 > 3 is the hardest one. It gets a lot easier.

Re:The Costs of Keeping Your Rails App Up to Date, Or Not by aaronem on Monday January 27, 2014 @04:29PM (#7133372)
That's not much of an example; to say that it barely scratches the surface, in all its seven-paragraph glory, is to be if anything excessively kind. This is unfortunately typical of the Rails community's attitude toward these matters; you may safely assume that, were there anything remotely resembling sufficient documentation available, I would not feel the need to utter complaints such as those above -- if I have anywhere given the erroneous impression that I enjoy hacking my way through this horrible triple-canopy jungle, without so much as a sketch map, please allow me at this juncture to disabuse you of the notion!
Re:The Costs of Keeping Your Rails App Up to Date, Or Not by zpe on Monday January 27, 2014 @05:32PM (#7133817)
I have no knowledge as to what you think of triple canapés, but I do get a strong feeling of entitlement from you. You also seem to disregard a whole bunch of people(like me for example) that didn't experience as much pain as you. As well as the people that have dedicated their time to write deprecation warnings and documentation, recording videos etc..

Worst case, your app is exceptionally hard to upgrade and I feel for your effort.

Re:The Costs of Keeping Your Rails App Up to Date, Or Not by subsection1h on Monday January 27, 2014 @05:45PM (#7133934)
> I've recently been fighting my way through an upgrade of a Rails 2.3 app to run under Rails 3.2; it's a difficult enough task to begin with, and is massively complicated by the fact that no real documentation exists on how to perform such an upgrade.

In what way was McAnally's book insufficient?

http://www.railsupgradehandbook.com/

> I've led upgrades from PHP 4 to PHP 5 which were both less painful and more quickly completed than the task of upgrading a single, rather small, site, from Rails 2.3 to Rails 3.2 has been.

PHP is a language and Rails is a framework. Compare upgrading PHP to upgrading Ruby. The latter is painless.

It seems like you should stick with PHP.

Re:The Costs of Keeping Your Rails App Up to Date, Or Not by hawleyal on Monday January 27, 2014 @02:17PM (#7132448)
FUD
Re:The Costs of Keeping Your Rails App Up to Date, Or Not by aaronem on Monday January 27, 2014 @02:38PM (#7132609)
Why bother to respond at all if you're not going to put forth even a minimal effort?