- C# and .NET Core Test Driven Development
- Ayobami Adewole
- 347字
- 2021-06-25 22:00:26
Difficulty in maintaining code
There are two types of code—good code and bad code. The syntax of both types of code may be correct when compiled and running the code can give the expected results. However, bad code leads to serious issues when it comes to extending or even making little changes to the code, due to the way it was written.
When programmers write code using unprofessional approaches and styles, this often results in bad code. Also, the use of unreadable coding styles or formats as well as not properly and effectively testing code are all precursors to bad code. Code can be written poorly when programmers sacrifice professionalism in order to meet approaching deadlines and project milestones.
I have come across a few software projects that rapidly become legacy software projects that are abandoned because of incessant production bugs and the inability to incorporate change requests from users easily. This is because these software applications were deployed into production with a severe accumulation of technical debts through bad code written by software developers as a result of making poor design and development decisions and using programming styles known to cause future maintenance problems.
Source code elements—methods, classes, comments, and other artifacts—should be easy to read, understand, debug, refactor, and extend if required by another developer other than the original developer; otherwise, bad code has already been written.
You know you have bad code when, extending or adding new features, you break the existing working features. This can also happen when there are portions of code that cannot be decoded or any changes to them will bring the system to a halt. Another reason for bad code is usually because of nonadherence to object-oriented and Don't Repeat Yourself (DRY) principles or wrong use of the principles.
DRY is an important principle in programming, which aims at breaking down a system into small components. These components can easily be managed, maintained, and reused in order to avoid writing duplicate code and having different parts of code performing the same function.
- 摩登創(chuàng)客:與智能手機和平板電腦共舞
- PHP 7底層設計與源碼實現(xiàn)
- INSTANT Weka How-to
- CKA/CKAD應試教程:從Docker到Kubernetes完全攻略
- R大數(shù)據(jù)分析實用指南
- HTML5從入門到精通 (第2版)
- UML 基礎與 Rose 建模案例(第3版)
- 運用后端技術(shù)處理業(yè)務邏輯(藍橋杯軟件大賽培訓教材-Java方向)
- Mastering Unity 2D Game Development(Second Edition)
- Python項目實戰(zhàn)從入門到精通
- Django 3.0入門與實踐
- ActionScript 3.0從入門到精通(視頻實戰(zhàn)版)
- 計算機應用基礎(第二版)
- Mudbox 2013 Cookbook
- 程序員的成長課