2022 Highlights: Open Source Development! ✨
Tags: opensource, beginners, programming
Published: 2022-12-14 08:53:06

Looking back at 2022, I can certainly say that this year has been one of the best years of my life in terms of self-growth, learning, and productivity. 

## Tech Skills Gained ✅



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/likt5xnhhr1m1nsq1ij6.png)




## Cool projects I worked on 

- [rwar](https://github.com/saminarp/rwar) - My static site generator
- [Exploit](http://exploit.herokuapp.com) - A browser-based cybersecurity game built with three.js 
- Fragments - A cloud computing course project built with AWS tools 
- A Seneca College research project for automating the customer onboarding process using Optical Character Recognition (OCR). 
- Built multiple iOS and Android applications for my portfolio. 


## Open-Source Development 💻

I made some awesome contributions to these repos in the last 14 weeks. 

- [intel/cve-bin-tool ](https://github.com/intel/cve-bin-tool)- 2 pull requests 
- [ifmeorg/ifme](https://github.com/ifmeorg/ifme)- 2 pull requests 
- [glific/glific-frontend](https://github.com/glific/glific-frontend) - 1 pull request 
- [flutter/flutter](https://github.com/flutter/flutter)- 1 pull request 
- [humphd/my-photohub ](https://github.com/saminarp/my-photohub)- 2 pull requests 
- [rahat agency](https://github.com/esatya/rahat-agency) - 1 pull request 
- [fig/autocomplete](https://github.com/withfig/autocomplete) - 1 pull request 

## Two most recent open-source contributions 2️⃣

### 1. My favorite repository: [My-Photohub](https://github.com/humphd/my-photohub) 📸

I began working on this repository a few weeks ago as an internal project of Seneca College.  As someone who loves photography, I knew I had to contribute to this. 

### [The issue](https://github.com/humphd/my-photohub/issues/5): GitHub Action to Generate Website and Commit to Repo
{% embed https://github.com/humphd/my-photohub/issues/5#issue-1415473825 %}

### The solution 💡
This issue required me to work with GitHub Actions and what I had to do was use the images uploaded by the users and generate a website for them using GitHub pages. 

{% embed https://github.com/humphd/my-photohub/pull/34 %}


### 2. Risky contribution: Flutter 🔵

Flutter is an open-source UI software development kit created by Google and is used to develop cross-platform applications for Android, iOS, Linux, macOS, Windows, Google Fuchsia, and the web from a single codebase.

I took a huge risk making this contribution to Flutter, but I knew it was a very useful one and the biggest I have done. I wanted to step way out of my comfort zone to do something, unlike anything I had done before. At first, I did not think I would end up contributing to Flutter as I was just simply experimenting with the issue I was thinking about. After about four days of work, I figured it out. But of course, the pull request was not so smooth, and tonight I discovered I still have some failing tests which I need to address promptly.

##### A little bit of backstory... 📽️

This summer, I was working as a research assistant at Seneca College for their industry partner which is an exciting startup in the vehicle renting industry -  similar to Turo. 

I had to do a lot of research for an efficient and automated customer onboarding process for them as it was their number one priority. 
Their mobile application was built using Flutter and I found myself looking at a lot of Flutter code. Even though I was not directly involved in building the mobile application, I was required to quickly learn Flutter and therefore, Dart which is the language used by Flutter. 


### The Issue 📝

I took a big risk and filed the issue myself before working on it! So, how did the idea come about?
As I was browsing through the  5000+ issues currently filed on Flutter, it felt intimidating. I was not being able to find the right issue to work on. I tried working on one and it was going nowhere. Then, I had this sudden aha moment after reading many issues and thought, why don't I just file the issue myself that I was thinking about and work on it? I had seen many others do the same. 
The issue was filed by me as a new feature request. 

{% embed https://github.com/flutter/flutter/issues/116702#issue-1483858938 %}
## The Solution ✅

{% embed https://github.com/flutter/flutter/pull/116705#issue-1483930599 %}
Flutter uses a 4-dimensional matrix to transform the image a widget is producing just like OpenGL. To mirror that image we have to rotate it around an axis. 

To mirror it horizontally we have to rotate it around the y axis by 180 degrees, and to rotate it vertically we have to rotate it around the x-axis by 180 degrees. 
With that theory in mind, we can apply matrix rotation to get the expected results. And by applying the transformation we get the scary math results as in the photo.
I love maths! 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vq7rucaqmwdezlyx301k.jpg)

Flutter already has transform widgets and it has named constructors to facilitate different transformations like translate and scale, but it did not have one to flip/mirror. So inspecting their way of implementing those transformations, I simply plugged in the values for the final matrix for the arguments flipX and flipY. :) 
I know it sounds simple, but it took me a lot of figuring out and studying the codebase to come up with this. I did not honestly think it would work out as I was just experimenting with it and ...ta-da... it did work out! 

The hardest part about the PR was writing the tests. It took a lot of research, trial, and error. It took me around 4-5 days to complete the entire pull request and I still am fixing some failing CI/CD workflow tests.  
 

## Going forward... 🚀

I need to improve on code reviews and it is a big part of my 2023 goals.