Skip to main content

DPS 909 - Release 0.3 - Contribution Updates

It's been a very busy week, between school work, work-work, and filthy cold Canadian weather. But, fortunately, I was able to get my PRs in, so let's take a look at what I did.

Internal Project - Seneca Telescope

As mentioned last week, our Fall 2019 class of DPS 909 has initiated a project called Telescope, which is a blog aggregation app that aims to completely overhaul the old and outdated CDOT Planet website. For my contribution to the project, I decided to code a backend filter that detected inactive blogs. To achieve this, I drew upon some of my old experiences as an applied research assistant and followed the age-old adage - if it's data work in Node, just throw JSONs at it! All jokes aside, the method I chose was simply to parse the blog feeds, extract the latest post dates, and write them to a "redlist" JSON file if they were older than a certain threshold (I didn't want to use blacklist because that sounded too grim).

It's a blog feed graveyard... spooky, but a few weeks too late for the festivities.

You can find the issue posted here, and my pull request here. As you can see from the PR thread, I took a bit of a review beating from our professor @humphd. But, fixes are fixes, and it's all in the name of good quality PRs that are of value to the project! I'm glad I got the chance to do my part - even the fixes were an excellent experience!

External Project - ihatemoney

I actually happened upon this neat little app while looking for a way to split cottage expenses among friends. Turns out they're open source, and on GitHub to boot! The way the app works is simple: you register participants to a budgeting project (which can be anything, such as going Dutch on a meal, or pitching in on a gift), add bills to a table, and the app will automatically calculate how much everyone owes each other. Very handy! It didn't take too long to find an issue I could dig my hands into - another user of the app thought it would be a great idea to include filtering bills by various details. Not a bad idea!

The demo board has some... interesting entries to be sure, but no way to filter results.

After posting to the issue thread to let everyone know I wished to try my hand at the problem, I got to work. Except I didn't really... at least not right away. That's because I ended up having a lot of learning to do. See, the ihatemoney project was developed using Flask, a Python-based web app framework. I had plenty of Python experience when it comes to data science, but I'd never touched Flask before, so I had to pick up the fundamentals real quick.

Next, I had to get acquainted with the development environment of the ihatemoney project, and that was where I ran into a lot of trouble. It's clear that the developers favored Linux, as there were convenient shortcuts to set up the dev environment on both Debian and Ubuntu. However, my local machine is running Windows 10, and while I could easily set up a virtual machine, all of my development tools were already set up just the way I liked them. Just when I thought about looking at another external project, I remembered that I had Anaconda installed on my machine from another project I did a while ago. In case you don't know what Anaconda is... it's an amazing all-in-one distribution of Python that just never stops blessing the world with miracles. If you're thinking of getting into Python development, definitely give Anaconda a look. It literally just works, and it's saved my ass many, many times.

Through trial and error, I managed to translate the steps listed in the ihatemoney contributions page to Anaconda, and I was able to create a virtualenv that gave me everything I needed to begin development. After a little bit of additional confusion in getting the test server up and running, I was finally ready to begin coding.

It's alive!
It took me several more hours to get truly familiar with the architecture of the project. Flask is a template-based framework that uses Pythonic inheritance to piece app components together. It took me quite a long time to follow the script logic through multiple layers of inheritance of imports. To be quite honest, the way the project was set up doesn't really lend itself to readability - there are very few code comments and the same entities receive different names as they are passed around modules. But I was already elbow-deep in the project, so... better keep going!

In the end, after overcoming my troubles, I was able to contribute a simple jQuery-based search bar that filters the list of bills based on who paid them. I submitted my PR, and made a point to describe the pitfalls I encountered, as well as the potential for future work should they find my contributions acceptable. Given the effort I put into understanding this project, I hope the project owners respond to my PR thread soon. Once they do, I plan to add more options to my search function so it can filter based on other properties.

It took a lot longer to get here than it looks...
So that's it for release 0.3! Just one more release to go. I'm looking forward to working on both Telescope and some more external contributions.

Comments

Popular posts from this blog

DPS909 - Lab 2 - Git Practice: Simple Noter App

Once again, I am continuing my journey to become a full-fledged member of the open source community. For this small milestone, I am practicing the creation and management of a Github repo using git bash on my local machine. For test material, I have created an incredibly simple, browser-based sticky note app, appropriately called Simple Noter. For those interested, the final product is hosted on Github Pages, and can be found here: https://jerryshueh.github.io/simple-noter/ The app itself is very basic - simply type a note into the text space and hit CTRL + X to save. Your note will be saved between sessions until you clear your browser's local data. It uses a number of open source and free-to-use resources, such as Kenny Wong's Hotkeys.js , and Google Fonts. By the way, something I've learned is that all Google Fonts are distributed under the SIL Open Font License, which allows anyone to use and modify them for personal or commercial purposes. As for the learning proce

DPS909 - Lab 1 - Github Trending Research: WebGL Fluid Simulator

The WebGL Fluid Simulator is a small application that allows the user to play with simulated fluids right in their browser, and works on both PCs and mobile devices. The visual effects follow proper fluid dynamics, and can be manipulated in real time by pointing and click, as well as several available options such as quality, density, and velocity.  The app is written in JavaScript, and as the name suggests, visually renders its effects using WebGL. It was created by Github user PavelDoGreat based off another Github project:  Fluids-2D , and is distributed under the MIT license. As of September 8th, 2019, WebGL Fluid Simulator is trending with 2,307 stars during the month, and 6,070 stars in total. Main interface of WebGL Fluid Simulator by Github user PavelDoGreat I was interested in investigating this project as it demonstrates the breadth of open source resources on Github. Users can find projects that range from complex systems and APIs, to small plug-ins and simple applica

DPS 909 - Lab 3 - Hacktoberfest, and the Very Scary Repository

It's that time of year; the mornings are getting chilly, the leaves are turning, the pumpkin spice is flowing, and open source developers are getting all worked up over something called Hacktoberfest . Not to be confused with the other , similar-sounding (though arguably no less beer-filled) celebration, Hacktoberfest is a chance for open source enthusiast to truly flex their projects and contributions. Hosted by DigitalOcean , Hacktoberfest 2019 is an event running throughout the month of October that encourages activity in the open source community. It is completely free to sign up, and participants can even link their Github accounts to use as their Hacktoberfest profiles. As you may have already guessed, I will be participating in this event as my next major milestone on my journey into the world of open source. Through the miracle of APIs, even my profile picture was imported! While the prospect of diving headfirst into such a large, open source event as a beginner may s