In the process of teamwork, all the developers have stepped on a lot of difficulties, among which the different coding styles are a big reason.

If everyone on a team doesn’t code by convention, the end project will be a pain to maintain. If you look at someone else’s code and you want to flip the mouse, maybe they’ll feel the same way about you, with arbitrary variable names, uncommented, and insanely complex logic, the teamwork process can be a pain.

It is said that no standards can be achieved without rules, and no cooperation can be achieved without norms. Teams following the same set of norms can greatly reduce collaborative costs and improve development efficiency. In the alibaba group, the development of the students have a common abide by rules, public version is “alibaba Java development manual”, this is ali technical team’s collective wisdom crystallization and experience summary, a line of actual combat experience several large-scale inspection and constantly improve, finally systematically filed, give to the developer.

Alibaba also launched Eclipse, IDEA plug-ins, which can help developers quickly apply coding specifications.

* * “alibaba Java development manual” online learning & IDE plug-in download: edu.aliyun.com/course/417 coding standards certification exam: edu.aliyun.com/certificati… **

The certification exam is designed to test your knowledge of the specification. Nearly 6,000 people have taken the exam so far, but less than a quarter of developers get certified.

Choose 5 questions at random (50 questions are required for the certification exam) :

1. Which of the following statements is consistent with the Alibaba Java Development Manual regarding the optimization analysis of database performance using Explain?

  • A. Target of SQL performance optimization: at least range level, ref level is required, conSTS is the best.
  • B. Index level scans indexes, so the speed is faster than that of ref.
  • C. Range level indicates the range index of the table.
  • The d. ref level refers to the use of primary keys or unique indexes.

2. Regarding classes and methods, which of the following conforms to the Alibaba Java Development Manual:

  • A. Any class, method, strictly controlled access scope. Because the wide access range is not conducive to module decoupling.
  • B. In principle, you are not allowed to modify the exposed interface signature. You are advised to add the interface signature to avoid impact on the dependent end.
  • C. If a new interface is added with the same function, the outdated interface must be annotated with @deprecated.
  • D. All outdated classes and methods should not be used.

3. As for the naming of database index, which of the following statements is consistent with the “Alibaba Java Development Manual” :

  • A. Primary key index. The field type is unsigned Bigint. When A single table is used, autoincrement is recommended.
  • B. Primary key index. The field type is unsigned Bigint. In single-table mode, autoincrement is recommended.
  • C. The unique key is named as the uk_ field name (if more than one field is underlined).
  • D. Normal index, marked as idX_ field name (if multiple fields are underlined).

4. Which of the following statements is true when CountDownLatch is used for asynchronous to synchronous operations:

  • A. The countDown() method must be called before each thread exits.
  • B. Thread execution code notices the catch exception and ensures that the countDown() method can be executed.
  • C. The child thread throws an exception stack, which can be caught directly on the main thread.
  • D. The main thread must call await() method after starting another thread, so that operations on the main thread will block on this method until the other thread completes its task.

5. According to The “Alibaba Java Development Manual”, the table design of the database allows appropriate redundancy to improve the performance of SQL queries and avoid associated query of tables. Which of the following fields are not allowed redundancy:

  • A. Field of the text type.
  • B. Basically fixed category names.
  • C. Field of vARCHar (2500).
  • D. Fields that need to be frequently modified.