owc blog 2

 hat Code Review Changed Me

During my senior year of college, I decided to contribute to an open source project. I picked a small “problem” and submitted my solution as a pull request (PR) on GitHub. My code worked, passed the tests, and honestly, I thought I did a good job. But the first comment that came gave me pause:


“Your function is great, but it’s a bit too much work. Can you consider reducing it to a single responsibility?”


This comment seemed simple, but I realized at that moment: It’s not enough for code to just work. It also needs to be readable, maintainable, and understandable to others.


Later comments pointed out that variable names were vague, I was skipping some test cases, and I lacked modularity. The comments were not destructive, but they were clear. The criticisms were open-ended questions:


“Why was this part done this way?”


“Have you considered this approach as an alternative?”


I was initially discouraged, but when I went back and reviewed my code again, I agreed. I rewrote the code in cleaner, smaller chunks. When the same reviewer commented again, he wrote:


“Much better, well done. This way it’s more readable for other contributors.”


I learned that a good code review not only finds bugs, but also guides the developer. From a technical perspective, I learned how to apply concepts like the “Single Responsibility Principle” to a real-life scenario.


This experience radically changed both my approach to writing code and the way I comment on other people’s code. Now, when I do a code review, I pay attention not only to whether it works properly, but also to its structure, readability, testability, and maintainability. And most importantly: the tone of my comments. Instead of being harsh or authoritarian, I try to be descriptive and respectful.


Thoughts on Using AI

I got help with a few prompts from ChatGPT while preparing this article, such as:


“How to write a personal experience post about code review?”


“How to give constructive technical feedback?”


“Why is empathy important in code review?”


ChatGPT’s sample structures and suggested topics were very helpful in planning my article. In particular, the information it provided on “the impact of tone” and “asking open-ended questions” in code review helped me frame my own example more meaningfully.


But the experience itself, my feelings, my initial disappointment and subsequent transformation are all my own. I lived this story and only I could convey the emotional reactions and lessons learned.

Yorumlar

Bu blogdaki popüler yayınlar

owc blog

owc blog 3