1.2 Simple Code!(翻译)
Simple Code! 简洁编码
Playing football is very simple, but playing simple football is the hardest thing there is. — Johan Cruyff
踢足球非常简单,但踢简单的足球是最难的事情。— Johan Cruyff
If we take this famous quote for programming, we can say;
如果我们把这句名言用于编程,我们也可以说:
Writing code is very simple, but writing simple code is the hardest thing there is. — ???
写代码非常简单,但是写简单代码是最难的事情。— ???
In this document, we will introduce simple rules, those are easy to implement.
在本书中,我们将会介绍简单规则,且这些规则很容易实现。
Once your application grows, it will be hard to follow these rules. Sometimes you find breaking rules will save you time in
a short term. However, the saved time in the short term will bring much more time loss in the middle and long term. Your
code base becomes complicated and hard to maintain. Most of the business applications are re-written just because you can't maintain it anymore.
一旦你的应用程序增长起来,你很难遵循这些规则。有时你会发现破坏规则在短期内会为你节省时间。然而,短期内节省的时间将会在中期和长期带来更多的时间损失。你的代码库变得复杂且难以维护。大多数商业应用程序被重新编写,只是因为你无法再维护它。
If you follow the rules and best practices, your code base will be simpler and easier to maintain. Your application reacts to changes faster.
如果你遵循这些规则和最佳实践,你的代码库将更简单且更容易维护。你的应用程序也能更快的应对变化。
1.2 Simple Code!(翻译)的更多相关文章
- Entity Framework Code-First(4):Simple Code First Example
Simple Code First Example: Let's assume that we want to create a simple application for XYZ School. ...
- 项目笔记---Socket Error Code翻译
前言 在项目中为了方便调试及客户反馈,需要Socket错误数字的中文解释,MSDN上只有英文版,同时也想自己学习而且方便将来更新ErrorCode的实际发生的情景,顾有此博文. MSDN:https: ...
- 如何写 go 代码 (How to Write Go Code 翻译)
目录 1. 写在前面的话 2. 介绍 3. 代码组织 3.1. 工作区 3.2. GOPATH 环境变量 3.3. Package 路径 3.4. 第一个 GO 程序 3.5. 第一个 GO 库 3. ...
- Paxos Made Simple【翻译】
Paxos一致性算法——分布式系统中的经典算法,论文本身也有一段有趣的故事.一致性问题是分布式系统的根本问题之一,在论文中,作者一步步的加强最初一致性问题(2.1节提出的问题)的约束条件,最终导出了一 ...
- [C]simple code of count input lines,words,chars
This is a simple C program which can count input lines, words and chars. But the number of words are ...
- 《Paxos Made Simple》翻译
1 Introduction 可能是因为之前的描述对大多数读者来说太过Greek了,Paxos作为一种实现容错的分布式系统的算法被认为是难以理解的.但事实上,它可能是最简单,最显而易见的分布式算法了. ...
- 《Paxos Made Simple》翻译(转)
1 Introduction 可能是因为之前的描述对大多数读者来说太过Greek了,Paxos作为一种实现容错的分布式系统的算法被认为是难以理解的.但事实上,它可能是最简单,最显而易见的分布式算法了. ...
- Python: simple code
# !/usr/bin/env python3.6 # -*- coding: utf-8 -*- # visual studio 2017 # 2019 10 12 Geovin Du print ...
- [翻译+山寨]Hangfire Highlighter Tutorial
前言 Hangfire是一个开源且商业免费使用的工具函数库.可以让你非常容易地在ASP.NET应用(也可以不在ASP.NET应用)中执行多种类型的后台任务,而无需自行定制开发和管理基于Windows ...
随机推荐
- grpc服务发现与负载均衡
前言 在后台服务开发中,高可用性是构建中核心且重要的一环.服务发现(Service discovery)和负载均衡(Load Balance)一直都是我关注的话题.今天来谈一下我在实际中是如何理解及落 ...
- NOIP模拟50
过分的神圣,往往比恶魔更加恶质. 前言 最大的一个收获就是不要动不动就码线段树,一定要审清楚题目之后再码!! T1 一开始理解错题了,以为答案是就是 \(\dfrac{\operatorname{le ...
- 用Java实现红黑树
红黑树是众多"平衡的"搜索树模式中的一种,在最坏情况下,它相关操作的时间复杂度为O(log n). 1.红黑树的属性 红黑树是一种二分查找树,与普通的二分查找树不同的一点是,红黑树 ...
- CommonsCollections3 反序列化利用链分析
InstantiateTransformer commons-collections 3.1 中有 InstantiateTransformer 这么一个类,这个类也实现了 Transformer的t ...
- [第三篇]——CentOS Docker 安装之Spring Cloud直播商城 b2b2c电子商务技术总结
CentOS Docker 安装 Docker 支持以下的 64 位 CentOS 版本: CentOS 7 CentOS 8 更高版本... 使用官方安装脚本自动安装 安装命令如下: curl -f ...
- 案例九:shell脚本自动创建多个新用户,并设置密码
此脚本是用来批量创建用户并设置用户密码,在企业用非常实用. 脚本一 #!/bin/bash for name in $( seq 1 100 ) do useradd "user$name& ...
- Java大数操作
Java的Math包中提供了两个类用于对大数进行操作: BigInteger类,用于大整数的操作 BigDecimal类,用于大的小数操作 BigInteger类 Java中的基本类型中,表示整数的有 ...
- easyx小游戏
#include "stdafx.h" int main(){ srand(time(NULL)); initgraph(640,480); int user_x=20,user_ ...
- 记一次docker compose的低级错误
记一次docker compose的低级错误 问题 今天在学习dockercompose的时候,启动docker compose up,结果却出现异常 Error response from da ...
- composer出现问题: Could not open input file: composer.phar
可以执行下面命令 php -r "readfile('https://getcomposer.org/installer');" | php This will install c ...