Code Smell – Bad Smell in Code : Understanding Feature Envy
This is one of Martin Fowler’s code smells. The methods of a class should be interested in the variables and functions of the class they belong to, and not the variables and functions of...
This is one of Martin Fowler’s code smells. The methods of a class should be interested in the variables and functions of the class they belong to, and not the variables and functions of...
You can insert calls to wait(), sleep(), yield(), and priority() in your code by hand. It might be just the thing to do when you’re testing a particularly thorny piece of code. Here is...
“Don’t comment bad code – rewrite it.” — Brian W. Kernighan and P. J. Plaugher If our programming languages were expressive enough, or if we had the talent to subtly wield those languages to...
The ideal number of arguments for a function is zero (niladic). Next comes one (monadic), followed closely by two (dyadic). Three arguments (triadic) should be avoided where possible. More than three (polyadic) requires very...
Understand Long Classes. Its like a Big BOM or Big Class. In an effort to make our classes and methods small, we might create too many tiny classes and methods. So this rule suggests...
Understanding Long Method In an effort to make our classes and methods small, we might create too many tiny classes and methods. So this rule suggests that we also keep our function and class...
Repeatation is the root of software evil. Every time you see duplication in the code, it represents a missed opportunity for abstraction. That duplication could probably become a subroutine or perhaps another class outright....
The SOLID principles provide five guidelines that, when followed, can dramatically enhance the maintainability of software. Dependency Inversion Principle Intro Download Examples Dependency Inversion Principle Intro The DIP states that high level modules...
The SOLID principles provide five guidelines that, when followed, can dramatically enhance the maintainability of software. The ISP specifies that clients should not be forced to depend upon interfaces that they do not use....
The SOLID principles provide five guidelines that, when followed, can dramatically enhance the maintainability of software. The LSP specifies that functions that use pointers of references to base classes must be able to use...
Recent Comments