Functions which are very complicated?
For complicated functions, this can be considered as bad coding habit due to a number of different reasons starting with the understanding ability of another programmer in case the program is to be given to another programmer. The harder it is to understand the program the longer it takes to debug a problem with the program either by the actual programmer who coded the program or by another programmer (Palomba et al.). The testing process of a program with complicated functions becomes even harder since the debugging process is too complicated. Finding errors within such a code proves to be hard for the programmer making this a bad coding habit.
Function call which is very Complicated?
For a very complicated function call, it has the disadvantage of code reusability unless the programmer using the program is able to comprehend the complexity of the code also it is more time consuming trying to internalize the code in case of debugging hence causes extreme time wastage if a simple non-complicated function call was to be used.
Function with a long parameter list?
Functions should not have a long parameter list since the shortcode in programming especially in Lua code reduces the syntax errors as well as debugging problems for the program. The long parameter list makes result to less readable of the code and lengthens the code. But trying to reduce parameter list this payoff by making it more readable. Also long parameter list results to unnoticed code duplication in the program. Long parameter lists are also too hard to understand and in return end up becoming contradictory and hard to use as they grow longer. Trying to group these parameter list together makes the code more manageable.
Class which has a lot of fields
It is not good to have a class with so many fields since the class ends up looking complicated. The more the fields in a class, the more effort is required to modify that class and maintain it. This also leads to manageability problems of the code and also time-consuming. Too many fields are to be redesigned to have a few of them in a program through some nested object grouping of some of the information. With this, the code is much easier to understand and manage.
Class which is very complex
Complicated classes in programming lead to a hard time testing the program by the programmer and also requires more time when it comes to maintaining the program or modifying it. This also makes it hard for a different programmer to debug the program or takes a lot of time when it comes to debugging the program. It becomes so hard to focus on a huge complicated class while having small, simple classes makes the development program of the class easier. This also lowers the number of errors in the program. For a complicated class it means that the class many complicated methods declared in it and by this, the class ends up having a greater potential impact on the derived class
Nested control flow depth
This has one major disadvantage which is hard to read and it is also considered as an anti-pattern. The conditional blocks (if) or loops (for, while) become hard to grasp the minute they go beyond a three level nesting and also have a high cyclomatic complexity (Palomba et al.). This is commonly referred to as dangerously deep nest. Hence the problem comes with a number of problems code is hard to read, the context at the moment is hard to understand and finally clean up happens vertically far from the original cause
Function Naming (Naming conventions)
One of the main problems of Function Naming (Naming conventions) is understanding the content in the code in case of lack of prior understanding of the language. The minute a single error occurs within the functional naming it results to a complete program fail hence proving to be a huge problem.
Work Cited
Palomba, Fabio, et al. "Do they really smell bad? a study on developers' perception of bad code smells." Software maintenance and evolution (ICSME), 2014 IEEE international conference on. IEEE, 2014.
Cite this page
Programming Paper Sample: Functions, Class, Naming Conventions. (2021, Jun 04). Retrieved from https://midtermguru.com/essays/programming-paper-sample-functions-class-naming-conventions
If you are the original author of this essay and no longer wish to have it published on the midtermguru.com website, please click below to request its removal:
- Background of the Kinetic Monte Carlo Method and a Description of the Catalyst Method
- Implementation of Traditional Filing and Records Keeping System by Organization - Paper Example
- Research Paper on Key Issues in Cyber Policy
- Application Letter to MSc in Software Engineering
- Sexting, Texting, Cyberbullying and Keeping Youth Safe Online - Article Analysis Essay
- Technology Revolution: How Smartphones and the Internet Changed the World - Essay Sample
- Healthcare Systems: Complexity, Resources & Patient Care - Essay Sample