We listed total 16 issues that are related to bad practice of .net programming:
1. Coupling Issues
- OOD is a good design but sometimes it is causing Code Dependency Issue on maintenance. When we change one function, it may cause other "sister" functions non-functioning.
- Too many classes and functions are depending on each other. Modifying one effects all. It is hard to debug the depending issue.
- All those methods and classes are server side objects. They consume memories and resources.
2. Using Too Many Third Party DLL(s)
- Third party DLL(s) are not your codes. They can be a trouble after a certain time.
- They could be running on different framework version rather than your one. That is causing a compatible issue.
- They could be buggy
- They could have some security issues that you may never know (or maybe the creators do not know neither)
3. Confusion On File Naming.
- Carelessly naming files, pages, folders, projects without a good naming policy. It is too hard to understand the meaning of objects by names.
- Using too many Abbreviations of naming that does not make sense.
- Using a single word as a folder's name that is a nightmare. When we do a search, it comes out hundreds single name on result list.
-
4. Time Delay On Loops - do while, for each, for and so on.
- Looping hundreds times on DB queries. The more time it spends on DB queries, the more chance of data table deadlock it will get
- Forgot to break the loop after the program got what it needs
- Define a new object inside a loop then an object have been created for n times.
5. Too many logical processes implemented on the Stored Procedures in SQL
- Logical Processes should be done on the Frontend programing. It should never be done on the SQL server. The save and update processes are locking the data tables.
- It likely causes a RACE condition.
6. Names and variables are hard coded on backend
- The hard coded fixed Variables on backend is a bad idea. It is hard for maintenance.
- They should be on Configuration file
7. Abusing Server Side Memory - Session ID
- Putting tons info on Session ID that uses too much server-side memory
- Session ID is a server side variable
- MVC is consuming a lot of server side memory
8. View State is too long
- Browser will take longer time to read View State Info
9. Too many JS and HTML errors:
- JavaScript is a powerful script for client side programming. However, it may not be compatible with the new browser.
- Browser generates too many html errors that slows down the performance
10. Calling third party web services takes too long on responding.
- Need to setup a time-out mechanism; drop after three attempts.
11. DB connection - Forgot to stop the connections after job was done.
- Forgot to handle the DB exceptions
- ADO.net Store Procedures most time is faster than "LINQ with Entity Framework" on DB queries
12. Too many table joins on Stored Procedures
- Get too many redundant data from DB tables
- Too many temp tables on one big SP and forgot to drop it after used
- Programming logic should be left on the Frontend layer, not in DB layer. Try to keep DB queries as simple as possible
13. No Documentation
- Programmers forgot to write down the document of the functions.
- Other people do not understand the codes.
- Maintenance Issue
14. Writing codes too complicated so no one can understand it.
- If a program that most people can NOT understand it then it is a garbage. It will have no development in future.
15. Avoid caching techniques
- Caching improves the performance but it creates an update issue at same time - New data is not updated sometimes.
16. Forgot to use indexer for tables. Both clustered and non clustered indexers can be used for performance improvement.
- Execution plan, Profiler and normalization to see the performance
- Using SQL functions to improve the performance