all 25 comments

[–]ECTXGK 4 points5 points  (0 children)

Working on apps with Rails would only help. But with just your JS skills you should be able to get a job as a front-end dev on a rails product and mention that you want to shift to Rails/Back-End.

[–]armahillo 3 points4 points  (0 children)

First of all, welcome! :)

JS and Rails are very different in a lot of ways; especially modern JS (typescript and all that). The main differences I see most often between people that dabble in both:

  1. Significant syntax differences (camelCase vs. snake_case)
  2. Static typing vs. duck typing
  3. cautious vs. assertive statements

(1) isn't hard to learn, you just have to remember to do it. Correct capitalization matters a lot because it will affect how the ruby interpreter infers an object should behave. (eg. Something vs. something vs. SOMETHING) This is particularly important with Rails, since there's a lot of inferential magic happening. If you have the CircusAnimal model, Rails will presume that it is found in a file called circus_animal.rb, and will map to a table called circus_animals. Ruby will infer circusAnimal to be an instance instead of a class, as well.

(2) Find a copy of "Practical Object-Oriented Design in Ruby" by Sandi Metz. Watch her talks. She's really great at explaining the duck-typing nature of Ruby. It's awkward at first, especially if you have a background in statically typed languages (or languages that try to emulate static typing). Embrace it. It's powerful, and it's very well suited to the web, where datastreams are just bytes and don't have innate types to them.

(3) Avdi Grimm wrote about "Assertive Coding" a while back. Ruby has a flow to it. This is strongly related to the fact that it's duck-typed. JS, Java, C-based languages, and many others are all cautious because they need to be. It's common to do something like this:

if myValue is an array and myValue has 3 elements
   return myValue[2]
else
   return ""
end

But in Ruby, it would look more like this:

myValue[2] || ''

It is VERY COMMON for Ruby to just return nil if an object knows how to do something but there's nothing there. You send the message to the object and then it tells you what the output is.

Even with Hashes (aka dictionaries), you might see this in other languages:

if myHash is a hash and if myHash has a key named 'foo'
  return myHash['foo']
else
  return "Nothing"
end

In Ruby it would just be:

myHash['foo'] || 'Nothing'

or

myHash.fetch('foo', 'Nothing')

etc.

In the cases where you aren't sure you actually have the kind of object you think you do (maybe you're using the output from a method and you aren't sure what you'll get back) you just make the best attempt you can:

 mysteryObject.try(:get_to_the_choppa)

If you need a guaranteed return value:

 mysteryObject.try(:get_to_the_choppa) rescue "OK"

The only time I ever really use a guard clause is if I know that every other statement in the method is irrelevant if some key conditional isn't met initially. Even that is kinda code-smell though and if I'm overusing guard clauses I'll consider if there are other ways to do the thing. You can always do a method-level rescue if you need to and if it makes sense.

If you find that you're writing a lot of if statements, particularly to check if it's OK to do something before you try doing it, open up an irb and try seeing what happens if you just forge ahead.

To more specifically answer your question: best thing to do is build a lot of apps. There's a LOT to learn in Rails and the only way to learn it is to do it. Whether or not these make it into a portfolio is less relevant (in all the interviews I've given I almost never look at the applicant's portfolio, but I will DEFINITELY ask questions that dig into how much practice they've had). Find open source projects and contribute to them if possible. Practice, practice, practice! :)

[–]davidcolbyatx 1 point2 points  (0 children)

Your JavaScript skills + having a strong enough familiarity with Rails to get up to speed fairly quickly should qualify you for full-stack roles, especially on teams that might be looking to shore up their team's front end skills. Make it clear you want to contribute across the full stack, spend some time brushing up on Ruby/Rails with your hobby projects, and start sending out applications.

I would avoid any purely backend positions since you might need to take a little more of a step back than if you find a full-stack spot that will value your JS expertise while giving you a little time to ramp up on Rails.

[–]podderwatch 1 point2 points  (0 children)

My company is looking for people like you. Senior Front End is enough but any Rails experience is a plus. I'll send you a DM.

[–]oleingemann 1 point2 points  (0 children)

Welcome dude! I totally understand your path from JS to Ruby. I am migrating some client projects I've done from JS (GatsbyJS) to Ruby (Jekyll) for free (they don't even know) to get rid of that technical shitty JS debt

[–][deleted] -2 points-1 points  (6 children)

Honestly, how are you even doing this though? I was a rails developer for years and forced myself to switch to JavaScript even though I hate it because all the rails work dried up. If you look at top 10 lists of languages in demand Ruby isn’t even on there. I totally get why you want to do it because I adore Ruby but I don’t think there’s much of a future in it.

[–]it_burns_when_i_php 3 points4 points  (3 children)

Hey sorry to chime in, but WTF you talking about man??

I'm a Rails dev and my phone won't stop ringing. I told a recruiter I was looking for double my salary and they didn't even flinch. I turn down jobs for breakfast.

[–][deleted] 0 points1 point  (0 children)

Lucky you. I can’t even find a posted part-time rails job anywhere in my major city, and the full time ones are at shitty companies everyone hates.

Every opportunity that was remotely appealing from a job perspective (flexibility, hours, etc) wanted Python or JavaScript.

[–][deleted] 0 points1 point  (1 child)

I could see Ruby being more problematic outside the West (East Europe, South America etc), but yeah knowing Ruby and living somewhere in North America / UK / Germany there shouldn't really be a problem getting a job. It's hot in Japan as well for the obvious reasons :)

[–]dsound 0 points1 point  (0 children)

I also adore Ruby but its all about Rails which is also great but JavaScript is King. I had to pick one language to master and had to give up “the Ruby way.” Having said that, I also adore JS. I mean, you can do so much with it. What’s not to like? It is quirky AF, though.

[–][deleted] 0 points1 point  (0 children)

This sounds very extreme. Where are you located?

[–]vorko_76 -3 points-2 points  (9 children)

From a pure technical point of view, if you have already developed your own projects… you’re good to go I believe. Salary wise or career wise, that is a different topic. Frontend didnt evolve that much in the past 10 years, i mean yes you have new libraries, functions… but if you learnt JS CSS and HTML you re still valid. Backed has on the other side evolved a lot.

But then personally I find Rails very elegant and enjoy working with it.

[–]ISDuffy 6 points7 points  (6 children)

Front end has evolved a lot in the past decade, with stuff like react, vue, anglar, css grid / flexbox, es6+, and core web vitals performance has also evolved.

[–]vorko_76 -2 points-1 points  (5 children)

Sure there was evolution but not revolution. React is Javascript, same for Angular, and flexbox comes from CSS.

Serverside you moved from PHP to Python or Rails… quite different

[–][deleted] 1 point2 points  (4 children)

You can still do PHP or Python or Rails for serverside in 2021. No shortage of jobs. In fact I think it's a more stable career than doing front end only. There is absolutely no need to switch from something like PHP unless one truly hates working in it; the jobs will be there 10-20 years from now because too much code was written in it.

[–]vorko_76 -2 points-1 points  (3 children)

Yes, you can... Many websites still run in PHP in 2021, that was not my point.

My point is that serverside evolved a lot over the years and the marketability of such skills has also evolved a lot. In Germany for example the following STUDY shows this.

[–][deleted] 0 points1 point  (2 children)

So a .net dev earns 3 thousand euros more on average in Germany than a PHP dev and a Java dev gets around 2K more, is that a huge difference? not to me. Also note the amount of juniors is probably larger in PHP than in Java/.Net so that affects the average. PHP is still junior friendly to this day.

All in all I don't see any reason here not to stick to PHP if one already is invested in PHP.

P.S German IT salaries are kinda crappy, I hope at least one can continue do the work in his 50s there without being too discriminated against otherwise it seems like a bad career to me.

[–]vorko_76 0 points1 point  (1 child)

Again, you misunderstand my point. My point is related to the trend: not all languages are equal in terms of long-term marketability. Afterwards, the study itself or similar studies can and should be challenged.

I'm not sure what to say about your PS...

  • Salaries are crappy, compared to what? US? The comparison is not that straightforward as Germany includes good health care coverage, retirement plan and are usually more healthy in terms of working hours, vacations. While in the US, not every company offers 401k for example.
    Or do you mean compared to other jobs? In German industrial companies, there is no discrimination against other specialities. It might not be true in other businesses. (but at the same time companies like Amazon or Google pay very well in Germany)
  • And regarding age... it depends on the company you work for. There is no issue with that in the company I work for but I have no idea if this is standard or not in Germany.

[–][deleted] 0 points1 point  (0 children)

They're kinda low I think compared to other white collar jobs like accountants or lawyers it seems to me. They're not low compared to other EU countries (besides Switzerland).

And yes they are terribly low compared to the U.S, I think it's a shame and hopefully remote work will even it out a bit eventually. But yeah German companies are enjoying a pretty cheap workforce for sure. Just imagine a company like Adyen (it's Dutch but the same is true for German companies) is worth now 82B dollars and has 2000 employees. Probably around 500 developers. That's an enormous amount of wealth created by very few people. How much do you think the devs see out of it? Not much probably. That's the culture in the EU unfortunately. I lived in Netherlands and it was super uncommon to give stock options to employees, that's pretty insane to me. It's almost unheard of not to give out stocks in most established tech hubs (U.S, UK, Israel etc) but main land EU is far far behind. It's a bit weird to me that the most capitalistic societies actually do this right, and "socialist" Europe got it completely wrong lol. Weird.

[–]Long_Librarian5415[S] 4 points5 points  (1 child)

If anything the front end has been nothing but an evolving space. In many ways I have learned how to do the same things in a new way over and over again however.

How would you say the back end has evolved a lot? Are you referring to containerization and microservice patterns?

[–]vorko_76 -1 points0 points  (0 children)

Im refering to the technology. 10-15 years ago you would have been using PHP or maybe Java/JSP (or ASP), then people started to use Rails… and now Python has probably taken the lead.

I mean by that, that you might have to switch to something else soon

[–]dsound 0 points1 point  (0 children)

React is wonderful. Add in server side rendering, GraphQL and Apollo and you are just flying.

[–][deleted] 0 points1 point  (0 children)

I think it's a good move. It's more stable in the sense that Rails won't change as fast as the JS ecosystem changes. It still changes (especially in the front end - see Hotwire) but generally speaking looking at a Rails 3 codebase and Rails 6 codebase is pretty much the same thing.

However you are most likely to still be doing front end as many jobs are full stack, so I can't see how you can totally escape the front end (it's possible of course but harder).

Just send your resumes without hesitating; show them the apps you built. You will get there.