palpatine and rwar
Tags: opensource, beginners, testing, releasev1
Published: 2022-09-17 00:47:25

### Partnering up
Samina and I have joined a lot of Hackathon's in the past and ended up working at [Seneca Innovation](https://www.senecacollege.ca/innovation.html) together over the summer. I find our work spirit to be similar and we both have a lot of passion for what we do. So we have decided to contribute to each other's Static Site Generator (SSG) project. 

### Explore the unknown - rwar
Reading someone else's code is something I don't really enjoy doing. Nonetheless, it's a vital skill to have in the software development field. I find it hard to understand what is going on and spend most of my time in debugging, just to see how they work. However Samina's code had clear implementation and as we both had some prior experience in Python at work, it was not too hard for me to understand what is going on. 

### Review of the palpatine
I am always pleased if somebody takes their time to review and test my code and then provide specific feedback that I can work on.

### Issues I have filed for my partner  [Samina](https://github.com/saminarp) <br/>[rwar](https://github.com/saminarp/rwar)
  - Inconsistency of titles in the terminal - [Issue # 1](https://github.com/saminarp/rwar/issues/1)
    - I have noticed that the titles of the textfiles output in the terminal were not consistent. For example, some were uppercase and some were lowercase. This issue wasn't a big deal as they were only in `terminal` not in the html. However, I thought it would be a good idea to make them consistent for such a great real-world tool since its usage and visibility is beyond the classroom. 
  - Readability of the static site  - [Issue # 2](https://github.com/saminarp/rwar/issues/2)
    - I have noticed that the generated static site was not easy on the eyes. She has written custom css to style it but in my opinion, in this scenerio, it would make more sense to use a [classless framework](https://dev.to/skypack/the-best-classless-css-frameworks-in-2021-427a). For example I have used [Bahunya](https://hakanalpay.com/bahunya/) in my project `palpatine`. I also have used [animate.css](https://animate.style/) to add some fancy animations to the static site. So I have filed an issue to use a classless framework to make the static site more readable.
  - Documentation - [Issue # 3](https://github.com/saminarp/rwar/issues/3)
    - This issue again was not related to the code implementation but documentation of repo. I have noticed that the documentation was not very clear. Use of tables is a nice way to demonstrate all the flags available in the tool. I have filed an issue to add a table in the documentation to make it more readable.
  - Exception handling - [Issue # 4](https://github.com/saminarp/rwar/issues/4)
    - This issue is almost same as the issue I got filed for my ssg `palpatine` as well. Samina reached out to me to ask how I handled the raw data files other than `text` files such as .md files. My answer to that was `- I am not :P`. So we filed issues to each others repo to add exception handling for such files.
  - README.md Logo - [Issue # 5](https://github.com/saminarp/rwar/issues/5)
    - Sam and I have similar README.md file structure. However, the logo she had in the [README.md](https://github.com/saminarp/rwar) was within the repository. This behavior is not recommended as it is redundant and increases the size of the repository. I have filed an issue to use a image hosting service such as [imgur](https://imgur.com/) to host the logo and use the link in the README.md file.

### Issues I got filed for my project <br/> [palpatine](https://github.com/batunpc/palpatine)
  - Error handling - [Issue # 1](https://github.com/batunpc/palpatine/issues/1)
    - Currently, `palpatine v1.0.0` only supports `text` files. However, if a user tries to use it with other file types such as `markdown` files, no explanatory error is thrown. I suppose such feature is necessary for everybody in `OSD600` as the instructions for `lab1` is not stating we need to support other formats. Although, I think we will work on such feature in further releases.
  - Documentation for a variety of OS - [Issue # 2](https://github.com/batunpc/palpatine/issues/2)
    - Currently, `palpatine v1.0.0` is only developed and tested in a macOS environment with [Clang++](https://clang.llvm.org/docs/UsersManual.html#introduction). Thus, I was not able to provide detailed instructions for windows. _Good news!_ `palpatine` is a [CMake](https://cmake.org/) project, meaning that it supports cross-platform build system and is compiler independent. With the same CMakeLists.txt file someone can easily create a Windows build (Visual Studio). However, I have not tested it yet, so if something fails feel free to comment below or file an issue in [palpatine](https://github.com/batunpc/palpatine). I manage my tools with the [Homebrew](https://brew.sh/) package manager in macOS. So if you follow the palpatine instructions in [README.md](https://github.com/batunpc/palpatine/blob/main/README.md) precisely you will be able to install it in macOS. 
  - Indentation of HTML - [Issue # 3](https://github.com/batunpc/palpatine/issues/3)
    - I have noticed that the generated HTML files are not indented. While, it makes no difference in the browser, I understand it is a good practice to have properly intended HTML files. 
  - Modularity - [Issue # 4](https://github.com/batunpc/palpatine/issues/4)
    - I tried to make the code modular as much as possible. However, in `main.cpp` I have used the [argparse](https://github.com/p-ranav/argparse) and [termcolor](https://github.com/ikalnytskyi/termcolor) along with the main function. As Sam, pointed out, it would be a good idea to move them to a separate file and import them in `main.cpp`.
  - Clarification of CMake - [Issue # 5](https://github.com/batunpc/palpatine/issues/5)
    - As I mentioned above CMake is really powerful, open-source cross-platform build system. A good resource can be found in [here](https://cmake.org/documentation/) or you can read through the readme.md file.

I still have 2 issues open - [Issue # 2](https://github.com/batunpc/palpatine/issues/2) and  [Issue # 4](https://github.com/batunpc/palpatine/issues/4). I still am working on Issue#2 as it requires me to do some research and finally test it using VM. I will update the issue once I am done. Issue#4 is a minor issue and I will fix it in the next release. I have updated my code to address error handling for non-txt files using if-else statement. You can check it from this [commit](https://github.com/batunpc/palpatine/commit/0e42e42d2b738ca684739ae2dd215928fc8b2afa). I also added more documentation for CMake and fixed HTML indentation here [commit](https://github.com/batunpc/palpatine/commit/18743a828068e626408793daf7295a8b529673ed)