Software Developer

View My GitHub Profile

Adding display of Main Language of Starred repo

Rust’s syntax is definitely something that takes time getting used to. I’ve worked with C and C++ for roughly 4-ish years and descendants of C (like Java), for even longer, around 6 years. Rust is pretty rough to look at and decipher easily - I’ve recently been playing with Elixir and I picked up Ruby a while back and both are easy to read at a glance.

I resolved to do something simpler in supernova this time but more useful than outputting starred repositories into a file - displaying more information through the API. My ultimate aim was to allow the user to grab information on programming languages of their starred repos so that if they wanted to work on or practise a new language, they could look up the repos that use those languages.


Grabbing main repo language and displaying it


The structure of Rust is something interesting. It takes a lot from functional programming, which besides Elixir, I have not experienced in depth. Rust is structured to avoid as much mutability as possible. Instead of objects, you have definitions for data and an implementation that “creates” it.

The goal of this simpler issue was to move away from tutorials and code snippets online (which turns out to be just as quickly depreciated as Ethereum tutorials actually). Rather, I wanted to learn from my maintainer who picked up on best practises quickly through meticulously researching every piece of code we submitted to the project, and rejecting anything that wasn’t up to best standards.

So this issue was mostly getting used to the Github API and how Rust and Serde, a (de)serialization framework can work together.

The API has quite a bit of options to play with, and I think supernova can really grow into a powerful and useful tool.

Steps I took:


Here’s the Pull Request location.