Skip to main content

Command Palette

Search for a command to run...

程序员金句一箩筐,也许每句都是你现在最需要

Published
程序员金句一箩筐,也许每句都是你现在最需要
  1. Don't complain about legacy code. You basically write it every day.

不要抱怨遗留代码,你几乎每天都在写。

2.Stop complaining about documentation. you're a programmer. read the source code.

不要抱怨文档。你是个程序员,去读源码。

3.Change is normal. Don't get too attached to code, or to a specific way to do something.

变化是正常的。 不要太执着于代码,或者做某事的特定方式

4.When writing code, always write it like someone else will read it and can’t ask you what it does.

写代码时,始终想着以后有人要阅读这些代码,而他却不能问你这些代码是干什么的。

5.“This is not a research farm.” A good implementation that’s completed is far better than an incomplete solution that tries to achieve perfection.

“这不是研究农场。” 一个已经完成的好的实现远比一个试图达到完美的不完整的解决方案要好得多。

6.The primary job of any software engineer is delivering value

任何软件工程师的主要工作是交付价值

7.The better you can work in different styles and be consistent in their problem domains, the less you’ll get stuck at technical barriers.

你越能以不同的风格工作并在他们的“问题领域”保持一致,你就越不会陷入技术障碍(解决方案领域)。

8.Don’t fixate - stay flexible about the least essential. These things can often change without meaningful impact.

不要固执——对最不重要的事情保持灵活。 这些事情经常改变但是并没有什么有意义的影响

  1. Always provide good documentation and comments to explain context and why.

总是提供良好的文档来解释上下文和原因。

10.If you don't know what to call it, you don't know what it's for.

如果你不知道怎么称呼它,你就不知道它是干什么用的。

11.There's always a simpler way to think about solving a problem, strive for simplicity, because code is a liability, not an asset

总是有一种更简单的方式来思考解决问题,力求简单,因为代码是一种责任,而不是一种资产

12.Everything is a tradeoff. Pick one based on context

一切都是权衡。 根据上下文选择一个方案

13.The first step of any project is to grossly underestimate its complexity and difficulty.

任何项目的第一步都是严重低估其复杂性和难度。

14.Don't fanatic with tech stack (language, framework, db, etc)

不要热衷于技术栈(语言、框架、数据库等)

15.Don't impress me with some complicated techniques, impress me by making the shit work.

不要用一些复杂的技术来取悦我,要让工作运行起来取悦我

16.When you start as a developer you think that the most important part of your job is the technology. Writing code.

Years passes and you realize that is writing good, readable code.

And after many years, that is in communication. Understand and be understood.

当你开始作为一名开发人员时,你认为你工作中最重要的部分是技术 - 编写代码。

几年过去了,你意识到是编写好的、可读的代码。

多年后,意识到沟通才是最重要的。 理解和被理解。

17.Languages are just tools, learn the principles of software development and picking up new tools will be easier.

语言只是工具,学习软件开发原理,学习新工具会更容易

18.Just because you can, doesn't mean you should

仅仅因为你可以,并不意味着你应该

19.Don't be afraid to ask questions, it's not a weakness to admit you don't understand something.

不要害怕提出问题,承认自己不懂并不是一种弱点

20.Don’t implement every customer request. Most of them are useless.

不要实现每个客户的要求。 他们中的大多数都是无用的

21.Don't overdo and overdo background stuff. If it works as it's supposed to, nobody cares.

22.Explain to me like I'm 5

把我当5岁孩子一样和我解释

23.There's no such thing as a dumb question

没有愚蠢的问题

24.A working solution is much better than a perfect one.

一个可行的解决方案比一个完美的解决方案要好得多

25.Don't ever cut and paste code if you don't understand what it does. Only add code to projects that you are confident you know what it does.

如果您不了解代码的作用,请不要剪切和粘贴代码。 仅将你有信心知道作用的代码添加到项目中

26.If your solution is too complicated, there is a simpler one

如果你的解决方案太复杂,有一个更简单的

27.Don’t just fix the bug. Fix its root cause.

不要只修复bug,修复问题的根源

28.The answer will come to you on the toilet.

答案会在你上厕所的时候浮现

29.Self-documenting code is the best documentation.

自注释的代码是最好的文档

30.Keep it simple, make it work, optimize later.

保持简单,让它工作,以后再优化

31.Type it, don't do copy and paste.

敲代码,不要复制粘贴

32.Don't write clever code.

不要写聪明的代码

33.Don’t push to production on Fridays.

不要在周五上线

34.Separation of concerns.

关注隔离

35.Divide and conquer

分而治之

36.Understand what customer really needs, not what they want.

了解客户真正需要什么,而不是他们想要什么

More from this blog

用Java 17的Records加速Spring Boot开发

在《Spring Boot 2.6新特性:使用Java 17的Record作为配置属性》,我们提到了使用Java Records来作为Spring Boot的配置属性(configuration properties),从而减少了大量样板代码的编写,我们本篇将进一步拓展Records在Spring Boot下的应用场景,从而进一步减少我们的样板代码,使代码看上去更简洁清晰。 1、什么是Records record是一种特殊类型的类声明,目的是为了减少样板代码。record引入的主要目的是快速创...

Nov 11, 2022
用Java 17的Records加速Spring Boot开发

Spring Boot 2.6新特性:使用Java 17的Record作为配置属性

Spring Boot 3.0的基线版本是Java 17,Spring Boot 3.0版本将全面对Java 17的支持。较新版本的2.x的Spring Boot版本也可以使用Java 17的特性。 本文介绍Spring Boot 2.6对Java 17支持的一个新特性,使用Java 17的Record来做为Spring Boot的配置属性(ConfiguartionProperties)。 什么是Record record是一种特殊类型的类声明,目的是为了减少样板代码。record引入的主要目...

Nov 3, 2022
Spring Boot 2.6新特性:使用Java 17的Record作为配置属性

使用Gradle全面加速Spring Boot开发

大家都知道Gradle和Maven一样,是一个项目的构建工具。它通过任务来控制开发的进程,这些任务包括:编译、打包、测试、部署和发布等。Gradle诞生于2008年,仅仅比Maven晚4年。Android也采用Gradle作为默认的构建工具。 本文期望通过以下的讲述,帮助你快速轻松的使用Gradle加速您的Spring Boot开发应用。 1、Gradle越来越流行 2012年开始,Spring框架已全部使用Gradle来构建;2020年开始,Spring Boot也全部采用Gradle来构建...

Oct 31, 2022
使用Gradle全面加速Spring Boot开发

Spring/Spring Boot下如何动态配置计划任务

在Spring/Spring Boot下实现计划任务是很简单的,我们只需通过@EnableScheduling 开启计划任务的支持,然后通过@Scheduled 注解来制定计划任务,这样的实现解决了我们对计划任务的绝大部分需求。 但在很多时候,通过上述方式实现的计划任务是在代码里写死的,我们需要修改计划任务只能通过修改代码的方式实现。很多时候,我们需要从外部来设置计划任务执行的时间和方式。所以在本文中,我们着重讲解一下如何动态地配置计划任务。 和Spring对异步任务的支持一样,通过@Enabl...

Oct 29, 2022
Spring/Spring Boot下如何动态配置计划任务

Spring 6/Spring Boot 3新特性:优雅的业务异常处理

当你使用Spring Boot(Spring MVC)进行RESTful API开发的时候,你会发现HTTP的状态码很多时候不能足够有效的传递错误的信息。 HTTP里有一个RFC 7807规范:https://www.rfc-editor.org/rfc/rfc7807。这个规范里定义了HTTP API的“问题细节”(Problem Details)内容。 该规范定义了一个“问题细节”(Problem Details),用它来携带HTTP错误返回信息,避免自定义新的错误返回格式。我们通常情况下是...

Oct 28, 2022
Spring 6/Spring Boot 3新特性:优雅的业务异常处理

汪云飞的工具箱

24 posts