Demand for Ruby on Rails is Still Huge
medium.com
medium.com
There is no tech stack in the world that will get you shipped and proving your business faster than RoR.
You'll fly through it.
1. Web development
2. Ruby/Ruby on Rails
3. Test Driven Develepment
If you're new to programming, start with something else. Trying to learn all three of these at the same time is not a recipe for success. Source: personal experience watching 100% of former mentees fail to make any progress with this tutorial.
Rails is not really for new learners in my opinion, since the famous Rails magic can obscure what's happening under the hood, and the framework itself has grown and evolved over the years. Nodejs is better for new devs in my opinion, but Rails really shines once you have the basics and a couple of small apps under your belt.
I'll take django for simplicity any day and run React from it's templates.
First I'd start with creating the database in Postgres. Create tables to hold data and any views needed to represent joined tables for convenience. Once that's settled, the express server comes next to create a CRUD API to work with the data and handle user authentication and authorization. This is dead simple and once it works there's little you need to touch. The database handles any data dependent business logic.
By this point you can make API calls and use the application through any REST client.
So now I just need to create a React client to consume the API and give a great user experience. Don't need Redux. Grab React-Router and a couple packages for UI components and you'll be up and running with the MVP in no time. Checkmate.
Not sure how you're beating Rails or Django at this, unless you're a 10X developer going against a normal one. For that matter, I'm willing to bet an experienced Drupal developer using drush would be faster setting things up.
Node will prob take longer if you're taking time to try out [new hotness lib of the day], though.
If so, would be cool to post it here to get a discussion going on it: https://hackerforums.co/show-hf-f7/
- make it a web app so the team can run tests
- add some charts
- keep it secure
- umpteen new semi related features
Would have been easier to just start at "rails new".
I think the surprising thing about this comment is that you actually developed using Django for all those years, and you still prefer RoR.
The vast majority of people on the web that comment invariably say they are pretty much the same and it depends on whether you know ruby or python better.
So people who already use python for finance or data science pick django.
I saw a study (old now, from the early days) that claimed they were about the same but that the admin page on django cut dev time by some %.
This is the first I've heard a long time django user say that rails was faster to develop and not about the same. Can you elaborate on why?
The efficiency you gain using Django on the admin side is lost with every other part of your app.
1. Active Record is superior to the Django ORM (which is still good). Being able to set scopes and do a lot of conveniences right on the model without needing to extend/override a manager is great. Being able to connect to an existing database for free is also great.
2. Controllers are great. The way they can be nested and composed is also powerful. Being able to mount a resource at any level in the hierarchy either alongside or beneath (or both!) is hugely powerful. I can state concerns at each level and 'forget about it' deeper. Eg, if my controller A needs to ensure a given user has access to that resource and all children, I can do that at level A and trust its handled so in the controller for level B or C (deeper layers) I am not worried about it.
2b. The syntactic sugar to add authentication/authorization/guards in controllers is incredible. `before_request :ensure_access`
3. Active Support is phenomenal.
4. You can build very elegant, flexible and powerful RESTful and RESTish API's REALLY quickly. And not just naive stuff that you can do with something like 10 lines of Flask ... but really foundational stuff that allows you to hit the ground running and then build on it layering in more security and functionality.
5. Polymorphic/STI power with Active Record. AR gives you so much more freedom to do polymorphism and bend your database to model your data as you see fit. With Django you are oftentimes stuck doing things their way. For instance if I want multiple classes to share a single database and get instantiated based on a 'type' field ... that is trivial in Rails and difficult with Django. Even moreso if you want to do relationships with those polymorphic objects.
6. Finally... the most important thing... it's sometimes difficult to model your domain/business inside of Django and by extension the Django admin tool. Let's say you have a friendship between two people. How do you create that in Django? You might have a many-to-many which means there is gonna be a join table somewhere. Do you ask your customer support folks to go into the FriendRelationship UI and 'create an object' connecting person_a to person_b and ensuring to choose the correct relationship type from the enum? Worse, you have too many users so you cant use a select field or search box without plugins and are left with two input boxes that expect a valid person ID to the FK. So now customer support needs a workflow for managing this data. I'd rather build my own "manage friends" page that will take me all of an hour and provide an experience modeled after the problem/task not the database.
Or let's say you have a more intricate transactional type of process where an object needs to be created with 3 or 4 child objects. The parent needs to be created first, then the children need to be created and linked to that parent. Sure, you can do this in the Django admin flow but at that point you might as well be writing `INSERT INTO...` queries. Again, I'd rather build my own tool. I will save SO much time building the API and the business logic for my program that I'll be afforded the time to build an administrative tool that is focused on tasks specific to my team/business not just a graphical representation of my SQL tables.
I could go on and on and on. I was a Django zealot for a long time and refused to drink the kool-aid. I bought into the hype from the community and trusted folks when they said "rails is magic, I don't like it" but that is a horribly naive approach and frankly I only hear it from less experienced engineers. When you get acclimated to Rails you realize there is no magic, it's all just straightforward code written by people who truly want to get things done. Perhaps I just align more with the Ruby way of thinking. Django folks tend to pride themselves on boilerplate and more complex interactions... like it's some kind of badge of honor.
You stick a check in the update controller for Friendship to destroy the object unless it has two members (or not to create without two) and additionally you add a "validates_numericality_of :friends, on: [:create, :destroy]" check on the model itself.
When someone "friends" another user, you create a new Friendship with both users as members. It's automatically bidirectional (but you probably want to add some approval logic in here, which is still pretty easy).
The manage friends page discussed is just a collection of all of the Friendships of which you are a member. You can use either update or destroy to remove you from membership, because now either will achieve the same thing.
It's funny hearing this because I was under the impression one of Django's core principles was to avoid boilerplate.
Like you, I've worked a ton in Rails and Django, but I started with Rails and always find Django work to be a slog -- particularly when it comes to environment configuration and administration. And the documentation for when you need to muck around under the hood is really not great.
And, invariably every Django application I've come across has tons of boilerplate.
I discovered it recently, and it has been great to be able to use various Python NLP libraries without having to learn a new stdlib, deployment stack, etc.
PHP and the laravel framework will be quicker to develop and faster to ship and perform more requests per second.
JS - Node/ Vue/react base provide one environment which can speed up development.
Still fast compared to Django, java, asp, go, perl, etc
Having serious large scale full stack Rails and non-Rails (Py or Node) under my belt now, it has become ever so clear how productive Rails is and how much of that is the fact that Ruby actually has a f*ing standard library (directed at JS). So I'm not surprised by these numbers.
Then with gems like devise, filterrific, simple_form, cocoon, carrierwave, sidekiq, and activerecord-import I can whip together apps so quickly it just boggles my clients' minds. The ecosystem is deep, rich, documentation is good if not great and the language has several paths to getting some serious speed improvements behind it (Graal/Truffle/Substrate and JIT).
Implementing the simplest things in the node ecosystem sometimes feels like wading through molasses. I love ES6/7 but damn for 95% of projects today regardless of (anticipated) scale I'd choose Rails to start with and then split off just the things which need to be fast or fancy like Delayed Processing / MQs, ETL, any data science, etc.
Hell, I even use it for quick n' dirty data analysis because working with Active Record is so easy. Rake import the data, then muck around with the Active Record models in Rails console. I honestly prefer this to working with Jupyter notebooks, unless I need graphing or something fancy out of sklearn.
"Rails can't scale" is a misnomer. Heroku and Github are RoR apps (or at least started there). At scale you might start pulling in some other services and technologies.
I enjoy programming with other languages but nothing beats Rails when it comes to getting a product out the door.
Last week I found out that a Rails app I built for a SAAS company many years ago is still running reliably and generating millions of dollars per year.
The painpoints I often run into with Ruby/Rails are concurrency and memory use. Both are addressable though.
Like for example I had a look at hackthon starters in rails, django and node and the node one has this cool dashboard https://hackathon-starter-2018.herokuapp.com/status
I think stuff like that is hard to do in rails. Also I was trying to do instant messaging in web2py and gave up and just wrote a service in node which was like 10 lines with express/socket.io.
Pragmatically I think it may be easiest to write the main app in rails of similar and link to a separate bit of node for stuff like the above.
* Your code is empirically around ~1 KLOC
* You won't have to maintain it in the future
So yeah: if you're going to make a one-off-deploy-once-never-touch-again message board/blog app with Google Maps integration, choose Rails. Otherwise: don't bother.
Making Ruby/Rails maintainable at scale is a sisyphean task: it's possible, but at an enormous cost. This is why there are several attempts to bolt a type system onto Ruby, the most recent one being developed by Stripe [0].
I've no hard numbers, but the narrative "without Ruby my startup wouldn't last long enough to worry about engineering it the right way" sounds very very suspicious to me when talking about even remotely complex problem domains. Your speed will drop to zero in about 3 weeks from the start when you have to refactor some fundamental piece of code/data structure anyway, and then better hope you at least wrote some tests. And having to write tests essentially halves your dev speed anyway, so I really am not sure where this "prototyping speed" meme comes from.
i've talked to other companies that have done similar things.
where are you getting any of this from?
I've worked on 5+ years old Ruby projects having around 100KLOC (including tests), and adding a timestamp to an internal API that affects several other internal microservices (something that shouldn't take more than 15mins) takes a week of code reviews and writing tests.
As I said, I don't claim it's impossible to make Rails maintainable. Instacart is apparently a good example of how to do that.
how much of your statement is driven by that one example? that seems like a broken process or a poorly designed system (orthogonal to rails) than anything else...
I'm not so sure about that. Even though the HN rating system shouldn't be abused to express dis/agreement it often is, and my comment seems to have more upvotes than downvotes so far.
> that seems like a broken process or a poorly designed system
I'm sorry, but saying that as long as your process isn't broken (whatever this means) and your system isn't poorly designed then Rails is maintainable seems to be a pretty weak argument. In a perfect world with perfect, non-changing requirements, no deadlines and understanding clients you can probably make Brainfuck maintainable :)
fwiw i voted you up because i strongly believe in constructive discussion around these things. i don't think you should take that as a signal that folks support this position.
> I'm sorry, but saying that as long as your process isn't broken...
i'm merely saying that from several shops i've worked at, including instacart, with many 10k+ lines of code rails codebases, i've never seen problems like what you've described and it sounds pathological for that specific application/company.
again my (and many others') point is that rails is absolutely maintainable, even at massive scale, and even in a world with ever-changing requirements, hard deadlines, and very loosely-understanding clients, and that all that takes is doing rails the "right way" (a comprehensive test suite, reasonable architectural design), and that it is still massively productive.
If you've got a dysfunctional team and poor design, the language/framework choice isn't gonna help you. There isn't a framework in the world that will save you from tight coupling, lack of styleguide, business logic scattered all over the place, poor test suites, or monoliths made by bootcamp graduates.
Talking about 1 KLOC and future unmaintanability is nonsense.
In order to scale, Ruby applications need very high coverage. This has nothing to do with Ruby and/or Rails though; it's a requirement of all the dynamically typed languages.
There are certainly missing functionalities that at some point will cause a roadblock (currently, threading is immature), however again, no framework can support all the possible functionalities.
Exactly, this is the "at enormous cost" bit I hinted at.
In case folks are wondering about what we mean by coverage...
In case folks are wondering about what we mean by coverage...
PS. Love Rails.
I don't think typed languages all get you away from this. You're gonna learn things that make you want to refactor things. Your standard typed Java app isn't going to get away without tests, there, since compile != correct for the vast majority of program designs.
You might be able to get "less obviously broken" for free - logic bugs but no 500 errors from unexpected exceptions, say - but is that so much better?
For the record, I do think typing solves real problems for Ruby. Speaking in terms of pure productivity, it will be helpful to bring in developers who just are not experienced at working without a type system. The downside is I think most of those problems are primarily generated by inexperienced Ruby developers writing non-expressive code. Working on large code bases with Ruby is a very strange and awesome skill. The way you name things and build standards around methods/class creation ends up being a huge positive IMO.
Making Ruby/Rails maintainable at scale is a sisyphean task:
it's possible, but at an enormous cost
Disagree. I've worked at two companies now with teams of less than 6 maintaining rails apps that have handled billions in sales.Rails can scale; the problem that Rails faces is that it is easy to get things going quickly, and lack of foresight or simple inexperience can create bombs of technical debt or scaling issues. For many years, Ruby was the lingua franca of 12-week bootcamp schools, and the code that that cohort of programmers made spanned the spectrum of quality, but it all went to production.
In other words, the problem with scaling Rails is not with the framework or with Ruby, but with the accessibility and ease of development making it easy for pernicious problems to enter the foundation of codebases.
Good ruby scales, bad ruby does not -- both exist.
I need
* Migrations
* Models with validations
* Views (prefereably statically typed)
* Controllers with built in routing and type safe routing methods.
* Static type checking.
* Great package management.
* Deploy to Heroku
I'm looking at https://luckyframework.org/ and it's looking very good. Using crystal as a type safe ruby.
https://github.com/aspnet/home
Linux/OSX works just fine.
https://users.rust-lang.org/t/how-not-to-use-unsafe-code/181...
I'll probably try it out when they eventually add Windows support, but if Ruby and Git are anything to go by, what starts out as second class always will be.
I'm currently using Rust, largely because `cargo` solves so many headaches, but I would prefer a garbage-collected language for most uses.
You can also go with a Docker+mounted FS, which'll let you run the code in the container, but edit the code with whatever.
Hell, I even do this on my mac so I don't have to worry about the rest of the environment setup.
Method chains are a trap in Rails and will always lead to NoMethodError sadness.
I've been programming in Ruby for 10 years and I have to say after writing Clojure for a bit I really enjoy the fact that nil behaves as an empty value, and is enumerable. It is not the purest CS interpretation of nil but it makes it way easier. If someone is really concerned to check to see if something is nil there is still .nil?
When have you had errors like Oh this is String [][]{} vs Int[][]{}? That kind of static typing gets in your way more than it saves you. Pretty much all my errors that would be saved with type checking involve nil and that could be handled as I stated above.
I got really into it and started using it with operators, eg
num_objects&.> 0And I thougt it was only me. I love Rails, but when I started learning it this was so confusing to me. Well, I understood what was happening, but I always expected an iteration or a method acting on nothing to simply return an empty result instead of an error.
1. So much faster. I'm getting super consistent 30ms response times on a heavily trafficked web app. AND I did this while completely ripping out a complicated layered caching system that I was using in last iteration of the app. It's just web app talking directly to postgres database, which sounded crazy to me, but actually works.
2. Socket/Channel goodness baked in. I built a real-time chat experience in about a day with Phoenix channels/presence. Makes it quite easy.
3. Less moving parts. Language level support for async tasks and in memory caching lets you do A LOT without installing/managing redis, queues, and other tools. For fancier use cases you still might want to go there, but for a lot of common tasks (send email after user registers for instance) you can go a long way with just Elixir. And you can keep related code together more easily because of this.
4. Easier testing and maintenance. Functional language by nature tends to lead to more modular, maintainable and testable code. Hard to appreciate this until you build a large-ish project with it, but I've found this to be very true.
$ grep -i 'php' hn.txt | wc -l 8
$ grep -i 'python' hn.txt | wc -l 50
$ grep -i 'react' hn.txt | wc -l 71
$ grep -i 'java ' hn.txt | wc -l 6
$ grep -i 'java,' hn.txt | wc -l 8
grep -i 'javascript' hn.txt | grep -v 'javascript:void' | wc -l 35
^^ thanks busterarm
$ grep -i 'objective' hn.txt | wc -l 2
$ grep -i 'object-c' hn.txt | wc -l 0
$ grep -i 'object' hn.txt | wc -l 4
$ grep -i 'haskell' hn.txt | wc -l 7
$ grep -i 'rails' hn.txt | wc -l
24 <<<<<<<
$ grep -i 'mongo' hn.txt | wc -l 10
$ grep -i 'mean' hn.txt | wc -l 21
$ grep -i 'lamp' hn.txt | wc -l
$ grep -i 'docker' hn.txt | wc -l 19
$ grep -i 'aws' hn.txt | wc -l 3
$ grep -i 'devops' hn.txt | wc -l 28
$ grep -i 'android' hn.txt | wc -l 18
$ grep -i 'ios' hn.txt | wc -l 21
$
There.
$ grep -i 'ruby' hn.txt | wc -l 25
$ grep -i 'ruby' hn.txt | grep -v 'rails' | wc -l 22
Most of my projects, were not web apps. ETL type things. When it was time for me to develop something with a web front-end, we still did not use Rails. Sinatra and (pick any template language off the shelf.)
Ruby and Rails are both large skills that take lots of experience and maybe even training to become competent at using. When hiring junior developers, I think based on my experience at least, a hiring manager would do well to defer them from learning Rails until the latest possible moment. Better to learn one major skill at a time.
(Then again most HN readers are probably not trying to get hired as a junior developer anywhere.)
Ruby on Rails isn’t a major skill that takes lots of experience. It takes experience to master it, but a junior dev could easily become productive in the framework almost instantly.
I don't see this your way. Junior devs are immediately productive? What kind of fantasy land is this? Junior devs need to walk before they can run. Everyone should know enough Ruby to parse them some CSV, if that's going to be part of the stack.
Then, they can pick up a Gem library for parsing CSV and never do that again. But having the experience of working around the edge cases and knowing enough core language features to know what parts are easy without any gems, is going to make you better able to spot "using the gem wrong," or even "the gem is doing it wrong" (which also totally happens!)
In my company, CSV was something we needed to have as a core competency (customers sending us data files, and bad data files, all of the time, ETL pipeline shaping them up and making them loadable into our custom schema...) and there were just two of us devs, so nobody's got time for pair programming. You're honestly going to ask a junior developer to start with "rails new" and then somehow trust what they produced, putting it on the internet?
A junior dev could easily become productive with a handful of gems too, and practically understand every part of what they did. That's the point. You don't keep all gems out of the picture forever, just long enough to learn what hard problems look like without having them solved for you.
If I'm a hiring manager and you're my junior dev, I want to start by seeing how you think, and I want to see you thinking with first principles so I can tell you where you're going wrong. I'll help you figure out the hard parts if you're struggling with something. But I do want you to struggle with those parts a bit, and I want to see it. If 95% of the work is done for you by a gem, then I might as well let you ask Rubocop and Brakeman what else you're doing wrong, and there's probably no point in having me here at all.
For one, CSV is part of the standard library. just "require 'csv'". No gems required.
Two, nobody without a really good reason should try implementing their own CSV parse library. RFC4180 doesn't even remotely reflect reality. It's several hundred lines of code to do right (about ~700 in Ruby currently, down from a bit over 2000 in earlier implementations). I hope they're good at RegExp.
Seven years ago, at the time I was starting the job I mentioned, this was not a thing. The gem was called 'fastercsv' and it was made a standard library in 1.9 – we were mostly working on 1.8.7 when I started, and 1.9.2 when I did the CSV implementation(s). It was a brand new standard library and it did not do all things for all people. Almost like they just picked a pretty good one off the shelf!
It still does not do all things for all people... today, you also have other competing implementations, say 'smartercsv' with most recent commit activity 4 days ago.
It's an implementation of CSV. If you know your CSV is pristine, you can parse it in a lot less than 700 lines. We had a utility that would output "pristine CSV" dumped out from whatever garbage the client sent us, in whatever Excel or other columnular format, and we had another utility that would only accept this "pristine" format. Sometimes things went wrong. More often than you expect maybe, and we'd fix them ... or sometimes we'd get the clients to fix their shitty files, and leave it the way we thought it should work.
Depending on what you need to do with the CSV, or how many ways you're planning on handling CSV, one could argue that you will be better served by a minimal implementation that you know exactly what it does and does not do, because you told it what to do. If it's making a mistake, that's yours. You own it! That's another boon, when the quality of the data is not guaranteed.
The standard library I remember has some great idiosyncrasies that you'll know if you've ever used it to work on bad CSV. So do all of the CSV libraries. I don't work on CSV anymore and my memory of it is not so good, so I can't tell you the war stories in perfect detail, but... suffice it to say there are several CSV libraries with different strengths and weaknesses.
We mixed and matched parts that served the specific need we had at any given time and place, until I was a total CSV expert. It was not a perfect ecosystem, and 7 years ago `require 'csv'` was simply not a thing. You had to pick one off the shelf, or roll your own. I'm really not sure what's different today. (Probably not much! Parsing CSV is not a core competency of either Ruby core team, or Rails.) We had our reasons though, to be sure.
The one I remember in particular was a bit that converted your CSV rows and columns and then turned them into arrays of hashes, or converted arrays of hashes into CSV, and then another piece that expected the hashes to be identically ordered. If you used all of the standard pieces, this worked great! I think it took multiple libraries to do this, actually, and some of them were not so standard.
But wait... hash keys are not ordered at all, and that's a property of hashes that is standard and well known. But in some cases the hashes do come back with their keys in a particular, consistent order, and in a perfect walled-garden use of the particular CSV library configuration that was expected by the people that wrote this crap, yeah everything worked.
Well, everything worked until you do get a CSV with an uneven number of columns in some of the rows.
Like I said, CSV was supposed to be a core competency for us. We would not have been successful if we just picked one CSV library and stuck with it. Or, that CSV library would have got a lot of free labor from us, I'm not really sure which. I'm not sure which is worse, either. I don't do that anymore though.
> Ruby Gem for smarter importing of CSV Files as Array(s) of Hashes, with optional features for processing large files in parallel, embedded comments, unusual field- and record-separators, flexible mapping of CSV-headers to Hash-keys
Hypothetically speaking, I don't know how you get around the fact that Ruby has way more code in it than any of the gems you'll want to pull in, but ignoring that, what's easier... getting a new gem certified, or writing just the parts you need and putting them through the normal review process?
The answer is not going to be the same each time you ask it.
Rails isn't very complex even now, especially if you separate the front end (a JS SPA) and the backend (an API Rails project). You can develop two different projects in two different repositories and forget all the asset pipeline. However you must know the frontend really well or the sum of the two projects is going to be much tougher than vanilla Rails views.
> I've been doing web development since 1994
> some CGI programs in C, CGI.pm (Perl), Struts (Java) and occasional PHP
I said junior developer, didn't I? :) and also mentioned that this was my first ("permanent") job (after college)?
Getting to know what's in a web framework, is exactly the learning curve I'm talking about. People complain about magic in Rails. I just wrote an ERB view "index.html.erb" and declared an empty method "index" in my controller. Add in a route definition, and now somehow they are all connected.
What is actually happening? Why does that even work?
If you've never used any web framework before, that's inscrutable magic. If you know what a correctly designed controller method looks like (it should maybe fetch some values, then render a view... and probably nothing else) then it's obvious. Getting over that hurdle is ... definitely not the kind of shit my first boss hired me to do. I'll say again, most of my assignments for the first year had nothing to do with "on a web page."
My stance on this (and how I did it as a junior) is to have someone implement a toy implementation of Active Record's basic relationships using Ruby meta-programming and to implement a basic request-response server. This is part of the curriculum of some bootcamps even.
If your junior developer can't do this, they shouldn't be touching your production Rails application. Your immediate goal on hiring them is to train them to be able to do this.
Having read the whole comment, I'd say that is spot on. I knew some SQL, but didn't start with Active Record. We used SQL client libraries to connect to our SQL database, which didn't have a Rails app built onto it until well into my second year.
I did all of that, except for the implementing ActiveRecord and the meta-programming. So I didn't really do any of that. We didn't have a production Rails app until it was clear that I was gaining proficiency, and I'd be sticking around long enough to get a handle on how to manage it. (I didn't write most of it. And we avoided metaprogramming pretty much at all costs.)
We had a production Microsoft Access app (no really, VBS in Access 2000), with a MySQL server on the backend, along with tons of perl, bash, and ruby to glue the important parts together. There was a Java app that handled the web side of things. I don't think I'll ever work in a place like that again! But it was the path I took, and now I work on pretty much exclusively Rails.
They may be using it, but they didn't mention it. As for Ruby work that I've done, infrastructure automation, ETL, systems programming and the occasional Jekyll or Sinatra project.
$ curl -s https://news.ycombinator.com/item?id=17205865 | grep -Eio '(php|python|react|java[ ,]|javascript|objective-c|objective|object-c|object|haskell|rails|mongo|mean|lamp|docker|aws|devops|android|ios|django)' | tr A-Z a-z| sort| uniq -c | sort -rn
295 javascript
95 react
65 python
40 aws
33 devops
29 rails
26 android
22 ios
21 mean
19 docker
15 django
13 haskell
10 mongo
8 php
8 java,
8 java
2 object
1 objective-c
1 objective $ links -dump https://news.ycombinator.com/item?id=17205865 | grep -Eio '(php|python|react|javascript|java|objective-c|objective|object-c|object|haskell|rails|mongo|lamp|docker|aws|devops|android|ios|django|ruby|rails|react|swift|node|docker)\b' | tr A-Z a-z| sort| uniq -c | sort -rn
87 react
63 python
42 javascript
39 aws
33 devops
29 rails
28 ruby
28 node
23 android
22 java
19 ios
19 docker
15 django
12 haskell
8 php
7 swift
5 mongo
2 object
1 objective-c
1 objective
Used links to get just the text and not the HTML markup. Used grep -O to emit just the part of the regex which matches so we can feed it all into a pipe that emits a single histogram. By ordering the pattern we can match "javascript" before "java" and not need to add the space or "," after "java" to exclude javascript (you could also use "\b" with grep -E).Case-insensitve and case-folded. Added a few other keywords.Since grep only emits the first match on a given line, this won't count properly if multiple keywords appear on one line.
Why did you search for "mean"?
Edit: here's another approach that splits the output into words first so that we can count multiple keywords on one line, along with a couple tweaks to the pattern to eliminate some false positives:
$ links -dump https://news.ycombinator.com/item?id=17205865 | tr -s '[[:punct:][:space:]]' '\n' | tr A-Z a-z | grep -E '\b(php|python|react|java|object|haskell|rails|mongo|lamp|docker|aws|devops|android|ios\b|django|ruby|rails|react|swift|node|docker)' | sort | uniq -c | sort -rn
87 react
63 python
42 javascript
38 aws
33 devops
29 rails
28 ruby
27 node
23 android
21 java
19 docker
18 ios
15 django
12 haskell
8 php
7 swift
6 nodejs
5 reactjs
5 mongodb
5 mongo
2 objective
2 object
1 reactnative
1 reactive
Another issue: this only grabs the first page of comments.If you or anyone wants to run this query on the full comment set, email us (hn@ycombinator.com) and we'll turn pagination off while you do that.
I can attest that the demand of Rails engineers is still large - why wouldn't it be? It isn't like the 15+ years of Rails code in the world just converted itself to another language.
But I will tell you one trend that I find very interesting and did not think I'd ever see: The lead-in for a full stack or even a backend position is the React/Redux part, not the backend technology.
Very often a position will be React + whatever you can do on the backend. For years, it was quite the opposite. You wanted to hire a Rails engineer who would dabble on the frontend where need be.
A lot companies I work will pay handsomely for a React developer, and they're quite sure they can teach the React developer whatever backend they use (usually Rails, Django, Flask, Sinatra -- in that order).
This kind of culture has always been around since way before Rails; unfortunately I've never learned how to turn it around. The team no longer has a database engineer :).
I'm especially interested as someone who's growing our own engineering teams and laser focused on getting people who can really crush it on the backend out of the gate (because I feel like we can teach the frontend pretty well).
The vast amount of projects and internal tools out there don't need to be "webscale" or process millions of requests a minute.
They are dwarfed by most media companies etc. Github's website sees far less than 1% of Facebook's traffic for example. On the other hand they have almost 30 million users so they are not exactly tiny.
Rails allows companies to grow quickly and focus on attracting users and delivering business value at the sacrifice of a re-write or complexity of managing rails and performance issues down the road.
If you need raw single process performance especially with parallelism then you probably should look beyond ruby. But the whole Rails doesn’t scale because Twitter meme is asinine.
Really, the vast majority of web apps built today will see hundreds of requests per minute.
Still, Github and Shopify have proven that Rails can scale to hundreds of thousands of requests per second. Which is a great number.
Said that, if my goal was to build an app with a simple set of features that don't change often, and that will serve 100 million users, where none of them is paying user, I would probably not choose Rails.
What would you choose in this case? I'm also a little confused where the user "paying" comes in. Is that in terms of the importance of that specific type of interaction or the concern of friction scaring of "free" users?
Whether that means the Job Providers in my sample simply aren't paying enough, Rails devs are sick of maintaining legacy Rails apps, or a combination of both, it seems like everyone I know who spent years working nearly exclusively with Ruby has now moved on to Go, Elixir, or Node.
At the end of the day though, the couple of jobs I did investigate were really pretty shitty. One company asked me to do a coding challenge... I said, "Sure, about how long will it take me?" "I dont know." "What's the subject matter?" "I don't know." "How will you grade the test?" "I dont know." "When do you need it?" "Thursday." "So the only thing you know about this test is it has to be done right now?"
They cant find talent and the company needs a budget programmer to clean up (legacy) problems.
I don't even entertain those interviews anymore. All of the other Ruby work available is more interesting.
It was nuts. Never seen anything like it.
When we were confronting the task of rewriting a large, undocumented, untested, msft db, and java (macro services) Rails was the easy part. Choosing a full fledged react app, with Rails as the api server was a harder decision, but based on who we had and what our immediate plans were it made sense. There is a decent argument now that just doing it all in Rails would of been faster, but the mobile part is going to be huge for us.
Finding senior rails devs is harder than it used to be though, hands-down. We converted a lot of django devs to rails and it's been a big win, according to them. "whalesalad" listed a lot of reasons why and I agree with all of those. We, at least in the past, at startups found Rails people to be more capable of full stack development and we needed that. But, that was probably just our experience in the 2009-2010 in the valley.
Money talks. I'm sure you can find someone in no time if you advertise $500k in compensation. Most employers balk at that rate, so most of the talent take the freelance/consulting route.
This means you have to go away and do some research to get your stack running.
This was enough to put me off.
persistance: spring-data, the JPA/Hibernate based library for SQL access appears to be very opinionated and is very simple to fully understand. I have never used MongoDB, but spring-data-mongodb is probably of equal quality.
DB migrations: What do you mean?
Support for Groovy Templates is legacy and not as equal as the other choices. Groovy is now Apache Groovy, and on the decline.
You can use the DI and config management container spring-core by itself. There are actually THREE web-frameworks: spring-webflux, spring-web and spring-web-mvc. Webflux is the new framework for "reactive HTTP", spring-web contains the conventional web/REST-server capabilities and spring-web-mvc offers mvc functionality with templates and depends on spring-web.
Correct me if I am wrong.
You are still missing Turbolinks, the rails console, JPA is nowhere as good as Active Record, rails scaffolding, Rspec, Devise, then you need to setup migrations... I could add a lot of other items, but no it's nowhere near rails yet. I've never found anything approaching rails for the speed of coding (but not the speed of execution unfortunately :/).
Rails templates is a very very small part of what makes it so quick to write code.
I think I agree about migrations. Flyway is useful but not as clean or easy as ActiveRecord and I think that depends on Ruby's dynamic nature so it would be hard to replicate.
You surely meant to write that the other way round.
Edit: JPA is usable yes, most ORM nowadays are quite good anyway, it's just that Active Record is still always one step above, it's a pleasure to work with.
Gems like 'bluepill' and 'god' have been instrumental in deploying and ensuring mission-critical processes like elasticsearch, and redis are always up. This system has been in production for over 4 years, and we're still cranking :)
So, I guess I just fundamentally disagree on the 'big' portion of that statement, but also, I think apps are by their nature not long lived, so I think it is a false requirement of a web framework.
That said, I also have had work I've done in Rails still powering the same website almost 10 years on, cacm.acm.org
I think you and I may just have worked on different kinds of things.
https://news.crunchbase.com/news/popular-web-frameworks-seed...
Set aside Angular could be the front end for Rails at the moment.
Consider this data: it would be interesting to know which of these get funded.
The funding may be an indication of agility i.e. which technology is the most successful and launching and iterating.
And then which technology makes it to scale will tell you which ones scale.
Sure, Ruby is amazing and sure Ruby on Rails is a great framework. But Ruby stalled right there -- RoR has been churning out regular updates and is still making strides in right direction, but look at Python and what happened with its community: the community didn't just stop at Django or Flask -- it went ahead in multiple domains and created useful libraries. The end result is, Python is used for far many types of projects (be it enterprise or robotics) where as Ruby is synonymous with only the Rails framework.
This is why Python has eaten up any potential share that could have gone over to Ruby and if that is not all, the Academics in Universities around the World are starting to take Python seriously and are teaching it (NOT RUBY!!) and if there was any space left for those grumpy Java Developers at the Enterprise level, well emergence of Spring and Spring Boot has swayed them back into Java's fold.
Still, it's easier to code a backend in Rails than in Phoenix (done that) or Django (inherited one). Both have extra layers that Rails proved to be unnecessary until the business scales to levels that very few companies reach. And if it doesn't, any MVP in any language can keep running fine for years. We can start debating about tradeoffs and premature optimizations but I don't remember any unicorn to shut down because it started with Rails (or PHP, hi Facebook!) and couldn't cope with the load. It's so much more about marketing and execution than technology.
This is not true. Rails is the most common back-end framework at coding bootcamps. But if you're trying to understand is happening to Rails, the biggest update is "Rails' model of serving HTML is dead/dying, and React took over a lot of Rails' old job". Bootcamps mostly teach JS now, for that same reason.
Sure rails may be more popular than other frameworks, but that's because Ruby has one major framework, whereas PHP has had 5 or so now.
If you read down the page, you see that PHP is actually more popular than Ruby.
I'm a rails dev. This is nice.
At this point I have a strong aversion to starting any product using a dynamically-typed language (regardless of framework). The initial speed and ease of development is repaid 10x later on in sheer engineering pain (if you're lucky enough to be successful, that is).
The only way to adress (but not eliminate, since it's impossible) technical debt is to refractor mercilessly and constantly. And then there is some merit to static type advertisement - as the tools and techniques to safely refractor are both more feasible and more available for these environments.
Hark! A counterexample has arrived! I spent a bunch of years creating and maintaining big Rails applications. I've spent the last couple years on a bigger application in Java. I didn't drink any kool-aid, I just think Java is a better tool for this. C# and other things may be even better; the key is the ability to write static analysis tooling, which includes, but is not limited to, a compiler's type-checking analysis. It's not that a language with strong static analysis support saves you from creating a mess, it's that it makes it easier and much less risky to clean up that mess over time.
I agree with everything in your second paragraph, and would emphasize the risk aspect of refactoring a big application without good static analysis tools. After the first few spooky-action-at-a-distance prod breakages due to refactoring, it becomes hard to argue for a merciless and constant refactoring culture, and much easier to become the grizzled veteran who is a risk averse gatekeeper discouraging major refactoring in code reviews (this was me).
That and: You don't (or at least shouldn't) write a big application anymore. The only other thing (other than horizontal scaling, that is) that microservice design makes easier is exactly code maintainance / refactoring. The practices around it have matured enough.
On the other topic: I've spent last year or so writing mostly JavaScript, and have moved to VS Code as my primary IDE. I'm pretty happy (was doing Java/Python before that, and PHP/Python before that, and some embedded stuff before that).
The truth is that a good tool (and VS Code is one hell of a tool) makes working in a dynamic language very usable. VSCode static analysis tools make my JS experience better than my previous NetBeans Java experience, all things considered.
And I'm now dabbling with TypeScript to see how that goes. I quite like the idea of "just enough typing" and I think type-hinting rather than static typing is the way forward in this networked future. It's simply that these JSON-ed distributed environment people work in now will make static typing languages frustratingly un-agile for large majority of use-cases.
I've worked with large rails, django, and node apps, and none of them have felt particularly enjoyable to work with from a feature development standpoint once a certain scale is achieved. This doesn't feel like a rails-specific problem to me, but that's just based on my experience.
You can architect clean software in any language. What happens is this: you learn a new framework (or sometimes learn a new framework AND the corresponding language it is build in). You don't know what is idiomatic. You haven't made mistakes yet. You're making progress on your idea and getting shit done though, so it doesn't matter. Long story short: you don't know any better. Hindsight is 20/20!
Next time around you try something new and blame your old woes on the framework. This time around you've learned a thing or two about how to properly organize your code. You've been bitten by a third party tool that stopped being maintained. You've grown and learned and become more wise. But... you still blame your past issues on the old framework.
At some point you've been doing this for decades and you start to learn about abstract patterns that are not coupled to frameworks: service-oriented design, domain-driven design, CQRS (command driven systems), event buses and event systems, clean architecture, separation of concerns, SOLID principles, etc... ONCE you are at that point, you will begin to realize that NONE of the frameworks are going to solve these issues and NONE of them are more or less prone to causing tech debt.
Long story short: keep building software and focus on principles not frameworks. Read up on SOLID. It just takes time to get better and to start building things that don't encourage debt.
Another thing to note: tech debt is not bad. People throw that term around all the time and use it as a proxy for "messy code". Nothing in life is free. Everything is a balance. Perfectly architected software vs move fast and prove the business and make a profit? Pick one. You're going to acquire some amount of tech debt along the way. It's like real debt... sometimes you gotta accrue monetary debt to make progress elsewhere.
Parent is definitely right, projects that are "designed right from the beginning" do not exist in reality. Everything has unknowns in the future, and it is better to be flexible and adapt the code base to them as they come rather than trying to plan everything out from day 1. Static typing does help with these adaptations, but it doesn't compensate for a lack of diligence in keeping the code clean as the software grows.
I'm not sure Ruby, Python, Javascript, etc. were really designed for large scale development (although people use them for that). I think this is the primary reason so many people complain about technical debt, hitting the wall/limit, needing to refactor, etc. And looking for another language. Their tools just were not meant to scale that large.
"Go was deliberately designed from the start to support large scale programs implemented by hundreds or thousands of different programmers. Those kinds of programs are written at Google, and Go was designed to be used to write programs at Google." - Ian Lance Taylor
More from Ian here - https://www.quora.com/Will-the-Golang-code-become-unmaintain...
Yeah, that's basically what invalidates the assertion. There's no language or framework that guards against the complexity of a large code base. Period.
Don't pin this on ROR. I have seen absolutely atrocious Django codebases, Clojure projects, etc...
Types do not solve this problem either. If you think static types prevent 'tech debt' you're delusional.
Good architecture can be had across the entire spectrum of tools and frameworks.
It's possible that for Scala development it is a fairly good option, and some of the pieces like the typesafe config library are pretty nice, but at this point we consider play to be more like a curse word representing incompatible inflexible garbage.
In any case, I'm with you in that some of the changes between major versions they did were painful, especially if the code was structured in certain ways.
If I had to create a new API from zero, I'd go with Rails.
Is there any competition here? I could be unfamiliar with other solutions, but I thought the purpose of using JS was to eliminate re-writing code in multiple front end languages.
You can't blame Ruby for speed and talk about Cordova just after, it's a bit ironic... Cordova is one of the slowest cross-platform framework I know and that's a big reason the adoption is not going that well.
Yes. Building a responsive web application.
https://m.signalvnoise.com/program-to-where-the-performance-...
Not to be pedantic, but I worked on Rails projects in 2006 and 2007, and had probably heard of it just a bit before that. This was during the initial Web 2 boom. I would not have thought that Rails was created much earlier than that, since I usually keep some track of at least major tech developments (although could be wrong, of course - I could have missed reading about it when it was created, or only first read about it after it became a bit popular). So anyway, I googled, and the Wikipedia article for Rails says:
>Initial release: 13 December 2005; 12 years ago[1]
Haven't used it lately, but I do keep reading that it is very mature and productive, as you say.
But anyway. A long time.
I had a customer with a full stack JavaScript application, coded when Angular 1 was all the rage. The development stopped, the original contractors moved to other customers. The customer wanted to resume development but after one year they're still having a very hard time finding somebody to work with such an ancient technological stack. Task one would be porting it to whatever is current today and probably rewrite substantial parts of it along the way. My bet is that either they'll spend nearly as much as they did years ago or let it die.
On the other side I've got a customer which started with a Rails 2 application in 2011 and ported it with not much pain to new versions of the framework. The next one will be the jump from 4.2 to 5.2.
The of course, the js ecosystem being what is it, everything changes. Stuff are not compatible anymore, docs disapear, new things are hot.
Mean while I have a django 1.4 project we migrated to 1.8 last year. The author was not a great dev. No tests. No docs. But it's a very stable stack, with lots of tutorials and a well integrated and compatible ecosystem. It was work, but not remotly a rewrite, and any python dev could have done it.
The current JS state of things, bith technological and cultural, leans to disposable projects.
The only successful JS projects i witnessed are ones from great teams. But the world is not made of mostly 10x dev.
I've worked with large and small organizations whose whole business ecosystem is built on Rails.
Including some very large publicly traded companies.
Sure things change - hashrockets are out for example - and I have regexed the codebase a few times, but the core business and presentation logic has stayed the same, and the process has been fairly painless, even when skipping a version now and then.
It actually makes sense to me. There are a lot of shops with legacy Rails apps, and they'll use Rails for new code too, because it's worked well and they don't need to do the shiny and new.
Some things get better with age. There's an advantage too, not being on the brand-spanking latest version of something – you get to let everyone else filter out the crap before it winds up in your production environments.
A few examples from recent Rails releases,
(1) Turbolinks is one thing that was widely regarded as absolute crap when it was released, but now I think it's a pretty non-controversial way for Rails developers to give their users a single-page experience without necessarily diving headfirst into JavaScript.
(2) If you rebuilt all of your Rails 5 apps to use the shiny new Encrypted Secrets in 5.1, ... surprise! 5.2 deprecates secrets in favor of the newer Encrypted Credentials feature.
I'm not saying there aren't good ideas in newer frameworks, but how many mature frameworks are still in active development? (Make a list) ... and how many of those would you actually like to use?
Though they may be more popular, I'm personally not seeing lots of people rallying behind Java and .NET, or making outrageous claims like that those platforms prioritize developer happiness. Rails developers like using rails.
I agree that Rails today is a mature platform and very good at what it does: server-side rendered web applications with a relational database backend.
Otherwise, the most prolific programmers I know personally that used Rails, have all moved onto other platforms at new jobs or for their new development projects. Mostly Go, modern JS frameworks (many of them), Python, and Kotlin.