Never miss the opportunity to have someone review your code.
I use to play chess in high school. During some of my more competitive matches, I always had an audience watching. When the match was late and moves were crucial, people would always gasp and grunt in frustration. What did they see that I didn't? What did I miss? Coding is a lot like that. Sometimes you just stare at code so long that you don't see what it's doing... you see what you think it's suppose to do. Code reviews can help flush out things you may have missed.
Just the other day, I had a review done on my code. The reviewer found some slow spots in my code. I was pulling a list of 500+ records, iterating through said list and then paging the results. What I should have done was pull the list, page it and THEN iterate through it. This step shaved at least 30 seconds. HUGE impact! Did it chip at my ego... sure. I'm only human. But it helps me be a better programmer and now my project is more efficient. Win-win situation. If I just learn to check my ego at the door, then we as a team will learn, grow and win!
No comments:
Post a Comment