Hello everyone,
In this lab I had worked on release 0.1 to refactor the code which eventually means to structure code in such a way to look more readable and modular.
3 Feature that has been refactored:
- Get rid of global variables- I have removed the global variable definitions and encapsulated the logic within functions. The main function is responsible for parsing command-line arguments and driving the program. This makes the code more organized and easier to follow.
- separate command-line argument parsing from file - In this code, we've separated the file processing logic into a generateHTML function while making minimal modifications. This separation helps improve code organization and readability.
- reduce code duplication through shared functions, classes- In this code, I added utility functions "readFile" and "writeFile" to handle reading and writing files. This reduces code duplication.
Bugs and error: While completing i do found some bugs such as for exit code and parsing error for TOML format.
Conclusion: Through this journey I learned the importance of maintaining neat and clean code which help other developer to work on project and further helps to find minor bugs which can be removed from project.
Top comments (0)