My First Coding Review Experience

KJ Osenenko
3 min readDec 14, 2020

--

So, my first coding review went pretty well until we got to the live coding — which is the part I was most nervous about heading in. It actually wasn’t a very difficult problem, it was just a new way of going about writing my method that I haven’t used before in Ruby so it took me a bit to figure out.

The challenge was to initialize my new instance without any attributes passed in, and then pass in the values afterwards. Where as the code I had written, the values were passed in on initialization, which is how I have always done initialize methods in ruby. I find that I am, to somewhat of a fault, a creature of habit, so going about this a new way is difficult for me to break out of my normal pattern of doing things, but in the end is a valuable way to understand the different ways to do so.

I have found one of my biggest problems when faced with a coding problem is that I over analyze them and tend to overlook the easy solution making it more difficult than it actually is. During the review, nerves probably didn’t help with this. As my review can note from some of the earlier questions, I definitely tended to give the more advanced answer rather than just the simple answer to the question.

My original code to initialize a new instance of my class took the data from an API service. Passed a hash of data into the initialize method of the class as an argument. Then in the class method, initialized a new instance iterating through hash from the argument to set the value for each attribute at initialization.

The actual solution to do this the new way was to initialize a blank object with no attributes from the service. Then in the service class method, set the attributes and values for the newly created instance. So literally just doing what was being done in one method, and doing it in the other method.

As I mentioned earlier, I find that one of my biggest problems in coding is making the problem more difficult than it really is. I was all set write new methods where I would then have to zipper arrays together, thus making the solution much more difficult than it needed to be. However with the help of my reviewer, and working through my code I was able to come to the simple solution.

--

--

KJ Osenenko
KJ Osenenko

No responses yet