Published Author
Out of work Cover Model
15+ Years Web Dev
Teaches / Speaks / Volunteers
Likes Tacos
I totally paid for this image.
Good
Cheap
Fast
Ruby
def paidMore amount
proc { |e| e.salary > amount }
end
C#
public Predicate<Employee>
PaidMore(int amount) {
return delegate(Employee e) {
return e.Salary > amount;
}
}
Bonita Sharif and Jonathan Maletic from the Department of Computer Science Kent State University
TCP_IP_connection vs tcpIpConnection etc.
Basics
Linting
Concepts
Readability
Readability
it's important!!!
Names
def do_needed_actions_to_item e
e.write
e.save
end
??????????????????????????
Keep Methods Small
You're the narrator. It's your job to guide clearly.
Modus Ponens
If I get off of work early then I will go with you.
I got off of work early.
Therefore I will go with you.
Modus Tollens
If a stranger shows, the dog will bark.
The dog did not bark
Therefore a stranger did not show.
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
et al.
REMEMBER - It's about people
Moving hooks to the repo:
https://github.com/icefox/git-hooks
Others are first-order functions
NOT TO BE CONFUSED WITH first-class functions
map, collect, select, reject, find, any?, all?, sort
Array.new(5)
=> [nil, nil, nil, nil, nil]
Array.new(5, 100)
=> [100, 100, 100, 100, 100]
Array.new(5, rand(100))
=> [65, 65, 65, 65, 65]
Array.new(5) { rand(100) }
=> [55, 69, 5, 68, 54]
GOOD!
https://github.com/gantman/eleGant
*Applause*