Yuri-SVB / Great_Wall

Protocol and application for providing Kerckhoffian, 0-trust, deviceless coercion-resistance in self-custody.
MIT License
24 stars 14 forks source link

Refactor for cleaner code #48

Closed fredericomba closed 8 months ago

fredericomba commented 8 months ago

I recommend everyone to watch the presentation on "Clean Code" by Uncle Bob. Everything I write here has a polite tone. I intend to help as I write this ticket.

If we try to push forward without organizing the code first, we'll be adding more mess on top of the existing mess, which will make it harder to maintain and changes will add subtle bugs over time. This is also one of the reasons why "test-driven development" has become a standard practice in software development: if bugs appear after some change in the code, the automated tests can catch them and they won't move forward. Not only that, the tests explain in programming language what the software is about, which is also helpful for newer developers looking to do maintenance for the project.

The organization of the code and separation of it into multiple files is also helpful on avoiding git conflicts: if two developers never work on the same set of files, it is impossible for a merge conflict to happen, thus less conflict resolutions will happen.

MuhammadMuradG commented 8 months ago

Is this an issue report of an issue you are experiencing? If this is the case then I think you need to add a clear description of the issue, how to reproduce it and anything that can help understand and fix it.

If this isn't the case then please, keep in mind that this section is relating to Great_Wall app issues tracking and reporting and we need to stick on that.

In general, organizing the code and separating code into multiple files are two general comments on the code quality which don't provide any info for improvements, instead address the issue that you think we need to address by a clear description; this is really helpful for our development process.

Also, the software development process is complex and it is easy to say using "test-driven development" but when you come to the implementation there are a lot of problems that we need to address before using it. One of these problem is available budget. However, "test-driven development" is one of the development processes that are exist.

We will closing this as it's not relevant to the issues section of Great_wall, feel free to open it if you have a clear description of the issue. And thanks for your reporting.