Skip to content

Personal Documents and Notes - used for my Bachelor Thesis at the University of St. Gallen

Notifications You must be signed in to change notification settings

fabian-gubler/bachelor-thesis

Repository files navigation

Bachelor Thesis – Refactoring of a Software System for Industry 4.0

📚 Bachelor Thesis:

Refactoring of a Software System for Industry 4.0 – Click the link to preview my bachelor thesis.


Overview

This bachelor thesis focuses on refactoring a software system for Industry 4.0, aiming to improve the system’s internal structure without altering its external behavior. The thesis builds on the established concepts of refactoring, closely linking them with the detection of code smells, managing technical debt, and measuring quality improvement. A comprehensive methodology was developed to apply refactoring principles to a specific case study in Industry 4.0, using the Fischertechnik Learning Factory as a simulation of a smart factory.

  • Degree: Bachelor of Arts in Business Administration
  • Institution: University of St. Gallen
  • Supervisor: Prof. Dr. Ronny Seiger
  • Submission Date: May 2022

Abstract

This thesis explores the connection between refactoring, software quality, and business impact. By analyzing a software system in an Industry 4.0 context, the research identifies key drivers of successful refactoring, such as detecting code smells, using a testing environment, and measuring improvements in code quality. The findings recommend that businesses establish a solid case for refactoring decisions using the concept of technical debt, ensuring that refactoring activities are well-justified economically.

Key Contributions

  1. Comprehensive Refactoring Process: Developed a refactoring methodology tailored to a smart factory simulation, identifying how refactoring influences both software engineering and business decisions.

  2. Detection of Code Smells: Identified prominent code smells, including duplicated code, long methods, and lazy classes, providing practical approaches for removing these issues.

  3. Business Case for Refactoring: Demonstrated how refactoring improves long-term maintainability and reduces technical debt, offering guidelines for businesses on when to invest in refactoring.

  4. Technical Debt Management: Introduced technical debt as a metaphor to justify refactoring and guide decision-making from both technical and business perspectives.

Key Learnings

  1. Software Quality Management: Gained experience in applying refactoring to enhance software maintainability, particularly in complex systems like those found in Industry 4.0.

  2. Technical Debt: Learned to quantify and communicate technical debt to stakeholders, providing a clear justification for refactoring decisions.

  3. Refactoring Techniques: Implemented Martin Fowler's refactoring strategies to improve the structure and flexibility of the software system without introducing new bugs.

  4. Testing and Measurement: Employed automated tools like Sonargraph and Radon to detect code smells and measure the improvement in code maintainability. Developed a custom Git hook to automate quality measurements after each code change.

Tools & Technologies

  • Languages: Python
  • Tools: Sonargraph, Radon, Git, Bash
  • Metrics: Maintainability Index, Cyclomatic Complexity, Halstead Volume
  • Framework: Fischertechnik Learning Factory, Camunda BPMN

Acknowledgements

I would like to thank Prof. Dr. Ronny Seiger for his invaluable guidance and support throughout this project. Additionally, I am grateful to the University of St. Gallen for providing the resources and environment to complete this thesis.

About

Personal Documents and Notes - used for my Bachelor Thesis at the University of St. Gallen

Topics

Resources

Stars

Watchers

Forks

Languages