Who is G
ant?
Who is G
ant?
Published Author
Out of work Co
v
er Model
15+ Y
ears W
eb De
v
T
eaches / Speaks / V
olunteers
Lik
es T
acos
Slide 3
I totally paid for this image.
Slide 4
WHY?
WHY?
eleG
ant R
uby
eleG
ant R
uby
Good
Cheap
Fast
Slide 5
eleG
ant L
ang
uage
eleG
ant L
ang
uage
Rub
y
def
paidMore
amount
proc {
|e|
e.salary > amount }
end
C#
public
Predicate<Employee>
PaidMore
(
int
amount
)
{
return
delegate
(Employee e) {
return
e.Salary > amount;
}
}
Slide 6
snake_c
a
se v
s c
amelC
a
se
snake_c
a
se v
s c
amelC
a
se
Bonita Sharif and Jonathan Maletic from the Department of
Computer Science K
ent State Univ
ersity
T
CP_IP_connection
vs
tcpIpConnection etc.
Slide 7
eleG
ant R
uby
eleG
ant R
uby
Ro
admap
Ro
admap
Basics
Linting
Concepts
Slide 8
B
a
sic
s
B
a
sic
s
Making Code Be
a
utif
ul
Making Code Be
a
utif
ul
Slide 9
Readability
Readability
it's important!!!
Slide 10
Names
def
do_needed_actions_to_item
e
e.write
e.save
end
??????????????????????????
Slide 11
K
eep Methods Small
Slide 12
No Neg
ativity
No Neg
ativity
Y
ou're the narr
ator
. It's y
our job to guide clearly
.
St
ay Positive
St
ay Positive
Slide 13
St
ay Positive
St
ay Positive
Modus P
onens
If A then B
A
therefore B
If I get off of work early then I will go with y
ou.
I got off of work early
.
Therefore I will go with y
ou.
Slide 14
St
ay Positive
St
ay Positive
Modus T
ollens
If A then B
Not B
therefore not A
If a str
anger shows, the dog will bark.
The dog did not bark
Therefore a str
anger did not show
.
-
The Hound of the Bask
ervilles
Slide 15
Slide 16
St
ay Positive
St
ay Positive
Slide 17
St
ay Positive
St
ay Positive
if
!user.is_full?
tacos.deploy
end
unless
@breakfast ==
nil
Takeout.deliver(@breakfast)
end
unless
user.is_full?
tacos.deploy
end
if
@
breakfast
Takeout
.deliver
(
@breakfast
)
end
Takeout
.deliver
(
@breakfast
)
if
@
breakfast
Slide 18
Linting
Linting
Keeping Code Be
a
utif
ul
Keeping Code Be
a
utif
ul
Slide 19
Linting
Linting
with R
ubo
cop
with R
ubo
cop
et al.
Slide 20
Linting
Linting
should be friendly
should be friendly
REMEMBER - It's about people
Slide 21
Git-Hook
s
Git-Hook
s
linting on commit
linting on commit
Mo
ving hooks to the repo:
https:/
/
github.com/icefo
x/
git-hooks
Slide 22
Concept
s
Concept
s
Be
a
uty in A
b
str
action
Be
a
uty in A
b
str
action
Slide 23
R
uby F
an-boy Checklist
R
uby F
an-boy Checklist
OOP
Dynamic
Interpreted
Multi-platform
Garbage Collection
Open Source
Intuitiv
e / Expressiv
e
Community
Maturity
Slide 24
Higher-order Functions
Higher-order Functions
Others are first-order functions
NO
T T
O BE CONFUSED WITH first-class functions