当前位置:网站首页>SwiftUI 开发经验之作为一名程序员需要掌握的五个最有力的原则
SwiftUI 开发经验之作为一名程序员需要掌握的五个最有力的原则
2022-07-03 12:40:00 【知识大胖】
在编程世界中,我们遵循一些人的原则。有些是广为流传的知识,但有些通常不说,因为它来自个人经验,例如:
- 永远不要在对你将要做什么没有一个扎实的想法的情况下开始编程。这适用于最多样化的项目,甚至是最简单的程序。在没有特定方向的情况下进行编码通常会导致返工。
- 简单胜于复杂。不仅您,其他人都必须了解所做的事情。永远不要轻视评论。
- 如果您正在处理一个中等规模的项目并且拥有所需的资源,请考虑使用 MVC 架构。正确分离项目中的各种文件使开发更加简单。
- 尽管为计算等复杂事物创建函数很诱人,但为此使用您的库是非常值得的。请记住,您通常没有时间从头开始编写代码,而且许多库是由主题专家的个人和组织创建的。
- 分而治之。如果你有一个大问题,把它分解成更小的部分并解决它们。这有助于/提高您对问题的理解,并使其更容易解决。这也是一种基本的算法构建技术。
- 尽可能重用和解耦。编写可重用和通用的函数/类/代码(在常识和问题要求的范围内)。做同样的事情,重用其他人的代码/解决方案。它可以节省您现在或将来的时间。
为人而不是机器编写代码。不要编写明天你不会理解或别人不会理解的代码。对于编写只有你知道的代码,你不是一个更好的程序员(在我看来,恰恰相反)。编写代码以便人们理解。
编程是一项艰巨的任务,就像许多知识领域一样,只能通过大量的实践和原则来学习。
边栏推荐
- stm32和电机开发(从mcu到架构设计)
- 8皇后问题
- 2022-01-27 redis cluster cluster proxy predixy analysis
- [today in history] July 3: ergonomic standards act; The birth of pioneers in the field of consumer electronics; Ubisoft releases uplay
- 父亲和篮球
- Mysqlbetween implementation selects the data range between two values
- 开始报名丨CCF C³[email protected]奇安信:透视俄乌网络战 —— 网络空间基础设施面临的安全对抗与制裁博弈...
- Tutoriel PowerPoint, comment enregistrer une présentation sous forme de vidéo dans Powerpoint?
- php:  The document cannot be displayed in Chinese
- 我的创作纪念日:五周年
猜你喜欢

35道MySQL面试必问题图解,这样也太好理解了吧

【历史上的今天】7 月 3 日:人体工程学标准法案;消费电子领域先驱诞生;育碧发布 Uplay

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

Servlet

Flink SQL knows why (16): dlink, a powerful tool for developing enterprises with Flink SQL

OpenHarmony应用开发之ETS开发方式中的Image组件
![[Database Principle and Application Tutorial (4th Edition | wechat Edition) Chen Zhibo] [Chapter III exercises]](/img/b4/3442c62586306b4fceca992ce6294a.png)
[Database Principle and Application Tutorial (4th Edition | wechat Edition) Chen Zhibo] [Chapter III exercises]

用户和组命令练习

Elk note 24 -- replace logstash consumption log with gohangout

Mysql database basic operation - regular expression
随机推荐
2022-01-27 research on the minimum number of redis partitions
Task6: using transformer for emotion analysis
When we are doing flow batch integration, what are we doing?
关于CPU缓冲行的理解
In the promotion season, how to reduce the preparation time of defense materials by 50% and adjust the mentality (personal experience summary)
CVPR 2022 图像恢复论文
2022-02-10 introduction to the design of incluxdb storage engine TSM
Spark实战1:单节点本地模式搭建Spark运行环境
STM32 and motor development (from MCU to architecture design)
mysqlbetween实现选取介于两个值之间的数据范围
2022-02-14 incluxdb cluster write data writetoshard parsing
Sword finger offer 14- I. cut rope
Today's sleep quality record 77 points
Logback 日志框架
Idea full text search shortcut ctr+shift+f failure problem
Flink SQL knows why (XIV): the way to optimize the performance of dimension table join (Part 1) with source code
Sitescms v3.1.0 release, launch wechat applet
剑指 Offer 17. 打印从1到最大的n位数
开始报名丨CCF C³[email protected]奇安信:透视俄乌网络战 —— 网络空间基础设施面临的安全对抗与制裁博弈...
高效能人士的七个习惯