4 ms·
When I took a software engineering course, they talked about the benefits of "decoupled code," "dependency injection," and "abstractions," but when it came to a
by hayst4ck 3y ago
When I took a software engineering course, they talked about the benefits of "decoupled code," "dependency injection," and "abstractions," but when it came to an actual tactical explanation of these things, or method of recognizing highly coupled code my education fell woefully short.
Tactically speaking, if you don't abuse the global scope (class methods/singletons are abuses of the global scope), don't have circular dependencies, don't have "intialization" methods called after constructors, and most important of all, don't call non trivial functions in constructors, then your code is probably reasonably abstracted.
More importantly than being abstracted, it is probably absolutely boring and trivial to unit test.