Friday, September 27, 2019

Hacktoberfest: My entrance to the 'Real' World of Open Source Development

DPS909, Hacktoberfest, and Release 0.2

Today I began to look at real issues and projects on Github. I've graduated from contributing to my peers' code, and have completed the first major project of four to be completed by the end of my course. Release 0.1 is complete, an assignment I talked about in my previous post. For the next assignment, I will have to attempt to complete the Hacktoberfest challenge. In order to win a Hacktoberfest T-Shirt, I have to find 4 issues and submit 4 pull requests on professional projects on Github. Part of the assignment is to blog my findings, so that is what I will be doing for the month of October.

My goals for Hacktoberfest

  1. To work on a product that I use frequently, and have my pull request confirmed and accepted to the project.
  2. To learn more about databases in a project that I work on, as I am very interested in database design.
  3. To contribute to a project that involves UI design, which I love to work on.
  4. To ask for help from my community and the online community as well.
So why am I attempting these goals? I want to engage in the community more, for a start. I keep to myself most of the time, and I have issues asking for help. It's one of the main problems I have in day-to-day life. I think this is a good opportunity to learn and grow in that respect. In terms of technical skill, I am fascinated by databases and their structure, and I want to learn more about them. I'm not sure what kind I'm going to find, but I'm excited at the prospect of contributing. Finally, my main goal is to contribute to a project that I use regularly. I am a frequent user of open source projects, but I never stopped to think how they were developed and why they are open source until now. I am hopeful that I can contribute to something I have used for so long.

Possible Issues

These are the issues that I am interested in attempting, for various reasons:

These two issues are good examples of easy entry code for me to try. I'm planning on finding something bigger to work on and having a few smaller issues going like these ones. Both of these issues are part of projects that are very interesting to me and are UI issues. To prepare myself to work on these I will brush up on my css, html, and javascript knowledge by reviewing my notes from previous years, and studying the styling of these projects in order to match colors, shapes, and sizes.
This project provides a way for me to combine my database and UI interests, in a feature that seems interesting to me. It involves creating a camera database to pull camera data from, in an effort to ease the processing of aerial imagery from drones. I could implement a database, and add a dropdown menu. In order to accomplish this, I must investigate the current database usage and features, how to implement such a database, and study the project's organizational structure and UI constraints.

Sunday, September 22, 2019

Github and Community: Learning how it all works

my-note, your-note, our-note



Where to begin... In my journey to learn everything I can about git and Github in my course, I have begun to contribute to projects in my class community. In my previous post about my-note, I described my note taking app. As the note taking app was a lab for my course, many of my classmates made their own note taking apps, of which I have contributed to two of them. I will discuss each project and how I contributed.

micro-note

Micro-note was created by MeisterRed. It was comprised of a title and a text box, colored to match post-it notes. Like my note taking app, it saved automatically and when reloaded would retain it's information, storing the text written in the browser. It looked like this when I first saw it:

micro-note (before pull request)

Issue - Add "Save" and "Download" Buttons

I thought that micro-note was lacking the ability to download your notes, which would allow the user comfort in knowing that they have their notes saved on their computer and allows the user to make more notes. I proposed using FileSaverJs, a library I used in my-note to facilitate downloading the notes taken. I also suggested adding a "Save" button to increase user comfort that their notes have been saved. The issue can be found here.

Solution and Pull Request

First, I added the "Save" and "Download" buttons to index.html. The save button called the noteSave() function already implemented by MeisterRed. This function saved the contents of the text box in the browser's internal database. I linked the FileSaverJs library at the top of the document and created a downloadNote() function, showcased below:


This function uses the FileSaverJs function saveAs(), in order to generate a downloadable document from input. The input is first formatted as a Blob object, and then the blob object is passed to saveAs(), along with a name for the download file. The name is set by a variable, which I set using a text box next to the download button shown below:

micro-note (after pull request was approved)
After I finished the button functionality, I added CSS code in order to fit the style of micro-note intact and provide context clues to how the app functions.The pull request was accepted with no comments or bug fixes needed. The pull request is located here.

my-note (grommers00 version)

Although grommers00's my-note had the same name as mine, our apps were similar and different in many ways. He and I had taken different approaches to the look and feel of the app. One of the most glaring differences was how we had used PaperCSS.

Issue - Improve the UI

my-note (before pull request)

Grommers00 had used PaperCSS, but not in a way that utilized it's features. He had no styling on the text box, the buttons, and nothing to impress upon the user that they had successfully saved. I suggested that to improve the UI (user interface), I could add more features from PaperCSS to make his text box stand out more, and improve the responsiveness of his buttons. I also suggested adding an alert that would let the user know that a button had been pressed and was successful. The issue can be found here.

Solution and Pull Request

my-note (after pull request)

I added CSS to change the color of the buttons to represent their meaning in a more intuitive way. I also increased the size and emphasis of the text box. The red "Saved!" box is an alert that pops up for a second after the file is saved. There is also a "Removed Text!" version of the alert for the respective button. The alert was implemented using a function that I called at the end of each button function, with a different message for each one passed as a variable. The pull request can be found here.

Interactions with my classmates

In both cases, I interacted with both developers online (Github and Discord) and in person in order to understand what they wanted me to do. In grommers00's case, we discussed what he wanted to do with his app and if the improvements I proposed followed his original idea. In terms of MeisterRed, we discussed his app's style and how I could fit my additions into his existing design. In both cases I tried to remain professional and fit with the original developer's style of code and naming conventions. 

I also assisted some people in class with their apps. I had someone next to me who had never used html before. I assisted them in how to add javascript to the page, as well as some pointers on CSS and html formatting. I was able to help them get to a point where they could add their own features and play around with it confidently.

Reviewing Pull Requests on my app

agarcio-caicedo's Pull Requests

agarcio-caicedo made two pull requests on my app. Their first pull request was to add dark mode. I really liked the way that they implemented dark mode, using a combination of javascript and css. I really enjoyed the way that it looked afterwards, and I thought it fit the original design very well. I approved it without fixes as I was really impressed and it hadn't broken anything as far as I saw.

The second pull request that they made was to fix my word count feature. I used a really simple method to generate a word count by counting spaces. I knew that the word count could be tricked by adding more spaces between words but I thought that users wouldn't abuse this feature. What I didn't know was that this can cause issues in FireFox. I tested my app in Chrome so I had no idea that this feature would break in another browser. The fixes to my code were relatively simple and made the app seem more professional, so I added them in without any issues.

My Overall Experience

My overall experience with this process was good. I never realized that Github had so many safety measures. I thought that as a developed it helped me to manage what I added to my code. It also helped me to practice my code reading skills. Everyone has a different style of writing code so sometimes it is difficult to read other people's code. Following the original developer's style was also difficult at times for this reason. 

My process was to begin by looking through the person's code, looking at their implementation on github.io, and then deciding what I was going to work on. I would then write an issue regarding the problem and would then fork the repo to work on a solution to the problem. If I finished early I would write a Pull Request detailing what I had done and referencing my issue in order to assist the developer in finding my issue. Then it was just a waiting game until the developer responded or merged my fixes to the master branch.

I learned a lot of things in this process. Most importantly, I learned the progression of the Github contribution process. I also learned how to deal with merge conflicts, as I had to fix one in order to perform a pull request with grommers00's app. I learned how to add css and javascript documents to an html page, which I had somehow never done before. Finally, I learned the git bash commands, which taught me to always pull before I push. I made that mistake too many times.

Thursday, September 12, 2019

my-note, my first step into Open Source Development

What is my-note?

my-note is a client side note taking app that will save your notes in your browser's SQLite system. It has many features aside from that, such as:
  • A word counter
  • A save feature (with confirmation alert)
  • A download button with customized file name through FileSaverJS (txt format only)
  • A paper and pen style (provided with PaperCSS)

How does it work?

The my-note app uses the FilerJS Browser Filesystem Library to save whatever is written in the box in the middle of the page in your browser's SQLite database. It saves your work automatically every 2 seconds, however my-note also supplies a fully functional save feature. The save feature includes an alert that lets you know if you have saved successfully or not. There is also a download feature provided through FileSaverJS. FileSaverJS takes what is written in the center box and will export it as a "note.txt" document. The name of the ".txt" document can be customized by typing the name in the text box next to the download button. The word counter updates every .5 seconds. The style of the page is provided by my own CSS, as well as a CSS Framework called PaperCSS. This provides the pen and paper feel of the app.

My Experience

I have never worked on an HTML page this hard. It was an extremely fun experience, where I got to practice using git commands, HTML formatting, and adapting to external code (FileSaverJS and FilerJS). One of the challenges I came across while writing this was that I had a merge conflict, due to working on this at home and school. I had to resolve the conflict by finding the most recent version on GitHub and copying it into the version I was using. Although maybe not the best way to deal with it, I didn't lose much of my work and got back on track after a few minutes. Another issue I had was figuring out exactly how FilerJS stored my data. I had no idea it was stored in the browser until my professor mentioned it in class. I thought it might have been stored locally somewhere or in a hidden file. I spent a good hour trying to find it on my home PC before I gave up.

my-note is available at https://github.com/drwm-base/my-note 

Friday, September 6, 2019

Real Time Voice Cloning

People are so concerned about deep fake technologies like FaceApp. These technologies are fascinating but their implications are also terrifying. Real Time Voice Cloning, started by Corentin Jemine on Github is one of these faking technologies, but instead of swapping faces this app clones voices.

Jemine, also known as CorentinJ on Github, has developed a Voice Cloning Toolbox that can take a 5 second clip of a person speaking and simulate their voice. The user must simply type a phrase in and the toolbox will generate audio that sounds like the actual person, speaking what you have typed. It is the implementation of a paper hosted at: https://arxiv.org/pdf/1806.04558.pdf. It converts a 5 second audio clip into the numerical representation of a voice that can be used to train a text-to-speech model to generate new voices. This is all part of a three-stage deep learning framework called SV2TTS, the three stages being the encoder, the synthesizer, and the vocoder.

A video showing the exact process to record and synthesize the voice can be found below:



The software is coded mostly in Python, aside from 1.2% coded in Jupyter Notebook, which is an Open Source web application that allows users to share documents injected with active code.

I was interested in this repo as the thought of someone copying my voice so accurately fascinates and terrifies me so much more than them taking my face. A voice is so personal, while people can look like other people all the time. I feel like if this software develops further, along with things like FaceApp, we could see a change in the way we represent ourselves online. I also think that this is a great example of collaboration on Github, and a good first look at an open source project.

This software is located at on Github here.

My First Blog

Hello there internet people! I'm drwm-base, but you can call me Jim. Or David. Or John Doe. Whatever you want to call me is cool, I don't care. I'm new to the blogging scene, a scene I thought was dead but is actually thriving. But I'm ready to give it a shot. I'm going to be blogging about my journey into the world of Open Source Software. Although I'm very new to all this, I'm excited to dive into this world and meet new people!