Evaluating a deeper penetration into Google's open-source project
Tags: webdev, programming, opensource, typescript
Published: 2023-11-28 14:02:56

## Code Review

A lot of conversation regarding code review happened as you can notice from the PRs itself.

### PR #1 - [feature: Enable strict mode for workspace search #2032](https://github.com/google/blockly-samples/pull/2079)

>For this PR most of the reviews were about replacing the conditional check with optional chaining for better code readability. A couple of the reviews were about praising my code changes and writing a better if conditional check.

>Links to the reviews are here:
* [use optional chaining](https://github.com/google/blockly-samples/pull/2079#discussion_r1399607567)
* [praised usage of generics](https://github.com/google/blockly-samples/pull/2079#discussion_r1399608804)
* [use optional chaining](https://github.com/google/blockly-samples/pull/2079#discussion_r1399609010)
* [better if conditional check for readability](https://github.com/google/blockly-samples/pull/2079#discussion_r1399610952)
* [use optional chaining](https://github.com/google/blockly-samples/pull/2079#discussion_r1399611429)

>They approved both my code changes for this PR which I was skeptical about as I mentioned in the [previous blog post]() so that was a major win for me. Besides, I was curious about their review regarding why they prefer optional chaining in certain places and not for the others so I asked them to give me more information about the same. They provided me with an insightful reason why they chose optional chaining for certain scenarios. The conversation can be found [here](https://github.com/google/blockly-samples/pull/2079#issuecomment-1821335301).

### PR #2 - [feature: enabled TS strict mode in workspace-backapck, resolved TS errors](https://github.com/google/blockly-samples/pull/2080)

>For this PR, I received all sorts of reviews considering this PR had quite a lot of code changes compared to PR #1.

>Links to the reviews are here:
* [throwing an error when interface not found](https://github.com/google/blockly-samples/pull/2080#discussion_r1399617874)
* [using optional chaining](https://github.com/google/blockly-samples/pull/2080#discussion_r1399619128)
* [confirming the changes are good](https://github.com/google/blockly-samples/pull/2080#discussion_r1399620915)
* [trying a different approach for declaring types of args](https://github.com/google/blockly-samples/pull/2080#discussion_r1399621418)
* [using optional chaining](https://github.com/google/blockly-samples/pull/2080#discussion_r1399621950)
* [praising the code changes](https://github.com/google/blockly-samples/pull/2080#discussion_r1399622127)
* [early return when the value is not found](https://github.com/google/blockly-samples/pull/2080#discussion_r1399623954)

>Most of the changes asked during the PR review were straightforward. They provided a review for the code change I was skeptical about as mentioned in the [previous blog]() for this PR. They mentioned using `Blockly.serialization.blocks.State` type by itself for `json` argument but I'd already tried that before putting out the PR which I explained to them in [this conversation](https://github.com/google/blockly-samples/pull/2080#discussion_r1399621418). They eventually agreed to my reasoning and approved my code change after I presented them with my findings, so that was a major win for me. 

Overall this release was a 10/10 success for me in terms of achieving my goals and the outcome that I was looking for. They provided prompt reviews for my PR and merged it quickly as well and the changes were released for their respective releases, [v8.1.0](https://github.com/google/blockly-samples/releases/tag/%40blockly%2Fplugin-workspace-search%408.1.0) for workspace-search and [v5.3.0](https://github.com/google/blockly-samples/releases/tag/%40blockly%2Fworkspace-backpack%405.3.0) for workspace-backpack

I am quite happy with my progress in this course. From being skeptical and doubting whether I could take on this massive challenge of contributing to an open-source project to actually contributing towards _multiple_ of these open-source projects, was one hell of a journey. Thank you Professor David for teaching us Seneca College students one of the most vital skills in becoming a better developer. I will forever be grateful for these invaluable skills that you provided me with, helped me navigate this course and aided me in building confidence in myself that I can surely get any task done if I'm committed to pursuing it.