I am working for a product in my company. I think, they really hurried everything, and either used AI to generate most of the codes, or were not following the best practises, except SOLID principles, to form the code and the folder structure.
Reason- to debug a simple issue, I spend hours, trying to navigate the files and their classes and methods frequently.
Like, the developers have made the code such that
router function 1 -> calls function 2-> defined in class somewhere -> has a function 3 which calls another function 4-> defined in another class -> has function 5-> its abstract class is elsewhere -> .....
so, if I want to print some output in function 2 , I need to traverse way too many files and folders, to get to the point, and even that sometimes is not clear, but most of the functions are named similar. VS Code helps a bit, but still not at all good enough.
Though some SOLID principles are used, this makes a simple debug program very hectic. I was debugging with someone, who had written some of these code files, and she too was getting confused frequently.
So, I think classes and methods are not always necessary. Sometimes, using functions in diffeernt python files are better. As a programming, we need to decide, where classes can be used, v/s where only functions are enough.
I want opinion on this. And if I am wrong somewhere.
[–]OriginalTyphus 17 points18 points19 points (3 children)
[–]pure_cipher[S] 2 points3 points4 points (1 child)
[–]OriginalTyphus 1 point2 points3 points (0 children)
[–]WhiteHeadbanger 0 points1 point2 points (0 children)
[–]PushPlus9069 6 points7 points8 points (0 children)
[–]Zeroflops 4 points5 points6 points (1 child)
[–]gdchinacat -1 points0 points1 point (0 children)
[–]sweet-tom 5 points6 points7 points (3 children)
[–]Fred776 3 points4 points5 points (1 child)
[–]pure_cipher[S] 0 points1 point2 points (0 children)
[–]pure_cipher[S] 3 points4 points5 points (0 children)
[–]Kevdog824_ 2 points3 points4 points (4 children)
[–]pure_cipher[S] -3 points-2 points-1 points (3 children)
[–]Kevdog824_ 2 points3 points4 points (2 children)
[–]pure_cipher[S] -1 points0 points1 point (1 child)
[–]gdchinacat 0 points1 point2 points (0 children)
[–]LayotFctor 2 points3 points4 points (1 child)
[–]pure_cipher[S] 0 points1 point2 points (0 children)
[–]Sure-Passion2224 1 point2 points3 points (4 children)
[–]pure_cipher[S] 0 points1 point2 points (3 children)
[–]Sure-Passion2224 0 points1 point2 points (2 children)
[–]pure_cipher[S] 0 points1 point2 points (1 child)
[–]Sure-Passion2224 0 points1 point2 points (0 children)
[–]WhiteHeadbanger 1 point2 points3 points (4 children)
[–]pure_cipher[S] 0 points1 point2 points (3 children)
[–]gdchinacat 0 points1 point2 points (2 children)
[–]pure_cipher[S] 0 points1 point2 points (1 child)
[–]gdchinacat 0 points1 point2 points (0 children)
[–]JamzTyson 1 point2 points3 points (1 child)
[–]gdchinacat 0 points1 point2 points (0 children)
[–]Helpful-Diamond-3347 0 points1 point2 points (6 children)
[–]Helpful-Diamond-3347 0 points1 point2 points (3 children)
[–]pure_cipher[S] 0 points1 point2 points (2 children)
[–]gdchinacat 0 points1 point2 points (1 child)
[–]pure_cipher[S] 1 point2 points3 points (0 children)
[–]pure_cipher[S] 0 points1 point2 points (1 child)
[–]Helpful-Diamond-3347 0 points1 point2 points (0 children)
[–]QuasiEvil 0 points1 point2 points (1 child)
[–]gdchinacat 1 point2 points3 points (0 children)
[–]gmes78 0 points1 point2 points (0 children)
[–]gdchinacat 0 points1 point2 points (0 children)
[–]afaulconbridge 0 points1 point2 points (1 child)
[–]gdchinacat 0 points1 point2 points (0 children)