rails style guide

Read about rails style guide, The latest news, videos, and discussion topics about rails style guide from alibabacloud.com

JavaScript Coding style Guide (Chinese edition) _javascript tips

Objective: The coding style of the programming language is important for a long term maintenance software, especially in team collaboration. If a team uses a uniform coding style, it can improve the team's level of collaboration and productivity. The core of the programming style guide is the basic formatting rules th

Learning notes: Google C + + programming style guide

= or ().12. Pre-processing instructionsPreprocessing directives do not indent, starting at the beginning of the line.Even if the preprocessing directives are in the indentation code block, the instructions should start at the beginning of the line.13. Class formatKeywords public:, protected:, Private: To indent 1 spaces, and these three keywords are not indented.14. Initialize the listThe constructor initialization list is placed in the same row or indented in a few rows by four cells. 15. Name

JS Code style Guide

prototype properties, should be annotated Four. Variables, functions, operators Variable declarationfunction BODY = variable declaration + function declaration + logical statement. Separate sections with blank lines function declarationDeclare the reuse, and do not put the function declaration in the IF branch, because the browser understands the difference, and ES does not give the standard Function calldo not add spaces around the parentheses to avoid confusion with bloc

"Translation" ExtJS coding style Guide and example

Original: ExtJS Code Style Guide with examplesExt JS style guide: Well-known and easy to learn Fast development, easy commissioning and easy deployment Well-organized, scalable and maintainable Ext JS Application Naming convention: 1, classThe class name should use Hump naming (camelcased).Do not

Web Front End Interview Guide (11): What are the ways to style import?

exist compatibility issues, import support above IE5, is css2.1 new In a stylesheet file, you can import other style sheet files using import, and link can not When a link references a CSS, it loads at the same time as the page loads, @import requires that the page be loaded after it is fully loaded. Link supports using JavaScript to control the DOM to change style, while @import does not suppo

JavaScript Code Style Guide

linesfunction declarationDeclare the reuse, and do not put the function declaration in the IF branch, because the browser understands the difference, and ES does not give the standardFunction callDo not add spaces around the parentheses to avoid confusion with block statementsAnonymous functions execute immediatelyEnclose the immediately executing anonymous function in parentheses to avoid confusion with anonymous function declarationsStrict modeDo not open strict mode in the global scope, only

Google C + + Style Guide Read NOTE 1

class file in the header file instead of the #include "file/base/file.h"How to use the Foo class when the header file does not get the Foo definition? Declare data members using Foo * or Foo . You can define and return values in a function declaration. With static data members, static members are defined outside the class.But if your class is a subclass of Foo or has a data member of type Foo, it contains the header file. Do not overdo the loss of header file inclusions, res

Google C + + style guide Naming conventions go

``AlternateUrlTableErrors``) 是类型, 所以要用大小写混合的方式. enum UrlTableErrors { kOK = 0, kErrorOutOfMemory, kErrorMalformedInput, }; enum AlternateUrlTableErrors { OK = 0, OUT_OF_MEMORY = 1, MALFORMED_INPUT = 2, };2009 年 1 月之前, 我们一直建议采用 :ref:`宏 ## 宏命名Tip you're not going to: Ref: 使用宏 , right? If you must, name it like this: MY_MACRO_THAT_SCARES_SMALL_CHILDREN .`预处理宏 *不应该* 使用宏. 如果不得不用, 其命名像枚举命名一样全部大写, 使用下划线::#define ROUND(x) ...#define PI_ROUNDED 3.0## 命名规则的特例Tip if t

Web Graphic Design Style Guide

[Csdn December 12 international] Web2.0 is a popular buzzword, but it is a major part of this particular Web2.0 design style, whether it is like or hate Web2.0. The purpose of this Guide is to give some reference to design beginners, or as a list, it provides a reference for the new Web 2.0 style that is still struggling to adapt to many social networks/social me

Google Java Programming Style guide

ObjectiveThis document is a complete definition of the Google Java Programming style specification. When and only if a Java source file conforms to the rules in this document, we think it conforms to Google's Java programming style.As with other programming style guides, this is not just about the beauty of the coding format, but also about conventions and coding standards. However, this document focuses pr

Google C ++ programming style guide (4): Smart pointers and other C ++ features

to illegal user input. If exceptions are allowed, there will be a lot of such a programming style guide (Note by the translator, this is a little far-fetched :-()! Conclusion: On the surface, the advantage of using exceptions is greater than the disadvantage, especially in new projects. However, for existing code, the introduction of exceptions involves all dependent code. If exceptions are allowed to be u

Google Java Programming Style guide-naming conventions

hump-type name.4. Finally connect all the words together to get an identifier.Example:Prose Form Correct Incorrect------------------------------------------------------------------"XML HTTP Request" XMLHttpRequest XMLHttpRequest"New Customer ID" Newcustomerid Newcustomerid"Inner stopwatch" Innerstopwatch Innerstopwatch"Supports IPV6 on IOS?" Supportsipv6onios Supportsipv6onios"YouTube Importer" Youtubeimporteryoutubeimporter*Asterisking indicates yes, but not recommended.Note: in English, some

Python2.7 Soon is the past style! Still using 2.7 programmers to prepare a 3 guide

handle it) like a string. I'm sure most of the course authors are happy to avoid these details, but now it's almost impossible. ConclusionPython 2 and Python 3 coexist for nearly 10 years, and today we have to say: It's time to turn to Python 3.Research and Production code should be shorter, easier to read, and significantly more secure after migrating to the Python 3 code base.Most libraries now support two versions of both 2.x and 3.x. But we should not wait until the popular toolkit

"Code Guide" Github Open source project--WYSIHTML5 Rich editor (Bootstrap style) "II"

If you accidentally enter the page, it may be easier to understand from the following links:"Code Guide" Github Open source project--WYSIHTML5 Rich editor (Bootstrap style) "One"1. Overall structureIn WYSIHTML5, all objects are protected by the WYSIHTML5 command space, and the entire code architecture is at a glance from its initialization definition:Https://github.com/xing/wysihtml5/blob/master/src/wysihtm

Writing maintainable JavaScript reading notes (appendix A): JavaScript Coding style Guide (1) original value

NewPerson ("Nicholas"); } Else { return NULL; } }//good wording.varperson =getperosn ();if(Person!==NULL) {dosomething (); }//bad notation: compare to an uninitialized variablevarPerson ;if(Person! =NULL) {dosomething (); }//bad writing: test to determine whether a parameter is passedfunctiondosomething (arg1, arg2, Arg3, Arg4) {if(Arg4! =NULL) {dosomethingelse (); }}Avoid using special value undefined. Determine if a variable should be defined using the TypeOf operator.// good wordin

English version of klayge C ++ code style guide

Reprinted please indicate the source is Klayge Game Engine , The permanent link of this article is Http://www.klayge.org /? P = 1941 After referring to Google's c ++ style guide, I wrote a document Klayge C ++ code style guide . The main principle is similar to that of Google, but there are several differences in t

Scss Style Guide Learning notes (i)

. Fuwo{Display:Block;//Use two spaces to represent indents instead of using the TAB key font-family:' Arial ';//String wrapped in quotation marks background:url ('/images/bg.jpg ');//url Better also wrap them in quotation marks opacity:0.5;//When the number is less than 1 o'clock, you should write 0 before the decimal point. Never show 0 of the trailing of decimals}$length: 0; When the length is defined, 0 is not required to add unit $value:5; $length: $value * 1px;//When adding a unit to a numb

GNU-style Arm Assembly syntax Guide (very detailed) 2

Conversion from: GNU-style Arm Assembly syntax Guide (very detailed) 2 2. the symbol (or label) in the GNU Assembler) The label can only be ~ Z, ~ Z, 0 ~ 9,".", _, And so on (it consists of dots, letters, numbers, underscores, and so on. It cannot start with a number except for a local number. The essence of Symbol: it represents the address where it is located. Therefore, it can be used as a variable or f

GNU-style Arm Assembly syntax Guide (very detailed) 4

Conversion from: GNU-style Arm Assembly syntax Guide (very detailed) 4 4. GNU assembly language definition entry point The default entry for assembler is_ StartLabel,You can also use the entry mark in the connection script file to specify other entry points.. Example: Define the entry point . Section. Data . Section. BSS . Section. Text . Globl _ start _ Start: 5. macro definition in GNU Assembler The

Follow the PEP8 style guide

the absolute name instead of using the relative name based on the current path, for example, when you introduce the Foo module in the bar package, you should write the From bar import Foo completely, rather than simply write import foo7 If you must write an import statement with a relative name, use the explicit notation: From.import fooThe import statements in the 8 file should be divided into three parts in order, representing standard library modules, third-party modules, and self-contained

Total Pages: 4 1 2 3 4 Go to: Go

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.