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

DPS 909 - Release 0.2 - Hacktoberfest Week 4

It's the home stretch for Hacktober fest! For my final contribution, I decided to tackle my last goal , which was simply to do something fun and interesting. Once again, thanks to GitHub user vichitr and his brilliant project , I was able to quickly find something to contribute. I've always thought that programming algorithms was a good challenge and invited great learning experiences, so for my final PR, I decided to program an example of the sliding window technique in Python. The sliding window technique is a very useful algorithm that is used across many disciplines of software design. It allows users to compare subsets of data (i.e. windows) within a larger collection, in order to find significant items. Personally, I have encountered the sliding window technique during some applied research projects that I have tackled in the past. In a particular machine learning project, I used the sliding window technique to construct subsets of data that were then fed into a separa...

DPS909 - Release 0.1 - A Fork in the Road

Hello friends, welcome back to my journey into the world of open source. Continuing from the last milestone (in which we explored pushing a simple app to Github), this time I begin to scratch the surface of a major aspect of open source - community contributions. For the Release 0.1 deliverable, I work alongside my fellow classmates from the DPS909 course, as we work to review and bugfix each other's work. For reference, we all created the same, simple note-taking app, but each programmer's individual preferences resulted in slightly different designs with unique source code. According to proper Github etiquette, users wishing to contribute to a project should first fork a version of the repo to their own Github account. Then, a separate branch of the repo should be made to specifically address the contribution being made. After the changes are implemented, a formal pull request should be submitted to the official project repo, so that it can be reviewed by the original auth...

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...