19
Wednesday, August 8, 12

SpeakerConf: my findings in trying to use this functional programming business you guys keep talking about

Embed Size (px)

Citation preview

Page 1: SpeakerConf: my findings in trying to use this functional programming business you guys keep talking about

Wednesday, August 8, 12

Page 2: SpeakerConf: my findings in trying to use this functional programming business you guys keep talking about

my findings in trying to use this functional

programming business you guys keep talking about

phil calçado@pcalcado

http://philcalcado.com

#speakerConf München

Wednesday, August 8, 12

Page 3: SpeakerConf: my findings in trying to use this functional programming business you guys keep talking about

are tests good design aid for programming with pure-ish functions?

my question:

Wednesday, August 8, 12

Page 4: SpeakerConf: my findings in trying to use this functional programming business you guys keep talking about

“dafuq? just use [Quick|Scala]Check LOL”

asking the FP community

“reason about your code or do not reason about your code,

there is no try”

Wednesday, August 8, 12

Page 5: SpeakerConf: my findings in trying to use this functional programming business you guys keep talking about

silly example:we have iOS push notifications; let’s introduce android

Wednesday, August 8, 12

Page 6: SpeakerConf: my findings in trying to use this functional programming business you guys keep talking about

written w/o tests

Wednesday, August 8, 12

Page 7: SpeakerConf: my findings in trying to use this functional programming business you guys keep talking about

writing some tests

Wednesday, August 8, 12

Page 8: SpeakerConf: my findings in trying to use this functional programming business you guys keep talking about

making it pass

Wednesday, August 8, 12

Page 9: SpeakerConf: my findings in trying to use this functional programming business you guys keep talking about

introducing android

Wednesday, August 8, 12

Page 10: SpeakerConf: my findings in trying to use this functional programming business you guys keep talking about

“Every function should have:- A single specific purpose- If possible, a generally useful purpose- A meaningful name- A structure that is simple to understand - An interface that is simple yet general enough”

Peter Norvig, Good Lisp Programming Style - http://bit.ly/u6JTPt

Wednesday, August 8, 12

Page 11: SpeakerConf: my findings in trying to use this functional programming business you guys keep talking about

other findings

Wednesday, August 8, 12

Page 12: SpeakerConf: my findings in trying to use this functional programming business you guys keep talking about

functional vs. object impedance happens all the

time

other findings

Wednesday, August 8, 12

Page 13: SpeakerConf: my findings in trying to use this functional programming business you guys keep talking about

Wednesday, August 8, 12

Page 14: SpeakerConf: my findings in trying to use this functional programming business you guys keep talking about

1) give up “functional” stages2) object-functional mapping

layer

stages must interact with ruby libs. options:

Wednesday, August 8, 12

Page 15: SpeakerConf: my findings in trying to use this functional programming business you guys keep talking about

there is something going on between category theory and software engineering*

* you know, the fairly anecdotal body of knowledge we use

other findings

Wednesday, August 8, 12

Page 16: SpeakerConf: my findings in trying to use this functional programming business you guys keep talking about

more types = less typingother findings

Wednesday, August 8, 12

Page 17: SpeakerConf: my findings in trying to use this functional programming business you guys keep talking about

more types = less typingother findings

ORLY? howmuch less?

Wednesday, August 8, 12

Page 18: SpeakerConf: my findings in trying to use this functional programming business you guys keep talking about

how much of testing as design aid can static

typing replace?

next question:

Wednesday, August 8, 12

Page 19: SpeakerConf: my findings in trying to use this functional programming business you guys keep talking about

phil calçado

http://philcalcado.com@pcalcado

www.soundcloud.com

Wednesday, August 8, 12