当前位置:网站首页>SwiftUI 开发经验之作为一名程序员需要掌握的五个最有力的原则
SwiftUI 开发经验之作为一名程序员需要掌握的五个最有力的原则
2022-07-03 12:40:00 【知识大胖】
在编程世界中,我们遵循一些人的原则。有些是广为流传的知识,但有些通常不说,因为它来自个人经验,例如:
- 永远不要在对你将要做什么没有一个扎实的想法的情况下开始编程。这适用于最多样化的项目,甚至是最简单的程序。在没有特定方向的情况下进行编码通常会导致返工。
- 简单胜于复杂。不仅您,其他人都必须了解所做的事情。永远不要轻视评论。
- 如果您正在处理一个中等规模的项目并且拥有所需的资源,请考虑使用 MVC 架构。正确分离项目中的各种文件使开发更加简单。
- 尽管为计算等复杂事物创建函数很诱人,但为此使用您的库是非常值得的。请记住,您通常没有时间从头开始编写代码,而且许多库是由主题专家的个人和组织创建的。
- 分而治之。如果你有一个大问题,把它分解成更小的部分并解决它们。这有助于/提高您对问题的理解,并使其更容易解决。这也是一种基本的算法构建技术。
- 尽可能重用和解耦。编写可重用和通用的函数/类/代码(在常识和问题要求的范围内)。做同样的事情,重用其他人的代码/解决方案。它可以节省您现在或将来的时间。
为人而不是机器编写代码。不要编写明天你不会理解或别人不会理解的代码。对于编写只有你知道的代码,你不是一个更好的程序员(在我看来,恰恰相反)。编写代码以便人们理解。
编程是一项艰巨的任务,就像许多知识领域一样,只能通过大量的实践和原则来学习。
边栏推荐
- SVN添加文件时的错误处理:…\conf\svnserve.conf:12: Option expected
- Sword finger offer 16 Integer power of numeric value
- My creation anniversary: the fifth anniversary
- Setting up Oracle datagurd environment
- Sword finger offer 14- I. cut rope
- C graphical tutorial (Fourth Edition)_ Chapter 15 interface: interfacesamplep271
- Flink SQL knows why (13): is it difficult to join streams? (next)
- 【数据库原理及应用教程(第4版|微课版)陈志泊】【第三章习题】
- Fabric. JS three methods of changing pictures (including changing pictures in the group and caching)
- 106. 如何提高 SAP UI5 应用路由 url 的可读性
猜你喜欢

8皇后问题

rxjs Observable filter Operator 的实现原理介绍

Flink SQL knows why (XI): weight removal is not only count distinct, but also powerful duplication

106. 如何提高 SAP UI5 应用路由 url 的可读性

Resolved (error in viewing data information in machine learning) attributeerror: target_ names

2022-02-09 survey of incluxdb cluster

2022-02-11 heap sorting and recursion

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

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

MySQL_ JDBC
随机推荐
剑指 Offer 12. 矩阵中的路径
2022-02-09 survey of incluxdb cluster
Sword finger offer 12 Path in matrix
Useful blog links
2022-01-27 research on the minimum number of redis partitions
In the promotion season, how to reduce the preparation time of defense materials by 50% and adjust the mentality (personal experience summary)
STM32 and motor development (from MCU to architecture design)
Servlet
SQL learning notes (I)
阿南的疑惑
解决 System has not been booted with systemd as init system (PID 1). Can‘t operate.
2022-01-27 redis cluster cluster proxy predixy analysis
Introduction to the implementation principle of rxjs observable filter operator
The difference between session and cookie
Flink SQL knows why (7): haven't you even seen the ETL and group AGG scenarios that are most suitable for Flink SQL?
已解决(机器学习中查看数据信息报错)AttributeError: target_names
CVPR 2022 图像恢复论文
Flink SQL knows why (XIV): the way to optimize the performance of dimension table join (Part 1) with source code
Solve system has not been booted with SYSTEMd as init system (PID 1) Can‘t operate.
Typeerror resolved: argument 'parser' has incorrect type (expected lxml.etree.\u baseparser, got type)