ruby
ruby copied to clipboard
Mentors are apparently telling students to use class methods rather than create objects
I came across a solution for the 'Hamming' where the previous mentor was removed because of inactivity. In the solution, the student had instantiated an object inside of the class method that was being called by the tests. The mentor had advised the student that instead of instantiating an object, they should create multiple class methods and pass the data around as parameters.
In my mind, this is not good advice because classes exists purely to create objects, they are not meant as a place to store your functions. Your code cannot be "object-oriented" if you don't actually create an object.
Is it worth creating an official guideline for mentors to address this issue?
Patrick I added you to the Ruby Mentors room on Slack. Can we talk about it there a bit? Not all the mentors are necessarily tracking things here.
(Not a participant on the Ruby track in particular.) Without diving into the actual matter, this sounds like good stuff to put in the mentor notes for the exercise.
I'm going to assume that this has been discussed in the mentor's Slack and that the mentor notes have been updated accordingly. <3
Closing.