Is this an indication of high coupling

92 views Asked by At

I am doing a code review for a software system. I noticed that some user's story and even sub-tasks when are implemented | modified they result in a large code commit and usually end up in changing tens of source code files (java classes, javascript files, HTML, etc)

I expect that when someone implements a subtask or a single user story will only require changing few components. Sometimes the commit can have up to 60 files changed.

Attached a screenshot to illustrate the case enter image description here

2

There are 2 answers

1
Socratees Samipillai On

If you know for sure you modified only specific classes/methods, and then as a result of it, you had to edit all the other places, then yes, the code is tightly coupled.

Refer here.

1
Alpar On

I'm not sure you can draw the conclusion that code is tightly coupled by looking at the number of files changed in isolation, and not consider the actual changes being made in the context of a user story.

If we consider coupling between classes and methods, there's no generic correlation between number of classes you would need to touch for a user story, that would really depend on the story itself.

Looking at the list of changed files a particular changes while implementing a story, like applying an automated IDE refactoring ( say renaming a method ) to a particular class would generate, would indeed hint at tight coupling.