`
charyle
  • 浏览: 166099 次
  • 性别: Icon_minigender_1
  • 来自: 天蝎座
社区版块
存档分类
最新评论

Clean Code setOne

 
阅读更多

1.函数应该短小,每个函数应该只负责一个功能

2.变量名称要有意义,名词做类名,动词做方法名称

3.函数要统一语义,get load fetch等

4.使用有意义的变量名称

5.避免无用的前缀

6.函数参数要少,不能多于2个

7.避免使用不同处小的名称

8.避免使用字母i和o,因为它们像数字

9.解决特定问题,使用特定问题域的名称

10.使用异常代替错误码

0
4
分享到:
评论

相关推荐

    MaTeX v1.6.3

    Some code cleanup. Downloads 14.3 KB MaTeX.m Source code (zip) Source code (tar.gz) v1.2.0 68cf8c6 v1.2.0 @szhorvat szhorvat released this on 24 Feb · 64 commits to master since this ...

    acpi控制笔记本风扇转速

    Additional cleanup and optimizations for the new Table Manager code. AcpiEnable will now fail if all of the required ACPI tables are not loaded (FADT, FACS, DSDT). BZ 477 Added #pragma pack(8/4) to ...

    01450A (1).pdf

    mechanical switch so that a clean signal can feed other circuitry. The application makes use of the Configurable Logic Cell (CLC) peripheral to produce fast switching on the output (if desired). If ...

    a project model for the FreeBSD Project.7z

    committers who are involved only with one sub-project and committers who commit to different parts of the code, including sub-projects. Because some committers work on different parts, the total ...

    BobBuilder_app

    So what makes a good index structure, here are what I consider essential features of one: Page-able data structure: Easy loading and saving to disk. Free memory on memory constraints. On-demand ...

    UE(官方下载)

    The benefit of a column maker is that it can help you to format your text/code, or in some cases to make it easier to read in complex nested logic. Quick Open UltraEdit and UEStudio provide multiple ...

    JQuery In Action.PDF

    JQuery facilitates this separation by providing APIs that enable developers to write clean, maintainable code without cluttering the HTML markup. - **jQuery Fundamentals** - **The jQuery Wrapper:**...

    Chucks_VBA_Reference_rev17.docx

    Code examples for closing a specific file or exiting Excel entirely using a macro, which can be useful for automating the cleanup process. **Create List of Workbooks/Worksheets in a Listbox (Page 28)...

    Google C++ Style Guide(Google C++编程规范)高清PDF

    One way in which we keep the code base manageable is by enforcing consistency. It is very important that any programmer be able to look at another's code and quickly understand it. Maintaining a ...

    Sakemail

    The default priority for each msg created will be prNormal, so you don‘t need to change your code any bit.1.8.6- Ulf Sturegren has added D4 compatibility, not many changes to the source (one letter)...

    Git-2.21.0-64-bit.zip

    * Code cleanup and futureproof. * More parameter validation. * "git update-server-info" used to leave stale packfiles in its output, which has been corrected. * The server side support for ...

    Manning - Eclipse In Action.pdf

    - **Coding**: Best practices for writing clean and maintainable code using Eclipse's features like code completion, refactoring, and debugging. - **Iteration**: The iterative nature of software ...

    Practical Malware Analysis

    Set up a safe virtual environment to analyze malware Quickly extract network signatures and host-based indicators Use key analysis tools like IDA Pro, OllyDbg, and WinDbg Overcome malware tricks like ...

    VisualSVN.1.7.3

    Handy VisualSVN toolbar provides clean, direct access to the most important commands and features of Subversion. We even provide a combo box containing the URL of the current Subversion branch, and ...

    Amplify Shader Editor1.5.4 最新版

    INTUITIVE and UX-focused, the workspace is familiar, clean and flexible. Dock it, or use it in a second monitor, it’s prepared to fit your layout requirements. MINIMALISTIC toolbars and menus have ...

    微软内部资料-SQL性能优化3

    However, the req_mode column of master.dbo.syslockinfo has lock mode code that is one less than the code values shown here. For example, value of req_mode = 3 represents the Shared lock mode rather ...

    Oracle sqldeveloper without jdk (win+linux)

    - Bug 4924484: Values to which NCHAR, NVARCHAR2, or NCLOB columns are modified may be unnecessarily converted to the database character set before being converted to the national character set and ...

    一个跨平台的CString源码

    // - The full MFC CString set of functions (including implicit cast) // - writing to/reading from COM IStream interfaces // - Functional objects for use in STL algorithms // // From this ...

    Bochs - The cross platform IA-32 (x86) emulator

    - added 'pseudo device' in common USB code for the device creation. This makes the HCs independent from the device specific code. - USB MSD: added support for disk image modes (like ATA disks) - ...

Global site tag (gtag.js) - Google Analytics