• Writing Better Javascript


       some of the techniques I use to make my code easier for other   programmers and projects to use.

      dumping useful functions into the utils.js file throughout this book.

       The problem with just dumping functions into a file in this way is that they become hard to manage  and maintain and, as I’ll explain shortly, difficult for others to integrate into their projects.    不利于别人使用,,,,

        I revisit my kitchen-sink file when I have reached a point in a project where the basic
    functionality is stable and I have a good feel for the way that different features fit together. At this point,
    and not before, I start to rework the code into modules so that it plays nicely with other libraries.

       再看代码,如果基本功能很稳定,并且把不同情况汇合到一起。再找代码重构,和别的库融合

      Once I have tidied up and modularized the code, I begin unit testing    当在模块化代码的时候,开始单元测试

    Testing is a very personal
    thing, and many testing proselytizers will insist that testing must begin as soon as you start coding

      测试是一个非常个人的事,

    Test when it feels right, test until you are happy with your code, and use the
    techniques and tools that work for you        测试感觉正确,喜欢自己的代码,并使用一些一具和技术

    Managing the Global Namespace

  • 相关阅读:
    Java基础——面向对象(继承应用)
    Java基础——数组例题&二维数组
    Java基础——面对对象-继承
    Java基础——this构造器转发 & 实例块、静态块
    spring mvc 映射与适配器
    Spring component-scan 标签的实现
    DUBBO 服务导出实现
    Idea
    ReentrantLock 实现
    C 语言程序设计
  • 原文地址:https://www.cnblogs.com/yushunwu/p/2598585.html
Copyright © 2020-2023  润新知