Another week goes by, the start of a new year, perhaps a new me? I’m not sure, I’ve never been the kind of person that takes new year’s resolutions seriously, but even then, the circumstances are ripe for change and unexpected turns, so who really knows what this year has in store. Anyway, enough of these thoughts, let’s get to what we did last week.

The week started where the last one left off, as I continued working on the Open Library issue I was working on last week. As I mentioned on the previous entry, this fairly easy to understand issue turned out to be way more complex than I expected, since I underestimated the scope of the project as a whole. The next day after uploading the last essay I cracked the problem, figuring out that they used a function that focused exclusively in getting books, but neither editions nor authors from lists. From there the fix was quite straightforward, as I just modified the original function in order to get all the info as it was instead of using it to find the books related to a given author or edition. During this endeavor I learned about a couple of things: first I learned about BibTex, a LaTeX bibliographic tool and format that was supported by the export function; then I learned about web.py, a framework (although it reminded me more of a library, such as React) intended to embed python code inside of html in order to develop a frontend environment, as HTML was another format supported for the export function; lastly, I learned about type hints in Python, as I was requested to add such hints to the functions I added by a maintainer of the repo. At the moment of writing, my PR is having some trouble passing the pre-commit checks of the project, however a couple of maintainers are taking care of that, so for the moment I just need to wait and be ready to help if need be.

After wrapping up that issue, I figured I should perhaps pick up an easier issue, as I noticed that I was only picking up time intensive issues. With that in mind, I picked a UX issue in a framework library called Elastic UI. I’ve noticed a common theme whenever I start working in an issue: I underestimate the scope of the problem, I realize it isn’t as easy as I thought, and finally I either move on to something else after a day and a half (an excellent advice given by one of my mentors) or pummel through the issue. This wasn’t the exemption. The problem in essence was an inconsistent style when focusing certain elements in a table, and I figured a couple of lines on CSS would suffice to fix it. First hurdle, it wasn’t written in CSS, but rather in Sass, and while I had seen some Sass while working on another project before, now I had to dive into it head on. My second hurdle was the fact that I hadn’t worked on CSS a lot over the last year, so I wasted too much time wondering why my fix wasn’t working while modifying the wrong property. Lastly, understanding the structure of the styles used in the project was more of a hazzle than I expected, however it was absolutely necessary to declare the modified properties in the correct place as to not mess up the style of unrelated elements. Overall, I think it was a pretty cool issue to work on, I learned a lot more about Sass as well as debugging style properties in an effective manner. At the moment, my (PR)[https://github.com/internetarchive/openlibrary/pull/6035] requires a couple of changes, as I modified a mixin that is used in several places other than the table I was trying to fix.

On Friday I returned to the Farmbot Web App, as I had left that issue dead for a couple of weeks. In this new attempt, I set up an Ubuntu virtual machine, and while I’m still struggling with this issue as it is throwing a Postgres authentication error, I learned quite a bit about installing and setting up a virtual environment, learning such important lessons as not giving your virtual machine 1 GB of RAM and 10 GB of memory while setting it up with a modern OS… I learned that the hard way.

Finally, on this day I’ve been working on a Vuetify, which is a Vue component library. The issue I’m working involves a wrong interpretation of the parameters passed, and therefore I had to get into the inner working of this library, learning more about how Vue2 works in the process. While I’ve spotted the issue already, I’m still working on creating the PR, and therefore this is still a work in progress.

To conclude this essay, and even though I know I said I’m not a resolution kind of guy, I still want to start this year by shredding some of the bad habits I’ve been picking up over the last few weeks. While researching for the Vuetify project, I found a strange statement, one that read as follows:

options.page || this.internalOptions.page

As this piece of code was supposed to return a number, I was left dumbfounded as to what exactly it was doing. This led me to a rabbit hole in which I discovered that JavaScript (and Python too!) return one of the operands when performing a logical OR / AND. This is something I hadn’t encountered until today, and this left me astounded as I’ve discovered a behavior I’ve never seen before. This made me realize I really hadn’t kept up with the You don’t know JS series, and it left me a bit disheartened that, what initially began as a lack of time, quickly became a bad habit and I lost the motivation to read these books. Well, new year new me, right? Therefore, I’ve resumed reading these books, and today I wrapped up the Scopes and Closures part of the series, and next week I’ll continue with this and object prototypes. I will do my best to not let it up this time, as I’m aware that time is passing and I still have a lot to learn.

Hopefully next week will be as productive as this one!

Ubuntu