answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Lisa [10]
2 years ago
5

What do you think is the most effective way to ensure that code adheres to good coding standards? (1 correct answer)

Computers and Technology
2 answers:
Stella [2.4K]2 years ago
7 0

Answer:

The code should pass all the unit test cases.

Explanation:

Unit testing is an important step in the development process, because if done correctly, it can help detect early flaws in code which may be more difficult to find in later testing stages.

When there is a development of a software, at that moment there are many small programs, which are developed by coders and, after they are created, those programs are attached together to make a full working system.

The correct option is the code should pass all the unit test cases....

Nikitich [7]2 years ago
4 0

The most effective way to ensure that code adheres to good coding standards is that the code should pass all the unit test cases. Coding standards are a validated rules’ set and practices that developers can follow when composing code which confirms that the code is readable, extensible, and maintainable as well as decreases the risk of presenting bugs.

 

EXPLANATION:

Here are some generally used coding standards in the financial industry and other industry sectors:

• Consistent case of methods and properties

This is decently a technical thing and it does not matter precisely which case you use. Java and .Net both endorse different cases. The approach is to use the C# suggested case for C# and Java for Java. Moreover, instruments like Resharper is able to auto-correct occasion sensitivity as the developer is coding.

• Descriptive method and class names

Making code readable part is to utilize good descriptive names for a method and class. For instance, the method of saying DoSomething() is completely unusable as it is hard to tell that it does deprived of going into the code. A method that says CreateConnectionToDatabase() and tosses back an object of connection is apparent in its goal.

• Keeping methods to a reasonable length

If the methods are very long, they turned out to be difficult to maintain and unreadable. If a method is very long, you can utilize the pattern of extract method to capture several of the functionality into another method.

• Ensuring code standards are adhered to

It is hard to evoke and irritating to return and correct standards in the code to write. Therefore, it is important to use some sort of computerized tool both at checking in time and design time that tests for particular elements of quality in the code.

• Tools

There are several tools in the marketplace that can be utilized for this and it recommended to use the following tools.

• For the development environment:

• For C# – Resharper from Jetbrains

• For Java – The IntelliJ environment owns the same functionality like Resharper

Analyzers

For .net, there is also FXCop which is a code standard static analyzer and NDepend that gives a large amount of configuration as well as the capability to write code to query the code!

• For the automated build environment

• NDepend also owns a server component that can examine the code upon check-in and generate reports.

• Configuration

Many tools used to generate a large amount of data when testing for coding standards. They usually examine hundreds of metrics out of the box and it is less than valuable when attempting to take incremental stages to advance code quality. Therefore, it is essential to organize these tools to just examine the metrics.

LEARN MORE

If you’re interested in learning more about this topic, we recommend you to also take a look at the following questions:

• What do you think is the most effective way to ensure that code adheres to good coding standards? https://brainly.in/question/9493794

Keywords : Coding Standards, code

Subject  : Computers & Technology

Class  : 7-9

Sub-Chapter : Coding

You might be interested in
ArgumentException is an existing class that derives from Exception; you use it when one or more of a method’s arguments do not f
dybincka [34]

Answer:

The C# code is given below

Explanation:

using System;

public class SwimmingWaterTemperatur

{

public static void Main()

{

while(true){

Console.Write("\nPlease enter the water temperature : ");

int x = Int32.Parse (Console.ReadLine());

try{

if(CheckComfort(x)){

Console.Write(x+" degrees is comfortable for swimming.");

}else{

Console.Write(x+" degrees is not comfortable for swimming.");

}

}catch(Exception ex){

Console.WriteLine(ex);

}

}

}

public static Boolean CheckComfort(int temp){

if(temp>=70 && temp<=85){

return true;

}else if(temp>=32 && temp<=212){

return false;

}else{

throw new ArgumentException("Value does not fall within the exptected range.");

}

}

}

7 0
2 years ago
_____________ helps to control and limit the number of consecutive request failures that cross a threshold. Review breaker Micro
True [87]

Answer:

Circuit breaker

Explanation:

Circuit breaker -

It is a type of electrical switch , whose main function is to protect the electrical circuit by the process of short circuit or overloading , is referred to as a circuit breaker .

The circuit breaker , as the name suggests , disrupts the circuit as soon as there is the condition of overloading or short circuit , and thereby saves the appliances .

Hence , from the given information of the question,

The correct term is circuit breaker  .

5 0
2 years ago
You would like to conduct a survey and ask your web page visitors to indicate the computer operating systems that they use. Each
Rudiy27

Answer:

<em>A. check box </em>

Explanation:

A check box, selection box, or tick box <em>is a small immersive box that the user can switch to demonstrate an affirmative or negative choice</em>.

It is often observed in applications and operating systems ' HTML input forms, dialog boxes, and GUIs.

A check mark appears inside the box when clicked to signify an affirmative (yes) option. The check mark will vanish when clicking again, suggesting a negative option (no).

6 0
2 years ago
Give a proof for each statement.
Marrrta [24]

Answer:

  • If a group of 9 kids have won a total of 100 trophies, then at least one of the 9 kids has won at least 12 trophies.
  • If a person buys at least 400 cups of coffee in a year, then there is at least one day in which the person has bought at least two cups of coffee.
  • The average of three real numbers is greater than or equal to at least one of the numbers.

Explanation:

1)

Suppose that  each kid has less than 12 trophies

Total trophies = 100

Maximum trophies won by one kid = 11

total kids = 9

total number of trophies = 9 * 11 = 99 which contradicts the fact the total number of trophies are 100

2)

Suppose that  person has less than 2 cups of coffee a day

Total cups of coffee = 400

he has bought at least one cup of coffee each day

which means

total number of cups of coffee = 1* 366 = 366 which contradicts the fact the person buys at least 400 cups of coffee in a year

3)

Average of three number = (a+ b+ c)/3

suppose that there are real numbers a, b, and c such  that all three numbers are less than the average of the three numbers.

Let m be the average (a+b+c )/3 = m. Then our assumption states that (a < m) and  (b < m) and (c < m). By adding all the inequalities we get a + b + c < 3m. But m is  defined to be (a+b+c) /3  , so a + b + c = 3m.  But now we have that 3m = a + b + c < 3m. So 3m < 3m which is an obvious  contradiction. Thus our claim is true

7 0
2 years ago
Jorge saw a computer named Watson on the game show Jeopardy and was surprised at how many answers Watson was able to get correct
KiRa [710]

Answer:

The above statement is FALSE

Augmented reality works with sensor based inputs from the real world.

It is an immersive perception of a real-world environment in which objects existing in the real world are augmented by computer-generated perceptual knowledge, often through multiple sensory modalities like visual, auditory, haptic, somatosensory and olfactory.

Based on the above description

8 0
2 years ago
Other questions:
  • The java compiler requires that a source file use the ________ filename extension question 3 options: 1) .class 2) .h 3) .java
    8·1 answer
  • True or false words spelling and grammar check is always %100
    7·2 answers
  • Which of the following statements about crane hand signal training are true? A. Both statements are true about crane hand signal
    5·1 answer
  • A firm that wanted to enable its employees to use and share data without allowing outsiders to gain access could do so by establ
    14·1 answer
  • Which of the following is NOT a method in which a macro can be run?
    10·1 answer
  • Imagine that you have configured the enable secret command, followed by the enable password command, from the console. You log o
    12·1 answer
  • George borrowed some equipment from his friend for recording his monologue for his art class. He got all the equipment except th
    15·1 answer
  • Information systems cannot solve some business problems. Give three examples and explain why technology cannot help.
    11·1 answer
  • A semaphore puts a thread to sleep:
    12·1 answer
  • A video game character can face toward one of four directions: north, south, east, and west. Each direction is stored in memory
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!