DEV Community

Maryam
Maryam

Posted on

My Experience with Code Review: It’s Not as Scary as It Sounds!

Reflections on Code Review

Hello folks! I wanted to share some thoughts and experiences from a recent code review collaboration.

How We Connected

I got introduced to my partner through a mutual friend. It's fascinating how connections can form, especially when working on similar projects or technologies.

Walking in Someone Else's Coding Shoes

Peeking into someone else’s code is a bit like snooping through their diary - you get to see how their brain ticks. And honestly? It was cool! I didn’t run into any "What the heck were they thinking?" moments or big hurdles. It was a smooth sail.

When the Spotlight Was on Me

Okay, let's be real, having someone review your work feels a lot like getting your English essay critiqued. But, it was great! Their feedback was solid gold. My README file looks snazzier now, and my code is friendlier with most Windows editors.

Issues Discovered

Let's dive into the specifics of the issues that surfaced during the review.

Issues I Raised in Their Repo

  1. Invalid Placement of <h1> Tags in Generated HTML
    Synopsis: The generated HTML files had the <h1> tags located outside the <body> tags, which is a violation of standard HTML practices.

  2. Clarification Needed for File vs. Folder Input
    Synopsis: There was ambiguity in how the program differentiated between file and folder inputs. Clearer instructions or a distinguishing mechanism could enhance user experience.

  3. Restrict input to .txt files only
    Synopsis: The program was open to accepting any file type, posing potential security risks and system crashes. Limiting input to .txt files would streamline the process and enhance security.

  4. Specific Type Annotations for readFile Function Parameters
    Synopsis: Loose type annotations for function parameters can lead to unpredictable results. Implementing specific TypeScript annotations can ensure consistent behavior.

  5. Lack of Validation for CSS Stylesheet URLs
    Synopsis: Any URL could be passed as a stylesheet without validation. Incorporating a validation check would prevent potential rendering issues or security vulnerabilities.

Issues They Raised in My Repo

  1. Missing .gitignore

  2. Non-generic paragraph split

  3. Readme improvements

  4. Missing command in Readme

  5. Main function not returning when path is missing

Resolving Issues

Was I able to fix everything? Yeah! And I owe a big thanks to my reviewer who didn't just point out issues but gave solutions too.

Learnings

More than anything, this experience was a great reminder that it’s good to get a second pair of eyes on your work. I learned a bunch - from coding tricks to the importance of clear notes. Plus, teaming up? Always a win!

To wrap up, code reviewing was a fun ride. It’s a blend of collaboration, learning, and honestly, a touch of humility. Would recommend! It's a growth opportunity.

Top comments (0)