ash16 / TYTS

0 stars 1 forks source link

Method too Long #5

Open MbJav opened 6 years ago

MbJav commented 6 years ago

https://github.com/ash16/TYTS/blob/c13ea69e5337df93cd12c7e8b882b7c2734511ba/buddingMainWindow.py#L20-L192

Method is much longer than ten lines and the method uses many functions repeatedly. Long methods can lead to 'spaghetti code' meaning it can be extremely difficult for developers to just look at the method, understand what is happening, and debug if needed. The more and more lines added, the more difficult it will become to debug issues that might arise from this one method.

There were some comments placed in the method. This usually hints that there's a need for a new method. Modularizing this method by creating smaller methods also prevents duplicate code.

MbJav commented 6 years ago

https://github.com/ash16/TYTS/blob/master/login_window.py#L11-L64

Same issue here described above.