Which is Better for Beginners: Full Stack Rails or Full Stack JavaScript?

Learning a programming language is a necessary step in becoming a web developer. There is no definitive choice for the best language to learn first, but Ruby and JavaScript are both great options due to their active community, resources, and job prospects. So which language is better for beginners to start with?

Readability

Rails uses the Ruby programming language, which focuses on simplicity and productivity. The creator of Ruby, Matz, designed it to have an elegant syntax that is natural to read and easy to write. Creating a loop that counts to 5 is as easy as:

Screen Shot 2015-04-20 at 3.26.00 PM

By contrast, the JavaScript equivalent is:

Screen Shot 2015-04-20 at 3.27.41 PM

JavaScript lacks Ruby’s simple elegance and focus on human readability. Ruby often looks and reads like plain English, making it easier for new developers to understand the code they are reading and writing.

Advantage: Rails

Community

The JavaScript and Rails communities are both thriving. There has been an explosion in conferences and in-person meetups for both languages in cities all over the world. The Rails community stands out for its reputation of being friendly to beginners and autodidactic learners, while encouraging and supporting new programmers. The Full Stack Javascript community is “expert-heavy”, and usually assumes some background HTML, CSS, and JavaScript programming experience.

Advantage: Rails

Resources

There are many online resources for both languages, and both are regularly ranked within the top ten most commonly referenced languages on Stack Overflow. New Rails programmers are able to tread a well worn path using resources like the Rails Guides, Mike Hartl’s Ruby on Rails Tutorial and Ryan Bates’ RailsCasts. (At Bloc, we strongly recommend Mike Hartl’s Ruby on Rails Tutorial for beginners.)

While resources exist for the beginning Full Stack JavaScript developers, the landscape is far more fractured due to the many competing JavaScript frameworks, like Angular, Backbone, React, and Ember among many others. As such, it can be harder for new developers to know where to start when learning JavaScript.

Advantage: Rails

Best Practices

In software development, best practices are a set of informal rules that improve the quality of software. For beginners, following best practices makes learning how to code proficiently much easier. Rails shines in its use of best practices. Its strongly opinionated nature forces developers to use it in a commonly accepted way.

An example of how Rails’ opinionated nature leads to better code quality is strong parameters. Strong parameters require developers to make a conscious choice about which attributes to allow for mass updating and prevents accidentally exposing that which shouldn’t be exposed.

Screen Shot 2015-04-20 at 3.28.42 PM

While many JavaScript frameworks are focusing more on best practices and becoming more opinionated, they still lag behind Rails due to the overall fragmentation of JavaScript frameworks and younger average age of most of those frameworks.

Advantage: Rails

Job Outlook

The job outlook for Rails and JavaScript are bright. Both have a history of strong job growth, and are projected to continue growing in the future. In addition, salaries for Rails and JavaScript developers are high, and increasing every year.

Advantage: tie

Growth

According to an analysis by Indeed of the relative growth of web development frameworks, demand for Ruby on Rails developers is nearly five times the demand for Python, and nearly 10 times the demand for PHP.

The relative growth JavaScript isn’t increasing as much as Rails, but that is only because JavaScript is increasing from a much larger base.

Both languages are growing strongly and offer many job opportunities to aspiring developers. In general, there are more opportunities for Rails and Full Stack Javascript developers in startups and younger companies (those started in the last 5 years). Older companies will usually have older stacks, and will be more interested in developers experienced with legacy code bases. But at Bloc, we strongly recommend the beginners start with the Rails stack as the cornerstone of their web development skills.

If you’d like to fortify your Web Development skills, check out Bloc’s Full Stack Web Developer Track, or our Ruby on Rails or Frontend courses.

Salaries

Given the increasing demand for Rails and JavaScript developers, it is not surprising that salaries are high and continues to increase.

According to PayScale Ruby on Rails developer jobs pay an average of $69,606 nationally, and as high as $105,000 in some markets.

The national average for JavaScript developers in 2014 was $67,532, with some salaries reaching $92,143.

Rails First

The future for JavaScript and Rails developers is bright and the number of job openings and average salaries are on the rise for both. Beginners can start with either, but overall Rails provides a more supportive environment in which to transform from aspiring developer to experienced developer. With its focus on simplicity, readability, and elegance, Ruby is a better language with which to learn programming concepts. The Rails community is more established and geared toward beginners, while Full Stack JavaScript remains fractured amongst many competing frameworks, including Angular, Backbone, React, and Ember. Rails’ opinionated nature enforces best practices and makes learning how to code much easier. The supportive Rails framework, community, and ecosystem has led thousands of new developers to successful careers, which is why Bloc recommends learning Rails first.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.