1

00:00:01,090  -->  00:00:08,640
Let's not look at some stylistic conventions just is about placement of precess we're already doing

2

00:00:08,720  -->  00:00:08,880
that.

3

00:00:08,910  -->  00:00:15,360
Right the beginning is should be at the end of the line while ending braes should be at the start of

4

00:00:15,360  -->  00:00:16,870
the statement.

5

00:00:16,890  -->  00:00:21,390
You may also come across quote that beginning base is also at the start of the statement.

6

00:00:21,840  -->  00:00:23,700
But I think the style is pretty uncommon.

7

00:00:23,780  -->  00:00:27,650
I'm so you can avoid doing that next.

8

00:00:27,680  -->  00:00:33,720
Inundation always in any block of code by force basis.

9

00:00:34,410  -->  00:00:35,770
Here is an example.

10

00:00:35,780  -->  00:00:42,900
The method is indented by force basis and within the method the block is again intended by an adult

11

00:00:42,900  -->  00:00:44,700
for business.

12

00:00:44,950  -->  00:00:52,110
Lot of programmers also prefer to use DOPs instead of spaces where each stop would pick up on four spaces

13

00:00:52,110  -->  00:00:52,950
.

14

00:00:53,160  -->  00:00:59,790
If you look up in the Internet you will find that there is this this is going on whatever program most

15

00:00:59,820  -->  00:01:06,480
using space would argue that spaces would look consistent across different machines on IDS as a single

16

00:01:06,480  -->  00:01:10,360
spaced represents one column on programmers.

17

00:01:10,390  -->  00:01:14,760
Tops would argue that DAB would involve fewer keystrokes.

18

00:01:14,760  -->  00:01:20,550
Additionally they also argue that each developer can configure the number of spaces that construct each

19

00:01:20,550  -->  00:01:21,520
duck.

20

00:01:21,750  -->  00:01:24,550
This is something that can be done in the editor setting.

21

00:01:24,900  -->  00:01:30,960
So wonderful but much so Bob says to force basis while the other two or three spaces since there is

22

00:01:30,960  -->  00:01:32,650
no strict consensus on this.

23

00:01:32,670  -->  00:01:37,540
I think you can use whichever you like if it disappears you can stick to four spaces.

24

00:01:37,610  -->  00:01:43,310
Otherwise you can use it single to Jindalee for the sake of readability.

25

00:01:43,410  -->  00:01:49,260
It is recommended to limit each line to 80 characters but it is always not possible to stick to this

26

00:01:49,260  -->  00:01:55,320
lament as some expressions can be really long in this because those long expressions can be wrapped

27

00:01:55,320  -->  00:01:59,820
into multiple lines by following these principles.

28

00:01:59,820  -->  00:02:05,400
Let me go with these principles first and then I will demonstrate this in my Eclipse already.

29

00:02:05,580  -->  00:02:12,540
The first one is about 13 locations and method declarations bevvy me a long list of arguments or parameters

30

00:02:12,540  -->  00:02:13,130
.

31

00:02:13,590  -->  00:02:15,700
And this is you can break after the comma.

32

00:02:15,990  -->  00:02:19,010
That is what arguments or parameters after the comma.

33

00:02:19,050  -->  00:02:21,240
Going to next line.

34

00:02:21,240  -->  00:02:26,620
Next you may have an if statement with several conditions supported by logical operators.

35

00:02:27,030  -->  00:02:32,700
In this case you can brigge before an operator that is an operator rebin the new line followed by subsequent

36

00:02:32,700  -->  00:02:38,670
conditions and the same rule also applies to long arithmetic ops.

37

00:02:39,720  -->  00:02:46,080
In general when you do such dropping into multiple lines Beder it is after the comma or before an operator

38

00:02:46,650  -->  00:02:54,180
always indent newlines by 8 spaces or it's hard to do two types from the first line that got split.

39

00:02:54,650  -->  00:03:00,780
So for language split into three lines then second line will be entered by 8 inches from the fast lane

40

00:03:01,170  -->  00:03:07,050
and even the total line will be entered by HP says from the first line so second and third lines will

41

00:03:07,050  -->  00:03:09,810
be in line with each other.

42

00:03:09,810  -->  00:03:13,560
Now let's look at this principles in my lives through a simple command.

43

00:03:13,560  -->  00:03:19,440
Eclipse will automatically format the code by applying these principles so these good principles are

44

00:03:19,440  -->  00:03:23,730
already incorporated into eclipse.

45

00:03:23,730  -->  00:03:31,190
Here is a sample method and here is a method declaration and it has a long list of parameters.

46

00:03:31,410  -->  00:03:39,060
So the declaration goes beyond 80 characters and here is an if statement with several conditions.

47

00:03:39,420  -->  00:03:42,520
It also goes beyond 80 characters.

48

00:03:43,020  -->  00:03:45,080
Then Witan the if statement.

49

00:03:45,120  -->  00:03:47,390
We have a turnout operation.

50

00:03:47,430  -->  00:03:53,750
It also goes beyond the characters and it is an arithmetic operation with several operators and operands

51

00:03:53,760  -->  00:03:54,190
.

52

00:03:54,240  -->  00:04:00,750
It also goes beyond 80 characters on the matter and also has a long comment with more than 80 characters

53

00:04:00,750  -->  00:04:03,440
so it should also get rocked.

54

00:04:03,510  -->  00:04:11,970
So we are in Eclipse now and let me just use this command control chef f that does all the wrapping

55

00:04:11,970  -->  00:04:18,810
here and it does the wrapping only for this particular class which we are looking at.

56

00:04:19,830  -->  00:04:26,370
So first let's look at the method declaration and the first one was that it needs to be proper after

57

00:04:26,370  -->  00:04:27,110
the comma.

58

00:04:27,210  -->  00:04:30,990
And that's what is happening here.

59

00:04:30,990  -->  00:04:38,480
We also talked about displacing the indentation that it needs to be a space or two paths.

60

00:04:38,520  -->  00:04:45,460
In my Eclipse I used tab as the setting so I have good jobs here and same with her.

61

00:04:45,610  -->  00:04:54,690
The third line and next is the if statement and we know that the wrapping should be before the operator

62

00:04:54,990  -->  00:04:57,120
and you can see that here.

63

00:04:57,150  -->  00:04:58,370
Same here.

64

00:04:58,860  -->  00:05:01,710
And we said that it has to be a does.

65

00:05:01,740  -->  00:05:06,700
I mean look it up lines should be indented to the same column from the last line.

66

00:05:06,780  -->  00:05:13,290
So at please you can see that this line this line and also this line are intended to the same column

67

00:05:14,930  -->  00:05:17,650
and the space is also two tabs.

68

00:05:17,650  -->  00:05:23,280
No it's just that this particular condition is a long condition or two very long.

69

00:05:23,310  -->  00:05:30,860
The expression is long and because it was going beyond the characters so it got robbed separately and

70

00:05:30,870  -->  00:05:31,220
so.

71

00:05:31,230  -->  00:05:34,410
But then when it got wrapped the next line was.

72

00:05:34,640  -->  00:05:38,760
Is it on 8 basis from the previous line or I'm here.

73

00:05:38,960  -->  00:05:43,300
So that's about the if statement with the operators.

74

00:05:43,600  -->  00:05:46,130
Even the Kennedy operation got robbed.

75

00:05:46,400  -->  00:05:55,850
And also before this operator which is the colon here and next is it Medich operation.

76

00:05:55,860  -->  00:06:03,050
It also got rid of before the operator and there is the eight space or the tab rule which has got it

77

00:06:03,050  -->  00:06:03,420
right.

78

00:06:03,420  -->  00:06:09,300
Same with that unary operation here and also the comment also got grub.

79

00:06:09,720  -->  00:06:14,810
So that said so the Eclipse does everything for us.

80

00:06:14,970  -->  00:06:22,290
So that's the nice thing about using an ID so it has incorporated all the conventions for.

81

00:06:22,290  -->  00:06:24,480
In addition are not overlapping.

82

00:06:24,480  -->  00:06:27,760
So that's the nice thing about using Eclipse.

83

00:06:27,870  -->  00:06:36,630
So that's about the conventions for the style stylistic conventions for inundations or not so for wrapping

84

00:06:36,630  -->  00:06:38,270
long lines and that set
