我怎么知道我的编码习惯是否不正确? [英] How do I know if I have bad coding habits?

查看:76
本文介绍了我怎么知道我的编码习惯是否不正确?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

喂!我一直在学习如何编程一段时间,在阅读了一篇关于自学成才的程序员通常有不良编程习惯的文章之后,我恐怕我可能已经或者已经有了一些这些坏习惯。所以我的问题是:是否有任何教程是真实的或教程不教不良的编码习惯?如果你知道,你能告诉我一些信息吗?感谢您的时间!享受有趣的编码,度过美好的一天!



编辑:



Woops!忘了告诉你我正在使用的编程语言!如果你不知道我在学什么,你找不到我的教程!现在,我正在学习javascript和某人html / css!

Hey! I have been learning how to program for some time now, and after reading an article about how self-taught programmers usually have bad programming habits, i'm afraid I may get, or already have, some of these bad habits. So my question is: are there any tutorials out there that are "real" or tutorials that do not teach bad coding habits? If you know any, could you give me the information of some? Thank you for your time! Have fun coding, and have a great day!

edit:

Woops! Forgot to tell you what programming language i'm using! You can't find a tutorial for me if you don't know what i'm learning! For now, i'm learning javascript and someone html/css!

推荐答案

编写代码,然后做一些其他项目。然后在两周或更好的一个月内阅读您自己的代码。如果它刺激你或难以理解,你就有坏习惯。您应该了解自己的代码是如何工作的,即使您忘记了它,然后在多年不接触之后再次阅读。



-SA
Write code and then do some other project. Then read your own code in two weeks or, better, in a month. If it irritates you or hard to understand, you have bad habits. You should understand how your own code works even if you forget it and then read again after years of not touching it.

—SA


这里的语言不是问题,我认为好的做法大多是通用的。互联网上有很多文章。但是,它有时会引起争议。所以一定要带上一点盐。要批判,试验然后再决定。这些链接将让您开始:

1. http://simpleprogrammer.com/2015/03/16/11-rules-all-programmers-should-live-by/ [ ^ ]

2. 耦合和内聚 [ ^ ]
Language is not an issue here, I think good practices are mostly generic. There are many articles on the Internet. However, it is sometimes controversial. So do take them with a pinch of salt. Be critical, experiment and then decide. These links will get your started:
1. http://simpleprogrammer.com/2015/03/16/11-rules-all-programmers-should-live-by/[^]
2. Coupling and Cohesion[^]


这篇关于我怎么知道我的编码习惯是否不正确?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆