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 PR, I'll make a feature appear out of my hat!
One weeks ago my open source development professor (@humphd), posted a lecture 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.
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 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:
- Implement the idea using a JS logging library called Winston.
- Implement the idea using a dict.
- 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 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. Progression is relative.
Top comments (0)