Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Talks #68 - Tudor Negrescu - From abstract art ...

Talks #68 - Tudor Negrescu - From abstract art to the art of coding

From abstract art to the art of coding

Talks by Softbinator

June 03, 2015
Tweet

More Decks by Talks by Softbinator

Other Decks in Programming

Transcript

  1. “You like it, that's all, whether it's a landscape or

    abstract. You like it. It hits you. You don't have to read it. The work of art - sculpture or painting - forces your eye.” Clement Greenberg (1909 – 1994)
  2. The art of coding Donald Knuth (1938 - ) Science

    is what we understand well enough to explain to a computer. Art is everything else we do.
  3.  Electronic computing & Internet Age To Coding  Minimalism

    / Conceptual / Contemporary Art To Abstraction The Path …
  4. -- Type annotation (optional) factorial :: (Integral a) => a

    -> a -- Using recursion factorial n | n < 2 = 1 factorial n = n * factorial (n - 1) -- Using recursion, with guards factorial n | n < 2 = 1 | otherwise = n * factorial (n - 1) -- Using recursion but written without pattern matching factorial n = if n > 0 then n * factorial (n-1) else 1 -- Using a list factorial n = product [1..n] -- Using fold (implements product) factorial n = foldl (*) 1 [1..n] -- Point-free style factorial = foldr (*) 1 . enumFromTo 1 The art of coding “Let us change our traditional attitude to the construction of programs: Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to human beings what we want a computer to do.” Vikram Chandra Geek Sublime: The Beauty of Code, the Code of Beauty