Lurker News

Comments (438) 69 threads

vinceguidry14 replies#
> Now, this line of code is not simple, it’s easy to write it, but the code is extremely complicated under the hood because:

Every time I hear someone complain about Rails, I ask myself if this person is really just complaining about how complex web dev is. I've never seen a complaint that passed this smell test.
Yes, Rails abstracts over a veritable shit-ton of complicated domains. The problem is, that complexity isn't going to go away if you decide not to use those abstractions. Every single one of that laundry-list of things that ActiveRecord::Base.create does will have to be implemented again, by you, badly, if you choose to roll your own.
It boggles my mind why developers don't take the web seriously as a domain, like it's not real coding or something. It's the worst instance of bike-shedding I've ever seen.
Rails isn't perfect, by any means. But Rails is not a black box, it's all free software. You are more than free to re-implement anything Rails does yourself and release it as a gem. Modularity and flexibility are built right in. It seems incredibly odd to leave Rails over this. For what, Java? Unbelievable.

jamra3 replies#
I'm not a rails dev, but I believe that you are misconstruing his argument. It is not about inevitable complexity, but about the ownership of that complexity. If you are able to control the side effects part of development, you can control how it scales and debug it much more easily.
mooreds2 replies#
> It is not about inevitable complexity, but about the ownership of that complexity.

I've been there, done that--was part of a team that owned a java application that grew over a decade (and eventually ran the team). A year or so after I left, they retired the application.
Why? Because we owned all the complexity and couldn't support it.
Maybe that was my failing. Maybe the team's failing. But I don't think that having control of how the whole codebase fits together means you necessarily have more control over complexity.

ethbro#
Those who trade for buried complexity are doomed to start digging whenever they discover an edge case.

Maybe they never need to do that, in which case that's a bargain. But I tend to think that any old enough codebase continually accrues edge cases that must be solved.

philwelch1 reply#
I've never seen a ten year old Rails application, but from the Rails applications I have seen, I'm horrified by the thought of how it would look after that long.

Continue this thread — 1 reply

dagw#
Having worked on systems like that, the problem is that you end up in a situation where there are literally two people in the world who can answer questions about how something works and integrating other third party libraries or solutions becomes harder and harder.
Double_Cast#
I have a third interpretation: I think Solnic was complaining about a lack of diversity in the Ruby ecosystem. The most salient part of the post was (imo) the paragraph regarding how Merb was subsumed into Rails, instead of continuing to compete against Rails. Rails is essentially a monopoly.

> It seems incredibly odd to leave Rails over this. For what, Java? Unbelievable.
If projects such as Merb were more common, maybe Solnic could leave Rails without abandoning Ruby.

forrestthewoods3 replies#
> about how complex web dev is

Isn't that part of the problem? Webdev is complex. But it feels to me like it's been overcomplicated by a factor of 100. It doesn't have to be.

gaius1 reply#
Absolutely. At the end of the day you're doing some string substitutions then sending a text file over a socket. We were doing that in the early 90s! But to do it now we use these surreal Rube Goldberg contraptions with a hundred layers of abstraction.
vinceguidry6 replies#
And all programming itself is is turning strings of 1s and 0s into other strings of 1s and 0s.

Asking web dev to be less complex is like asking financial markets to be simpler. Websites are market tools, tools have to retain a competitive edge. You can't afford to ignore market trends. You can't afford to wait until everything is well-defined. You can't let craftsmanship get in the way of shipping.
You can buck the rules yourself and operate on whichever side of the tradeoff you want to operate in, but you can't expect everybody else to follow the same rules you do.
I mean, if you don't like the web, then by all means find a different domain. I personally love it, and find it absolutely fascinating. With the right tools, (Rails) the complexity is manageable.

Continue this thread — 6 replies

Klathmon1 reply#
But at the end of the day aren't all platforms complicated.

It's been a while since I did GUI programming on the desktop, but I remember it being so complex to build cross-platform applications that rolling your own cross-platform abstraction would be downright ludicrous.
I think the parent commenters point is correct. People treat the web like it should be easy, like it should just be HTML, but its not. It's full of legacy stuff, it requires working on multiple "platforms" (browsers), it runs on all kinds of device sizes and shapes, and the applications being written for it are no longer trivial.

majewsky#
You should try Qt. It's always fun to write some open-source software, and find that someone ported it to Windows or Mac in a few minutes.
phamilton#
In my observation there are two things going on:

1) Broken platforms. How much "innovation" has occurred in javascript to compensate for a broken execution model? How much caching does your average rails app do because of the poor concurrency the the Ruby platform, requiring external services for persistence across requests?
2) Looking for challenging problems. Design patterns are often a solution to a meta problem. Building a CRUD app, there aren't too many hard domain. However, code maintenance is a hard problem. It involves many people using subjective judgement. So as a somewhat bored developer, I'm going to try to solve the meta problem.
It sort of pains me to see how much engineering effort has gone into essentially making broken systems more performant and maintainable.

awesomepantsm7 replies#
Try setting up rails dev on a windows environment and get back to me.
Retr0spectrum3 replies#
I think the majority of webdev tools are pretty tedious to set up on Windows without cygwin etc.
Marazan1 reply#
Flask is no problem, Django is child's play to setup.

Continue this thread — 1 reply

schwarrrtz2 replies#
Node is a one click install on Windows, no cygwin required.

Continue this thread — 2 replies

takno#
Never had any significant issues with Java stuff, or php for that matter
Ericson23143 replies#
I think that might be a bit too sandboxed for your needs.

Continue this thread — 3 replies

xraystyle1 reply#
How is this relevant, exactly? Ruby was written on and designed to run on *NIX OS's, as is most of the software commonly found in webapps, because it all runs on Linux servers. I'm sure it'd be a pain in the ass to get MS Paint to run on Debian, too.
kefka2 replies#
MS paint on Linux is easy.I double click on paint.exe and it runs.

And I have WINE to thank for that layer of compatibility.

Continue this thread — 2 replies

stephenhuey#
I've done that over the years and I used to answer questions on the RailsInstaller list, and yes, at times it was harder than at other times. I'm expecting it to be easier than ever thanks to Microsoft's recent announcement to support running Bash as a full-fledged citizen on Windows:

http://www.hanselman.com/blog/DevelopersCanRunBashShellAndUs...

rhizome#
I did until 3.2. The only real problem was native extensions, and many gem developers provided win32 bins for those things if they support win32 at all. Granted, I personally wasn't (...) God's gift to clean code, but I could certainly work with anything other people (say, on IRC) were working with and talking about.
MrBra#
I don't know how long ago you tried it last time, but recently this has got much better. You surely could find some gotchas here and there, but it's not as much frustrating as it was before.

Continue this thread — 1 more reply

Continue this thread — 11 more replies

matt40777 replies#
If any of the frameworks glorified on HN were subject to the same scrutiny as Rails, Github would need a suicide hotline.

I've recently had the pleasure of working on a new, medium-sized node/react project. Now I was new to a lot of the technology, but I've learned a few and would think I have some experience.
It probably took me a week to get webpack running the way I wanted. The documentation is an atrocious mix of stuff that is outdated (older than 6 months) and stuff that's too new (webpack 2.0) without any indication as to the validity. There're six different ways to get hot reloading/replacement to work, with similar problems. The configuration's syntax is heavily influenced by brainfuck with a /\w/[{\[]/s thrown in for good measure. As a soothing measure, webpack doesn't complain about anything but parse errors with the configuration. The version I was using came with 12 different options to render source maps, none of which worked in chrome (since fixed).
And that's just the linker. I actually had presets to search for, i. e. ["express.js" from: to:]. node_modules once managed to consume 4TB of hd space (someone managed to create a circular dependency) and even in regular use gets to the point where I'm looking for the elasticsearch plugin for ls *. If you have checkouts of several versions or projects, each one will have it's own version of left_pad & friends at around 230MB (just checked with a clean install of mxstbr/react-boilerplate) with no way of deduplication.
I enjoy playing with new technology (currently elm & swift) but I know that it's time "joyfully wasted" right now and don't try to justify it. There's no amount of type-safety bugs that could cost as much time as a new framework's kinks.

BurningFrog2 replies#
The most used frameworks are always the most complained about.

It's an easy mistake to think that means they're the worst.

rtpg1 reply#
While that's true, why don't we see this sort of stuff with Django or Flask?

Of course we see people complain about these tools, but my impression is that people who end up leaving those communities are rarely because of community issues (more like "I'm going to do some Go instead"-style things)
Surely something is different. It's not like Django is unused...

goldbrick1 reply#
Rails is at least an order of magnitude more widespread than Django/Laravel/any of its imitators. If you take a swing at any of the follow-ons, its proponents will invariably say it's just doing what Rails does. Try to imagine a "Why Django sucks" flamepost garnering anywhere near the attention that the same does for Rails... yeah, won't happen.

Continue this thread — 1 reply

gbog#
I always disagree with "always". I think Django and Flask in python world are used a lot, and didn't notice a flood of complains about them.
haukur2 replies#
I've been working on React projects lately and also spent a lot of time gluing together all the different libraries and setting up a proper build process via Webpack. I've also worked on Rails projects in the past, and I have to say that I prefer the modularity of being able to structure my projects according to the problem they're trying to solve. For instance, you wouldn't create a single-page app in Rails.

Also, with regards to Webpack, even though it's complex, it's extremely powerful, more so than anything else I've found. It includes many ways to optimize asset bundles considerably, by splitting them up into different files, removing unused code, and of course all the usual stuff like minimizing and gzipping the assets. In comparison to Rails it also compiles way faster, by only recompiling the code that you changed. It also includes many development tools, like an auto-reloading server and even updates your webpage without a refresh (HMR). All these are things that just aren't possible in Rails without much, much more effort.
Edit: I guess there's a first for everything, but I'm really confused as to why this was downvoted. If something I said is wrong or debatable, I'd be happy to hear it and discuss it.

matt40771 reply#
(didn't downvote, but:)

> I prefer the modularity of being able to structure my projects according to the problem they're trying to solve. For instance, you wouldn't create a single-page app in Rails.
Those two sentences don't follow logically the way they appear. A project's structure has nothing to do with its functionality, which SPA is. I admit that rails is late to the SPA game, but if the new websockets (ActionCable) and API mode do what the docs say (haven't tried), there's no reason why it wouln't work nicely. For a given rails project, less than 5% of non-template code should change: create an API (one line for most projects) and... well, I can't think of anything else.
The rails view architecture is also almost identical to React: a bunch of nested templates. React best-practice is a bit more insistent on modularity (small & more generic components), but a 1:1 mapping of React and rails templates is possible.

haukur#
What I meant to say was that I felt Rails was too rigid for some purposes, especially creating single-page applications. It's true that Rails wasn't built with that in mind originally, but it seems that it's becoming a bit easier now (I haven't been following Rails lately and had never heard of the "API mode" you mentioned).

I also know about a couple of projects using React successfully within Rails apps, but I would personally not do that if I were to start a new project today, even though I love Ruby.

ocean3#
There is nothing stopping from creating a single page app in rails. I have a SPA running on rails 3 using backbonejs. Some parts of which now use reactjs.
hackerboos1 reply#
Documentation of Webpack is getting better. I still use Gulp but at least the Webpack docs aren't just a bunch of 'Coming soon' pages like they used to be - take a look at the comments here: (http://webpack.github.io/docs/usage.html)
haukur1 reply#
I think using Webpack still requires reading a lot of source code and examples, the docs aren't quite there yet. But it seems they're improving - the last time I checked the page you linked, it was completely empty!
gaastonsr#
Webpack is the worst about using React. No complains about anything else.

Took me a few days to me to get it working and "kind of" understand what it was doing. That really should not be that way.

tacone#
This.

Webpack is usually the biggest source of bugs and questions on any given React boilerplate. Something won't compile, circular dependencies causing the build to fail the first time, some strange bug in CSS inlining, hot reloading not reloading, etc.
It's very powerful yet very hard.

Continue this thread — 3 more replies

pmontra37 replies#
I used Rails mostly for small or medium sized projects, one or two developers teams, all of us freelancers. It's the perfect tool for this kind of work. We can deliver quickly, send invoices, move on to something else or come back later to add features.

Do projects get complicated? Yes, some of then. Mainly because most customers pay for features and not for refactoring or design, which they don't understand (remember, no in house technical staff). Try to sell them a new page with attached the price of a major refactoring... good luck with that. So sometimes features get kludged together because of budget constraints. I have projects with suboptimal UX (understatement) because they rationally decide to make tradeoffs between usability and costs. It's their privilege. I bet this would happen with any language or framework. Your customers could be more long sighted than mines, I hope they are.
So, would I move away from Ruby and from Rails? Yes, when customers won't like starting a project with Rails anymore. This means that other tools don't have to cost them more. Do I care about Rails architectural shortcomings? A little, but I appreciate its shortcuts more. They work well in my projects.

Continue this thread — 37 replies

orthoganol19 replies#
I can't take his opinions too seriously because his 3 central gripes, which he wrote extensively about, boil down to:

1) Too much complexity is hidden by simple interfaces
Those simple interfaces make programming enjoyable and don't break, so...
2) Your app logic is going to be too tightly coupled to core Rails features like AR, helpers, controllers ("your app is Rails")
Yes, you are in fact using the features of Rails when you use Rails. Is this actually a problem?
3) ActiveSupport. "No actual solutions, no solid abstractions, just nasty workarounds"
ActiveSupport has saved me bajillions of hours and never broke anything for clients. I wasn't aware it was such a flawed library, if it is?
Rails is maximized for developer happiness by, among other things, making things simple (yes, which to a large extent means hiding complexity), giving you a bunch of Omikase core features that you can in fact use, and gives you a lot of sugary methods for handling things that are tedious. I understand people wanting to try other things and leave Rails, no problem with that, but his stated reasons reveal a lot more about him than about Rails.

Continue this thread — 19 replies

Load more comments