uprm-inso4117-2024-2025-s2 / semester-project-thriftuni

semester-project-thriftuni created by GitHub Classroom
8 stars 0 forks source link

[Lecture Topic Task] Debugging the Main Page for Listings and Search #193

Closed ilikecheese117 closed 1 month ago

ilikecheese117 commented 1 month ago

Objective:

The objective of this lecture is to document the lessons learned during the debugging of the ThriftUni main page. This session will focus on structured debugging techniques, the role of debugging tools, and best practices that improve software reliability.


Lecture Topic Description:

Debugging is a critical process in software development, where developers verify assumptions about code and systematically eliminate errors. During the debugging of the ThriftUni main page, several key principles were applied, including structured problem-solving, the use of debugging tools such as breakpoints and watchpoints, and iterative testing methodologies. This session will explore the debugging strategies used, common pitfalls encountered, and practical debugging lessons that improve software quality.


Key Debugging Lessons Learned:

  1. The Importance of Systematic Debugging

    • Debugging is more effective when issues are isolated step-by-step rather than through random changes.
    • Using structured approaches, such as binary search debugging, helps locate errors efficiently.
  2. Using Breakpoints and Watchpoints for Efficient Debugging

    • Breakpoints allow us to pause execution and inspect variable states at specific points.
    • Watchpoints help track how variables change over time, providing deeper insights into logical errors.
  3. The Role of Error Logging in Debugging

    • Implementing structured logging (console logs, error reports) improves issue tracking.
    • Logging unexpected behaviors early helps catch and fix issues before they escalate.
  4. Testing as Part of Debugging

    • Debugging and testing are closely related: tests help confirm fixes and prevent regressions.
    • Automated testing (unit tests, end-to-end tests) should be integrated into the debugging workflow.
  5. UI Debugging and Cross-Browser Compatibility

    • Ensuring layout consistency across different screen sizes avoids responsiveness issues.
    • Using browser dev tools to inspect elements and fix CSS inconsistencies is essential.
  6. Common Debugging Pitfalls and How to Avoid Them

    • Fixing symptoms instead of root causes: Always investigate why a bug occurred.
    • Not reproducing the issue: Debugging is only effective when the issue can be consistently recreated.
    • Ignoring small errors: Minor warnings or console errors often lead to bigger issues later.

Implementation in Real-World Debugging:

  1. Identifying and Categorizing Bugs

    • Group issues into UI bugs, logic errors, and performance concerns.
    • Prioritize bugs based on impact and urgency.
  2. Using Debugging Tools Effectively

    • Automate debugging where possible using log analysis tools.
  3. Regression Testing After Fixes

    • Ensuring no new bugs are introduced after debugging.
    • Running automated tests and user acceptance tests before deployment.

Suggested Values: