Functdesign sl
Upcoming SlideShare
Loading in...5
×
 

Functdesign sl

on

  • 168 views

 

Statistics

Views

Total Views
168
Views on SlideShare
168
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Functdesign sl Functdesign sl Presentation Transcript

  • Using Haskell Type Signatures as a Functional Design Notation Michael Feathers Groupon
  • Using Haskell Type Signatures as a Functional Design Notation (just because) Michael Feathers Groupon
  • a
  • [a]
  • map :: (a -> b) -> [a] -> [b]
  • map :: (a -> b) -> [a] -> [b] map (+2) [1,2,3]
  • region 7 9 “expertsexchange”
  • region 7 9 “expertsexchange”region :: Int -> Int -> String -> String
  • regionFrom7 9 “expertsexchange”regionFrom7 :: Int -> Int -> String -> String
  • Hoping
  • Line Break algorithm
  • String -> String
  • String -> [String] -> [[String]] -> [String] -> String
  • String -> [String] -> [[String]] -> [String] -> StringbreakTextIntoWords
  • String -> [String] -> [[String]] -> [String] -> StringbreakTextIntoWords breakWordsIntoLines
  • String -> [String] -> [[String]] -> [String] -> StringbreakTextIntoWords breakWordsIntoLines joinWordsInBrokenLines
  • String -> [String] -> [[String]] -> [String] -> StringbreakTextIntoWords breakWordsIntoLines joinWordsInBrokenLines joinBrokenLines
  • String -> [String] -> [[String]] -> [String] -> String
  • String -> [String] -> [[String]] -> [String] -> StringString -> [String] -> (Int -> [[String]]) -> [[String]] -> [String] -> String
  • String -> [String] -> [[String]] -> [String] -> StringString -> [String] -> (Int -> [[String]]) -> [[String]] -> [String] -> String
  • String -> [String] -> [[String]] -> [String] -> StringString -> [String] -> (Int -> [[String]]) -> [[String]] -> [String] -> StringAbuse!
  • A Design Device
  • (via Scott Ambler)
  • (via Scott Ambler)
  • String -> [String] -> [[String]] -> [String] -> String words
  • String -> [String] -> [[String]] -> [String] -> String words
  • String -> [String] -> [[String]] -> [String] -> String words brokenLines
  • String -> [String] -> [[String]] -> [String] -> String words brokenLines wordJoinedLines
  • String -> [String] -> [[String]] -> [String] -> String words brokenLines wordJoinedLines joinedLines
  • Favors combinator style
  • Favors combinator style [String] -> Int
  • Favors combinator style [String] -> Int[String] -> [Int] -> [Int] -> [Int] -> Int (repeated types in endomorphic chain)
  • Affordances
  • Separate bins for your head and your notation String -> [String] -> (Int -> [[String]]) -> [[String]] -> [String] -> String
  • Concentrates on Data
  • Concentrates on Data ..in naming
  • Favors combinator styleStaying in the same shape is the easiest way to get from here to there
  • Thank you