Оцените презентацию от 1 до 5 баллов!
Тип файла:
ppt / pptx (powerpoint)
Всего слайдов:
15 слайдов
Для класса:
1,2,3,4,5,6,7,8,9,10,11
Размер файла:
50.31 kB
Просмотров:
77
Скачиваний:
0
Автор:
неизвестен
Слайды и текст к этой презентации:
№1 слайд![Item Use native methods](/documents_6/3c644410a48cc4e7f4b0c152181e5dda/img0.jpg)
Содержание слайда: Item 54: Use native methods judiciously
№2 слайд![Disadvantages of native](/documents_6/3c644410a48cc4e7f4b0c152181e5dda/img1.jpg)
Содержание слайда: Disadvantages of native methods:
Not save –
memory corruption errors may occur
Platform dependent –
native methods are less portable
More difficulties with debugging
Worse performance doing a small amount of work –
consume some resources for going into and out of native code
№3 слайд![Use as little native code as](/documents_6/3c644410a48cc4e7f4b0c152181e5dda/img2.jpg)
Содержание слайда: Use as little native code as possible
№4 слайд![Strive to write good programs](/documents_6/3c644410a48cc4e7f4b0c152181e5dda/img3.jpg)
Содержание слайда: Strive to write
good programs rather than fast ones
Don’t sacrifice sound architectural principles for performance
№5 слайд![Strive to avoid design](/documents_6/3c644410a48cc4e7f4b0c152181e5dda/img4.jpg)
Содержание слайда: Strive to avoid design decisions that limit performance
Components interacting between modules and with the outside world are difficult to change.
№6 слайд![Consider the performance](/documents_6/3c644410a48cc4e7f4b0c152181e5dda/img5.jpg)
Содержание слайда: Consider the performance consequences of your API design decisions
Mutable public class – may require a lot of needles defensive coping
Inheritance – ties class with its parent and may have limits on the performance of superclass
Interfaces – allow to create faster implementation in the future
№7 слайд![Don t warp API to achieve](/documents_6/3c644410a48cc4e7f4b0c152181e5dda/img6.jpg)
Содержание слайда: Don’t warp API to achieve good performance
Problems with performance may go away in future releases,
bad API – never
№8 слайд![Measure performance before](/documents_6/3c644410a48cc4e7f4b0c152181e5dda/img7.jpg)
Содержание слайда: Measure performance
before and after each attempted optimization
Effect can be measurable or even negative
№9 слайд![Java doesn t have a strong](/documents_6/3c644410a48cc4e7f4b0c152181e5dda/img8.jpg)
Содержание слайда: Java doesn’t have a strong performance model
There is a gap between
what the programmer writes and what the CPU executes
№10 слайд![Item Adhere to generally](/documents_6/3c644410a48cc4e7f4b0c152181e5dda/img9.jpg)
Содержание слайда: Item 56: Adhere to generally accepted naming conventions
№11 слайд![Packages Components of](/documents_6/3c644410a48cc4e7f4b0c152181e5dda/img10.jpg)
Содержание слайда: Packages
Components of package names should consist of lowercase alphabetic characters and, rarely digits.
Components should be short, generally eight or fewer characters.
Meaningful abbreviations are encouraged
(For example, util rather than utilities)
№12 слайд![Classes and interfaces](/documents_6/3c644410a48cc4e7f4b0c152181e5dda/img11.jpg)
Содержание слайда: Classes and interfaces
Abbreviations are to be avoided, except for acronyms and certain common abbreviations like max and min.
Acronyms can be either uppercase or have only their first letter capitalized
(The second is better. HTTPURL or HttpUrl)
№13 слайд![Method and field names The](/documents_6/3c644410a48cc4e7f4b0c152181e5dda/img12.jpg)
Содержание слайда: Method and field names
The same as classes’ names but the firstLetterShouldBeLowercase.
If constant – UPPERCASE_WORDS_SEPARETED_WITH_UNDERSCORE
№14 слайд![Local variable The same as](/documents_6/3c644410a48cc4e7f4b0c152181e5dda/img13.jpg)
Содержание слайда: Local variable
The same as members’ names but abbreviations are available
№15 слайд![Type parameter names T for an](/documents_6/3c644410a48cc4e7f4b0c152181e5dda/img14.jpg)
Содержание слайда: Type parameter names
T for an arbitrary type
E for the element type of a collection
K and V for the key and value types of a map
X for an exception
A sequence of arbitrary types can be T, U, V or T1, T2, T3.