Categories
Uncategorized

Review Review

This week I did my first code review.  I have never reviewed anyone else’s code before, and this was an interesting experience.  At times, the scope of this project feels insurmountable, but this code review gave me a great amount of confidence that we will be able to complete it.

Xinpeng was responsible for writing code to create, move and destroy the note blocks that will be used for our rhythm game.  The approach he chose was different than I expected, and I think quite elegant, with a waypoint object storing destinations, and the move function causing the blocks to move towards those destinations.  This method could allow us to create unique movements for the blocks as opposed to just a simple straight line.  I had never considered an option like this, but immediately saw the potential.

This simple and elegant solution has given me a great amount of faith in my team, not that I didn’t have faith in them before.  But this has showed me that even when I am not involved at all in a portion of the project, it will be done well.  The code was clean and probably better written than my own.

I also feel I learned a lot from this short exercise.  I learned how important documentation is, because I had no idea what the purpose of the waypoint code was until I read the README file that Xinpeng provided.  I was able to read the code and understand exactly what it was doing, but without the documentation I didn’t know the purpose. 

I also learned about keeping the code clean and a way to structure code that should have been obvious to me.  In the code I reviewed, the Update method was used exclusively to call other methods.  Those methods were all very clearly and descriptively names.  This made it so easy to see what was happening, and in what order.  I am going to implement these as I go forward, because I don’t want others to have to read through messy code.

I was dreading the code review, and honestly didn’t have much faith in the process.  It seemed like it might just be a way to discourage people.  I am pleasantly surprised, and happy to say that I was dead wrong.

Print Friendly, PDF & Email

Leave a Reply

Your email address will not be published. Required fields are marked *