🗊 Презентация Code quality

Нажмите для полного просмотра!
Code quality, слайд №1 Code quality, слайд №2 Code quality, слайд №3 Code quality, слайд №4 Code quality, слайд №5 Code quality, слайд №6 Code quality, слайд №7 Code quality, слайд №8 Code quality, слайд №9 Code quality, слайд №10 Code quality, слайд №11 Code quality, слайд №12 Code quality, слайд №13 Code quality, слайд №14 Code quality, слайд №15 Code quality, слайд №16 Code quality, слайд №17 Code quality, слайд №18 Code quality, слайд №19 Code quality, слайд №20 Code quality, слайд №21 Code quality, слайд №22 Code quality, слайд №23 Code quality, слайд №24 Code quality, слайд №25 Code quality, слайд №26 Code quality, слайд №27 Code quality, слайд №28 Code quality, слайд №29 Code quality, слайд №30 Code quality, слайд №31 Code quality, слайд №32 Code quality, слайд №33 Code quality, слайд №34 Code quality, слайд №35 Code quality, слайд №36 Code quality, слайд №37 Code quality, слайд №38 Code quality, слайд №39 Code quality, слайд №40 Code quality, слайд №41 Code quality, слайд №42 Code quality, слайд №43 Code quality, слайд №44 Code quality, слайд №45 Code quality, слайд №46

Содержание

Вы можете ознакомиться и скачать презентацию на тему Code quality. Доклад-сообщение содержит 46 слайдов. Презентации для любого класса можно скачать бесплатно. Если материал и наш сайт презентаций Mypresentation Вам понравились – поделитесь им с друзьями с помощью социальных кнопок и добавьте в закладки в своем браузере.

Слайды и текст этой презентации


Слайд 1


Code quality, слайд №1
Описание слайда:

Слайд 2


Tell me, what is a clean code for you?
Описание слайда:
Tell me, what is a clean code for you?

Слайд 3


for (i = 0;i < strlen(line);i++) { short char_code = isupper(line[i]) ? line[i] - 64 : line[i] - 96; if (char_code > 0 && char_code < 27) {...
Описание слайда:
for (i = 0;i < strlen(line);i++) { short char_code = isupper(line[i]) ? line[i] - 64 : line[i] - 96; if (char_code > 0 && char_code < 27) { printf("%c", isupper(line[i]) ? ((char_code + step) % 26 + 64) : ((char_code + step) % 26 + 96)); } else { printf("%c", line[i]); } }

Слайд 4


void CEquation::trio(double array[][rt+1],double alfa[][rt+1]) { for (int L = 0; L
Описание слайда:
void CEquation::trio(double array[][rt+1],double alfa[][rt+1]) { for (int L = 0; L

Слайд 5


Good vs Bad
Описание слайда:
Good vs Bad

Слайд 6


How to write beautiful code
Описание слайда:
How to write beautiful code

Слайд 7


Why its important? 80% of the lifetime cost of a piece of software goes to maintenance. Hardly any software is maintained for its whole life by the...
Описание слайда:
Why its important? 80% of the lifetime cost of a piece of software goes to maintenance. Hardly any software is maintained for its whole life by the original author. Code quality improve the readability of the software, allowing engineers to understand new code more quickly and thoroughly.

Слайд 8


Why do we see a bad code? Time: I don't have a time We never seem to have time to do it, but always seem find time to redo it?! Knowledge: what is a...
Описание слайда:
Why do we see a bad code? Time: I don't have a time We never seem to have time to do it, but always seem find time to redo it?! Knowledge: what is a good code? Tools: I don’t know about it Skills: I can’t do it

Слайд 9


Code quality, слайд №9
Описание слайда:

Слайд 10


Naming is important
Описание слайда:
Naming is important

Слайд 11


The name should represent the developer’s idea
Описание слайда:
The name should represent the developer’s idea

Слайд 12


The name should represent the developer’s idea
Описание слайда:
The name should represent the developer’s idea

Слайд 13


The name should represent the developer’s idea
Описание слайда:
The name should represent the developer’s idea

Слайд 14


Use meaningful difference
Описание слайда:
Use meaningful difference

Слайд 15


Use meaningful names
Описание слайда:
Use meaningful names

Слайд 16


Use searchable names
Описание слайда:
Use searchable names

Слайд 17


Class names
Описание слайда:
Class names

Слайд 18


Method names
Описание слайда:
Method names

Слайд 19


Method Names Should Say What They Do
Описание слайда:
Method Names Should Say What They Do

Слайд 20


One function – one operation One function – one operation
Описание слайда:
One function – one operation One function – one operation

Слайд 21


Code quality, слайд №21
Описание слайда:

Слайд 22


F1:Too Many Arguments F1:Too Many Arguments Functions should have a small number of arguments. No argument is best, followed by one, two, and three....
Описание слайда:
F1:Too Many Arguments F1:Too Many Arguments Functions should have a small number of arguments. No argument is best, followed by one, two, and three. F2: Output Arguments Output arguments are counterintuitive. Readers expect arguments to be inputs, not outputs. If your function must change the state of something, have it change the state of the object it is called on.

Слайд 23


F3: Flag Arguments F3: Flag Arguments Boolean arguments loudly declare that the function does more than one thing. They are confusing and should be...
Описание слайда:
F3: Flag Arguments F3: Flag Arguments Boolean arguments loudly declare that the function does more than one thing. They are confusing and should be eliminated F4: Dead Function Methods that are never called should be discarded. Keeping dead code around is wasteful. Don’t be afraid to delete the function. Remember, your source code control system still remembers it.

Слайд 24


Code quality, слайд №24
Описание слайда:

Слайд 25


Code review
Описание слайда:
Code review

Слайд 26


Comments C1: Inappropriate Information Change histories(?) Authors(?) Date of last update(?) C2: Obsolete Comment It is best not to write a comment...
Описание слайда:
Comments C1: Inappropriate Information Change histories(?) Authors(?) Date of last update(?) C2: Obsolete Comment It is best not to write a comment that will become obsolete If you find an obsolete comments – update or erase it ASAP!

Слайд 27


Comments C3. Redundant Comment Don’t comment what a code does – I can read the code for that—keep it DRY Example 1 i++; // increment i What about...
Описание слайда:
Comments C3. Redundant Comment Don’t comment what a code does – I can read the code for that—keep it DRY Example 1 i++; // increment i What about example 2? /** * @param sellRequest * @return * @throws ManagedComponentException */ public SellResponse beginSellItem(SellRequest sellRequest) throws ManagedComponentException

Слайд 28


Comments C4: Poorly Written Comment Comments should say Why or purpose, not how C5: Commented-Out Code Who knows how old it is? Who knows whether or...
Описание слайда:
Comments C4: Poorly Written Comment Comments should say Why or purpose, not how C5: Commented-Out Code Who knows how old it is? Who knows whether or not it’s meaningful? Yet no one will delete it because everyone assumes someone else needs it or has plans for it.

Слайд 29


General G1: Multiple Languages in One Source File a Java source file might contain snippets of XML, HTML, YAML, JavaDoc, English, JavaScript or in...
Описание слайда:
General G1: Multiple Languages in One Source File a Java source file might contain snippets of XML, HTML, YAML, JavaDoc, English, JavaScript or in addition to HTML a JSP file might contain Java, a tag library syntax, English comments, Javadocs, XML, JavaScript, and so forth. The ideal is for a source file to contain one, and only one, language. Realistically, we will probably have to use more than one.

Слайд 30


General G5: Duplication Every time you see duplication in the code, it represents a missed opportunity for abstraction. Result of copy/paste...
Описание слайда:
General G5: Duplication Every time you see duplication in the code, it represents a missed opportunity for abstraction. Result of copy/paste programming – to separate method switch/case or if/else chain that appears again and again in various modules, always testing for the same set of conditions – to use polymorphism

Слайд 31


General G5: Duplication (cont) modules that have similar algorithms, but that don’t share similar lines of code – to use Template Method or Strategy...
Описание слайда:
General G5: Duplication (cont) modules that have similar algorithms, but that don’t share similar lines of code – to use Template Method or Strategy design patterns. Find and eliminate duplication wherever you can!

Слайд 32


General G6: Code at Wrong Level of Abstraction Good software design requires that we separate concepts at different levels and place them in...
Описание слайда:
General G6: Code at Wrong Level of Abstraction Good software design requires that we separate concepts at different levels and place them in different containers

Слайд 33


General G7: Base Classes Depending on Their Derivatives The most common reason for partitioning concepts into base and derivative classes is so that...
Описание слайда:
General G7: Base Classes Depending on Their Derivatives The most common reason for partitioning concepts into base and derivative classes is so that the higher level base class concepts can be independent of the lower level derivative class concepts.

Слайд 34


General G9: Dead Code You find it in the body of an if statement that checks for a condition that can’t happen. You find it in the catch block of a...
Описание слайда:
General G9: Dead Code You find it in the body of an if statement that checks for a condition that can’t happen. You find it in the catch block of a try that never throws. You find it in little utility methods that are never called or switch/case conditions that never occur.

Слайд 35


General G11: Inconsistency If you do something a certain way, do all similar things in the same way. If you name a method processVerificationRequest,...
Описание слайда:
General G11: Inconsistency If you do something a certain way, do all similar things in the same way. If you name a method processVerificationRequest, then use a similar name, such as processDeletionRequest, for the methods that process other kinds of requests.

Слайд 36


General G23: Prefer Polymorphism to If/Else or Switch/Case “ONE SWITCH” rule: There may be no more than one switch statement for a given type of...
Описание слайда:
General G23: Prefer Polymorphism to If/Else or Switch/Case “ONE SWITCH” rule: There may be no more than one switch statement for a given type of selection. The cases in that switch statement must create polymorphic objects that take the place of other such switch statements in the rest of the system.

Слайд 37


General G28: Encapsulate Conditionals if (shouldBeDeleted(timer)) is preferable to if (timer.hasExpired() && !timer.isRecurrent())
Описание слайда:
General G28: Encapsulate Conditionals if (shouldBeDeleted(timer)) is preferable to if (timer.hasExpired() && !timer.isRecurrent())

Слайд 38


General G29: Avoid Negative Conditionals if (buffer.shouldCompact()) is preferable to if (!buffer.shouldNotCompact())
Описание слайда:
General G29: Avoid Negative Conditionals if (buffer.shouldCompact()) is preferable to if (!buffer.shouldNotCompact())

Слайд 39


General G35: Keep Configurable Data at High Levels
Описание слайда:
General G35: Keep Configurable Data at High Levels

Слайд 40


One more Clear, not Clever Don’t be clever, instead be clear “I never make stupid mistakes. Only very, very clever ones” John Peel
Описание слайда:
One more Clear, not Clever Don’t be clever, instead be clear “I never make stupid mistakes. Only very, very clever ones” John Peel

Слайд 41


What is “code smell”? Wiki say: In computer programming, code smell is any symptom in the source code of a program that possibly indicates a deeper...
Описание слайда:
What is “code smell”? Wiki say: In computer programming, code smell is any symptom in the source code of a program that possibly indicates a deeper problem. Code smells are usually not bugs—they are not technically incorrect and don't currently prevent the program from functioning. Instead, they indicate weaknesses in design that may be slowing down development or increasing the risk of bugs or failures in the future.

Слайд 42


The most “popular” code smells
Описание слайда:
The most “popular” code smells

Слайд 43


Bad vs. Clean code What is the clean code? What is the bad code? Characteristics of quality code Metrics to measure quality Ways to identify and...
Описание слайда:
Bad vs. Clean code What is the clean code? What is the bad code? Characteristics of quality code Metrics to measure quality Ways to identify and build quality

Слайд 44


What do you know now? What is Code Smell It’s a feeling or sense that something is not right in the code You can’t understand it Hard to explain Does...
Описание слайда:
What do you know now? What is Code Smell It’s a feeling or sense that something is not right in the code You can’t understand it Hard to explain Does some magic Can we measure it?

Слайд 45


How to improve code quality?
Описание слайда:
How to improve code quality?

Слайд 46


Code quality, слайд №46
Описание слайда:



Теги Code quality
Похожие презентации
Mypresentation.ru
Загрузить презентацию