Friday 24 September 2021

OSD600 Lab 2 - Sharing and Forking

This week we are suppose to choose another student's SSG repo and provide initial support for Markdown files to be converted into html. and also implement at least one of the Markdown features (Italics, Bold, Header1, Header2 or a Link).  I decided to work with Oliver Pham's repo mainly because it was written in Python and I wanted to see a different version of what we are implementing.

Adding support by first creating Issue #10 on Silkie

Below is a sample code running,


The following is the sample output in html


 This is a hard problem to solve to convert .md to .html because there are multiple edge cases such that will break part of the code, validation of the html, not displaying correctly and a number of issues.  Working with this new python code, Oliver has done a great job in keeping the code clean and easy to understand by using the yattag library, which allow python to generate html.  I learned it the hard way that you are only as good a programmer as how well you understand the python libraries.  As you can see in my code my brute force attempt at the header styles of Markdown lead to unexpected results, and potential issues.  I decide to focus on making links work well as well as allowing the user to have any number of Bold and Italics text in a single paragraph.  The major problem is keeping track of where you need the paragraph tags in which I put one whenever I encounter a bold/italics text just in case that is the only bold or italics text.  I received helpful feedback from Oliver and his reject to my initial pull requests are rightly justified.  I realized the importance of fully testing the code and making sure something is working before pushing code to Github.  The collaborative effort in open source is pillared on good pull request, good communication and proper use of git.  Having Oliver working on my code on the other hand was a delight.  It is like work being done on your behalf. This is what open source is all about.

Next Time I'll be Ready



No comments:

Post a Comment

What I learned from Project 1 of Udacity's Data Science with Python bootcamp

Introduction As part of the project I completed successfully, I used SQL to explore a database related to movie rentals. SQL queries was ran...