当前位置:网站首页>SwiftUI 开发经验之作为一名程序员需要掌握的五个最有力的原则
SwiftUI 开发经验之作为一名程序员需要掌握的五个最有力的原则
2022-07-03 12:40:00 【知识大胖】
在编程世界中,我们遵循一些人的原则。有些是广为流传的知识,但有些通常不说,因为它来自个人经验,例如:
- 永远不要在对你将要做什么没有一个扎实的想法的情况下开始编程。这适用于最多样化的项目,甚至是最简单的程序。在没有特定方向的情况下进行编码通常会导致返工。
- 简单胜于复杂。不仅您,其他人都必须了解所做的事情。永远不要轻视评论。
- 如果您正在处理一个中等规模的项目并且拥有所需的资源,请考虑使用 MVC 架构。正确分离项目中的各种文件使开发更加简单。
- 尽管为计算等复杂事物创建函数很诱人,但为此使用您的库是非常值得的。请记住,您通常没有时间从头开始编写代码,而且许多库是由主题专家的个人和组织创建的。
- 分而治之。如果你有一个大问题,把它分解成更小的部分并解决它们。这有助于/提高您对问题的理解,并使其更容易解决。这也是一种基本的算法构建技术。
- 尽可能重用和解耦。编写可重用和通用的函数/类/代码(在常识和问题要求的范围内)。做同样的事情,重用其他人的代码/解决方案。它可以节省您现在或将来的时间。
为人而不是机器编写代码。不要编写明天你不会理解或别人不会理解的代码。对于编写只有你知道的代码,你不是一个更好的程序员(在我看来,恰恰相反)。编写代码以便人们理解。
编程是一项艰巨的任务,就像许多知识领域一样,只能通过大量的实践和原则来学习。
边栏推荐
- February 14, 2022, incluxdb survey - mind map
- R language uses the data function to obtain the sample datasets available in the current R environment: obtain all the sample datasets in the datasets package, obtain the datasets of all packages, and
- MySQL_ JDBC
- 剑指 Offer 12. 矩阵中的路径
- Elk note 24 -- replace logstash consumption log with gohangout
- PowerPoint tutorial, how to save a presentation as a video in PowerPoint?
- 2022-02-11 heap sorting and recursion
- The 35 required questions in MySQL interview are illustrated, which is too easy to understand
- luoguP3694邦邦的大合唱站队
- 【R】 [density clustering, hierarchical clustering, expectation maximization clustering]
猜你喜欢
Seven habits of highly effective people
Flink SQL knows why (17): Zeppelin, a sharp tool for developing Flink SQL
Sword finger offer 14- ii Cut rope II
Image component in ETS development mode of openharmony application development
我的创作纪念日:五周年
双链笔记 RemNote 综合评测:快速输入、PDF 阅读、间隔重复/记忆
[Database Principle and Application Tutorial (4th Edition | wechat Edition) Chen Zhibo] [Chapter IV exercises]
对业务的一些思考
Typeerror resolved: argument 'parser' has incorrect type (expected lxml.etree.\u baseparser, got type)
Idea full text search shortcut ctr+shift+f failure problem
随机推荐
R语言gt包和gtExtras包优雅地、漂亮地显示表格数据:nflreadr包以及gtExtras包的gt_plt_winloss函数可视化多个分组的输赢值以及内联图(inline plot)
2022-02-14 analysis of the startup and request processing process of the incluxdb cluster Coordinator
用户和组命令练习
35道MySQL面试必问题图解,这样也太好理解了吧
2022-01-27 use liquibase to manage MySQL execution version
18W word Flink SQL God Road manual, born in the sky
luoguP3694邦邦的大合唱站队
stm32和电机开发(从mcu到架构设计)
Setting up Oracle datagurd environment
2022-02-09 survey of incluxdb cluster
人身变声器的原理
Some thoughts on business
C graphical tutorial (Fourth Edition)_ Chapter 17 generic: genericsamplep315
Flink code is written like this. It's strange that the window can be triggered (bad programming habits)
SLF4J 日志门面
When we are doing flow batch integration, what are we doing?
Elk note 24 -- replace logstash consumption log with gohangout
Start signing up CCF C ³- [email protected] chianxin: Perspective of Russian Ukrainian cyber war - Security confrontation and sanctions g
双链笔记 RemNote 综合评测:快速输入、PDF 阅读、间隔重复/记忆
[Database Principle and Application Tutorial (4th Edition | wechat Edition) Chen Zhibo] [Chapter 6 exercises]