Specs2

1,552 views

Published on

The slides for the fp-syd presentation: http://www.youtube.com/watch?v=lMyNRUuEvNU.

Sorry for the bad fonts which have been converted by SlideShare on upload.

Published in: Technology, Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,552
On SlideShare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
9
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Specs2

  1. 1. 2<br />specs<br />Go functional!<br />
  2. 2. Shame<br />
  3. 3. Mutability<br />
  4. 4. Concurrency<br />
  5. 5. Acceptance<br />
  6. 6. Why<br />The idea<br />User<br />Program<br />Design<br />
  7. 7. Go Functional!<br />But what is it?!<br />
  8. 8. Referential transparency<br /> Immutability<br />
  9. 9. Processing data structures<br />FP<br />OO<br />pipelined<br />emergent<br />behavior<br />behavior<br />
  10. 10. Why<br />The idea<br />User<br />Program<br />Design<br />
  11. 11. Starting point<br />
  12. 12. Nesting<br />Precedence:<br />+<br />!<br />^<br />
  13. 13. Formatting<br />Text<br />Example<br />Text<br />Example<br />Example<br />
  14. 14. Formatting<br />p<br />br<br />end<br />t, t(i)<br />bt, bt(i)<br />acceptance<br />
  15. 15. Context<br />
  16. 16. doBefore<br />withDb.apply(e2)<br />
  17. 17. Why<br />The idea<br />User<br />Program<br />Design<br />
  18. 18. Run<br />sequence<br />to text<br />levels<br />to html<br />arguments<br />select<br />statistics<br />execute<br />
  19. 19. Laziness vs evaluation<br />
  20. 20. Iterating<br />
  21. 21. Traverse<br />the mapping<br />A data<br />structure to traverse<br />the accumulation<br />
  22. 22. Applicative magic?<br />simple<br />Lots of instances:<br /><ul><li> State
  23. 23. List
  24. 24. Monad
  25. 25. Monoid</li></ul>Type inference <br />is hard,<br />Let’s go shopping!<br />composable<br />
  26. 26. Reducer<br />aggregation<br />mapping<br />specs2 reducers:<br /><ul><li> Levels
  27. 27. Statistics
  28. 28. Arguments
  29. 29. Text
  30. 30. Html</li></ul>“parallel” composition<br />
  31. 31. Why<br />The idea<br />User<br />Program<br />Design<br />
  32. 32. Trees<br />Suite<br />Description<br />Text<br />Test <br />Description 1<br />Test <br />Description 2<br />Example 1<br />Example 2<br />Suite<br />Description<br />fChildren = TD1, TD2<br />
  33. 33. TreeLoc<br />
  34. 34. TreeLoc<br /><body><br /><h1>Title 1</h1><br /><h2>part 1</h2><br /><h2>part 2</h2><br /><h1/><br /></body><br /><h2/><br /><h2/><br />Anti-XML<br />The non-violent solution<br />
  35. 35. Concurrency<br />=> Promise[Seq[ExecutedFragment]]<br />a concurrent<br /> task<br />
  36. 36. Exceptions<br />
  37. 37. Exceptions<br />
  38. 38. Exceptions<br />
  39. 39. Mocks<br /><h1/><br />
  40. 40. Mutability<br />Back for good<br />Nothing here!<br />Throws exception<br />
  41. 41. Configuration<br />Part of the flow<br />nested ‘record’<br />named parameters + defaults<br />
  42. 42. Configuration<br />Implicits<br />default <br />value<br />implicit <br />arguments<br />
  43. 43. Conclusion<br /><ul><li> Reliability
  44. 44. Concurrency
  45. 45. Composition
  46. 46. Less mocks
  47. 47. val/vars
  48. 48. DSL
  49. 49. Type inference
  50. 50. Learning curve</li>

×