ruby icon indicating copy to clipboard operation
ruby copied to clipboard

Mentors are apparently telling students to use class methods rather than create objects

Open PatrickMcSweeny opened this issue 5 years ago • 2 comments

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?

PatrickMcSweeny avatar Sep 29 '19 15:09 PatrickMcSweeny

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.

kotp avatar Sep 29 '19 16:09 kotp

(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.

sshine avatar Sep 29 '19 16:09 sshine

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.

kytrinyx avatar Oct 12 '22 22:10 kytrinyx