📺 Develpreneur YouTube Episode

Video + transcript

The Value of Clean Code Part 2

2023-01-05 •Youtube

Detailed Notes

What is readable code?

Readable code is simply code that communicates its intent to the reader. It means that when you pull up some code or any type of software, (be it HTML, Java, C, .Net, whatever) that anyone can look at the code and you understand what the code is doing.

Benefits of using readable code

Easier for us to understand what the code is doing. The intent is for any developer to come in, open the code, look at the code and understand what’s going on. Clean and easy to read it make it easier to understand how the code works. When code is written cleanly, it beings to self-document the requirements. If done right anyone can come behind the coder, and easily make a code modification or fix a problem. Makes it easier for us to write testable code, like unit testing. Because if the code is written cleanly then the functionality of our functions, methods, etc… are easier to understand. Such that a tester should be able to identify how the code works, making it easier to test them. Additionally, some other benefits are taking existing documentation such as software documentation and requirement documentation, and taking pieces of this documentation and putting it in the code where it belongs. So, we know that this code goes with this functionality or this requirement.

What happens when we don’t write readable code?

Hard to understand. Complex code can be hard to read. Hard for other developers to follow the developer’s intent because it is not clear. No idea or understanding of how the code works. Typically, when we don’t write readable code, you’ll hear developers say, oh, the code’s unmaintainable it’s spaghetti code. We don’t know what’s going on. Those are signs that your code is not readable. It was not written well. It’s also very hard to make code modifications or fix a problem because the code is unreadable or unmanageable. You don’t know what’s going on or where to begin. Simply put, if you don’t know what’s going on with the code and you can’t read it, you can get stuck.

The same thing applies to testing. If the code is unreadable, you don’t know where to test it. You don’t know how to test or where to test a feature in the software.

There are essentially four ways you can write readable code, but really there are five.

Documentation

Begin with some clear type of documentation. These can be either software requirements, specification documents, some type of test plan, or some other type of business requirements. Essentially, you want some type of documentation around the software that you are going to be writing or changing. So, documentation is really key for writing well-documented readable code.

Coding Standards

Coding standards define how we are going to write our code. Such as, what are the different requirements based on things like our language, environment, architecture, or other significant coding considerations that we should follow. Especially, when we bring in a new developer, making it easier for the new developer to jump in knowing how to write the code, and what to expect when they’re looking at the code. Because everyone is following the same template as they’re writing their code.

Style Guides

Style guides are the way you should organize your code, name variables, name methods, and define classes. Anything that pertains to your language’s basic coding standards, basic style guides, and file naming conventions. For example, in Java, there are specific industry standards around how you name your classes, the way you name your methods or your functions, or the way you name your CSS files.

Code reviews

Code reviews, help in a couple of different ways. One, it helps maintain readability because if someone else reviews it and they can’t understand it, or they can’t read it or they can’t follow it, then it probably needs to go back and be refactored and cleaned up so that it can be understandable.

This also helps flush out any potential logical problems or potential bugs that could be introduced into an application. Something that maybe the tester or the developer forgot to test, or they didn’t think about a particular edge case. These are things that you can look at with or catch what code reviews and code reviews are also a good place to help make ensure that you’re following those coding standards and style guides.

Practice

Finally, we have practice. Unfortunately, this is not something that can be easily done overnight. It takes a lot of time and a lot of practice to get good at writing readable code. Typically, a lot of students come out of college following the examples and derivatives that they were taught in school. They will have one mindset of what coding standards or coding styles are based on whoever taught them.

Transcript Text
thank you
[Music]
so that's not really clean that's not
real easy to follow and that's going to
make testing a pain in the butt
however it gets worse so once we get
into our main we then have to
instantiate our class so that we can
actually run it and example one doesn't
really tell us what this program does
example one is just an example example
of what so that's very unclear
we then see that we have we're creating
two method variables for float and we
are doing some type of parsing float and
we're taking the arguments that are
coming into the application so this
right here tells me that oh so
apparently I'm supposed to be getting
some arguments but there's no
documentation telling me what these
arguments are or what this application
is supposed to be getting so very
unclear so really I don't know what this
is supposed to do yet
uh and then the second one we're parsing
a sec uh so this one here says okay
we're going to parse the first parameter
that's passed in and this here says
we're going to pass the third parameter
that's passed in but what the heck is
the middle parameter well we have this
switch uh case here that looks to do
something with the second argument and
if we look we see that oh well the
second argument apparently is going to
be either plus minus divide or uh
asterisk and then based on those strings
we are going to call the corresponding
method based on these uh strings if we
don't receive one of these we basically
say not a valid function
okay kind of figuring out what's going
on but it's not easy so we've already
spent a couple minutes just trying to
understand what's going on but it's not
clear
so let me start by telling you what this
program is so from a high level
perspective this program is actually the
uh basic structure of a calculator
application
so if we actually did our due diligence
and we have our documentation we can
create some Java Docs
here that will explain what this class
what this program is supposed to be so
this is going to be a calculator
application
and it is going to uh have functions
to simulate
a calculator
to simulate buttons on the calculator
all right so right off the bat this now
uh makes it a little bit cleaner that we
at least now know what this application
is we can add things like the author
okay who wrote this well I wrote this
Michael and we should really add some
additional things so in Java with
javadocs you can just do the asteroid
and you have all these different uh
annotations that you can add to your
documentation so that when you generate
the nice pretty HTML you're going to
actually see this uh highlighted or
defined so we can do things like API
nodes if this is API we have author
category is this method deprecated
meaning is it about to go away not used
anymore we want to hide this we could do
since which since is interesting because
since we can say okay when was this
implemented so we could say this was
implemented on August
sixth
2022
and we can also add so we have since we
can also add version so we could say
version zero or version one
so when we make changes to this we can
update this information and we know what
happens so you could actually keep it
like this or you can make modifications
and say okay modified
on
eight seven
and add the additional information
now in the old days uh in old days I
mean back in Mainframe days when you
were dealing with like Cobalt
um
again some of the older naming
conventions but
cold fusion Cobalt
um basic things like that back on Old
mainframes you had to actually write not
just a formatted code but you had to
actually write code that was fixed
linked in um
the style so you didn't have this pretty
you had oh it had to be somebody's tabs
so many spaces everything had to line up
you then had to also include all this
information at the top so documentation
was Hardcore back in the old days uh
because if we didn't we had no idea what
was going on
all right so we have our high level
documentation okay so it's a calculator
application we have functions to
simulate buttons on the calculator
uh I am the author I created it on H6
and we are dealing with version one
okay so we now have a class document we
have a program document telling us what
this is supposed to do
the next thing we need to do is we
probably need to rename this class or
rename this program to actually explain
what it is that we are doing what its
function really is because example one
really doesn't tell us anything so to be
a good coder and direct good readable
code
everything in our code should explain
what it is that it's doing so here
instead of example one this should be
calculator
calculate for
application
now it's telling me okay you've renamed
this but in Java standards you have to
your class name has to match your file
so because we're in Eclipse it's very
easy all we have to do is click the
rename feature here and it's going to do
the work for us so now we have
calculator app
matches calculator app
so now let's kind of walk through the
application a little bit so we have this
first method here now this first method
is actually a method that is going to
add
two numbers
together
and here this is actually going to
simulate
the Plus
on a calculator
and so method one really should be add
float should be left number
or we could just say
start with this the number one
number two XY still work but we want to
be a little cleaner we want to make this
as clean as possible so you have ADD
number one number two now
add well it's succinct really still does
not explain the functionality of this
method we want to be as clear and
concise as possible so for good readable
code it should be add
two numbers
together
return
sum
so add two numbers together we could say
return sum or add two numbers together
return
[Music]
value
so add two numbers together
return result okay
all right so now we have number one
number two
so really we can make this a little bit
better so left number
right number
and why I'm being this uh anal about
naming it makes sense that when we get
down to some of the other methods all
right so we we simulate the Plus on the
calculator we add two numbers together
so
really add to numbers result uh returns
result so here in Java we could also do
uh oops uh Java doc
so we can add here and we can add return
and we're going to return a float
this is the results
of adding left number
two right number
all right so adding two numbers together
so now we need to update our return
statement so return
left
number Plus
right number now depending upon your
coding style uh this is a very
simplistic view of coding now you could
bloat this up just a little bit which
makes it a little more readable but you
don't necessarily have to do it it's
just depending upon your coding style or
the coding uh parameters that are
required for coding standards so another
way to do this is you could do float
some
equals
left number plus right number and then
return sum now if we want to follow
the naming convention we can just say
results
and then we could say return results
so just by renaming our code
We Now understand exactly what's going
on so this first method is supposed to
simulate the Plus on the calculator
which adds two numbers together and a
return is going to be the float result
of adding the left number to the right
number
so now if we actually read the code it
almost reads exactly like our comment
so we say float add two numbers return
result
left number float right number
we take the float results of left number
plus right number and we return the
results
now if I actually were to remove this
comment
we get the exact same readability from
the code
so this is kind of what we call in
software development as self-documenting
code if you clearly write readable code
and follow good coding practices and
styles you can pretty much know what's
going on in a function or in a piece of
code just based on the code itself
but it is still helpful to add things
like javadocs or class documentation
all right so let's do the next one here
so I will take this piece here just to
cut down on code
so this one here we want to simulate the
subtraction on a calculator so here
we're going to subtract
two numbers
and we are going to return the float
result of subtracting
the left number from
the right number
so this should actually instead being
just method two should be sub
tract
two numbers
return result
again
left number
right number
now one additional piece of
documentation you could add to this
method is
if people don't understand uh math which
there are people out there is if the
left number
or I'm sorry if the right number
is greater
than
the
left number
we will get
Okay negative
or we should get
we will get we
should get a negative number
so this is just a rule
a subtraction
all right so float results
number right
so we subtract two numbers return
results so let's do the same thing we
did before so we'll do float
results
equals
x minus y
return results
but wait x minus y doesn't exist it
needs to be left number
right number
all right let's read this so subtract
two numbers
uh we'll receive left number and right
number our result is going to be the
subtraction of uh left number minus
right number
so simulate the minus on the calculator
subtract two numbers
float returns results so subtracting
left number from right number
okay
makes sense so far
all right so method three
so we now want to simulate the division
on a calculator now this is not to be
confused
what it did on Java we have a div
method
or a div property which is the remainder
of a division not the division itself
so here we want to divide two numbers
and there is a division rule
and our division rule
we cannot divide by zero
this will return uh this is bad so this
returns
not a number
all right so our float results of
dividing
left number from right number
so again we should make something a
little more distinct
for our naming
so float
change this to divide
two numbers left and right
and we'll return results
and let's do method four so now we want
to simulate the multiplication
foreign
and here we're going to multiply
two numbers
don't need a rule for that
and Float result of multiplying
left number two right now
so we need to change method four to be
multiplied two numbers return results
foreign
X and Y
to left and right number
and it said divide we will multiply
all right so so far so good we
understand now that we have a calculator
application we're simulating the buttons
on a calculator
so calculator application is the name of
our program
we have four methods for adding two
numbers dividing two numbers multiplying
two numbers and subtracting two numbers
and these return results
all right
last and not least we have our main
so this is pretty much just the main app
uh
Main
that's that
so this is where what runs our code
all right so first things first
we need to change
or we need to basically tell the
end user
what parameters this application
requires
so really we need to make sure that if
there are no arguments we need to check
for that so main method runs code
foreign
we actually do need some Java dots so
here we have arguments
some parameter
R and
zero
is going to be the left
number
we have argument one and argument two
argument one is going to be our
calculator
button
value
plus minus
divide
what
our application is going to
so our application
is going to accept
three values
simulating
two numbers
and
a
math symbol
being entered into a calculator
for example
left number
uh
right number
Etc
but for readability let's just do all of
it
we have left number
plus minus
slide
and multiply
so now we know what our main method is
supposed to do so we are expecting three
values so if we don't get these three
values we're going to fail
so first thing this program actually
needs to do is we need to add an
additional condition so we need to say
if
ours
equal args equal null
foreign
is less than three
less than or equal to three no
less than three yeah that's right
I had my curly braces for readability we
can do just about
and what we want to see is we want to
say our calculator app
so in Java this is kind of
expected formatting so we can do
calculator app
we say required
or
calculator app requires
uh
left number
operation
price number
[Music]
Transcript Segments
10.7

thank you

18.89

[Music]

27.18

so that's not really clean that's not

29.279

real easy to follow and that's going to

31.38

make testing a pain in the butt

33.48

however it gets worse so once we get

36.3

into our main we then have to

38.579

instantiate our class so that we can

40.5

actually run it and example one doesn't

42.54

really tell us what this program does

44.52

example one is just an example example

47.7

of what so that's very unclear

51

we then see that we have we're creating

54.42

two method variables for float and we

58.14

are doing some type of parsing float and

60.48

we're taking the arguments that are

62.52

coming into the application so this

65.46

right here tells me that oh so

67.68

apparently I'm supposed to be getting

69.18

some arguments but there's no

70.979

documentation telling me what these

72.42

arguments are or what this application

74.52

is supposed to be getting so very

76.619

unclear so really I don't know what this

79.56

is supposed to do yet

81.299

uh and then the second one we're parsing

83.34

a sec uh so this one here says okay

85.56

we're going to parse the first parameter

87.6

that's passed in and this here says

89.7

we're going to pass the third parameter

91.439

that's passed in but what the heck is

93.479

the middle parameter well we have this

95.82

switch uh case here that looks to do

99.42

something with the second argument and

101.46

if we look we see that oh well the

104.159

second argument apparently is going to

105.78

be either plus minus divide or uh

109.439

asterisk and then based on those strings

113.52

we are going to call the corresponding

115.5

method based on these uh strings if we

119.759

don't receive one of these we basically

121.979

say not a valid function

124.2

okay kind of figuring out what's going

126.6

on but it's not easy so we've already

128.7

spent a couple minutes just trying to

130.02

understand what's going on but it's not

132.54

clear

134.28

so let me start by telling you what this

136.8

program is so from a high level

139.2

perspective this program is actually the

142.62

uh basic structure of a calculator

145.26

application

147.54

so if we actually did our due diligence

150.66

and we have our documentation we can

153.9

create some Java Docs

156.599

here that will explain what this class

160.379

what this program is supposed to be so

162.72

this is going to be a calculator

165.36

application

173.099

and it is going to uh have functions

178.44

to simulate

180.42

a calculator

182.4

to simulate buttons on the calculator

190.319

all right so right off the bat this now

192.18

uh makes it a little bit cleaner that we

195.959

at least now know what this application

197.519

is we can add things like the author

199.98

okay who wrote this well I wrote this

202.5

Michael and we should really add some

205.8

additional things so in Java with

207.84

javadocs you can just do the asteroid

209.76

and you have all these different uh

212.58

annotations that you can add to your

216.08

documentation so that when you generate

218.459

the nice pretty HTML you're going to

221.04

actually see this uh highlighted or

223.14

defined so we can do things like API

225.78

nodes if this is API we have author

228.659

category is this method deprecated

231.659

meaning is it about to go away not used

234.06

anymore we want to hide this we could do

237.84

since which since is interesting because

240.06

since we can say okay when was this

241.68

implemented so we could say this was

243.659

implemented on August

246.739

sixth

248.34

2022

250.5

and we can also add so we have since we

254.04

can also add version so we could say

256.019

version zero or version one

260.699

so when we make changes to this we can

262.62

update this information and we know what

265.139

happens so you could actually keep it

267.54

like this or you can make modifications

269.699

and say okay modified

273.6

on

276.06

eight seven

280.139

and add the additional information

283.62

now in the old days uh in old days I

286.86

mean back in Mainframe days when you

288.419

were dealing with like Cobalt

291.54

um

292.82

again some of the older naming

296.16

conventions but

297.479

cold fusion Cobalt

300.06

um basic things like that back on Old

302.94

mainframes you had to actually write not

306

just a formatted code but you had to

309

actually write code that was fixed

311.16

linked in um

313.44

the style so you didn't have this pretty

315.84

you had oh it had to be somebody's tabs

318.54

so many spaces everything had to line up

320.28

you then had to also include all this

322.56

information at the top so documentation

324.419

was Hardcore back in the old days uh

327.6

because if we didn't we had no idea what

329.4

was going on

330.72

all right so we have our high level

332.52

documentation okay so it's a calculator

334.56

application we have functions to

337.979

simulate buttons on the calculator

340.5

uh I am the author I created it on H6

344.94

and we are dealing with version one

348

okay so we now have a class document we

350.82

have a program document telling us what

352.86

this is supposed to do

354.24

the next thing we need to do is we

356.1

probably need to rename this class or

358.259

rename this program to actually explain

361.139

what it is that we are doing what its

363.66

function really is because example one

365.759

really doesn't tell us anything so to be

368.34

a good coder and direct good readable

370.56

code

371.88

everything in our code should explain

374.16

what it is that it's doing so here

377.52

instead of example one this should be

380.039

calculator

382.639

calculate for

385.68

application

389.34

now it's telling me okay you've renamed

392.4

this but in Java standards you have to

395.28

your class name has to match your file

397.62

so because we're in Eclipse it's very

399.9

easy all we have to do is click the

401.94

rename feature here and it's going to do

404.28

the work for us so now we have

405.539

calculator app

407.16

matches calculator app

410.52

so now let's kind of walk through the

412.199

application a little bit so we have this

413.639

first method here now this first method

416.039

is actually a method that is going to

419.639

add

421.68

two numbers

423.66

together

426.12

and here this is actually going to

429.18

simulate

430.38

the Plus

432.18

on a calculator

440.039

and so method one really should be add

446.819

float should be left number

453.18

or we could just say

455.099

start with this the number one

459.539

number two XY still work but we want to

463.319

be a little cleaner we want to make this

465.3

as clean as possible so you have ADD

468

number one number two now

471.84

add well it's succinct really still does

476.099

not explain the functionality of this

478.38

method we want to be as clear and

480.9

concise as possible so for good readable

484.199

code it should be add

486.96

two numbers

489.18

together

494.52

return

499.259

sum

501.78

so add two numbers together we could say

504.72

return sum or add two numbers together

507.06

return

508.3

[Music]

510

value

516.479

so add two numbers together

520.26

return result okay

524.399

all right so now we have number one

525.959

number two

527.22

so really we can make this a little bit

528.899

better so left number

532.2

right number

534.36

and why I'm being this uh anal about

538.38

naming it makes sense that when we get

540.48

down to some of the other methods all

542.279

right so we we simulate the Plus on the

544.8

calculator we add two numbers together

546.42

so

548.64

really add to numbers result uh returns

551.94

result so here in Java we could also do

555.24

uh oops uh Java doc

558.66

so we can add here and we can add return

563.22

and we're going to return a float

567.48

this is the results

570.42

of adding left number

574.14

two right number

581.339

all right so adding two numbers together

583.38

so now we need to update our return

585.959

statement so return

588.779

left

590.04

number Plus

592.74

right number now depending upon your

596.459

coding style uh this is a very

598.8

simplistic view of coding now you could

601.74

bloat this up just a little bit which

603.839

makes it a little more readable but you

605.94

don't necessarily have to do it it's

607.68

just depending upon your coding style or

610.14

the coding uh parameters that are

613.5

required for coding standards so another

616.68

way to do this is you could do float

619.56

some

620.76

equals

627.48

left number plus right number and then

631.32

return sum now if we want to follow

635.58

the naming convention we can just say

638.22

results

640.08

and then we could say return results

642.899

so just by renaming our code

646.92

We Now understand exactly what's going

649.44

on so this first method is supposed to

651.899

simulate the Plus on the calculator

653.459

which adds two numbers together and a

656.7

return is going to be the float result

658.86

of adding the left number to the right

660.959

number

661.8

so now if we actually read the code it

664.62

almost reads exactly like our comment

667.32

so we say float add two numbers return

670.079

result

671.1

left number float right number

673.68

we take the float results of left number

676.2

plus right number and we return the

678.66

results

679.98

now if I actually were to remove this

682.56

comment

684.66

we get the exact same readability from

688.38

the code

689.399

so this is kind of what we call in

692.88

software development as self-documenting

695.16

code if you clearly write readable code

699.24

and follow good coding practices and

701.76

styles you can pretty much know what's

704.399

going on in a function or in a piece of

707.22

code just based on the code itself

710.399

but it is still helpful to add things

712.74

like javadocs or class documentation

716.16

all right so let's do the next one here

717.899

so I will take this piece here just to

721.68

cut down on code

724.44

so this one here we want to simulate the

728.1

subtraction on a calculator so here

731.399

we're going to subtract

734.1

two numbers

738.779

and we are going to return the float

740.519

result of subtracting

743.899

the left number from

747.3

the right number

750.66

so this should actually instead being

753

just method two should be sub

756.6

tract

758.94

two numbers

760.98

return result

764.519

again

766.019

left number

769.92

right number

772.079

now one additional piece of

774.42

documentation you could add to this

776.279

method is

779.579

if people don't understand uh math which

783.42

there are people out there is if the

786.6

left number

789.12

or I'm sorry if the right number

793.56

is greater

797.339

than

800.04

the

801.54

left number

807.44

we will get

809.76

Okay negative

811.5

or we should get

814.139

we will get we

816.139

should get a negative number

826.519

so this is just a rule

829.92

a subtraction

836.82

all right so float results

839.339

number right

841.079

so we subtract two numbers return

843.36

results so let's do the same thing we

845.88

did before so we'll do float

848.459

results

850.2

equals

851.7

x minus y

855.839

return results

858.3

but wait x minus y doesn't exist it

860.639

needs to be left number

863.339

right number

869.579

all right let's read this so subtract

871.62

two numbers

873

uh we'll receive left number and right

875.639

number our result is going to be the

877.8

subtraction of uh left number minus

880.56

right number

881.519

so simulate the minus on the calculator

883.56

subtract two numbers

885.6

float returns results so subtracting

887.459

left number from right number

893.88

okay

895.44

makes sense so far

897.36

all right so method three

905.579

so we now want to simulate the division

907.94

on a calculator now this is not to be

912.12

confused

916.92

what it did on Java we have a div

921.44

method

923.339

or a div property which is the remainder

930

of a division not the division itself

933

so here we want to divide two numbers

940.68

and there is a division rule

950.279

and our division rule

954.12

we cannot divide by zero

965.88

this will return uh this is bad so this

969.66

returns

971.16

not a number

974.519

all right so our float results of

976.44

dividing

979.079

left number from right number

981.899

so again we should make something a

984.72

little more distinct

987.36

for our naming

989.22

so float

991.019

change this to divide

995.519

two numbers left and right

1014

and we'll return results

1025.88

and let's do method four so now we want

1028.339

to simulate the multiplication

1031.64

foreign

1036.799

and here we're going to multiply

1040.579

two numbers

1046.459

don't need a rule for that

1049.58

and Float result of multiplying

1054.679

left number two right now

1059.9

so we need to change method four to be

1063.08

multiplied two numbers return results

1066.62

foreign

1078.64

X and Y

1081.5

to left and right number

1088.88

and it said divide we will multiply

1093.14

all right so so far so good we

1095.6

understand now that we have a calculator

1097.46

application we're simulating the buttons

1100.76

on a calculator

1102.2

so calculator application is the name of

1104.539

our program

1105.44

we have four methods for adding two

1109.82

numbers dividing two numbers multiplying

1111.98

two numbers and subtracting two numbers

1113.78

and these return results

1120.98

all right

1124.28

last and not least we have our main

1127.94

so this is pretty much just the main app

1130.82

uh

1132.08

Main

1133.4

that's that

1138.08

so this is where what runs our code

1144.02

all right so first things first

1147.32

we need to change

1150.98

or we need to basically tell the

1154.4

end user

1156.14

what parameters this application

1158.78

requires

1160.58

so really we need to make sure that if

1164.84

there are no arguments we need to check

1167.12

for that so main method runs code

1171.32

foreign

1172.78

we actually do need some Java dots so

1176.12

here we have arguments

1182.84

some parameter

1185.78

R and

1189.62

zero

1191.48

is going to be the left

1194.66

number

1200.78

we have argument one and argument two

1203.72

argument one is going to be our

1207.62

calculator

1209.36

button

1211.76

value

1215.96

plus minus

1220.16

divide

1221.66

what

1228.74

our application is going to

1233.48

so our application

1235.94

is going to accept

1239.5

three values

1243.08

simulating

1249.02

two numbers

1251.419

and

1252.86

a

1254.059

math symbol

1257.72

being entered into a calculator

1269.24

for example

1274.7

left number

1276.38

uh

1277.82

right number

1284.36

Etc

1287.9

but for readability let's just do all of

1291.02

it

1295.58

we have left number

1297.5

plus minus

1299.539

slide

1301.039

and multiply

1302.6

so now we know what our main method is

1306.38

supposed to do so we are expecting three

1310.039

values so if we don't get these three

1313.159

values we're going to fail

1315.44

so first thing this program actually

1318.38

needs to do is we need to add an

1321.38

additional condition so we need to say

1323.6

if

1325.88

ours

1330.98

equal args equal null

1337.28

foreign

1346.82

is less than three

1354.2

less than or equal to three no

1360.32

less than three yeah that's right

1365.12

I had my curly braces for readability we

1367.94

can do just about

1371.84

and what we want to see is we want to

1373.88

say our calculator app

1376.28

so in Java this is kind of

1380.38

expected formatting so we can do

1382.94

calculator app

1390.14

we say required

1395.72

or

1401.12

calculator app requires

1404.6

uh

1406.22

left number

1408.98

operation

1411.86

price number

1413.58

[Music]