{"id":988,"date":"2021-01-01T10:44:00","date_gmt":"2021-01-01T08:44:00","guid":{"rendered":"https:\/\/arc.dev\/developer-blog\/?p=988"},"modified":"2024-04-17T11:31:06","modified_gmt":"2024-04-17T03:31:06","slug":"ruby-on-rails-interview-questions","status":"publish","type":"post","link":"https:\/\/arc.dev\/talent-blog\/ruby-on-rails-interview-questions\/","title":{"rendered":"11 Ruby on Rails Interview Questions and Answers"},"content":{"rendered":"\n<p>Looking to hire a Ruby on Rails (RoR) developer? You\u2019ll want to start by putting together an interview guide that can thoroughly test your candidate\u2019s technical knowledge.<\/p>\n\n\n\n<p>Experienced senior developers at Arc collaborated on this list of Ruby on Rails interview questions to help set the stage for your successful RoR technical interviews.<\/p>\n\n\n\n<p>Let\u2019s get started!\u00a0<\/p>\n\n\n\n<p><em>Looking to hire the best remote developers? Arc can help you:<\/em><\/p>\n\n\n\n<p><em>\u26a1\ufe0f Get instant candidate matches without searching<br>\u26a1\ufe0f Identify top applicants from our network of 350,000+ <br>\u26a1\ufe0f Hire 4x faster with vetted candidates (qualified and interview-ready)<\/em><\/p>\n\n\n\n<p><a href=\"https:\/\/arc.dev\/\"><em><strong>Try Arc to hire top developers now \u2192<\/strong><\/em><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"1.-consider-the-scenario-below-and-answer-the-following-questions%3A\">1. Consider the scenario below and answer the following questions:<\/h2>\n\n\n\n<p><em><em>The product team has a great new feature they want to add to your Ruby on Rails application: they want every model in the system to be able to retain special user notes. You realize that there will be a collection of forms and model code that will be duplicated in the dozen<\/em><\/em> <em><code>ActiveRecord<\/code>\u00a0models already in your application.<\/em><\/p>\n\n\n\n<p><strong>What are some strategies you can employ for reducing duplication and bloated Active Record models? What are the pros\/cons of each strategy?<\/strong><\/p>\n\n\n\n<p>Because Ruby on Rails is an MVC framework, it can become tempting to try and fit everything into the Model or the Controller. Ruby on Rails is a powerful framework that provides many different mechanisms for describing our application and keeping our models and controllers nice and tidy.<\/p>\n\n\n\n<p>Below are two ways of reducing fat models. They illustrate different levels of shared understanding between the extracted functionality and the model in question.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1.-use-activesupport%3A%3Aconcern\">1. Use&nbsp;<code>ActiveSupport::Concern<\/code><\/h3>\n\n\n\n<p>If the code really belongs in the model (because it relies on ActiveRecord helpers), but there is a coherent grouping of methods, a concern might be worth implementing. For example, many models in a system could enable a user to create a note on a number of models:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>require<\/strong> 'active_support\/concern'\n\n<strong>module<\/strong> <strong>Concerns::Noteable<\/strong>\n  extend ActiveSupport::Concern\n\n  included <strong>do<\/strong>\n    has_many :notes, as: :noteable, dependent: :destroy\n  <strong>end<\/strong>\n\n  <strong>def<\/strong> <strong>has_simple_notes?<\/strong>\n    notes.not_reminders_or_todos.any?\n  <strong>end<\/strong>\n\n  <strong>def<\/strong> <strong>has_to_do_notes?<\/strong>\n    notes.to_dos.any?\n  <strong>end<\/strong>\n\n  <strong>def<\/strong> <strong>has_reminder_notes?<\/strong>\n    notes.reminders.any?\n  <strong>end<\/strong>\n  ...\n<strong>end<\/strong><\/code><\/pre>\n\n\n\n<p>The Concern can then be applied like so:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>class<\/strong> <strong>Language<\/strong> &lt; ActiveRecord::Base\n  <strong>include<\/strong> TryFind\n  <strong>include<\/strong> Concerns::Noteable\n<strong>end<\/strong><\/code><\/pre>\n\n\n\n<p><strong>Pros:<\/strong><br>This is a great way of testing a cohesive piece of functionality and making it clear to other developers that these methods belong together. Unit tests can also operate on a test double or a stub, which will keep functionality as decoupled from the remaining model implementation as possible.<\/p>\n\n\n\n<p><strong>Cons:<\/strong><br><code>ActiveSupport::Concerns<\/code>&nbsp;can be a bit controversial. When they are over-used, the model becomes peppered in multiple files and it\u2019s possible for multiple concerns to have clashing implementations. A concern is still fundamentally coupled to Rails.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"2.-delegate\">2. Delegate<\/h3>\n\n\n\n<p>Depending on the source of the bloat, sometimes it makes better sense to delegate to a service class. 10 lines of validation code can be wrapped up in a custom validator and tucked away in app\/validators. Transformation of form parameters can be placed in a custom form under app\/forms. If you have custom business logic, it may be prudent to keep it in a lib\/ folder until it\u2019s well defined.<\/p>\n\n\n\n<p>The beauty of delegation is that the service classes will have no knowledge of the business domain and can be safely refactored and tested without any knowledge of the models.<\/p>\n\n\n\n<p><strong>Pros:<\/strong><br>This approach is elegant and builds a custom library on top of what Ruby on Rails provides out of the box.<\/p>\n\n\n\n<p><strong>Cons:<\/strong><br>If the underlying APIs change, your code will likely need to be updated to match. Instead of coupling to your model layer, you\u2019ve now coupled yourself to either Ruby on Rails or a third-party library.<\/p>\n\n\n\n<p><strong>Conclusion<\/strong>\u00a0:<br>This question helps demonstrate two critical skills every Ruby developer needs to develop: how to handle complexity from emerging requirements and how to decide the most appropriate refactoring.<\/p>\n\n\n\n<p>By working through different refactoring strategies, you can explore a candidate\u2019s problem-solving skills, their overall familiarity with Ruby on Rails, and their knowledge of MVC. Knowing what code is specific to the application and what can be generalized into a completely decoupled piece of functionality is important.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"2.-given-an-array-%5B1%2C2%2C34%2C5%2C6%2C7%2C8%2C9%5D%2C-sum-it-up-using-a-method%3A\">2. Given an array&nbsp;<code>[1,2,34,5,6,7,8,9]<\/code>, sum it up using a method:<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>def<\/strong> <strong>sum<\/strong>(array)\n  <strong>return<\/strong> array.inject(:+)\n<strong>end<\/strong><\/code><\/pre>\n\n\n\n<p>The summation of an array is one of the most fundamental concepts in programming, and there are a lot of methods to achieve it, such as iterating the array and summing the numbers. In Ruby, it\u2019s neat to know there is a method called\u00a0<code>inject<\/code>, because it\u2019s so powerful yet simple.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"3.-what-is-metaprogramming%3F\">3. What is metaprogramming?<\/h2>\n\n\n\n<p>Ruby developers should know what metaprogramming is because it is widely used, especially in popular frameworks such as Rails, Sinatra, and Padrino. By using metaprogramming, you can reduce duplicate code. However, the downside is that it increases the complexity of the code in the long run.<\/p>\n\n\n\n<p>Here\u2019s an example of metaprogramming in Ruby:<\/p>\n\n\n\n<p>A user can have a lot of roles, and you want to check the authorization.<\/p>\n\n\n\n<p><strong>Normal scenario:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>def<\/strong> <strong>admin?<\/strong>\n     role ==  'admin'\n<strong>end<\/strong>\n\n<strong>def<\/strong> <strong>marketer?<\/strong>\n    role == 'marketer'\n<strong>end<\/strong>\n\n<strong>def<\/strong> <strong>sales?<\/strong>\n   role == 'sales'\n<strong>end<\/strong><\/code><\/pre>\n\n\n\n<p><strong>Metaprogramming:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;'admin', 'marketer', 'sales'].each <strong>do<\/strong> |user_role|\n    define_method \"#{user_role}?\" <strong>do<\/strong>\n        role == user_role\n    <strong>end<\/strong>\n<strong>end<\/strong><\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"4.-give-the-output-of-the-stated-class-implementation%3A\">4. Give the output of the stated class implementation:<\/h2>\n\n\n\n<p><em>Given this&nbsp;<code>Human<\/code>&nbsp;class implementation:<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>class<\/strong> <strong>Human<\/strong>\n\n    <strong>def<\/strong> <strong>talk<\/strong>\n        puts \"I\u2019m talking\"\n    <strong>end<\/strong>\n\n     private\n\n     <strong>def<\/strong> <strong>whisper<\/strong>\n          puts \"I\u2019m whispering\"\n     <strong>end<\/strong>\n<strong>end<\/strong><\/code><\/pre>\n\n\n\n<p><strong>What\u2019s the output of:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><code>Human.new.talk<\/code><\/li><li><code>Human.new.whisper<\/code><\/li><li><code>Human.new.send(:talk)<\/code><\/li><li><code>Human.new.send(:whisper)<\/code><\/li><\/ol>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<ol class=\"wp-block-list\"><li><code>I\u2019m talking<\/code><\/li><li>NoMethodError: private method \u2018whisper\u2019 called for&nbsp;<code>#&lt;Human:0x007fd97b292d48&gt;<\/code><\/li><li><code>I\u2019m talking<\/code><\/li><li><code>I\u2019m whispering<\/code><\/li><\/ol>\n\n\n\n<p>To explain, the class object&nbsp;<code>Human.new.talk<\/code>&nbsp;is calling an instance method, so it works perfectly. The&nbsp;<code>talk<\/code>&nbsp;method is a public method and can be called by everyone.<\/p>\n\n\n\n<p>The class object&nbsp;<code>Human.new.whisper<\/code>&nbsp;is trying to access a private method, which it is not allowed to. Private and Protected methods are not accessible from outside. They are only used internally. This is an object-oriented design and can be used to structure the code, which the implementation is not supposed to expose to consumer object.<\/p>\n\n\n\n<p>Finally,&nbsp;<code>Human.new.send(:talk)<\/code>&nbsp;sends a bypass control check to the method so it can be called without raising an error. Same goes to&nbsp;<code>Human.new.send(:whisper)<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"5.-write-code-that-splits-a-given-array-of-integers-into-two-arrays%3B-the-first-containing-odd-numbers-and-second-containing-even-numbers.\">5. Write code that splits a given array of integers into two arrays; the first containing odd numbers and second containing even numbers.<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>%i|select reject|.map { |m| array.partition(&amp;odd?)}<\/code><\/pre>\n\n\n\n<p>or<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>array.each_with_object({odd:&#91;], even:&#91;]}) <strong>do<\/strong> |elem, memo|\n  memo&#91;elem.odd? ? :odd : :even] &lt;&lt; elem\n<strong>end<\/strong> <em># inject for ruby &lt; 2.0 is fine as well<\/em><\/code><\/pre>\n\n\n\n<p>The straightforward approach would be to call array.select to store odds and then array.reject to store evens. There is nothing wrong with this, except it violates DRY principle:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>odds = array.select &amp;:odd?\nevens = array.reject &amp;:odd?<\/code><\/pre>\n\n\n\n<p>Future modification of this code might accidentally change the only one line from the above pair, breaking consistency. It is not likely the case for this particular example, but DRY usually works for future use.<\/p>\n\n\n\n<p>One might notice that the latter example does one iteration through an array, while the former is still iterating the array twice, once for each method. In most cases, the performance penalty is not significant, but it should be taken into consideration when dealing with huge arrays.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<p class=\"has-background\" style=\"background-color:#d0f2dc\">Struggling with interview prep? Meet senior developers from Amazon, Microsoft, and Google now on Codementor. They\u2019ll help you tackle coding challenges, practice interviews, and sharpen your skills in live 1:1 sessions.<br><br><strong>Book a session with our <a href=\"https:\/\/www.codementor.io\/mock-interview-practices\">interview prep tutors<\/a> today! Your first 15 minutes are free.<\/strong><\/p>\n\n\n\n<p>Explore our other software development interview questions and answers to prep for your next remote job.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/arc.dev\/talent-blog\/javascript-interview-questions\/\">JavaScript Interview Questions<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/arc.dev\/talent-blog\/machine-learning-interview-questions\/\">Machine Learning Interview Questions<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/arc.dev\/talent-blog\/mongodb-interview-questions\/\">MongoDB Interview Questions<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/arc.dev\/talent-blog\/typescript-interview-questions\/\">TypeScript Interview Questions<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/arc.dev\/talent-blog\/selenium-interview-questions\/\">Selenium Interview Questions<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/arc.dev\/talent-blog\/spring-interview-questions\/\">Spring Interview Questions<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/arc.dev\/talent-blog\/data-engineer-interview-questions\/\">Data Engineer Interview Questions<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/arc.dev\/talent-blog\/reactjs-interview-questions\/\" data-type=\"URL\" data-id=\"https:\/\/arc.dev\/developer-blog\/reactjs-interview-questions\/\">React Interview Questions<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/arc.dev\/talent-blog\/data-analyst-interview-questions\/\">Data Analyst Interview Questions<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/arc.dev\/talent-blog\/vue-interview-questions\/\">Vue Interview Questions<\/a><\/li>\n<\/ul>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/arc.dev\/talent-blog\/sql-interview-questions\/\">SQL Interview Questions<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/arc.dev\/talent-blog\/devops-interview-questions\/\">DevOps Interview Questions<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/arc.dev\/talent-blog\/engineering-manager-interview-questions\/\">Engineering Manager Interview Questions<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/arc.dev\/talent-blog\/java-interview-questions\/\">Java Interview Questions<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/arc.dev\/talent-blog\/php-interview-questions\/\">PHP Interview Questions<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/arc.dev\/talent-blog\/ruby-on-rails-interview-questions\/\">Ruby on Rails Interview Questions<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/arc.dev\/talent-blog\/angular-interview-questions\/\">Angular Interview Questions<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/arc.dev\/talent-blog\/android-interview-questions\/\">Android Interview Questions<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/arc.dev\/talent-blog\/data-warehouse-interview-questions\/\">Data Warehouse Interview Questions<\/a><\/li>\n<\/ul>\n<\/div>\n<\/div>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"6.-how-would-you-flatten-the-following%3F\">6. How would you flatten the following?<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>hash = { a: { b: { c: 42, d: 'foo' }, d: 'bar' }, e: 'baz' }<\/code><\/pre>\n\n\n\n<p>to<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{ :a_b_c=&gt;42, :a_b_d=&gt;\"foo\", :a_d=&gt;\"bar\", :e=&gt;\"baz\" }<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\u03bb = -&gt;(h, key = nil) <strong>do<\/strong>\n  h.map <strong>do<\/strong> |k, v|\n    _k = key ? \"#{key}_#{k}\" : k.to_s\n    v.is_a?(Hash) ? \u03bb.call(v, _k) : &#91;_k.to_sym, v]\n  <strong>end<\/strong>.flatten <em>#\u21d2 note flatten <\/em>\n<strong>end<\/strong>\nHash&#91;*\u03bb.call(hash)]\n<em>#\u21d2 {:a_b_c=&gt;42, :a_b_d=&gt;\"foo\", :a_d=&gt;\"bar\", :e=&gt;\"baz\"}<\/em><\/code><\/pre>\n\n\n\n<p>Understanding recursion is important. While all these Fibonacci numbers and factorials are repeated over and over again, the real-world tasks are less academic. Walking through the hash in the described manner is often a must.<\/p>\n\n\n\n<p>The exercise might be stated as the exact opposite: given the \u201cflattened\u201d form of the hash, rebuild its nested representation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"7.-consider-the-following%3A\">7. Consider the following:<\/h2>\n\n\n\n<p><em>Given the following syntactic sugar:<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>(1..42).reduce &amp;:*\n<em>#\u21d2 1405006117752879898543142606244511569936384000000000<\/em><\/code><\/pre>\n\n\n\n<p><em>What makes this notation to be an equivalent of:<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>(1..42).reduce { |memo, elem| memo * elem }<\/code><\/pre>\n\n\n\n<p><strong>Does the Ruby parser handle this particular case, or could this be implemented in plain Ruby?<\/strong><\/p>\n\n\n\n<p>The candidate can monkeypatch to the Symbol class with their own implementation of the aforementioned syntactic sugar.<\/p>\n\n\n\n<p>E.g.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>class<\/strong> <strong>Symbol<\/strong>\n<strong>def<\/strong> <strong>to_proc<\/strong>\n  <em># this implementation in incomplete<\/em>\n  <em># \u2014 more sophisticated question: why?<\/em>\n  <em># \u2014 even more hard: re-implement it properly<\/em>\nlambda { |memo, recv| memo.public_send(<strong>self<\/strong>, recv)  }\n<strong>end<\/strong>\n<strong>end<\/strong>\n(1..42).reduce &amp;:*\n<em>#\u21d2 1405006117752879898543142606244511569936384000000000<\/em><\/code><\/pre>\n\n\n\n<p>There is not much magic in this example. An ampersand converts an argument, that is apparently a Symbol instance here, to&nbsp;<code>Proc<\/code>&nbsp;object, simply calling&nbsp;<code>to_proc<\/code>&nbsp;method on it. The implementation is&nbsp;<code>Symbol#to_proc<\/code>&nbsp;in done in C for performance reasons, but the candidate can write their own implementation in Ruby to make sure everything works as expected.<\/p>\n\n\n\n<p><strong><em>Answers to additional questions in the code<\/em>:<\/strong>&nbsp;\u2014 the code above fails when the callee expects to receive one parameter only<\/p>\n\n\n\n<p>(e.g. a try to use this implementation with&nbsp;<code>Enumerator#each<\/code>)<\/p>\n\n\n\n<p>will fail with an arity error:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>(1..42).each &amp;:*\nArgumentError: wrong number of arguments (given 1, expected 2)<\/code><\/pre>\n\n\n\n<p>To fix this, the candidate should use the splat argument to lambda and analyze the amount of actual argument passed:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lambda <strong>do<\/strong> |*args|\n  <strong>case<\/strong> args.size\n  <strong>when<\/strong> 1 <strong>then<\/strong> <em># each-like<\/em>\n<strong>when<\/strong> 2 <strong>then<\/strong> <em># with accumulator<\/em>\n...<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"8.-what%E2%80%99s-wrong-with-the-code-below-and-why%3F\">8. What\u2019s wrong with the code below and why?<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>require<\/strong> 'benchmark'\nputs Benchmark.measure <strong>do<\/strong>  \n    <strong>break<\/strong> <strong>if<\/strong> Random.rand(100) === 1 <strong>while<\/strong> true\n<strong>end<\/strong><\/code><\/pre>\n\n\n\n<p>Operator precedence matters! The code will return<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>LocalJumpError: no block given (yield)<\/code><\/pre>\n\n\n\n<p>As&nbsp;<code>do-end<\/code>&nbsp;is weaker than attracting arguments to the function, that\u2019s why one either needs to surround the whole call to&nbsp;<code>Benchmark.measure<\/code>&nbsp;with parentheses, or to use curly brackets instead of&nbsp;<code>do-end<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"9.-build-an-array-based-on-the-following-scenario.\">9. Build an array based on the following scenario.<\/h2>\n\n\n\n<p><em>Provided we have a hash of a fixed structure (e. g. we receive this hash from a third-party data provider, that guarantees the structure):<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>input = &#91;\t{a1: 42, b1: { c1: 'foo' }}, \n{a2: 43, b2: { c2: 'bar' }}, \n{a3: 44, b3: { c3: 'baz' }},\n\u2026 ]<\/code><\/pre>\n\n\n\n<p>How can one build an array of&nbsp;<strong>cN<\/strong>&nbsp;values&nbsp;<code>(['foo', bar', baz'])<\/code>?<\/p>\n\n\n\n<p>Some examples would be:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>input.map { |v| v.to_a.last.last.to_a.last.last }<\/code><\/pre>\n\n\n\n<p>or<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>input.map { |v| v.flatten.last.flatten.last }<\/code><\/pre>\n\n\n\n<p>Here one iterates through the array, collecting nested hashes and using an index to build the requested key name, but there is more straightforward approach.&nbsp;<code>Hash<\/code>&nbsp;is an&nbsp;Enumerable, which gives the developer an ability to query it almost as what has been done with an array.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"10.-consider-the-following-scenario-related-to-variables.\">10. Consider the following scenario related to variables.<\/h2>\n\n\n\n<p><em>Given the code below, how one might access the&nbsp;<code>@foo<\/code>&nbsp;variable from outside? Is it an instance variable, or class variable? What object this variable is defined on?<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>class<\/strong> <strong>Foo<\/strong>\n  <strong>class<\/strong> &lt;&lt; self\n    @foo = 42\n  <strong>end<\/strong>\n<strong>end<\/strong><\/code><\/pre>\n\n\n\n<p>You can access the variable with<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>(<strong>class<\/strong> &lt;&lt; Foo ; @foo ; <strong>end<\/strong>)<\/code><\/pre>\n\n\n\n<p>It\u2019s an instance variable and defined on Foo\u2019s Singleton method, or more specifically, the&nbsp;eigenclass&nbsp;of Foo.<\/p>\n\n\n\n<p>Each class in Ruby has its own \u201ceigenclass.\u201d This eigenclass is derived from&nbsp;<code>Class&nbsp;<\/code>class. Foo class is an instance of it\u2019s eigenclass. This eigenclass has the only instance Foo; it as well has instance methods, defined as class methods on Foo, and it might have instance variables, e. g.&nbsp;<code>@foo<\/code>&nbsp;variable in this particular example.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"11.-what-are-the-different-uses-of-ruby-modules%3F-could-you-provide-an-example-of-each-and-explain-why-it-is-valuable%3F\">11. What are the different uses of Ruby modules? Could you provide an example of each and explain why it is valuable?<\/h2>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>Traits\/Mixins:<\/strong><br><em>Examples: Mappable, Renderable, Movable<\/em><br>Traits\/Mixins is a useful alternative to class inheritance when there is a need to acquire behavior that describes a trait (e.g. Renderable) instead of an&nbsp;<code>is-a<\/code>&nbsp;relationship (e.g. Vehicle), especially when there is a need for multiple traits since a class can only inherit once.<\/li><li><strong>Namespace:<\/strong><br><em>Examples: Graphics, Devise, Finance<\/em><br>Namespace Ruby classes and modules to avoid naming clashes with similarly-named classes\/modules from libraries<\/li><li><strong>Singleton class alternative:<\/strong><br><em>Examples: Application, Universe, Game<\/em><br>Modules cannot be instantiated, therefore they can be used as an easy alternative to singleton classes to represent only one instance of a domain model via module methods (equivalent of class methods)<\/li><li><strong>Bag of stateless helper methods:<\/strong><br><em>Examples: Helpers, Math, Physics<\/em><br>Stateless helper methods receive their data via arguments without needing a class to be instantiated nor keep any state (e.g.&nbsp;<code>calculate_interest(amount, rate_per_year, period)<\/code>), so a module is used instead for holding a bag of stateless helper methods.<\/li><\/ol>\n\n\n\n<p>In addition to knowing the 4 different functions of modules in Ruby cited above, it\u2019s important that your candidate knows when to use a module v.s. a superclass when doing object-oriented domain modeling. This can greatly impact the maintenance of the code a few months down the road in a software project.<\/p>\n\n\n\n<p>For another practical example, a car-race-betting game allows players to bet on cars rendered on the screen as moving at different speeds. Players can print a sheet of game results representing each car\u2019s details and status to claim their prize at a casino when the game is over.<\/p>\n\n\n\n<p>If the candidate were to implement all of these details in a car object, and later introduce differences between a Jaguar, Mercedez, and Porche, the candidate would rely on a car&nbsp;<code>superclass<\/code>&nbsp;shared among three subclasses via inheritance. <\/p>\n\n\n\n<p>However, if in the future, trucks and horses are thrown into the mix as well, the candidate would have to split the ability of an object to move, the ability to render object on screen, and the ability to print object details into separate modules (Movable, Renderable, and Printable respectively), and mix them into each of Car, Truck, and Horse.<\/p>\n\n\n\n<p>Next, the three classes can each serve as a superclass for multiple subtypes as needed by the game (e.g.&nbsp;<code>JaguarCar<\/code>,&nbsp;<code>FireTruck<\/code>,&nbsp;<code>ThoroughbredHorse<\/code>). This will offer maximum separation of concerns and improved maintainability of the code.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h2>\n\n\n\n<p>Hope these Ruby on Rails interview questions help you find and vet a Ruby developer\u2019s technical skill.<\/p>\n\n\n\n<p>What\u2019s more important is to also review a candidate\u2019s past projects, how the candidate solves issues previously faced, and <a href=\"https:\/\/arc.dev\/developer-blog\/behavioral-interview-questions-tech\/\">other soft skills<\/a>. This is not an exhaustive list of interview questions, but these are some good ones to help you get started.<\/p>\n\n\n\n<p>Let us know below if you know any other Ruby on Rails interview questions!<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/arc.dev\/?utm_source=CTA-Banner&amp;utm_medium=Image&amp;utm_campaign=Blog-CRO\"><img decoding=\"async\" width=\"1024\" height=\"256\" src=\"https:\/\/arc.dev\/developer-blog\/wp-content\/uploads\/2022\/02\/Meet-HireAI-blog-CTA-banner-1024x256.png\" alt=\"\" class=\"wp-image-2106\" srcset=\"https:\/\/arc.dev\/talent-blog\/wp-content\/uploads\/2022\/02\/Meet-HireAI-blog-CTA-banner-1024x256.png 1024w, https:\/\/arc.dev\/talent-blog\/wp-content\/uploads\/2022\/02\/Meet-HireAI-blog-CTA-banner-300x75.png 300w, https:\/\/arc.dev\/talent-blog\/wp-content\/uploads\/2022\/02\/Meet-HireAI-blog-CTA-banner-768x192.png 768w, https:\/\/arc.dev\/talent-blog\/wp-content\/uploads\/2022\/02\/Meet-HireAI-blog-CTA-banner.png 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Have an upcoming technical interview? Here&#8217;s a comprehensive list of important Ruby on Rails interview questions to know how to answer.<\/p>\n","protected":false},"author":4,"featured_media":1013,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-988","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-interview-preparation"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>11 Ruby on Rails Interview Questions and Answers to Prepare For<\/title>\n<meta name=\"description\" content=\"Have an upcoming technical interview? Here&#039;s a comprehensive list of important Ruby on Rails interview questions to know how to answer.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/arc.dev\/talent-blog\/ruby-on-rails-interview-questions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"11 Ruby on Rails Interview Questions and Answers to Prepare For\" \/>\n<meta property=\"og:description\" content=\"Have an upcoming technical interview? Here&#039;s a comprehensive list of important Ruby on Rails interview questions to know how to answer.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/arc.dev\/talent-blog\/ruby-on-rails-interview-questions\/\" \/>\n<meta property=\"og:site_name\" content=\"Arc Talent Career Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/arcdotdev\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/arcdotdev\" \/>\n<meta property=\"article:published_time\" content=\"2021-01-01T08:44:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-17T03:31:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/arc.dev\/talent-blog\/wp-content\/uploads\/2022\/02\/Ruby-on-Rails-Interview-Questions.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1128\" \/>\n\t<meta property=\"og:image:height\" content=\"635\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Arc Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@arcdotdev\" \/>\n<meta name=\"twitter:site\" content=\"@arcdotdev\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Arc Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/arc.dev\\\/talent-blog\\\/ruby-on-rails-interview-questions\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/arc.dev\\\/talent-blog\\\/ruby-on-rails-interview-questions\\\/\"},\"author\":{\"name\":\"Arc Team\",\"@id\":\"https:\\\/\\\/arc.dev\\\/talent-blog\\\/#\\\/schema\\\/person\\\/5ab8d561ed1c4df83cf67128a502da7f\"},\"headline\":\"11 Ruby on Rails Interview Questions and Answers\",\"datePublished\":\"2021-01-01T08:44:00+00:00\",\"dateModified\":\"2024-04-17T03:31:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/arc.dev\\\/talent-blog\\\/ruby-on-rails-interview-questions\\\/\"},\"wordCount\":2015,\"publisher\":{\"@id\":\"https:\\\/\\\/arc.dev\\\/talent-blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/arc.dev\\\/talent-blog\\\/ruby-on-rails-interview-questions\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/arc.dev\\\/talent-blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/Ruby-on-Rails-Interview-Questions.jpg\",\"articleSection\":[\"Interview Preparation\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/arc.dev\\\/talent-blog\\\/ruby-on-rails-interview-questions\\\/\",\"url\":\"https:\\\/\\\/arc.dev\\\/talent-blog\\\/ruby-on-rails-interview-questions\\\/\",\"name\":\"11 Ruby on Rails Interview Questions and Answers to Prepare For\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/arc.dev\\\/talent-blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/arc.dev\\\/talent-blog\\\/ruby-on-rails-interview-questions\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/arc.dev\\\/talent-blog\\\/ruby-on-rails-interview-questions\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/arc.dev\\\/talent-blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/Ruby-on-Rails-Interview-Questions.jpg\",\"datePublished\":\"2021-01-01T08:44:00+00:00\",\"dateModified\":\"2024-04-17T03:31:06+00:00\",\"description\":\"Have an upcoming technical interview? Here's a comprehensive list of important Ruby on Rails interview questions to know how to answer.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/arc.dev\\\/talent-blog\\\/ruby-on-rails-interview-questions\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/arc.dev\\\/talent-blog\\\/ruby-on-rails-interview-questions\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/arc.dev\\\/talent-blog\\\/ruby-on-rails-interview-questions\\\/#primaryimage\",\"url\":\"https:\\\/\\\/arc.dev\\\/talent-blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/Ruby-on-Rails-Interview-Questions.jpg\",\"contentUrl\":\"https:\\\/\\\/arc.dev\\\/talent-blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/Ruby-on-Rails-Interview-Questions.jpg\",\"width\":1128,\"height\":635,\"caption\":\"how to answer Ruby on Rails Interview Questions and ruby interview questions\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/arc.dev\\\/talent-blog\\\/ruby-on-rails-interview-questions\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/arc.dev\\\/talent-blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"11 Ruby on Rails Interview Questions and Answers\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/arc.dev\\\/talent-blog\\\/#website\",\"url\":\"https:\\\/\\\/arc.dev\\\/talent-blog\\\/\",\"name\":\"Arc Talent Career Blog\",\"description\":\"Tech insights and career advice for developers worldwide\",\"publisher\":{\"@id\":\"https:\\\/\\\/arc.dev\\\/talent-blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/arc.dev\\\/talent-blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/arc.dev\\\/talent-blog\\\/#organization\",\"name\":\"Arc.dev\",\"url\":\"https:\\\/\\\/arc.dev\\\/talent-blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/arc.dev\\\/talent-blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/arc.dev\\\/developer-blog\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/Arc-alternate-logo.png\",\"contentUrl\":\"https:\\\/\\\/arc.dev\\\/developer-blog\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/Arc-alternate-logo.png\",\"width\":512,\"height\":512,\"caption\":\"Arc.dev\"},\"image\":{\"@id\":\"https:\\\/\\\/arc.dev\\\/talent-blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/arcdotdev\",\"https:\\\/\\\/x.com\\\/arcdotdev\",\"https:\\\/\\\/www.instagram.com\\\/arcdotdev\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/arcdotdev\",\"https:\\\/\\\/www.youtube.com\\\/c\\\/Arcdotdev\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/arc.dev\\\/talent-blog\\\/#\\\/schema\\\/person\\\/5ab8d561ed1c4df83cf67128a502da7f\",\"name\":\"Arc Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a0ede409fa33fc8968402c9e39b820b22e501e28ec7700d038eedfc80652d3aa?s=96&d=mm&r=pg\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a0ede409fa33fc8968402c9e39b820b22e501e28ec7700d038eedfc80652d3aa?s=96&d=mm&r=pg\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a0ede409fa33fc8968402c9e39b820b22e501e28ec7700d038eedfc80652d3aa?s=96&d=mm&r=pg\",\"caption\":\"Arc Team\"},\"description\":\"The Arc team provides articles and expert advice on tech careers and remote work. From helping beginners land their first junior role to supporting remote workers facing challenges at home or guiding mid-level professionals toward leadership, Arc covers it all!\",\"sameAs\":[\"https:\\\/\\\/arc.dev\\\/talent-blog\\\/\",\"https:\\\/\\\/www.facebook.com\\\/arcdotdev\",\"https:\\\/\\\/www.instagram.com\\\/arcdotdev\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/arcdotdev\",\"https:\\\/\\\/x.com\\\/arcdotdev\",\"https:\\\/\\\/www.youtube.com\\\/c\\\/Arcdotdev\"],\"url\":\"https:\\\/\\\/arc.dev\\\/talent-blog\\\/author\\\/arcteam\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"11 Ruby on Rails Interview Questions and Answers to Prepare For","description":"Have an upcoming technical interview? Here's a comprehensive list of important Ruby on Rails interview questions to know how to answer.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/arc.dev\/talent-blog\/ruby-on-rails-interview-questions\/","og_locale":"en_US","og_type":"article","og_title":"11 Ruby on Rails Interview Questions and Answers to Prepare For","og_description":"Have an upcoming technical interview? Here's a comprehensive list of important Ruby on Rails interview questions to know how to answer.","og_url":"https:\/\/arc.dev\/talent-blog\/ruby-on-rails-interview-questions\/","og_site_name":"Arc Talent Career Blog","article_publisher":"https:\/\/www.facebook.com\/arcdotdev","article_author":"https:\/\/www.facebook.com\/arcdotdev","article_published_time":"2021-01-01T08:44:00+00:00","article_modified_time":"2024-04-17T03:31:06+00:00","og_image":[{"width":1128,"height":635,"url":"https:\/\/arc.dev\/talent-blog\/wp-content\/uploads\/2022\/02\/Ruby-on-Rails-Interview-Questions.jpg","type":"image\/jpeg"}],"author":"Arc Team","twitter_card":"summary_large_image","twitter_creator":"@arcdotdev","twitter_site":"@arcdotdev","twitter_misc":{"Written by":"Arc Team","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/arc.dev\/talent-blog\/ruby-on-rails-interview-questions\/#article","isPartOf":{"@id":"https:\/\/arc.dev\/talent-blog\/ruby-on-rails-interview-questions\/"},"author":{"name":"Arc Team","@id":"https:\/\/arc.dev\/talent-blog\/#\/schema\/person\/5ab8d561ed1c4df83cf67128a502da7f"},"headline":"11 Ruby on Rails Interview Questions and Answers","datePublished":"2021-01-01T08:44:00+00:00","dateModified":"2024-04-17T03:31:06+00:00","mainEntityOfPage":{"@id":"https:\/\/arc.dev\/talent-blog\/ruby-on-rails-interview-questions\/"},"wordCount":2015,"publisher":{"@id":"https:\/\/arc.dev\/talent-blog\/#organization"},"image":{"@id":"https:\/\/arc.dev\/talent-blog\/ruby-on-rails-interview-questions\/#primaryimage"},"thumbnailUrl":"https:\/\/arc.dev\/talent-blog\/wp-content\/uploads\/2022\/02\/Ruby-on-Rails-Interview-Questions.jpg","articleSection":["Interview Preparation"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/arc.dev\/talent-blog\/ruby-on-rails-interview-questions\/","url":"https:\/\/arc.dev\/talent-blog\/ruby-on-rails-interview-questions\/","name":"11 Ruby on Rails Interview Questions and Answers to Prepare For","isPartOf":{"@id":"https:\/\/arc.dev\/talent-blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/arc.dev\/talent-blog\/ruby-on-rails-interview-questions\/#primaryimage"},"image":{"@id":"https:\/\/arc.dev\/talent-blog\/ruby-on-rails-interview-questions\/#primaryimage"},"thumbnailUrl":"https:\/\/arc.dev\/talent-blog\/wp-content\/uploads\/2022\/02\/Ruby-on-Rails-Interview-Questions.jpg","datePublished":"2021-01-01T08:44:00+00:00","dateModified":"2024-04-17T03:31:06+00:00","description":"Have an upcoming technical interview? Here's a comprehensive list of important Ruby on Rails interview questions to know how to answer.","breadcrumb":{"@id":"https:\/\/arc.dev\/talent-blog\/ruby-on-rails-interview-questions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/arc.dev\/talent-blog\/ruby-on-rails-interview-questions\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/arc.dev\/talent-blog\/ruby-on-rails-interview-questions\/#primaryimage","url":"https:\/\/arc.dev\/talent-blog\/wp-content\/uploads\/2022\/02\/Ruby-on-Rails-Interview-Questions.jpg","contentUrl":"https:\/\/arc.dev\/talent-blog\/wp-content\/uploads\/2022\/02\/Ruby-on-Rails-Interview-Questions.jpg","width":1128,"height":635,"caption":"how to answer Ruby on Rails Interview Questions and ruby interview questions"},{"@type":"BreadcrumbList","@id":"https:\/\/arc.dev\/talent-blog\/ruby-on-rails-interview-questions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/arc.dev\/talent-blog\/"},{"@type":"ListItem","position":2,"name":"11 Ruby on Rails Interview Questions and Answers"}]},{"@type":"WebSite","@id":"https:\/\/arc.dev\/talent-blog\/#website","url":"https:\/\/arc.dev\/talent-blog\/","name":"Arc Talent Career Blog","description":"Tech insights and career advice for developers worldwide","publisher":{"@id":"https:\/\/arc.dev\/talent-blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/arc.dev\/talent-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/arc.dev\/talent-blog\/#organization","name":"Arc.dev","url":"https:\/\/arc.dev\/talent-blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/arc.dev\/talent-blog\/#\/schema\/logo\/image\/","url":"https:\/\/arc.dev\/developer-blog\/wp-content\/uploads\/2021\/11\/Arc-alternate-logo.png","contentUrl":"https:\/\/arc.dev\/developer-blog\/wp-content\/uploads\/2021\/11\/Arc-alternate-logo.png","width":512,"height":512,"caption":"Arc.dev"},"image":{"@id":"https:\/\/arc.dev\/talent-blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/arcdotdev","https:\/\/x.com\/arcdotdev","https:\/\/www.instagram.com\/arcdotdev\/","https:\/\/www.linkedin.com\/company\/arcdotdev","https:\/\/www.youtube.com\/c\/Arcdotdev"]},{"@type":"Person","@id":"https:\/\/arc.dev\/talent-blog\/#\/schema\/person\/5ab8d561ed1c4df83cf67128a502da7f","name":"Arc Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/a0ede409fa33fc8968402c9e39b820b22e501e28ec7700d038eedfc80652d3aa?s=96&d=mm&r=pg","url":"https:\/\/secure.gravatar.com\/avatar\/a0ede409fa33fc8968402c9e39b820b22e501e28ec7700d038eedfc80652d3aa?s=96&d=mm&r=pg","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a0ede409fa33fc8968402c9e39b820b22e501e28ec7700d038eedfc80652d3aa?s=96&d=mm&r=pg","caption":"Arc Team"},"description":"The Arc team provides articles and expert advice on tech careers and remote work. From helping beginners land their first junior role to supporting remote workers facing challenges at home or guiding mid-level professionals toward leadership, Arc covers it all!","sameAs":["https:\/\/arc.dev\/talent-blog\/","https:\/\/www.facebook.com\/arcdotdev","https:\/\/www.instagram.com\/arcdotdev\/","https:\/\/www.linkedin.com\/company\/arcdotdev","https:\/\/x.com\/arcdotdev","https:\/\/www.youtube.com\/c\/Arcdotdev"],"url":"https:\/\/arc.dev\/talent-blog\/author\/arcteam\/"}]}},"_links":{"self":[{"href":"https:\/\/arc.dev\/talent-blog\/wp-json\/wp\/v2\/posts\/988","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/arc.dev\/talent-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/arc.dev\/talent-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/arc.dev\/talent-blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/arc.dev\/talent-blog\/wp-json\/wp\/v2\/comments?post=988"}],"version-history":[{"count":0,"href":"https:\/\/arc.dev\/talent-blog\/wp-json\/wp\/v2\/posts\/988\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/arc.dev\/talent-blog\/wp-json\/wp\/v2\/media\/1013"}],"wp:attachment":[{"href":"https:\/\/arc.dev\/talent-blog\/wp-json\/wp\/v2\/media?parent=988"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/arc.dev\/talent-blog\/wp-json\/wp\/v2\/categories?post=988"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/arc.dev\/talent-blog\/wp-json\/wp\/v2\/tags?post=988"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}