📺 Develpreneur YouTube Episode

Video + transcript

The Value of Clean Code Part 1

2023-01-03 •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]
welcome everyone today we are going to
be talking about writing readable code
so primarily today's discussion is going
to be about
making our code readable you know what
is readable code why do we need it what
are some of the benefits of it and
essentially how do we write it so we're
going to focus primarily on these two
four topics today but we're going to be
covering it from multiple different
angles so primarily we're going to be
looking at what is readable code and how
do we write it
so let's begin with what readable code
is so readable code is simply code that
literally communicates its intent to the
reader so basically it means that when
you pull some code or any type of
software or be it HTML Java C
uh
dot net whatever uh that you look at the
code and you understand what the code is
doing
um you know what is the functionality of
the code
so what are some of the benefits to
using readable code you know why do we
want to focus on readable code well one
it makes it easier for us to understand
what the code is so any developer can
come in open up the code and look at the
code and understand what's going on
uh it's very clean easy to read
it we can understand how the code works
so if the code is written cleanly it's
documented well uh I'll be able like for
instance someone could come behind you
they could easily make a code
modification they could fix a problem
that's been reported by a customer or
they can understand how quickly it is or
where to add a new feature or
functionality to an application
and interestingly enough having readable
code also makes it easier for us to
write testable code like unit testing j
in it PHP whatever because if the code
is written cleanly if we have defined
our functions methods whatever in a
clean way we should be able to identify
how to test them it makes it very easy
for us to work through this
uh some of the other benefits of
uh writing readable code is it also
takes those like software documentations
requirement documentations and we can
then take that piece of uh documentation
and actually put it in the code where it
belongs so we know that this code goes
with this functionality or this
requirement
alternatively if we don't write readable
code it's hard to understand uh it's
very hard to read it's not very
understandable by other developers it's
very hard to understand 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 fix a problem because the
code is unreadable it's unmanageable you
don't know what's going on you don't
know where to begin and you also don't
know where to add new features because
if you don't know what's going on with
the code and you can't read it you're
kind of stuck you don't know what's
going on and then the same thing applies
to testing if the code is unreadable you
don't know where to test you don't know
how to test you don't know where to test
different features in the software
so how do we write readable count well
there's essentially
four
ways you can write readable code but
really I've written five here because it
all begins with documentation you have
to have some clear type of documentation
it's either requirement specification
document uh some type of test plan some
type of uh business requirements you
have to have some documentation around
the software that you're going to be
writing or that you're going to be
updating so documentation is a real key
feature here
however so many companies and so many
organizations skip this step for very
small module pieces of requirements in
smaller tickets they give you smaller
chunks and we don't have that large
document giving us a big overview of how
our software works so documentation is
key the other thing for documentation to
think about is you're actually writing a
message to your future self with this
documentation or a future developer so
documentation is basically going to be
telling the next person or a reminder to
yourself in the future as to what this
code is for what are we trying to do
with this piece of software the other
thing with documentation that is
interestingly enough is if you write
clear concise documentation about how an
application works the different
requirements
this also can become a good marketing
strategy for your sales department to go
out and actually sell the application to
actually explain it to customers when
they're presenting it or doing demos on
the software this is also a good area a
good piece of uh documentation or a good
document to have to basically flush out
a lot of the problems that your
application could potentially have or
bugs or features that were missed in the
initial design process
so that's where we start is with
documentation now this documentation can
then be broken down and moved into the
code in different places but before we
get to that let's talk about the next
step so the next
feature or the next piece that you need
to write readable code is coding
standards
these basically Define how it is that we
are going to write our code what are the
different requirements we need based on
our language based on our environment
based on our architecture that we should
follow so that every time we bring in a
new developer they are going to know how
to write the code what to expect when
they're looking at the code and everyone
is basically following the same template
as they're writing their code if you
don't follow a coding standard basically
anyone that comes into the organization
or anyone that touches your code is
potentially following their own rules
their own guidelines and it can be a hot
mess uh
the code could look very different from
one class to another from one function
to another function uh and really having
standards really structure your code and
makes it clean makes it readable and
everyone can understand what's going on
which kind of leads into the style
guides so style guides are the way you
should organize your code the way you
should name your variables the way you
should name your methods classes uh all
your languages have basic coding
standards and basic style guides these
are going to be ways that you name your
application files like in Java you name
your classes the way you name your
methods or your functions the way you
name your CSS files uh what type of you
know do you use CSS files versus inline
Styles so there's different ways of
coding and different styles for
different languages so creating a style
guide or following a style guide also
helps improve the overall structure of
readable code
foreign now I've added this fourth one
here and this one can kind of be
debatable but another way to help your
code be readable is to implement the
practice of code reviews regardless if
it's a SQL script if it's a Javascript
file uh javafile.net regardless of the
language or what it is any time you
write or make a change to an application
it makes sense to do a code review 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 two this helps flush
out any potential logical problems or
potential bugs that could be introduced
into an application something that maybe
the tester forgot or the developer
forgot to test uh they didn't think
about a particular Edge case uh these
are things that you can look at with or
catch within code reviews
and code reviews are also a good place
to help uh make ensure that you're
following those coding standards and
style guts and then lastly practice this
is not something that can be easily done
overnight it takes a lot of time and a
lot of practice to really get good at
writing readable code
um
typically a lot of students coming out
of college follow basically the examples
and derivatives that they were taught in
school they will have one mindset of
their coding standards or Styles based
on whoever bought them so
say you bring five students into one
organization from different colleges
every single one may have their own
styling technique so in order for
everyone to get on the same page they
need to start learning the coding
standards they need to learn the style
guides and the only way to really learn
this and implement this is to practice
to do it then to follow up with code
reviews and then make sure that the code
reviews that the code meets with the
style guides the coding standards and
backup to the documentation so it's kind
of a top-down approach or bottom-up
approach depending upon the direction
that you're coming at this
so that's it for the slides let's
actually jump out today and walk through
a code example uh it's a real simple
example but it really
drives home what readable code is and
how to make it work
all right so first and foremost I'm
using Java but you can use any language
PHP Java
javascript.net whatever
these principles I'll be talking about
today pretty much apply to any language
uh so it's kind of language agnostic
so what I have here is I have this uh
project example I created called
documentation example now this project
in Java has to start lowercase this is a
standard naming convention in Java
this is a basic Java project with a
basic structure
so the first thing I did was I just
created a class called example one now
in Java this isn't really the best
practice there's some additional
features or some additional coding
standards that you should really
Implement and that's things like
packages where you do com dot the
reverse URL of your site now C sharp
kind of follows the same practices PHP
JavaScript those can be slightly
different as well but really depending
upon the language you're going to have
some actual structure that goes around
your application and that kind of gets
more into the coding Styles and those
foreign
so that gets more into those coding
Styles and those style guides that we
were talking about but I'm not going to
focus so much on that today but I'm
going to walk through some ideas on how
to implement that physically in the code
So today we're going to focus just on
the code itself
so I have this
Java class here called example one
it's in the package document example and
it looks like this we have some
methods looks like we have uh four
methods here we have some main method
which will be where the application in
Java starts we have some code in here
but really it's not clean really just by
looking at this we don't know how this
works so if we actually just come up
here and try to run this
uh we get example uh we get a result of
2.0 well that really doesn't tell us
anything so let me actually just run it
as a straight Java exam application uh
sorry
so let me run it at configuration
so let me just run this as is no
arguments so if we just try to run this
program it fails it says Hey exception
and thread main Java rate index out of
bounds index 0 out of bounds well if you
are not a Java developer you're going to
be like what the hell does this mean you
know what's this exception
if you are a Java developer this should
actually have been handled uh so this is
a bug that potentially we need to fix
so to start with we need to then kind of
reverse engineer this code or walk
through the code and try to understand
what's going on well the first thing we
look at though is the code is gobblegoop
it's a big mess and if you're dealing
with JavaScript there's a lot of times
where you have to minimize your
JavaScript so all your javascript's on
one line so it's very hard to read so
you essentially need to drop your code
into some type of IDE or form formatter
and actually let some tool either apply
a code style for you or you can apply
your own coding format or coding style
as you want since we're using Eclipse we
can kind of cheat and jump into the
default uh parameters for whatever
eclipse is set up with so here if I do
control shift f
or command shift F it's going to
reformat our code with all the correct
tabs all the correct spaces uh the
correct line breaks so that we can
actually read the code so that the code
is now in a cleaner format so
first we look at this this is not real
clean not real readable yes we can kind
of see everything on the screen but we
don't know what's going on it's a hot
mess so we first format it
there we go all right let me save those
changes
so the first thing we did was we
formatted so now we can see okay we have
three methods method one two three and
four we have our static main method for
Java which runs the application and
that's all we have for methods now since
I'm using Eclipse I can also open up the
Explorer here and this gives me a nice
outline view of the program so we see
okay we've got Main and we've got four
methods here that take two parameters
each a float and they return a float
value so if we look at it a little bit
more we see okay method one looks like
we're adding two float values together
returning the sum method two or we
receive two values we're subtracting
okay so we got a minus
don't really know why it's just called
method two method three we're dividing
two float values method four or
multiplying
so that's what those methods are so
right off the bat we can see that okay
this makes no sense I really don't
understand what's going on but I have to
go in to determine what these methods
are doing
foreign
Transcript Segments
11.54

thank you

19.69

[Music]

27.48

welcome everyone today we are going to

30.06

be talking about writing readable code

33.78

so primarily today's discussion is going

36.48

to be about

37.92

making our code readable you know what

40.32

is readable code why do we need it what

43.2

are some of the benefits of it and

45.2

essentially how do we write it so we're

47.64

going to focus primarily on these two

50.46

four topics today but we're going to be

52.559

covering it from multiple different

54.3

angles so primarily we're going to be

56.399

looking at what is readable code and how

59.1

do we write it

61.26

so let's begin with what readable code

63.18

is so readable code is simply code that

67.979

literally communicates its intent to the

70.14

reader so basically it means that when

73.2

you pull some code or any type of

76.76

software or be it HTML Java C

82.38

uh

83.88

dot net whatever uh that you look at the

87.119

code and you understand what the code is

89.22

doing

90.06

um you know what is the functionality of

91.86

the code

94.32

so what are some of the benefits to

96.54

using readable code you know why do we

98.579

want to focus on readable code well one

101.64

it makes it easier for us to understand

104.36

what the code is so any developer can

107.4

come in open up the code and look at the

109.619

code and understand what's going on

111.84

uh it's very clean easy to read

115.32

it we can understand how the code works

118.2

so if the code is written cleanly it's

121.079

documented well uh I'll be able like for

124.259

instance someone could come behind you

125.52

they could easily make a code

127.259

modification they could fix a problem

129.06

that's been reported by a customer or

131.22

they can understand how quickly it is or

133.62

where to add a new feature or

135.78

functionality to an application

138.84

and interestingly enough having readable

141.66

code also makes it easier for us to

144.72

write testable code like unit testing j

147.54

in it PHP whatever because if the code

150.72

is written cleanly if we have defined

152.64

our functions methods whatever in a

154.92

clean way we should be able to identify

157.379

how to test them it makes it very easy

159.84

for us to work through this

161.94

uh some of the other benefits of

164.519

uh writing readable code is it also

168.06

takes those like software documentations

170.22

requirement documentations and we can

172.5

then take that piece of uh documentation

175.92

and actually put it in the code where it

177.959

belongs so we know that this code goes

179.879

with this functionality or this

181.379

requirement

183.48

alternatively if we don't write readable

186.54

code it's hard to understand uh it's

190.2

very hard to read it's not very

192.959

understandable by other developers it's

195.36

very hard to understand how the code

197.04

Works typically when we don't write

200.58

readable code you'll hear developers say

202.92

oh the code's unmaintainable it's

205.26

spaghetti code we don't know what's

206.94

going on those are signs that your code

209.879

is not readable it was not written well

213.379

it's also very hard to make code

215.819

modifications fix a problem because the

218.159

code is unreadable it's unmanageable you

220.319

don't know what's going on you don't

221.7

know where to begin and you also don't

223.86

know where to add new features because

225.12

if you don't know what's going on with

226.5

the code and you can't read it you're

228.54

kind of stuck you don't know what's

230.04

going on and then the same thing applies

232.26

to testing if the code is unreadable you

235.379

don't know where to test you don't know

236.879

how to test you don't know where to test

238.799

different features in the software

242.299

so how do we write readable count well

246.239

there's essentially

248.28

four

250.379

ways you can write readable code but

253.14

really I've written five here because it

255.84

all begins with documentation you have

258.239

to have some clear type of documentation

261.239

it's either requirement specification

262.919

document uh some type of test plan some

266.16

type of uh business requirements you

269.28

have to have some documentation around

271.259

the software that you're going to be

273.54

writing or that you're going to be

275.759

updating so documentation is a real key

279.36

feature here

281.4

however so many companies and so many

284.4

organizations skip this step for very

287.759

small module pieces of requirements in

292.259

smaller tickets they give you smaller

293.94

chunks and we don't have that large

295.979

document giving us a big overview of how

298.86

our software works so documentation is

301.919

key the other thing for documentation to

304.86

think about is you're actually writing a

308.22

message to your future self with this

311.28

documentation or a future developer so

313.62

documentation is basically going to be

315.72

telling the next person or a reminder to

319.44

yourself in the future as to what this

321.6

code is for what are we trying to do

323.58

with this piece of software the other

325.919

thing with documentation that is

327.66

interestingly enough is if you write

330.6

clear concise documentation about how an

333.12

application works the different

334.5

requirements

336.06

this also can become a good marketing

339.06

strategy for your sales department to go

341.34

out and actually sell the application to

343.44

actually explain it to customers when

345

they're presenting it or doing demos on

347.28

the software this is also a good area a

350.52

good piece of uh documentation or a good

353.58

document to have to basically flush out

357

a lot of the problems that your

358.5

application could potentially have or

360.539

bugs or features that were missed in the

362.58

initial design process

364.8

so that's where we start is with

366.66

documentation now this documentation can

369.18

then be broken down and moved into the

371.639

code in different places but before we

374.82

get to that let's talk about the next

377.22

step so the next

379.259

feature or the next piece that you need

381.6

to write readable code is coding

384.36

standards

386.039

these basically Define how it is that we

389.34

are going to write our code what are the

391.74

different requirements we need based on

393.6

our language based on our environment

395.819

based on our architecture that we should

399.12

follow so that every time we bring in a

402.479

new developer they are going to know how

404.94

to write the code what to expect when

407.1

they're looking at the code and everyone

409.08

is basically following the same template

411.3

as they're writing their code if you

413.759

don't follow a coding standard basically

416.039

anyone that comes into the organization

417.96

or anyone that touches your code is

420.539

potentially following their own rules

422.699

their own guidelines and it can be a hot

425.759

mess uh

428.28

the code could look very different from

430.56

one class to another from one function

433.319

to another function uh and really having

436.139

standards really structure your code and

438.84

makes it clean makes it readable and

441.72

everyone can understand what's going on

444.78

which kind of leads into the style

446.819

guides so style guides are the way you

451.5

should organize your code the way you

453.479

should name your variables the way you

455.4

should name your methods classes uh all

458.52

your languages have basic coding

461.58

standards and basic style guides these

464.22

are going to be ways that you name your

466.4

application files like in Java you name

469.44

your classes the way you name your

471.72

methods or your functions the way you

474.599

name your CSS files uh what type of you

478.919

know do you use CSS files versus inline

481.259

Styles so there's different ways of

484.02

coding and different styles for

485.88

different languages so creating a style

488.22

guide or following a style guide also

491.16

helps improve the overall structure of

493.8

readable code

495.599

foreign now I've added this fourth one

498.66

here and this one can kind of be

501.24

debatable but another way to help your

503.639

code be readable is to implement the

506.4

practice of code reviews regardless if

509.759

it's a SQL script if it's a Javascript

512.76

file uh javafile.net regardless of the

516.899

language or what it is any time you

520.56

write or make a change to an application

522.719

it makes sense to do a code review code

526.5

reviews help in a couple of different

528.24

ways one it helps maintain readability

530.82

because if someone else reviews it and

533.94

they can't understand it or they can't

535.68

read it or they can't follow it then it

538.38

probably needs to go back and be

539.82

refactored and cleaned up so that it can

542.519

be understandable two this helps flush

545.64

out any potential logical problems or

548.459

potential bugs that could be introduced

551.279

into an application something that maybe

553.26

the tester forgot or the developer

555.54

forgot to test uh they didn't think

557.82

about a particular Edge case uh these

560.58

are things that you can look at with or

562.38

catch within code reviews

564.899

and code reviews are also a good place

567.72

to help uh make ensure that you're

570.06

following those coding standards and

571.74

style guts and then lastly practice this

575.94

is not something that can be easily done

577.98

overnight it takes a lot of time and a

581.82

lot of practice to really get good at

584.82

writing readable code

587.1

um

588.42

typically a lot of students coming out

590.58

of college follow basically the examples

593.58

and derivatives that they were taught in

595.8

school they will have one mindset of

598.44

their coding standards or Styles based

600.839

on whoever bought them so

603.839

say you bring five students into one

606.42

organization from different colleges

608.04

every single one may have their own

610.38

styling technique so in order for

612.54

everyone to get on the same page they

614.82

need to start learning the coding

616.56

standards they need to learn the style

618

guides and the only way to really learn

620.7

this and implement this is to practice

623.279

to do it then to follow up with code

626.279

reviews and then make sure that the code

628.019

reviews that the code meets with the

630.12

style guides the coding standards and

632.64

backup to the documentation so it's kind

634.74

of a top-down approach or bottom-up

637.92

approach depending upon the direction

639.54

that you're coming at this

642.62

so that's it for the slides let's

645.24

actually jump out today and walk through

647.579

a code example uh it's a real simple

649.98

example but it really

651.899

drives home what readable code is and

655.44

how to make it work

669.839

all right so first and foremost I'm

673.019

using Java but you can use any language

675

PHP Java

677.24

javascript.net whatever

679.88

these principles I'll be talking about

682.32

today pretty much apply to any language

686.22

uh so it's kind of language agnostic

689.82

so what I have here is I have this uh

693.72

project example I created called

696.24

documentation example now this project

699.24

in Java has to start lowercase this is a

702.899

standard naming convention in Java

706.8

this is a basic Java project with a

710.04

basic structure

711.66

so the first thing I did was I just

713.459

created a class called example one now

717.72

in Java this isn't really the best

720.54

practice there's some additional

722.3

features or some additional coding

725.579

standards that you should really

727.56

Implement and that's things like

729.3

packages where you do com dot the

733.2

reverse URL of your site now C sharp

736.8

kind of follows the same practices PHP

739.32

JavaScript those can be slightly

741.42

different as well but really depending

743.94

upon the language you're going to have

745.92

some actual structure that goes around

748.44

your application and that kind of gets

750.36

more into the coding Styles and those

753.54

foreign

756.18

so that gets more into those coding

758.16

Styles and those style guides that we

760.079

were talking about but I'm not going to

761.88

focus so much on that today but I'm

763.98

going to walk through some ideas on how

766.2

to implement that physically in the code

768.18

So today we're going to focus just on

770.76

the code itself

772.8

so I have this

774.3

Java class here called example one

777.24

it's in the package document example and

780.839

it looks like this we have some

784.1

methods looks like we have uh four

787.56

methods here we have some main method

789.72

which will be where the application in

792.36

Java starts we have some code in here

795.72

but really it's not clean really just by

798.48

looking at this we don't know how this

800.579

works so if we actually just come up

802.68

here and try to run this

806.279

uh we get example uh we get a result of

809.579

2.0 well that really doesn't tell us

811.5

anything so let me actually just run it

814.019

as a straight Java exam application uh

817.38

sorry

818.279

so let me run it at configuration

823.8

so let me just run this as is no

826.32

arguments so if we just try to run this

829.26

program it fails it says Hey exception

832.079

and thread main Java rate index out of

834.54

bounds index 0 out of bounds well if you

837.6

are not a Java developer you're going to

839.76

be like what the hell does this mean you

841.5

know what's this exception

843.42

if you are a Java developer this should

847.56

actually have been handled uh so this is

850.38

a bug that potentially we need to fix

853.2

so to start with we need to then kind of

857.04

reverse engineer this code or walk

859.74

through the code and try to understand

860.94

what's going on well the first thing we

863.639

look at though is the code is gobblegoop

866.04

it's a big mess and if you're dealing

868.079

with JavaScript there's a lot of times

870.66

where you have to minimize your

872.04

JavaScript so all your javascript's on

873.899

one line so it's very hard to read so

877.139

you essentially need to drop your code

879.06

into some type of IDE or form formatter

881.88

and actually let some tool either apply

886.139

a code style for you or you can apply

889.019

your own coding format or coding style

891.959

as you want since we're using Eclipse we

895.56

can kind of cheat and jump into the

897.839

default uh parameters for whatever

900.18

eclipse is set up with so here if I do

902.88

control shift f

905.1

or command shift F it's going to

907.92

reformat our code with all the correct

911.04

tabs all the correct spaces uh the

914.16

correct line breaks so that we can

916.139

actually read the code so that the code

917.88

is now in a cleaner format so

921.54

first we look at this this is not real

924.36

clean not real readable yes we can kind

926.76

of see everything on the screen but we

928.44

don't know what's going on it's a hot

930.54

mess so we first format it

940.019

there we go all right let me save those

942.18

changes

943.26

so the first thing we did was we

944.88

formatted so now we can see okay we have

947.459

three methods method one two three and

950.339

four we have our static main method for

952.98

Java which runs the application and

955.68

that's all we have for methods now since

957.839

I'm using Eclipse I can also open up the

960.36

Explorer here and this gives me a nice

962.76

outline view of the program so we see

966.18

okay we've got Main and we've got four

968.279

methods here that take two parameters

970.98

each a float and they return a float

973.74

value so if we look at it a little bit

976.68

more we see okay method one looks like

978.899

we're adding two float values together

981.54

returning the sum method two or we

985.68

receive two values we're subtracting

987.66

okay so we got a minus

989.82

don't really know why it's just called

991.5

method two method three we're dividing

993.779

two float values method four or

995.94

multiplying

997.139

so that's what those methods are so

999.24

right off the bat we can see that okay

1002.18

this makes no sense I really don't

1003.98

understand what's going on but I have to

1005.66

go in to determine what these methods

1008.36

are doing

1021.8

foreign