Entry level Ruby on Rails developer


You tried Rails and you love it but pure love does not pay the bills, so you want to find an RoR entry level job. What should you know?

So you participated on one of those Rails Girls events in your city, or you ended up learning web development at one of most known web sites like Codeshool or CodeAcademy (which are by the way great) but in any case, you are not sure how much is enough to get an entry level job in Ruby on Rails? *I would also like to mention that I do the technical interviews at my current job at Inspire (agency in Utrecht, creating digital products with meaningful impact) so this source might be very relevant. 😉

A while ago while searching for what a senior developer should know I came across a very interesting list of required topics for each level: entry, medior and senior. You can find a full list at stack overflow thread What Ruby and Rails Developers Ought To Know?. In this article I will go through the first step of the process, the entry level mandatory knowledge topics:

  • Create and setup a Rails environment
  • Use generators to create models, controllers and migrations
  • Create and use a migration to manage the database
  • Create a unit test using rspec/etc
  • Create a model and basic validations
  • Handle a GET request using a Controller, Model, and View
  • Handle a POST request using a Controller, Model, and View
  • Basic HTML, CSS and JavaScript
  • Basic GIT – clone, commit, push
  • Each item will be explained a little bit followed by the sources where you can learn more about it.

Create and setup a Rails environment

This means to be perfectly able to setup all necessary components for running ruby (if not by default), rails and other gems (libraries, like devise) you use in the project. This is something you already did on your machine but you will be asked to do it again on the company laptop (a lots of companies simply provide you with one).

For the windows users, I would advise you to have a dual boot or simply switch to some Linux distribution if you can, you will probably want Ubuntu. Developing with Rails on Windows is possible, but it is like eating lots of chocolate every day, at some point it will make you sick 😉 To this item of the list, I would add the ability to use your own development environment efficiently, that includes using terminal (command line) and text editor or choice (sublime, atom, …).

InstallRails

Terminal Cheat Sheet for MacOS – key bindings will not work on Linux but the rest will be more or less the same, if not, Google can help you to find equivalent

Atom editor tutorial – A tip for both Atom and Sublime, do not be afraid to use additional packages!

Sublime editor tutorial
Use generators to create models, controllers and migrations
I would add with understanding of what you are generating. As a beginner they teach you how to scaffold “some” files but it is very important to understand what was created! In practice, you will rarely use scaffold generator but know you options. You can find the list of generators if you run this command on your terminal:

    rails generate

Generators can help you improve your performance, they are not the most important thing to learn but they are super simple and useful!

Create and use a migration to manage the database (+ SQL)

The list does not mention using the database but it is self implied since any dynamic application will use the storage. As a safe bet you can learn more about the relational database systems, that would be PostgreSQL or MySQL. What you need to know is how to set a simple queries using SQL and not using the Active Record (those nice queries that Rails uses). Basic queries would be select, insert, update, drop, … Check W3Schools SQL Introduction.

After you understand how your database work you will have better understanding why you need to learn how to manage the database. The application domain (tables that you will have will change through the time) and you have to be able to migrate (change tables structure and or data) safely. No data should be accidentally lost in the process. Rails offers convenient approach to do that, learn more about migrations.

Create a unit test using rspec/etc (+TDD concept)

This is the one I would say it is mandatory but, believe it or not, there are still companies out there that do not do TDD (test drive development) or tests at all. I will assume you want to be a proper developer, therefor, writing automated tests should be something you are very comfortable with. But how to start? You will have to get yourself familiar with Rspec (http://rspec.info/) or Mini Test. Both are good but Rspec will allow you to do more. In the beginning you might want to stick with unit tests but later on, you will expand it with integration tests. Stack overflow can help you understand what am I talking about here.

Check following sources for more info:

Test Driven Development – approach of writing tests first

Back to basics writing unit tests first

More advanced for entry level developer – End to end testing with Rspec and Capybara

Create a model and basic validations (+ basic associations)

Model is something that stands between your data and the controller (part that decides what should be done). In order not to get any invalid data, you have to learn how to eliminate attempts of invalid data reaching your database. Validations can help you prevent no data for certain attribute (presence), validate uniqueness or inclusion in certain values. Read more about validations on official Rails Guide.

At this point, as an entry level, you don’t necessarily know how to create complex associations in between your models (ex. song has many authors and authors can have many songs) but you should be comfortable with understanding simple ones like belongto (student belongs to school) and hasmany (school has many students, assuming a student cannot have 2 schools). Confusing, read about associations and try to understand and learn how to use belongs_to, hasone and has_many! That will do for now.

Handle a GET/POST request using a Controller, Model, and View

I joined these two items because they are both simply the HTTP methods. They are very different and you have to know why, W3Shools explains it in a nice way, check HTTP Methods: GET vs. POST. How does that apply to Rails, check Intermediate Rails understanding model, views and controller.

You should be able to find the controller action, view and model methods that are used to render the url you are accessing at any given moment! Hint: it is very simple, you can always read it on the server log on the terminal, look for lines similar to:

Started GET "/blog/5-newer-blog" for 127.0.0.1 at 2016-04-24 22:18:17 +0200
Processing by ArticlesController#show as HTML
Parameters: {"id"=>"5-newer-blog"}
  Article Load (0.5ms)  SELECT  "articles".* FROM "articles" WHERE "articles"."id" = $1 LIMIT 1  [["id", 5]]
  Rendered articles/show.html.slim within layouts/application (15.0ms)
  Rendered layouts/_navigation.html.slim (0.2ms)
  Rendered layouts/_footer.html.slim (0.0ms)
Completed 200 OK in 192ms (Views: 120.2ms | ActiveRecord: 6.2ms)

Simply read it through it will make all the sense 😉

Basic HTML, CSS and JavaScript

Whatever you do you on the backed, you simply have to know to show it to the outside world. If you prefer backend development, you should still know the basic to understand better what the browser has to deal with when presenting the content. A lot of people at some point touched html, in school, back in time, things did not change drastically since then but there is still plenty of things you have to be aware of, finding sources for this 3 is the simplest one, so I will skip it here.

I will however extend this with saying the fact that many projects end up using bootstrap. Take a look at it because there are high chances you will end up on the project that is heavily based on it. And you can also see it as a good example how things could be done (not sure if should – not a frontender).

Basic GIT – clone, commit, push (+ using branches)

The last but not the least – git! After all the hard work you do, it would be a pity to lose the code and not share it with the rest. Git helps you with that. Git is a distributed version control system that most people use. What does that mean? It helps you save your progress and keep the older versions of your files, which allows you to go back in time, if something did not go well and collaborate with your team in the most efficient way. Do not underestimate the power of this tool and be wise while trying to do things with it! Understand what you do before confirming your actions! 😉

What is then Github or Gitlab? Those are simply the cloud based services for managing repositories. Most of the companies will have one of these solutions but there are more. Check Simple words for a gitlab introduction article that explains few important words for this topic. Also, as a newbie, you might not feel comfortable with your code being public on Github, so I suggest you use Gitlab where your repository can be private till the moment you decide it is time to share it with the world.

And that is it!

Seems a lot, ha? The list is extensive and it can be used for the orientation and estimation of the level you are at. Of course, if you are looking for an internship, less could also do 😉 All it takes is hard work and dedication but I guarantee that there will be no company that will reject you because of your programming skills if you know and understand these. Good idea is also to have your own project, a sample application that is available publicly, your future employer might appreciate that.

There is much more that makes a good developer, and it is related to the logic and the way of thinking and solving problems but that comes later I would say. First know what your tools are and what they can do for you. Programming is not about typing lines and lines of code, it is solving problems.