广告后台

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 476|回复: 0

Constitutes an unempathetic

[复制链接]

1

主题

1

帖子

5

积分

其他

Rank: 1

积分
5
发表于 2023-12-21 16:21:45 | 显示全部楼层 |阅读模式
The first sin that  code is an unreadable code. Imagine variable names of functions and classes that mean nothing to you tons of ifs loops and a dense network of dependencies that start to give you a headache. Often even a comment in the code does not improve the situation. Besides commenting on unreadable code is also far from the idea of ​​empathetic code. Programming practices such as SOLID DRY YAGNI and KISS did not come out of nowhere. Empathy is behind many good programming practices.

An unempathetic code is also one with the above mentioned faces. By mine I mean errors and traps in the code that were left intentionally. Such a trap may be for example an error left intentionally in the code. It could also Phone Number List be an unstable test or a test with an incorrect assertion.




An even worse case is a piece of code intentionally omitted from testing. I am far from adhering to the idea of ​​ % code coverage. However by leaving an important fragment of the code without verification in the form of a test we add another problem to our codebase. After all it may also be TODO fix later or TODO do it better left in the code only to be removed after a few years. I also encourage you to fight against the someone will fix it attitude.

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|小黑屋|五常同城 ( 黑ICP备19004948号-4 )

GMT+8, 2025-8-23 16:16 , Processed in 0.114324 second(s), 21 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表