OSD600 Blog #3 - Lab 1
Tags: osd600
Published: 2022-09-15 23:15:56

Hi Everyone!

In Week #2, in our OSD600 class we partnered up and worked together to improve our base Release 0.1 code (which was our static site generator). 

Slack proved to be an amazing collaboration tool, as I was able to find someone ([Neil An](https://github.com/NeilAn99)) to work with within an hour! Both of us were also using the same technologies to devleop our individual static site generators (node.js + commander module). 

It was definitely interesting to see how someone else tackled the same problem, even if it was with the same tools. For example, I was completely using synchronous JavaScript, but my Neil was using asynchronous JavaScript.

Neil also brought the perspective of a Windows user, as I had mainly developed my program for Unix environments, and I did not realize that just because it worked in Unix environments it may not work in Windows. 

**Specifically, the issues that Neil found were:**

1. [Installation does not work out of box](https://github.com/rokaicker/StaticSiteGenerator/issues/1) - Basically, I thought running `npm install -g` would automatically install the npm dependencies as well as install my tool globally on the system. However, it turned out it was required to run `npm install` to install the node dependencies and then run `npm install -g` to globally install my command line tool. 

2. [The -v and --version options are missing information](https://github.com/rokaicker/StaticSiteGenerator/issues/2) - Here I had completely missed the other requirement of the "version" command that it should also output the tool name (I definitely should have read the requirements more carefully). 

3. [Spaces are missing in the HTML file](https://github.com/rokaicker/StaticSiteGenerator/issues/3) - This was one of the formatting issues where if a sentance carried on to the next line of the text file, there would be a missing space between words. 

4. [Title and header are incorrectly created in some cases](https://github.com/rokaicker/StaticSiteGenerator/issues/4) - There was a bit of a bug happening where my program would be missing text if the title (indicated by two blank lines after the title line) was not in the first line. 

5. [Cannot run the rohan-ssg command directly on a windows terminal](https://github.com/rokaicker/StaticSiteGenerator/issues/5) - This bug I wasn't entirely able to fix. I definitely have to do more research on this, but if anyone knows the answer please let me know below! I am able to run the program in windows using a bash shell, however using Powershell or Command Prompt does not work, so as a work around I specified the use of a bash shell in my tools README file.

6. [Better formatting for HTML Files](https://github.com/rokaicker/StaticSiteGenerator/issues/6) - Here Neil brought up a good point that all my \<p>...\</p> tags were generated inside of a single line (and there could be hundreds of them). I fixed the formatting, and made it a lot easier to read by having all \<p>...\</p> tags generated on a new line. 

**The issues I found in Neil's project were:**

1. [node_modules shouldn't be commited in git](https://github.com/NeilAn99/nan1-ssg/issues/1) - In another class I took with Prof. Humphrey (CCP555), we learned about the importance of .gitignore files, and that the node_modules is a folder we should avoid committing to git.

2. [inability to specify direct path to a separate folder](https://github.com/NeilAn99/nan1-ssg/issues/2) - In Neil's original code, the text files we needed to convert needed to be in the same folder as the program itself. 

3. [need to add "node" to the beginning of the command](https://github.com/NeilAn99/nan1-ssg/issues/3) - As a command line tool, I think we need to be able to simply just type tool name, without prepending "node" to it. 

4. [possibly change stylesheet colors for less eye strain](https://github.com/NeilAn99/nan1-ssg/issues/4) - In the original CSS design, there was a blue blackground behind blue text, which made it a little difficult to read. 

5. [duplicate variables](https://github.com/NeilAn99/nan1-ssg/issues/5) - Here, I thought we could shorten the code a little bit because the same piece of data was being used by two variables (when it could be just used by 1). 

Overall, it was a great experience having a second pair of eyes to look over my code, as Neil was able to find deficiencies in my code that I had not even noticed. I think this is one of the fundamental concepts of Open Source, that many eyes are constantly analyzing the same code base, to constantly improve the software.