Alex Thottunkel
- Total activity 2325
- Last activity
- Member since
- Following 0 users
- Followed by 0 users
- Votes 1
- Subscriptions 1186
Articles
Recent activity by Alex Thottunkel Sort by recent activity-
The code contains at least one class defining a destructor
Why you should care For several reasons detailed in references, using finalizers is not recommended: The finalization is not determined. You don't know when the finalizer will be called Due t...
-
The code contains too many switch cases with missing ending breaks
Why you should care Ending switch branches with ‘breaks’ helps the code be more consistent, functional, and easier to debug. This allows developers in different teams navigate the code easier and ...
-
The code contains modifications of buildtins objects : Object, Array or Function
Why you should care Modifying builtins like Object.prototype and Array.prototype are strictly forbidden. Modifying other builtins like Function.prototype is less dangerous but still leads to hard ...
-
Avoid using ellipsis in functions
Why you should care Functions should not be defined with a variable number of arguments. Varargs methods are a convenient way to define methods that require a variable number of arguments, but the...
-
Avoid protected member in final classes
Why you should care The difference between private and protected visibility is that child classes can see and use protected members, but they cannot see private ones. Since a final class will have...
-
Avoid loop counter modification
Why you should care Loop counters shall not be modified in the body of the loop. However other loop control variables representing logical values may be modified in the loop, for example a flag to...
-
Avoid Equals methods not testing their parameters
Why you should care Because the equals method takes a generic Object as a parameter, any type of object may be passed to it. The method should not assume it will only be used to test objects of it...
-
Avoid catches that only rethrow
Why you should care A catch clause that only rethrows the caught exception has the same effect as omitting the catch altogether and letting it bubble up automatically, but with more code and the a...
-
Avoid nested try-catch blocks
Why you should care Although this is sometimes unavailable, nesting try/catch blocks severely impacts the readability of the source code as it makes it difficult to understand which block will cat...
-
Avoid long case statements
Why you should care The switch statement should be used only to clearly define some new branches in the control flow. As soon as a case clause contains too many statements this highly decreases th...