"Code is read many more times than written." - this statement changed my view of Software Engineering. From that point on I made it my personal mission to write the best code I could possibly write.
This talk is about my very favorite coding wisdoms that I picked up on my journey so far. All of these will help you to write better code, be more productive and have more fun. And good code pays it's interest rate every day.
Also if you're a clean code junkie looking for a fix - this talk is for you.
30. # allowed to drink?
if customer.age > 18
say 'Okay'
prepare_drink requested_drink
say 'here you go'
hand_drink_over drink, customer
else
say 'I am sorry you are not legally
allowed rather to drink here'
say "Would you rather have a
#{NON_ALCOHOLIC_DRINKS.sample}?"
end
31. # allowed to drink?
if customer.age > 18
say 'Okay'
prepare_drink requested_drink
say 'here you go'
hand_drink_over drink, customer
else
say 'I am sorry you are not legally
allowed rather to drink here'
say "Would you rather have a
#{NON_ALCOHOLIC_DRINKS.sample}?"
end
37. if customer.age > 18
say 'Okay'
prepare_drink requested_drink
say 'here you go'
hand_drink_over drink, customer
else
say 'I am sorry you are not legally
allowed rather to drink here'
say "Would you rather have a
#{NON_ALCOHOLIC_DRINKS.sample}?"
end
38. if customer.age > 18
say 'Okay'
prepare_drink requested_drink
say 'here you go'
hand_drink_over drink, customer
else
say 'I am sorry you are not legally
allowed rather to drink here'
say "Would you rather have a
#{NON_ALCOHOLIC_DRINKS.sample}?"
end
39. if customer.age > 18
say 'Okay'
prepare_drink requested_drink
say 'here you go'
hand_drink_over drink, customer
else
say 'I am sorry you are not legally
allowed rather to drink here'
say "Would you rather have a
#{NON_ALCOHOLIC_DRINKS.sample}?"
end
40. if customer.age > 18
say 'Okay'
prepare_drink requested_drink
say 'here you go'
hand_drink_over drink, customer
else
say 'I am sorry you are not legally
allowed rather to drink here'
say "Would you rather have a
#{NON_ALCOHOLIC_DRINKS.sample}?"
end
68. „Incoming messages should be tested for
the state they return. Outgoing
command messages should be tested
to ensure they get sent. Outgoing query
messages should not be tested.“
Sandi Metz