Associate Tech Lead
Trane TechnologiesModule Lead
MphasisRuby on Rails Developer
ExpertusSystem Engineer Trainee
InfosysTechnology Analyst
InfosysRails Engineer
Access Healthcare Services
HTML5

CSS3

jQuery

SVN

Swagger

Postman

GitHub

Atom
Hi, yes, so I'm Rashmi, I'm a Ruby full stack developer. I have been working in a range of domains including edtech, fintech, and telecom, and healthcare domains. I have worked as a full stack developer with Rails and React, VueJS and React. And also I have worked on the backend, like the Ruby API applications, and the databases I have worked on Mongo and MySQL. I have worked both as an individual contributor and I have also done design-level, architecture-level contribution on a lead level.
Can you explain the process of integrating a 3rd party javascript library with React application? Yes, so whenever I have worked as a full stack developer, I have used ReactJS and VueJS separately in two different applications. So if I have to integrate a 3rd party javascript library, for example, if I am trying to integrate ReactJS with Rails 6, Rails 6 comes in with a default webpacker added. So I do not have to separately add webpacker to the Rails application like we used to do before Rails 6 version. Like until Rails 5, it used to be separately there should be a webpacker added. And through that webpacker, we will add the javascript framework. But in Rails, webpacker comes in handy, like once I create the Rails application, webpacker is also installed. I do not have to separately install webpacker. Through the webpacker, I can install whatever JS framework I want to integrate with that Rails application. This will happen only with Rails 6. In earlier versions, we have to install webpacker separately. But with Rails 7, again this default webpacker has been removed.
How would you refactor a complex view template in Rails to increase clarity and performance? So if I have a complex view template, the first thing I would do is if there is a possibility of splitting it into partials, I would split that view template into possible partials and I would render the partials in the main container view template instead of having everything put together as one single view template. So based on the functionality it serves, I would break down the view template into multiple partial view templates and render them in the main view. And apart from that, if there is any feature of that view template that is being used by multiple other controllers, I would put that kind of view code into the helper and use it as a utility throughout the views that need that particular functionality of the view.
Can you discuss how RESTful principles apply to Rails routing? Yes, so RESTful principles, like if I take an example of any CRUD operation, so Rails by default comes in with the MVC architecture, which means so if I hit an endpoint, I should have defined that route already in my routes.rb file and through that endpoint that I have already defined in my routes.rb, the endpoint will, like if I hit that URL on a Rails application after I start the Rails server, that endpoint will actually route to the corresponding controller action and from that corresponding controller action, whatever data has to be acted upon will be performed and it will go to the corresponding model of that controller and from there if there is any data action needed, that will happen and all of these acted on data will come back to the controller from the model and it will come back to the view. This all happens if I have already defined the flow of the data through a route in the routes.rb file in my Rails application.
can you detail a testing strategy for ensuring mbc conference rails interact correctly with ajax codes testing strategy ensuring mbc conference rails interact correctly with ajax codes okay so in this case i would write a test for the controller action which receives the actual ajax method so if i have written an ajax method for a get api in my view so that ajax call will route to the get action of that particular controller from where i have routed that ajax call so i will write a test case for that controller's get action like in that case it would be like a show action if it is a member route it will be a show action in my corresponding controller so i would write a test case for that show action like what if the data comes in like based on the based on different data set there will be different test cases written like what if data has an id and routes to the get action like routes to the show action of that corresponding controller what if it doesn't have an id and come to this show action um and possible combinations of test cases i would write for the show action if i'm using a get api on an ajax code
how would you approach optimizing CSS selectors for both performance and maintainability in a web project okay so if there is a possibility that I have a CSS selector that is kind of nested so I would use the nested parent hierarchy to actually select that particular HTML element like to select that particular HTML element using CSS selector so I would use nesting hierarchy instead of directly calling that particular ID so I would minimize the use of ID in the HTML DOM that is one way I would handle the CSS selectors optimization and another way is like so if there is a case where I can change only the virtual DOM and not make alterations to the actual DOM the time it takes to load the time the assets take to load on the web page will be lesser so if there is a possibility of altering only the virtual DOM I would go for that like if I am using react.js I only alter the virtual DOM before modifying the actual DOM so that is one way of reducing performance issues using the appropriate CSS selectors
this ruby code is intended to handle errors during service execution explain what this code does and how it could potentially fail to handle certain errors this code does not help in handling errors begin handle service.execute error during service execution rescue service error if there is a service error you'd get a message ok ok ok ok in this case begin rescue block will handle errors while a service is executed but the kind of error it will handle is like only if the service has a service error this block will handle it in cases where the service has any other error other than service error like if the service has any data error or syntax error this code will not cover rest of the errors in the service this only covers the service error whereas like data error or migration error or syntax error or method error will not be covered through this rescue block
Given this active record query snippet in Ruby on Rails, explain what it does. Also suggest a way to improve its efficiency if it is called frequently. Okay, user.infersarticles where articles published is true. So this query includes, okay, users.articles where article published is true, okay. So this query basically will fetch all the articles that are published by the available users. So also it will limit to 10 records. So this will act as a select data query which will get all the published articles, which means where the published flag is set to. So this query will fetch all the published articles of the available users. So it will give result of user and their corresponding user and the articles they have published. So the problem with this query is if there is a bulk load of users, so there will be one query to fetch all the n number of users and another query to fetch all the associated articles of each user. So to improve efficiency, one way is like, includes will in itself reduce the number of data fetches possible. In case if joins is used in this case, it would end up in n plus 1 query problem, but because it already has includes used in it, it would be an efficient code if joins is as joins is not being used here.
how would you apply object-oriented programming principles how would you apply object-oriented programming principles to refactor arrays service object service object okay I have so far not written a real service object so if I have to refactor service object in dreams I think I will have to I have hands are not worked in this use case so if I have to still do it I am of the understanding that I will have to do data encapsulation if possible and if there is a possibility of implementing polymorphism like dynamic polymorphism inside of that object I would implement that for refactoring
What approach would you use to create animated transition and rails application views? It's good to have a question in answering this question out of the two little screens. Okay. What approach would you use to create animated transition and rails application views? Okay. The first approach I could think of in this case is I would use transitions through CSS. I would try to implement the transitions in my view through CSS code only. And with the combination of HTML and CSS changes, I can bring in basic level of animated transitions. But if it is something complex, I would take help of some JavaScript library. I can start with jQuery library also. And with React or Vue also we can achieve animated transition and rails.
How would you handle real-time data updates in Rails application with emphasis on minimal runtime impact? In this case, I would keep the application already structured on the view end so that if the data is expanding, the view scale doesn't get affected One way is RWD implementation Apart from that, based on the data, if there is any impact on the front-end I would properly paginate the list pages Scaling I would implement on show pages Redirection pages, if there is multiple redirection happening because of data changes I would try to implement the redirection as smooth as possible For example, I will put in transition animations during the redirection phase or keep the rest of the page static while I refresh only the required page So that way I keep the changes to the front-end minimal and unimpacted while making bulk bigger data changes