DEV Community

Cover image for Filing issues in open-source
Omar Hussein
Omar Hussein

Posted on

Filing issues in open-source

Finding a Team

To find a partner to work with on my first open-source project, I was able to find and collaborate with 3 other students through our Slack channel. we decided to read each others code, then each of us would review issues for one person, and that person reviews the code for the next person as in a funky code review circle!

My Experience

As I read through my peers code, I realized a lot of differences in coding style as well as structural style. I wasn't surprised to see the code that I saw, however, I was surprised by the structural differences. Many structural considerations aren't generally taken at the beginning of a project, however, reading code that looks much more like a single use script than an actual program has always intrigued my curiosity as to why wouldn't you write your code as if you would reuse it tomorrow? After my code has been reviewed and issues submitted, I realized that I often make programs that have a plethora of features but with little to no documentation. Having my code reviewed helped me notice these shortcomings and address them properly, which gives me a better method to approach my problems as I code more in the future.

Issues I Found

One of the issues I documented was an issue that could rarely happen, but could cause a lot of annoyance later on down the line https://github.com/mnajibi/tml/issues/2 was the issue that I raised and was fixed promptly by my classmate!
This issue rarely happens but some text editors on windows insert a carriage return with a newline character to create a newline. This could cause the utility to miss the correct file splitting and output all the data within one <p> tag.
My recommendation was to use the Python re Regular Expression module with the following code.

 body_paragraphs = re.split(r"\r?\n\r?\n", "\n".join(lines[3:]))
Enter fullscreen mode Exit fullscreen mode

Issues I Fixed

One of the issues I had to resolve was an interesting case of asynchronous function causing havoc in JavaScript/TypeScript. The issue that was raised was about a directory not being recreated after deletion, but only if the supplied input was a file. After checking the code, I realized I has missed placing an await statement before creating the directory, which caused the index generator function to fail when attempting to read the output directory recursively.

await processFile(input, title, ...);
Enter fullscreen mode Exit fullscreen mode

After fixing all issues that were raised, It felt a lot better knowing that my software had been hardened and felt a lot more robust simply by allowing people to use it and report issues back to me about it. This taught me the value of open-source contributions and how much progress can be made by adding more eyes and fingers to the coding and testing army!

Top comments (0)