Google C++ Style Guideexplains the rules we don’t have, rather than the rules we do: for example, goto contravenes many of the following principles, but is already vanishingly rare, so the Style Guide doesn’t discuss it. Optimize prohibition is not the same as a license to proceed. Use your judgment, and if you are unsure, please don’t hesitate to ask your project leads to get additional input. Header Files In general, every .cc file rely upon, except in the unusual case of forward declaration. If you rely on symbols from bar.h, don’t count on the fact that you included foo.h which (currently) includes bar.h: include bar.h yourself,0 码力 | 83 页 | 238.71 KB | 1 年前3
Google Java Style Guideprimarily on the hard-and-fast rules that we follow universally, and avoids giving advice that isn’t clearly enforceable (whether by human or tool). 1.1 Terminology notes In this document, unless otherwise indentation. 2.3.2 Special escape sequences For any character that has a special escape sequence (\b, \t, \n, \f, \r, \", \' and \\), that sequence is used rather than the corresponding octal (e.g. \012) or the dot separator (.), the two colons of a method reference (::), the amper- sand in type bounds (<T extends Foo & Bar>), and the pipe in catch blocks (catch (FooException | BarException e)). 2. When0 码力 | 19 页 | 84.76 KB | 1 年前3
Google Python Style GuidePros: Catches easy-to-miss errors like typos, using-vars-before-assignment, etc. 2 Cons: pylint isn’t perfect. To take advantage of it, we’ll need to sometimes: a) Write around it b) Suppress its warnings simply don’t want to catch. • Minimize the amount of code in a try/except block. The larger the body of the try, the more likely that an exception will be raised by a line of code that you didn’t expect to default operators is generic. It can be used with any type that supports the operation. Cons: You can’t tell the type of objects by reading the method names (e.g. has_key() means a dictionary). This is also0 码力 | 30 页 | 94.81 KB | 1 年前3
03 Experiments, Reproducibility, and Projects - Introduction to Scientific Writing WS2021/22building Systematic experiments observations and ideas for improvements Don’t be afraid of throw away prototypes that don’t work Good Research Fires Itself Initial experiments give directions for improvements over state-of-the-art don’t add up Experiments and Result Presentation [Timothy G. Armstrong, Alistair Moffat, William Webber, Justin Zobel: Improvements That Don't Add Up: Ad-Hoc Retrieval Results Figures Axes Use Informative axes labels with units (e.g., Total Execution Time [ms]) Don’t cheat or mislead readers and reviewers Start y-axis at 0 for linear scale Experiments and Result0 码力 | 31 页 | 1.38 MB | 1 年前3
02 Scientific Reading and Writing - Introduction to Scientific Writing WS2021/22understanding and evaluation #1 Start open-minded, listen to arguments and trust provided evidence #2 Don’t accept superficial, contradictory, or unproven claims #3 If there are problems, which constructive reference, inconsistent / no logical consequence) #2 Read Fully Read and annotate issue, don’t fix immediately (destroys the flow) Take annotated document and fix issues #3 Ask Big Questions review The Goldilocks Method (examples, proofs, theoretical analysis, experiments) If you can’t say something nasty … (ignore good parts, focus on weaknesses) Silent but deadly (low scores, no comments)0 码力 | 26 页 | 613.57 KB | 1 年前3
Google's R Style Guidelast on own line 7. else: Surround else with braces 8. Assignment: use <-, not = 9. Semicolons: don’t use them 10. General Layout and Ordering 11. Commenting Guidelines: all comments begin with # followed should end in .R and, of course, be meaningful. GOOD: predict_ad_revenue.R BAD: foo.R Identifiers Don’t use underscores ( _ ) or hyphens ( - ) in identifiers. Identifiers should be named according to the0 码力 | 8 页 | 47.42 KB | 1 年前3
01 Structure of Scientific Papers - Introduction to Scientific Writing WS2021/22building Systematic experiments observations and ideas for improvements Don’t be afraid of throw away prototypes that don’t work Ex. Compressed Linear Algebra Data characteristics inspired overall0 码力 | 36 页 | 1.12 MB | 1 年前3
共 7 条
- 1













