当前位置: 首页 > news >正文

开个人网站需要多少钱青岛万维网站设计

开个人网站需要多少钱,青岛万维网站设计,网站免费建站 图标,建设部网站诚信平台用什么代码可以改变键盘by John Cobb约翰科布(John Cobb) 为什么我改变了对代码质量的看法 (Why I changed the way I think about Code Quality) What do you think about when you think about code quality?当您考虑代码质量时#xff0c;您会怎么看#xff1f; Is it …用什么代码可以改变键盘by John Cobb 约翰·科布(John Cobb) 为什么我改变了对代码质量的看法 (Why I changed the way I think about Code Quality) What do you think about when you think about code quality? 当您考虑代码质量时您会怎么看 Is it consistency? Enforcing a set of standards and best practices on your code through linter rules and formatters? How about ensuring your code has tests that run automatically during your build process? What about pull requests and code reviews — protecting your master branch from direct commits and having peers review your code? 是否一致 通过linter规则和格式化程序对代码执行一套标准和最佳实践 如何确保您的代码具有在构建过程中自动运行的测试 拉取请求和代码审查又如何—保护您的master分支免受直接提交并让同级审查您的代码 They’re some of the things that come to mind for me. Automated processes and manual checks. Smart and efficient. Yet, while they’re all useful, they really only address half of the problem. 这些是我想到的一些东西。 自动化流程和手动检查。 聪明高效。 然而尽管它们都很有用但实际上只能解决一半的问题。 我们不能使一切自动化 (We can’t automate everything) Automation is crucial for maintaining code quality. Static analysis of your syntax with a linter and automated testing should be mandatory. But I can write code that passes all the automated processes without any guarantee to its actual quality. 自动化对于保持代码质量至关重要。 必须使用lint对语法进行静态分析并进行自动测试。 但是我可以编写通过所有自动化过程的代码而不能保证其实际质量。 Does the code follow established patterns? Does it use existing modules, or does it duplicate code? Is everything named sensibly? Is the code in the right place in the codebase? Will this change have wider, unintended, implications? Does this code actually address/solve what it intends to? Does it even work? 代码是否遵循既定模式 它使用现有模块还是重复代码 一切都被合理地命名了吗 代码是否在代码库中的正确位置 这种变化会产生更广泛的意想不到的影响吗 此代码是否实际解决/解决了预期的问题 它甚至工作 Automated processes can’t answer those questions for you (yet). If you (or another human being) aren’t asking these questions of your code, then you’re probably not shipping quality code. That’s why we have code reviews. 自动化流程无法为您回答这些问题(至今)。 如果您(或其他人)没有问代码的这些问题那么您可能没有在交付质量代码。 这就是为什么我们要进行代码审查。 良好的代码审查不仅仅应包含代码 (A good code review should be about more than the code) Of course a code review should be about the code (it’s right there in the name after all). But it should also be about the broader questions posed above, and also about the end product. 当然代码审查应该是关于代码的(毕竟它就在名称中)。 但这还应与上面提出的更广泛的问题以及最终产品有关。 I’ve noticed a tendency for developers to treat code reviews as perfunctory. A rudimentary check of the modified code. A comment on any obvious mistakes (or just picking a nit or two to look busy). 我注意到开发人员倾向于将代码审查视作敷衍。 对修改后的代码的初步检查。 对任何明显的错误发表评论(或者只是挑一两个尼特让他们看起来很忙)。 Five minutes, job done. Looks good to me. 五分钟工作完成。 对我来说看起来不错 。 But, code that doesn’t address the requirements of the task is not quality code. Code that produces console errors or visual bugs in the device/browser is not quality code. Neither of those things can be picked up in a perfunctory code review. You can’t adequately review code unless you actually run it. 但是不能满足任务要求的代码不是质量代码。 在设备/浏览器中产生控制台错误或视觉错误的代码不是质量代码。 这些功能都无法在敷​​衍的代码审查中找到。 除非您实际运行代码否则您将无法充分审查代码。 I propose that a good code review should involve at minimum: 我建议良好的代码审查至少应涉及 Pulling down the branch to a local environment. 将分支拉到本地环境。 Building the project (and checking that the linter and tests all pass). 构建项目(并检查短毛绒和测试是否全部通过)。 Checking that the code runs error free in the target browsers/devices. 检查代码是否在目标浏览器/设备中无错误运行。 Checking that the completed work matches the requirements of the task. 检查完成的工作是否符合任务要求。 If there are any issues with any of those steps the pull request should be rejected. Do not pass Go. Do not collect $200. Do not merge to master. 如果这些步骤中的任何步骤有任何问题则应拒绝请求请求。 不要通过围棋。 不要收取200美元。 不要合并到母版。 Reviewers should also use the code review as an opportunity to ask questions. If you don’t understand the code, then you shouldn’t approve the pull request. Don’t assume that the author knows more than you do — if it doesn’t make sense to you, ask for clarification. 审阅者还应将代码审阅作为提问的机会。 如果您不理解代码则不应批准请求请求。 不要以为作者比你了解更多—如果这对你没有意义请澄清。 The reviewer has equal responsibility with the author for the quality of the code. This is a mindset that is essential for maintaining code quality. 审阅者与作者对代码质量负有同等责任。 这是保持代码质量必不可少的一种心态。 Comprehensive code reviews go a long way to helping ensure code quality. But there are steps you can take before you even open a pull request. Small things you can do that will help enhance the quality of your code, and reduce the effort required to review it. 全面的代码审查对确保代码质量大有帮助。 但是您甚至可以在打开拉取请求之前执行一些步骤。 您可以做的小事情将有助于提高代码的质量并减少检查代码所需的工作。 仔细检查您自己的作品是否完整 (Double check your own work for completeness) I have an annoying habit. When I finish writing the last lines of code for a task, I mentally check the task off as complete. 我有个烦人的习惯。 当我完成任务的最后几行代码编写时我会在脑海中检查任务是否完成 。 If I were to listen to that impatient voice in my head, I’d submit my pull request right then. But that code would likely contain many, or all, of the following: 如果我想听听我脑子里那急躁的声音那我马上就要提交我的请求。 但是该代码可能包含许多或全部以下内容 Missed requirements. 错过的要求。 Missing test cases. 缺少测试用例。 Superfluous, unused or draft code. 多余的未使用的或草稿的代码。 Not enough code comments. 代码注释不足。 Visual bugs in some browsers/devices. 某些浏览器/设备中的视觉错误。 If any of those things are true about your code, then your code is not complete. If any of those things end up in the master branch, then you have degraded the quality of the codebase. 如果您的代码中有任何上述情况则您的代码不完整。 如果这些事情中的任何一个最终出现在master分支中则说明代码库的质量下降了。 The main point here is this: code quality starts with the code author. You shouldn’t rely on automated tasks, a code review, quality assurance or user acceptance testing to catch your mistakes. 这里的重点是代码质量始于代码作者。 您不应该依靠自动化任务代码审查质量保证或用户验收测试来发现错误。 Double checking work for completeness is an essential first step toward code quality. It’s the easiest step to take, but also the easiest one to ignore. 进行双重检查以确保完整性是迈向代码质量必不可少的第一步。 这是最简单的步骤也是最容易忽略的步骤。 You should only open up a pull request when you are certain your code is complete. 仅在确定代码完成后才应打开拉取请求。 对分支机构进行自我审查 (Perform a self review of your branch) I’m always surprised at how many issues — or opportunities to refine a solution — I can find in my own code. Issues and opportunities that only become visible to me when I step back and view my changes in isolation. 我总是在自己的代码中发现有多少问题或改进解决方案的机会总是感到惊讶。 当我退后一步孤立地查看我的更改时问题和机会才对我可见。 You can review your work and apply your own feedback before assigning a team member to review your work. You can also use this opportunity to leave comments on the pull request to clarify anything for the reviewer. 您可以在分配团队成员来审查您的工作之前先审查您的工作并应用您自己的反馈。 您还可以利用此机会在请求请求中留下评论以使审阅者澄清任何事情。 Taking time to ensure your work is complete, to correct obvious mistakes, or assess your solution, will enhance the quality of your code. It also reduces the effort required to review it. 花一些时间来确保您的工作完成纠正明显的错误或评估您的解决方案将会提高代码的质量。 它还减少了审核所需的工作。 It might also save you some embarrassment. I know it has for me. 这也可能使您免于尴尬。 我知道它适合我。 确保代码质量应该是每个开发任务的内在要求 (Ensuring code quality should be an inherent requirement of every development task) You may be thinking that this approach adds time to the length of a task. And you’re right, it does. But that isn’t a bad thing. 您可能会认为这种方法会增加任务时间。 你是对的的确如此。 但这不是一件坏事。 Efficiency is important, but laziness and apathy is harmful. Apathy leads to a bloated, inconsistent code base. Laziness creates a growing backlog of bad technical debt. We can’t be passive and maintain code quality. It requires time and effort. 效率固然重要但懒惰和冷漠是有害的。 冷漠会导致a肿的不一致的代码库。 懒惰导致不良技术债务积压的情况越来越多。 我们不能被动地保持代码质量。 这需要时间和精力。 Changing the culture around code quality can be hard. Project managers and product owners generally aren’t concerned about code quality — they have their own concerns. Requesting extra time for code quality processes can sometime fall on deaf ears. However, maintaining code quality shouldn’t be thought of as something extra — it should be an inherent requirement of every task. 改变围绕代码质量的文化可能很难。 项目经理和产品所有者通常不关心代码质量-他们有自己的问题。 为代码质量过程请求额外的时间有时会置若de闻。 但是不应将保持代码质量视为额外的工作—它应该是每个任务的固有要求。 As developers, if we don’t change the way we think about code quality, we can’t expect anyone else to. 作为开发人员如果我们不改变我们对代码质量的方式我们不能指望别人。 Nothing I’ve talked about here is particularly groundbreaking, nor is it prescriptive. Not every team, workplace, or project is the same, and some of the above may not be applicable to you. 我在这里谈论的没有什么特别开创性的也不是规定性的。 并非每个团队工作场所或项目都是相同的并且上述某些内容可能不适用于您。 I do believe there is often a gap between the way developers think about code quality, and the actual actions taken to address it. If you’ve found that too, then hopefully there is something you can take away from this article — or perhaps you’ve already taken a different approach to addressing it. I’d love to hear your suggestions in the comments. 我确实相信开发人员对代码质量的思考方式与为解决该问题而采取的实际措施之间通常存在差距。 如果您也发现了这一点那么希望本文可以对您有所帮助–也许您已经采用了另一种方法来解决它。 我很想听听您在评论中的建议。 Thanks for reading! 谢谢阅读 翻译自: https://www.freecodecamp.org/news/why-i-changed-the-way-i-think-about-code-quality-88c5d8d57e68/用什么代码可以改变键盘
http://www.pierceye.com/news/449812/

相关文章:

  • 手机版企业网站php西宁做网站公司排名
  • 微网站如何做推广做淘宝客网站需要备案吗
  • 天津网站制作重点windows与wordpress
  • 可以查企业备案的网站吗佛山住房和城乡建设部网站官网
  • 和初中生做视频网站怎么进入追信魔盒网站开发软件
  • 邯郸开发网站有哪些阳江市房产信息网
  • 快速网站推广公司丹阳房产网二手房
  • 做一个卖东西的网站黄村做网站的公司
  • 网站增长期怎么做广州seo推广优化
  • 怎么做拍卖网站吗免费网站推广入口
  • 农产品网站建设的主要工作岳阳seo招聘
  • 每年网站备案抽查惠州营销网站建设
  • 四川网站建设seo友汇网网站建设
  • 企业家居网站建设做公司网站方案
  • 特性设计的网站营销型网站建设的五力原则
  • 网站布局设计工具装修室内设计培训学校
  • 哈尔滨网络科技公司做网站中国建设官方网
  • 紫川网站建设做画找图网站
  • 郑州快速建站公司合肥学做网站app的学校
  • 除了做视频网站还能做什么网站wordpress手机站如何做
  • 域名注册最好的网站人才网站
  • 网站建设咨询云尚网络中铁十二局出国招工
  • 建站系统推荐做网站在哪里做
  • 贵州建设工程招标协会网站wordpress黑白主题
  • 怎么免费建立自己网站扁平化网站设计
  • 可以自己做漫画的网站北仑营销型网站制作
  • 免费网站统计代码有什么样的网站开发
  • 文山微网站建设湖南人工智能建站系统软件
  • 做网站时候编代码wordpress 技术博客主题
  • 成立网站建设工作领导小组seo网站关键词优化软件