当前位置:网站首页>SwiftUI 开发经验之作为一名程序员需要掌握的五个最有力的原则
SwiftUI 开发经验之作为一名程序员需要掌握的五个最有力的原则
2022-07-03 12:40:00 【知识大胖】
在编程世界中,我们遵循一些人的原则。有些是广为流传的知识,但有些通常不说,因为它来自个人经验,例如:
- 永远不要在对你将要做什么没有一个扎实的想法的情况下开始编程。这适用于最多样化的项目,甚至是最简单的程序。在没有特定方向的情况下进行编码通常会导致返工。
- 简单胜于复杂。不仅您,其他人都必须了解所做的事情。永远不要轻视评论。
- 如果您正在处理一个中等规模的项目并且拥有所需的资源,请考虑使用 MVC 架构。正确分离项目中的各种文件使开发更加简单。
- 尽管为计算等复杂事物创建函数很诱人,但为此使用您的库是非常值得的。请记住,您通常没有时间从头开始编写代码,而且许多库是由主题专家的个人和组织创建的。
- 分而治之。如果你有一个大问题,把它分解成更小的部分并解决它们。这有助于/提高您对问题的理解,并使其更容易解决。这也是一种基本的算法构建技术。
- 尽可能重用和解耦。编写可重用和通用的函数/类/代码(在常识和问题要求的范围内)。做同样的事情,重用其他人的代码/解决方案。它可以节省您现在或将来的时间。
为人而不是机器编写代码。不要编写明天你不会理解或别人不会理解的代码。对于编写只有你知道的代码,你不是一个更好的程序员(在我看来,恰恰相反)。编写代码以便人们理解。
编程是一项艰巨的任务,就像许多知识领域一样,只能通过大量的实践和原则来学习。
边栏推荐
- Luogup3694 Bangbang chorus standing in line
- PostgreSQL installation
- Smbms project
- [Database Principle and Application Tutorial (4th Edition | wechat Edition) Chen Zhibo] [Chapter 7 exercises]
- Sitescms v3.1.0 release, launch wechat applet
- Flink SQL knows why (13): is it difficult to join streams? (next)
- 父亲和篮球
- R语言使用data函数获取当前R环境可用的示例数据集:获取datasets包中的所有示例数据集、获取所有包的数据集、获取特定包的数据集
- 2022-02-13 plan for next week
- 正则表达式
猜你喜欢

MySQL

已解决TypeError: Argument ‘parser‘ has incorrect type (expected lxml.etree._BaseParser, got type)

Flink SQL knows why (19): the transformation between table and datastream (with source code)

Idea full text search shortcut ctr+shift+f failure problem

Solve system has not been booted with SYSTEMd as init system (PID 1) Can‘t operate.

Flink SQL knows why (12): is it difficult to join streams? (top)

2022-02-09 survey of incluxdb cluster

PowerPoint 教程,如何在 PowerPoint 中将演示文稿另存为视频?

【数据库原理及应用教程(第4版|微课版)陈志泊】【第三章习题】

Introduction to the implementation principle of rxjs observable filter operator
随机推荐
Flink code is written like this. It's strange that the window can be triggered (bad programming habits)
regular expression
71 articles on Flink practice and principle analysis (necessary for interview)
用户和组命令练习
【数据库原理及应用教程(第4版|微课版)陈志泊】【第三章习题】
2022-02-14 analysis of the startup and request processing process of the incluxdb cluster Coordinator
有限状态机FSM
elk笔记24--用gohangout替代logstash消费日志
[Database Principle and Application Tutorial (4th Edition | wechat Edition) Chen Zhibo] [Chapter IV exercises]
道路建设问题
正则表达式
My creation anniversary: the fifth anniversary
DQL basic query
对业务的一些思考
106. 如何提高 SAP UI5 应用路由 url 的可读性
35道MySQL面试必问题图解,这样也太好理解了吧
STM32 and motor development (from MCU to architecture design)
剑指 Offer 15. 二进制中1的个数
Road construction issues
双链笔记 RemNote 综合评测:快速输入、PDF 阅读、间隔重复/记忆