Showing posts with label yearinreview. Show all posts
Showing posts with label yearinreview. Show all posts

Thursday, 31 December 2020

What open-source projects have I contributed to Github in 2020?

Today is the last day of 2020, which means it is time to have my 2020 Github Rewind! Last year I've had 1,775 contributions on Github and I got 4,104 contributions as of today. You can see my Github profile [here](https://github.com/wingkwong). ![image](https://user-images.githubusercontent.com/35857179/103392217-b53f6200-4b57-11eb-95fc-8db1d6881080.png) Let's go through what I've worked on one by one in an arbitrary order. ## vote4hk/warsinhk ![image](https://user-images.githubusercontent.com/35857179/103001652-60ed1e80-4568-11eb-83f6-91d487248c94.png) [warsinhk](https://github.com/vote4hk/warsinhk) is a static website for [covid19.vote4.hk](covid19.vote4.hk). I've developed some components such as alert message boxes, datepicker, share buttons and etc, integreated react-i18next, did some bug fixing and revised the documentation. ## aws/aws-sam-cli [aws-sam-cli](https://github.com/aws/aws-sam-cli) is a CLI tool to build, test, debug, and deploy Serverless applications using AWS SAM. ![image](https://user-images.githubusercontent.com/35857179/103003177-436d8400-456b-11eb-9120-2154ea6a7898.png) I've worked on a bug ticket with Jacob who is a senior software engineer at AWS. The bug was about the attribute ``Command.ScriptLocation`` not being updated for ``Glue::Job`` when running ``sam build`` because dot notations were not supported. At the beginning, my implementation was a bit complicated and Jacob suggested to use ``jmespath`` to handle the querying for nested attributes in JSON instead. The pull request was merged after 2-month discussion. ## wingkwong/hk-address-parser [hk-address-parser](https://github.com/wingkwong/hk-address-parser) is an unofficial library for [Hong Kong Address Parser](https://g0vhk-io.github.io/HKAddressParser/#/), designed for Python applications. The usage is pretty simple. ``` from hk_address_parser import AddressParser # Single Query address = AddressParser.parse( "Eaton Hotel, 380 Nathan Road, Jordan") # Batch Query addresses = AddressParser.parse( [ "九龍觀塘海濱道 181號 9樓", "九龍長沙灣道 303號長沙灣政府合署 12樓", "九龍啟德協調道 3號工業貿易大樓 5樓", "香港中環統一碼頭道 38號海港政府大樓 7樓", "香港北角渣華道 333號北角政府合署 12樓1210-11室", "九龍旺角聯運街 30號旺角政府合署 5樓 503室", "九龍觀塘鯉魚門道 12號東九龍政府合署 7樓", "九龍深水埗南昌邨南昌社區中心高座 3樓", "九龍黃大仙龍翔道 138號龍翔辦公大樓 8樓 801室", "新界沙田上禾輋路 1號沙田政府合署 7樓 708-714室", "新界大埔墟鄉事會街 8號大埔綜合大樓 4樓", "新界荃灣大河道 60號雅麗珊社區中心 3樓", "新界屯門震寰路 16號大興政府合署 2樓 201室", "新界元朗橋樂坊 2號元朗政府合署暨大橋街市 12樓" ] ``` Then you can call the [methods](https://github.com/wingkwong/hk-address-parser#methods) to get the corresponding info. ## cli/cli ![image](https://user-images.githubusercontent.com/35857179/102997450-25e6ed00-4560-11eb-9ad6-b6fddd1cea28.png) [cli](https://github.com/cli/cli) is GitHub’s official command line tool written in Go. I've worked on the command ``gh gist create`` which is used to create a new Github gist with given contents. The feature has been released. For the usage, please check out the official documentation [here](https://cli.github.com/manuala/gh_gist_create). ## aws/copilot-cli ![image](https://user-images.githubusercontent.com/35857179/102997652-9b52bd80-4560-11eb-917a-1472d92c13f8.png) [copilot-cli](https://github.com/aws/copilot-cli) is a tool for developers to build, release and operate production ready containerized applications on Amazon ECS and AWS Fargate. I was responsible for a few bug fixing tickets and a feature adding an optional env flag to the command ``app delete`` with test cases. ## wingkwong/k8sgen ![image](https://user-images.githubusercontent.com/35857179/103000877-db1ca380-4566-11eb-9c83-5760d547b93d.png) [k8sgen](https://github.com/wingkwong/k8sgen), written in Go, is an utility which is designed to guide users to build their Kubernetes resources in an interactive CLI. At that time I was learning k8s and drilling down into the details of its internal designs. It was an experimental project. ```bash k8sgen jumpstart _ ___ | | _( _ ) ___ __ _ ___ _ __ | |/ / _ \/ __|/ _ |/ _ | |_ \ | | (_) \__ | (_| | __| | | | |_|\_\___/|___/\__, |\___|_| |_| |___/ ? What kind of object you want to create? [Use arrows to move, type to filter] ClusterRole ClusterRoleBinding Configmap > Deployment Job Namespace PodDisruptionBudget PriorityClass Quota Role RoleBinding Secret Service ServiceAccount ? What deployment you want to name? my-deployment ? What image you want to name to run? busybox ? Please select an output format yaml json > yaml ? What directory you want to save? /home/wingkwong/deployment.yaml ``` Result: ``` apiVersion: apps/v1 kind: Deployment metadata: creationTimestamp: null labels: app: my-deployment name: my-deployment spec: replicas: 1 selector: matchLabels: app: my-deployment strategy: {} template: metadata: creationTimestamp: null labels: app: my-deployment spec: containers: - image: busybox name: busybox resources: {} status: {} ``` ## cortexlabs/cortex ![image](https://user-images.githubusercontent.com/35857179/103001520-22effa80-4568-11eb-8066-e0c7096a6e6d.png) [Cortex](https://github.com/cortexlabs/cortex) is an open source platform for large-scale inference workloads. I added a feature to support ``.cortexignore`` file to exclude files/directories from cortex project zip and also updated AWS resource metadata. ## wingkwong/react-quiz-component [react-quiz-component](https://github.com/wingkwong/react-quiz-component) is a ReactJS component allowing users to attempt a quiz. I've added some new features and worked on some bug fixing tickets. Currently it got 10K+ downloads in NPM. ## alexellis/k3sup ![image](https://user-images.githubusercontent.com/35857179/103352491-4fb08e80-4ae1-11eb-913d-1a1c1c7fa7b8.png) [k3sup](https://github.com/alexellis/k3sup) is a light-weight utility to get from zero to KUBECONFIG with k3s on any local or remote VM. All you need is ssh access and the k3sup binary to get kubectl access immediately. I've made a pull request with the changes to add ``app info`` sub-command to show post-install instructions for an app and the app homepage link, so that users don't have to unnecessarily install again to see them, which was the only way till now to see post install instructions. The changes were implemented for nginx-ingress, cert-manager, metrics-server, tiller, linkerd, cron-connector, kafka-connector, minio, postgresql, kubernetes-dashboard, istio, and crossplane commands. ## inlets/inlets & inlets/inletsctl ![image](https://user-images.githubusercontent.com/35857179/103352425-2e4fa280-4ae1-11eb-89f4-e0ef8d57f1a7.png) [inlets](https://github.com/inlets/inlets) is a Cloud Native Tunnel written in Go and [inletsctl](https://github.com/inlets/inletsctl) creates inlets tunnel servers in the cloud. The same bug was found in both repository. When running ``get.sh``, the program will fail if the target folder contains a space. Therefore I made the same fix to both repository. The fix was simple enough - just added several double quotes. ## My Self-Learning Playgrounds I learn something new by doing when I feel bored. Here's the list. - [aws-playground](https://github.com/wingkwong/aws-playground) - [azure-playground](https://github.com/wingkwong/azure-playground) - [gcp-playground](https://github.com/wingkwong/gcp-playground) - [qsharp-playground](https://github.com/wingkwong/qsharp-playground) - [nlp-playground](https://github.com/wingkwong/nlp-playground) - [deno-playground](https://github.com/wingkwong/deno-playground) - [gRPC-playground](https://github.com/wingkwong/gRPC-playground) - [argocd-playground](https://github.com/wingkwong/argocd-playground) - [skaffold-playground](https://github.com/wingkwong/skaffold-playground) - [traefik-playground](https://github.com/wingkwong/traefik-playground) - [lxd-playground](https://github.com/wingkwong/lxd-playground) ## wingkwong/competitive-programming [competitive-programming](https://github.com/wingkwong/competitive-programming) contains CP solutions (mostly written in C++) from different OJs and contest sites with explanations. I believe most of the commits come from this repository as I've solved quite a lot of problems this year. ![image](https://user-images.githubusercontent.com/35857179/103392596-a48feb80-4b59-11eb-8a12-8b87cbaca11f.png) Competitive programming is a mind sport for programmers to solve mathematical or logical problems. I started my CP journey in 2014 and I had a chance to participant in ACM-HK Collegiate Programming Contest in 2015. I took a long break since then. Most of the people practice lots of CP problems just to get into FANNG companies but I only treat it as a hobby. ## Conclusion In 2020, I mainly worked on CLI projects in Go, practiced 1000+ CP problems in C++, and learned cloud native stuff. In the next year, I believe I'll focus on advanced algorithms. Probably I'll try to use different programming languages to solve the CP problems to sharpen my programming skills.

Tuesday, 31 December 2019

What open-source projects have I contributed to Github in 2019?

Today is the last day of 2019. I wonder what I have done throughout this year. I decide to take a look at my Github page and have my 2019 Github Rewind. I found that I've 1,775 contributions on Github this year. ![image](https://user-images.githubusercontent.com/35857179/71611572-ebf53c00-2bd4-11ea-8a8c-90b8f2a79d5f.png) The most used programming language is JavaScript. In 2020, I would write more code in Python and Go. ![image](https://user-images.githubusercontent.com/35857179/71611608-3bd40300-2bd5-11ea-9e1e-cc2dd6bedda8.png) Compared with the last year, the number of contributions decreased by 4.6%. This year I've worked on several projects and let's go through them one by one. # pyramid [pyramid](https://github.com/wingkwong/pyramid) is a JSON-based Business Rules Engine. I created it just because I was bored and I was working on Red Hat Decision Manager at that time. It is nothing special and I was trying to explore the power of the Rete algorithm. # react-quiz-component ![image](https://user-images.githubusercontent.com/35857179/71610338-00ccd200-2bcb-11ea-945c-6accccd5f3c0.png) [react-quiz-component](https://github.com/wingkwong/react-quiz-component) is a ReactJS component allowing users to attempt a quiz. Once again, I created it just for fun and I didn't expect the downloads now go to 7.3K. I kept adding features constantly. Here's the [demo](https://wingkwong.github.io/react-quiz-component/). # Ourland Searching ![image](https://assets.collaction.hk/project_image/dfc3a399583ab583e0acb4ba6a6c84fd111728309a7ce82b29f95b7a8392b9fc2c98a9686d5a9fa87911daabc04d0d4b.jpg) [Ourland Searching](https://github.com/OurLandHK/WebApp) was my first contribution project written in ReactJS with Firebase. It is a Neighbour Media Web Application where neighbors could browse community events within 1 - 3 kilometers based on the current location, filter their interesting posts and participate in some events related to public facilities, community activities or social issues. # Ourland Bigpost ![image](https://user-images.githubusercontent.com/35857179/71610432-f3fcae00-2bcb-11ea-99af-6d27dd414a97.png) [Ourland BigPost](https://www.collaction.hk/s/wall/) is Ourland Searching's Native IOS/Android version written in Flutter with Firebase. It is my first Dart language project. Basically it is a location-based chat app and you can download it on [Google Play Store](https://play.google.com/store/apps/details?id=hk.ourland.wall&hl=en_US) or [App Store](https://apps.apple.com/us/app/bigpost/id1483312010). When I was working on this project, we needed some other Dart plugins. Therefore, I created [dart_tel_input](https://github.com/wingkwong/dart_tel_input) which is a Dart widget for entering international telephone numbers with dropdown searching input countries, [geodesy](https://github.com/wingkwong/geodesy) which is a Dart library for geodesic and trigonometric calculations working with points and paths, and [rich_link_preview](https://github.com/wingkwong/rich_link_preview) which is a rich link preview widget written generating a rich presentation of the given link from social meta tags. Dart syntax is similar to Java. By working on these projects, I got hang of it. For those plugins, you can download them on Pub. # Hong Kong Address Parser ![image](https://g0vhk-io.github.io/HKAddressParser/og-image.png) [HKAddressParser](https://github.com/g0vhk-io/HKAddressParser) was one of the projects I found interesting in the [g0vhk.io hackathon](https://www.collaction.hk/h/g0vhk). I tried to contribute and became a part of the team. I met the team members in person on the day we soft-launched the application. This application is used to parse a great number of addresses utilizing open data from OGCIO and the Hong Kong Government. It aims to help convert the addresses to the coordinates, translate addresses and standardize the address format. Here's the [link](https://g0vhk-io.github.io/HKAddressParser/) and you can see one of the use cases [here](https://medium.com/@howawong/%E9%9D%9E%E7%A7%91%E6%8A%80%E4%BA%BA%E5%A6%82%E4%BD%95-%E9%9B%B6code-%E4%BB%A4%E5%88%B0%E8%B3%87%E8%A8%8A%E9%80%8F%E6%98%8E%E5%8C%96-%E9%97%9C%E6%84%9B%E5%85%B1%E4%BA%AB%E8%A8%88%E5%8A%83%E6%8A%95%E9%81%9E%E7%AE%B1%E5%9C%B0%E5%9C%96%E8%A3%BD%E4%BD%9C%E6%95%99%E5%AD%B8-31e2cf521aa1). I am also writing a python library for it. The link is [hk-address-parser](https://github.com/wingkwong/hk-address-parser). # Hong Kong ATM Locator ![image](https://assets.collaction.hk/project_image/c3d07f8e424001445edb2e36ed8d17d2660adb177439e8d5c1518d9af5da8c25183f1005f2211c553d38a94bb4165d77.jpg) [hk-atm-locator](https://github.com/wingkwong/hk-atm-locator) was the first project I purposed in the next hackathon as a project owner. During that time, the Hong Kong Monetary Authority published the Open Application Programming Interface (API) Framework for the Hong Kong banking sector. However, the interoperability was frustrating as the API was implemented at different standard levels. This project was meant to centralize Hong Kong ATM data in a well-defined yet standardized format and display in a web portal for public use. I needed to register an Open API account and provided company registration evidence in order to use it. Later on, some staff from different banks called me asking me what the purpose was to use their API. At the end, I was only able to collect 10 bank API portal endpoints. The worst-case was to create corresponding Python scapers to scape the data from each bank official website. However, those data might not be up-to-date and it was too time-consuming. I decided to archive this project. Thanks to some contributors, we've made a [web application](https://wingkwong.github.io/hk-atm-locator) showing a number of the ATMs in Hong Kong. # Vote4.hk ![image](https://vote4.hk/og-image.png) [district-councils-dashboard](https://github.com/cswbrian/district-councils-dashboard) was another large project that I've worked on. Later on, the team registered the domain and decided to change the name to [Vote4.hk](https://vote4.hk/). What it does is to provide 2019 District Council Election information such as voting instructions, constituencies, nominated candidates(stance, media coverage, meeting attendance and electoral history), the past election result, etc. At the early stage, I was focus on performing data cleansing using Excel and Talend Data Preparation because we collected lots of data online with different formats. I was also working on the frontend part written in ReactJS as well as the backend part. As the Election was approaching, there were more people joining the team and making contributions. Collaboration is the beauty of working on an open-source project. Starting from mid-Aug, I was way busy preparing for my AWS certification exams and my health condition was getting worse. Hence, there was a period of time I stopped coding as shown in my GitHub activity graph. After the break, I continued to contribute Vote4.hk. This time I was focused on i18next to deliver the data to the English audience. In the end, this application gained more attention and was able to deliver what we wanted to show to the public. # Amazon Web Services Open Source Community ![image](https://user-images.githubusercontent.com/35857179/71611973-0977d500-2bd8-11ea-8ea8-bdd443d4aa42.png) After the Election, I got more time and started to contribute [aws-cdk-examples](https://github.com/aws-samples/aws-cdk-examples). I made a pull request to demonstrate how to use AWS CDK to provision a MySQL RDS database inside its dedicated VPC in Python and it got merged after 1 week. ![image](https://user-images.githubusercontent.com/35857179/71611997-30cea200-2bd8-11ea-8a73-c2ab47bb22d3.png) I also made a pull request to [aws-sam-cli](https://github.com/awslabs/aws-sam-cli) to handle dot notations in the path_prop_name variables. Working on such a world-class project was definitely a great experience and I got chances to discuss the code with AWS employees. # Gorsk [Gorsk](https://github.com/ribice/gorsk) is a Golang starter kit for developing RESTful services. It is designed to help you kickstart your project, skipping the 'setting-up part' and jumping straight to writing business logic. I created a Taskfile for relocating the boilerplate package. I wrote a post about it. If you are interested, check out [Relocate Golang Boilerplate Packages using Taskfile](https://dev.to/wingkwong/relocate-golang-boilerplate-packages-using-taskfile-35ae) # Go Serverless ![image](https://avatars1.githubusercontent.com/u/59302891?s=200&v=4) Recently I wanted to work in a Go project because the best way to learn is to get your hands dirty. Hence, I created [go-serverless](https://github.com/go-serverless) so that I could explore more in both fields. One of the projects is [serverless-iam-dynamodb](https://github.com/go-serverless/serverless-iam-dynamodb) which provides serverless CRUD services in Go with DynamoDB. While working on this project, I've encountered tons of errors. I've resolved them one by one and documented them so that I could share them later on to others. Like I said before, working on open-source projects definitely gives you lots of benefits. It is not only for the project itself but also for the people and the impact that you create. That's it. How was your 2019? What interesting projects have you done this year? What would you do in 2020? Let me know. Follow me on [DevTo](https://dev.to/wingkwong) for more blog posts. Happy New Year 🎉

A Fun Problem - Math

# Problem Statement JATC's math teacher always gives the class some interesting math problems so that they don't get bored. Today t...