Sunday, February 3, 2013

Code Review by Jan Chua


Sitting cross-legged on a low table, his laptop and the projector in front of him, Jan prepares for his code review. He then endlessly adjusts and re-adjusts the settings, anxious. Finally, he pushes back his glasses all the way up the bridge of his nose and begins almost sheepishly.

As he gains steam, the audience can't help but be enthralled. Here is someone who is speaking Programmer-ese, but is truly easy to understand. That, and the fact that his code is close to flawless, makes for one afternoon of kick ass code review.

The following is a summary of his report:

What were you working on? 

I am working on a basic form for entering data with files for entering time schedules (no automatic allocation of time slots and other complicated shenanigans). Frankly, there is nothing new about the problem as its idea is common and usual.


What was the issue / problem you encountered? 

• Keeping the problem complexity at bay
• Keeping code clean, readable, and easy to work on
• I needed to handle time data such that it:
          ◦ is easy to compute (for me and the computer)
          ◦ makes me not have to worry about timezones when doing the computations


What cool solutions did you find for it? 

I took advantage of the MVC pattern (for client and server-side code) as much as possible to keep code organized, cleanly separated by purpose, reusable, and at some degree, pluggable. Leverage on the usual object-oriented concepts to localize and isolate computations and other operations, hence, preventing the problem at hand to escalate in complexity due to implementation approach. As for the date and time information, store them as “epoch” – a representation of time since January 1, 1970 00:00 GMT+0 in seconds, computational errors due to uses entering date time data in different timezones.


Jan then goes on to share a lot more of his ninja moves beyond the topic of his code review, thus having his peers' undivided attention for more than an hour. June, our Training Director, could not find fault in his code as it is as close to perfect as can be. Other developers also expressed amazement at the level of Jan's adeptness in coding, as well as the ease at which he conducted his report and how easy he made it seem so that everybody understood it well.

That's Jan for you. A humble guy who ever so quietly does his job, but does it in a super mindblowing way that both his superiors and clients couldn't help but marvel in awe.

No comments:

Post a Comment