Release 0.2.2 or, Standing on the Shoulders of a small project
Tags: opensource, python, github, javascript
Published: 2020-10-05 19:12:07

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/rus7qi4zej8ynfvigkl5.png)

I read once that if you aren't the dumbest person in the room you're doing it wrong.

And now, for my second release [0.2](https://github.com/Seneca-CDOT/topics-in-open-source-2020/wiki/release-0.2) PR, I'll make a feature appear out of my hat!

One weeks ago my open source development professor [(@humphd)](https://blog.humphd.org/), posted [a lecture](https://www.youtube.com/watch?v=s28g7yfU-vo) where he contributed to a relatively small project with only one developer called **Shoulders**. Shoulders is described by the author as such: `Quickly view a list of open issues for the open-source packages that your project depends on.`

![enter image description here](https://camo.githubusercontent.com/19f4acc48944f3b853b2283a925d364824e31221/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f67682f6d6a7377656e73656e2f73686f756c6465727340353030643433343533336430626332393662613132653132636661383139633936346235626364392f6173736574732f64656d6f2e676966)
While I do love me some CLI, I found navigating through a CLI when this much text to be cumbersome. While watching my professor use the program and add something to it, I had the idea (*audacity?*) to give the user the ability to output the console to an HTML file. I went to submit [an issue to the project](https://github.com/mjswensen/shoulders/issues/5) requesting the permission to implement my idea (which I might have stayed up for a while trying to implement already).

___

I made a lot of weird mistakes trying to add this. Mistake number one was to try and over engineer this project. I wasn't sure how to actually do this, and for some reason figured I needed some sort of logging library to send the console output to a container which can then be exported to a file. Over engineered (poorly?) would be an under statement. I could never get the library to cooperate with me, and when it did the input was in JSON or had issues properly logging the ANSI colours.

I scrapped that idea quickly and while lying in bed trying to sleep I came up with an easier idea:  Just dump everything into a container instead of the console... Idiot. Why create ANOTHER dependency for something so silly anyway? Well, turns out JavaScripts dicts are uh.. silly. I tried with map as well and couldn't figure out how to make either work the way I wanted them to.

I then just decided to dump everything into an array and separate the issues with a newline. Whatever, it's fine. It works. It's quick. It's fine. God I made this project so ugly now and Matt (*project author*) probably thinks I'm an idiot (he'd be wrong, right?).

To reiterate, I ridiculously had three iterations of the project going at any one time:

 1. Implement the idea using a JS logging library called Winston.
 2. Implement the idea using a dict.
 3. Implement the idea using an array.

Then I had to figure out how files worked with NODE and discovered the `fs` library. I created my object, dumped to an HTML file, played with the output to try and match the console output, and just like that we were done.

Not a very impressive feature but not too bad for what little time I have these days with school work and my job. Matt never ended up getting back to me so I decided to [submit my PR](https://github.com/mjswensen/shoulders/pull/8) anyway and see what he thought. He seems like a really nice guy so I hope he gets back to me so I can continue to work on this (and with him), even if he thinks my idea is dumb. If he does I'll be sure to update this.

Thankfully while my JS sucks, my experience with Python's weakly typed syntax was a bonus. Next time I'll try to think more clearly about what the functional requirements really are. Had I simply started with my third version I'd have finished an otherwise small feature much sooner.

___

In other news [I also broke everything by trying to remove a picture](https://github.com/Seneca-CDOT/telescope/pull/1147#pullrequestreview-501256328). Progression is relative.