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

Ruby as Science; Ruby as Art; Ruby as Craft

Ruby as Science; Ruby as Art; Ruby as Craft

Programmer. Computer Scientist. Software Engineer. Software Craftsman. Principal Architect. Designer. Developer.

These are the words that we use to describe our profession and ourselves. We are encouraged to study Computer Science, however a large percentage of us are self-taught or have entered programming through related fields. This sits in stark contrast to most other engineering disciplines, and this diversity is possibly our greatest strength.

We are computer programmers, but we are also artists, teachers, mothers, social advocates, athletes, scientists, writers, gardeners, and many more. It’s important for us to take the time to look at problems through many lenses, and form diverse teams that allow us to solve problems from many different angles. There is no ‘one size fits all’ approach to programming – we are all standing on the shoulders of giants.

Programming sits at the intersection of science, art, and craft. I contend that, given introspection on each of these facets, we will all improve. I’ll provide concrete examples of how to apply formal Computer Science techniques to real-world problems. I’ll outline the benefits of treating code as an art form. I’ll explain how problem solving in programming maps directly onto other crafty domains. But most importantly I’ll discuss the importance of taking the time to look at problems from different perspectives. No matter what path you have taken, there is always more to be learned by walking in the footsteps of another.

Davy Stevenson

October 22, 2013
Tweet

More Decks by Davy Stevenson

Other Decks in Technology

Transcript

  1. Ruby as Science Ruby as Art Ruby as Craft Davy

    Stevenson @davystevenson Cascadia Ruby 2013 I’d  like  to  state  upfront  that  there  is  exactly  zero  lines  of  Ruby  code  in  this  presenta9on.   9:30  is  just  too  early  for  that  sort  of  thing.   There  will,  however,  be  math,  so  prepare  yourself!   The  goal  of  this  talk  is  for  everyone  to  walk  away  with  something  new  to  think  about,  whether  you   are  an  accomplished  computer  scien9st,  consider  yourself  an  ar9st,  or  think  of  programming  as   your  craG.
  2. SCIENCE “Science is a way of thinking much more than

    it is a body of knowledge” - Carl Sagan For  those  of  us  who  have  a  degree  indica9ng  that  we  have  formally  studied  the  discipline  of  our   careers,  that  degree  most  likely  says  Computer  Science.   One  of  the  newer  scien9fic  fields,  the  structure  and  interplay  of  the  Computer  Science  department   can  oGen9mes  vary  dras9cally  between  different  colleges  and  universi9es.  
  3. SCIENCE “Research is what I’m doing when I don’t know

    what I’m doing” - Wernher von Braun For  those  of  us  who  have  a  degree  indica9ng  that  we  have  formally  studied  the  discipline  of  our   careers,  that  degree  most  likely  says  Computer  Science.   One  of  the  newer  scien9fic  fields,  the  structure  and  interplay  of  the  Computer  Science  department   can  oGen9mes  vary  dras9cally  between  different  colleges  and  universi9es.  
  4. Source: Mathematics by Tom Brown Computer  Science  was  born  out

     of  mathema9cs,  but  has  a  physical  component  that  formal   mathema9cs  lacks.   The  physical  proper9es  that  create  and  control  the  func9on  of  computers  also  encourage  study   along  other  fields  such  as  Physics  and  Electrical  Engineering.   Some  programs  con9nue  the  tradi9on  from  other  science  fields  of  requiring  lab  classes,  while   others  can  be  mostly  theore9cal.   It  is  en9rely  possible  to  graduate  with  a  Computer  Science  degree  without  having  actually  wriQen   code  that  runs  on  a  computer.   http://www.flickr.com/photos/t_e_brown/8677750589/
  5. Source: Pure Mathematics by Ed Brambley If  students  aren’t  actually

     wri9ng  code  in  CS  classes,  what  exactly  are  they  learning?     One  of  the  fundamental  classes  for  any  computer  science  student  is  the  analysis  and  study  of   algorithms.   Studying  algorithms  abstractly  –  that  is  devoid  of  any  requirement  for  a  par9cular  language  –   encourages  us  to  divorce  the  implementa9on  par9culars  away  from  the  underlying  proper9es  of   the  algorithm.   http://www.flickr.com/photos/edbrambley/4260498576/
  6. Source: Brockhaus and Efron Encyclopedic Dictionary Algorithms  are  analyzed  based

     on  overall  complexity,  also  known  as  Big  O  nota9on.   What  we  are  trying  to  determine  is  how  does  the  algorithm  scale.   Running  an  algorithm  on  a  set  of  10  items  is  almost  always  fast.   How  fast  is  it  given  1000  or  10M  items? http://www.flickr.com/photos/double-m2/4495941077/
  7. Complexity O(n) O(log n) O(n log n) O(n2) O(2n) O(n!)

    Here’s  a  graph  showing  how  algorithm  running  9me  increases  as  the  number  of  elements  increase   for  different  Big  O  complexity  designa9ons. When  analyzing  an  algorithm  for  Big  O  nota9on  we  only  care  about  the  highest  order  factor.  We   ignore  constant  factors  and  lower  order  terms.  
  8. Complexity O(log n) - Logarithmic - Sorted Data O(log  n)

     algorithms  grow  very  slowly  -­‐-­‐  you  can  barely  see  the  slope  of  the  blue  line.  Generally  this   means  the  algorithm  can  assume  sorted  data,  which  is  why  database  indexes,  caching  and   otherwise  pre-­‐sor9ng  out  data  is  so  important.
  9. Complexity O(n) - Linear - Analyze each point O(n)  algorithms

     require  dis9nct  analysis  of  each  data  point.
  10. Complexity O(n log n) - Loglinear - Best Search Algorithms

    O(n  log  n)  complexity  encompasses  most  of  the  best  sor9ng  algorithms,  which  we  know  is   important  to  allow  for  quick  O(log  n)  searching.
  11. Complexity O(n2) - Quadratic - Compare pairs of points O(n^c)

     algorithms,  also  known  as  quadra9c  when  c  is  2,  or  polynomial  otherwise,  are  algorithms   where  we  are  star9ng  to  get  into  the  realm  of  rapid  growth  as  the  number  of  points  in  the  data  set   increase.
  12. Complexity O(2n) - Exponential - Try and avoid O(c^n)  algorithms

     preQy  much  require  either  a  known  small  set  of  data  points,  or  massive   background  tasks.  The  exact  solu9on  to  the  traveling  salesman  problem  is  an  exponen9al   algorithm.
  13. Complexity O(n!) - Factorial - You are gonna have a

    bad time O(n!)  algorithms,  just  say  no. AQemp9ng  to  solve  the  traveling  salesman  problem  using  a  brute-­‐force  search  appoach  is  a   factorial  algorithm. For  more  informa9on  on  space  and  9me  complexi9es  for  many  of  the  common  algorithms  used  in   CS:  hQp://bigocheatsheet.com/
  14. Source: Silver and Gold - Charles Babbage’s Difference Engine by

    odditty An  algorithm  is  a  set  of  instruc9ons  that  will  solve  a  par9cular  problem.   A  problem  might  have  many  algorithms  that  describe  correct  solu9ons,  and  many  more  that  might   provide  ‘good  enough’  solu9ons.   http://www.flickr.com/photos/bubba88xw/3737229915/
  15. Source: jar by hillary.hc.chang A  convex  hull  is  a  mathema9cal

     term  to  describe  the  envelope  of  a  set  of  n  points.   The  easiest  heuris9c  for  envisioning  this  is  to  think  of  wrapping  a  string  around  a  set  of  points.   The  points  that  the  string  touch  are  the  points  on  the  convex  hull.   It  is  true  that  the  ver9ces  crea9ng  the  polygon  represen9ng  the  convex  hull  consists  en9rely  of   points  within  the  set  of  n  points. http://www.flickr.com/photos/hillaryhcchang/6036496849/
  16. Source: Convex Hull by fdecomite Convex  hull  is  a  mathema9cal

     concept  that  has  many  real-­‐world  use  cases,  including  in  computer   graphics  (more  advanced  bounding  box  es9ma9ons  for  quicker  intersec9on  calcula9ons),  paQern   recogni9on  and  image  processing,  and  GIS  to  name  a  few.   Finding  the  convex  hull  allows  for  further  calcula9ons,  such  as  finding  the  centroid  or  center  of   gravity  or  intersec9on  with  another  polygon.   http://www.flickr.com/photos/fdecomite/3928892650/
  17. Source: Plejaden M45 by Carsten Frenzi The  brute-­‐force  algorithm  to

     solving  the  convex  hull  problem  involves  itera9ng  through  each  line   between  each  pair  of  points.  For  even  a  small  dataset  this  is  a  lot  of  lines.  Even  with  only  9  points   there  is  way  too  many  lines  to  even  aQempt  drawing  them  all. The  brute  force  algorithm  takes  advantage  of  the  fact  that  for  any  line  on  the  convex  hull,  all  the   remaining  points  in  the  dataset  will  be  located  only  on  one  side  of  the  bisected  plane.  Once  you   have  the  set  of  all  lines,  you  can  iterate  through  all  the  remaining  points  to  see  if  this  is  the  case.   http://www.flickr.com/photos/cfaobam/5408859056/
  18. Source: Plejaden M45 by Carsten Frenzi The  brute-­‐force  algorithm  to

     solving  the  convex  hull  problem  involves  itera9ng  through  each  line   between  each  pair  of  points.  For  even  a  small  dataset  this  is  a  lot  of  lines.  Even  with  only  9  points   there  is  way  too  many  lines  to  even  aQempt  drawing  them  all. The  brute  force  algorithm  takes  advantage  of  the  fact  that  for  any  line  on  the  convex  hull,  all  the   remaining  points  in  the  dataset  will  be  located  only  on  one  side  of  the  bisected  plane.  Once  you   have  the  set  of  all  lines,  you  can  iterate  through  all  the  remaining  points  to  see  if  this  is  the  case.   http://www.flickr.com/photos/cfaobam/5408859056/
  19. Source: Plejaden M45 by Carsten Frenzi The  brute-­‐force  algorithm  to

     solving  the  convex  hull  problem  involves  itera9ng  through  each  line   between  each  pair  of  points.  For  even  a  small  dataset  this  is  a  lot  of  lines.  Even  with  only  9  points   there  is  way  too  many  lines  to  even  aQempt  drawing  them  all. The  brute  force  algorithm  takes  advantage  of  the  fact  that  for  any  line  on  the  convex  hull,  all  the   remaining  points  in  the  dataset  will  be  located  only  on  one  side  of  the  bisected  plane.  Once  you   have  the  set  of  all  lines,  you  can  iterate  through  all  the  remaining  points  to  see  if  this  is  the  case.   http://www.flickr.com/photos/cfaobam/5408859056/
  20. Source: Plejaden M45 by Carsten Frenzi The  brute-­‐force  algorithm  to

     solving  the  convex  hull  problem  involves  itera9ng  through  each  line   between  each  pair  of  points.  For  even  a  small  dataset  this  is  a  lot  of  lines.  Even  with  only  9  points   there  is  way  too  many  lines  to  even  aQempt  drawing  them  all. The  brute  force  algorithm  takes  advantage  of  the  fact  that  for  any  line  on  the  convex  hull,  all  the   remaining  points  in  the  dataset  will  be  located  only  on  one  side  of  the  bisected  plane.  Once  you   have  the  set  of  all  lines,  you  can  iterate  through  all  the  remaining  points  to  see  if  this  is  the  case.   http://www.flickr.com/photos/cfaobam/5408859056/
  21. Source: Plejaden M45 by Carsten Frenzi The  brute-­‐force  algorithm  to

     solving  the  convex  hull  problem  involves  itera9ng  through  each  line   between  each  pair  of  points.  For  even  a  small  dataset  this  is  a  lot  of  lines.  Even  with  only  9  points   there  is  way  too  many  lines  to  even  aQempt  drawing  them  all. The  brute  force  algorithm  takes  advantage  of  the  fact  that  for  any  line  on  the  convex  hull,  all  the   remaining  points  in  the  dataset  will  be  located  only  on  one  side  of  the  bisected  plane.  Once  you   have  the  set  of  all  lines,  you  can  iterate  through  all  the  remaining  points  to  see  if  this  is  the  case.   http://www.flickr.com/photos/cfaobam/5408859056/
  22. Source: Plejaden M45 by Carsten Frenzi The  brute-­‐force  algorithm  to

     solving  the  convex  hull  problem  involves  itera9ng  through  each  line   between  each  pair  of  points.  For  even  a  small  dataset  this  is  a  lot  of  lines.  Even  with  only  9  points   there  is  way  too  many  lines  to  even  aQempt  drawing  them  all. The  brute  force  algorithm  takes  advantage  of  the  fact  that  for  any  line  on  the  convex  hull,  all  the   remaining  points  in  the  dataset  will  be  located  only  on  one  side  of  the  bisected  plane.  Once  you   have  the  set  of  all  lines,  you  can  iterate  through  all  the  remaining  points  to  see  if  this  is  the  case.   http://www.flickr.com/photos/cfaobam/5408859056/
  23. Source: Plejaden M45 by Carsten Frenzi The  brute-­‐force  algorithm  to

     solving  the  convex  hull  problem  involves  itera9ng  through  each  line   between  each  pair  of  points.  For  even  a  small  dataset  this  is  a  lot  of  lines.  Even  with  only  9  points   there  is  way  too  many  lines  to  even  aQempt  drawing  them  all. The  brute  force  algorithm  takes  advantage  of  the  fact  that  for  any  line  on  the  convex  hull,  all  the   remaining  points  in  the  dataset  will  be  located  only  on  one  side  of  the  bisected  plane.  Once  you   have  the  set  of  all  lines,  you  can  iterate  through  all  the  remaining  points  to  see  if  this  is  the  case.   http://www.flickr.com/photos/cfaobam/5408859056/
  24. Brute Force Algorithm • For each pair of points find

    line between them: O(n2) • For each line, determine if other points are all on one side of the line: O(n) • Total: O(n3) We can do better than that!
  25. Source: Plejaden M45 by Carsten Frenzi Another  rela9vely  simple  algorithm

     that  has  a  huge  performance  boost  over  brute-­‐force  is  called   the  GiG-­‐wrapping  algorithm  or  Jarvis  march.  First  you  need  to  find  a  point  you  know  is  on  the  edge   –  this  can  be  accomplished  by  scanning  through  all  the  points  and  finding  the  leGmost  point.  Next   calculate  the  polar  angles  of  all  remaining  points  with  respect  to  the  edge  point  and  the  ver9cal   line.  Select  the  point  with  minimum  (or  maximum)  polar  angle,  this  point  is  guaranteed  to  be  on   the  hull. Now  that  the  next  point  on  the  hull  is  found,  the  same  process  can  be  repeated,  with  the  new  edge   point  as  the  center  of  the  polar  coordinates  and  the  line  between  it  and  the  previous  point  as  the   reference  line,  un9l  you  are  back  at  the  original  end  point.   http://www.flickr.com/photos/cfaobam/5408859056/
  26. Source: Plejaden M45 by Carsten Frenzi Another  rela9vely  simple  algorithm

     that  has  a  huge  performance  boost  over  brute-­‐force  is  called   the  GiG-­‐wrapping  algorithm  or  Jarvis  march.  First  you  need  to  find  a  point  you  know  is  on  the  edge   –  this  can  be  accomplished  by  scanning  through  all  the  points  and  finding  the  leGmost  point.  Next   calculate  the  polar  angles  of  all  remaining  points  with  respect  to  the  edge  point  and  the  ver9cal   line.  Select  the  point  with  minimum  (or  maximum)  polar  angle,  this  point  is  guaranteed  to  be  on   the  hull. Now  that  the  next  point  on  the  hull  is  found,  the  same  process  can  be  repeated,  with  the  new  edge   point  as  the  center  of  the  polar  coordinates  and  the  line  between  it  and  the  previous  point  as  the   reference  line,  un9l  you  are  back  at  the  original  end  point.   http://www.flickr.com/photos/cfaobam/5408859056/
  27. Source: Plejaden M45 by Carsten Frenzi Another  rela9vely  simple  algorithm

     that  has  a  huge  performance  boost  over  brute-­‐force  is  called   the  GiG-­‐wrapping  algorithm  or  Jarvis  march.  First  you  need  to  find  a  point  you  know  is  on  the  edge   –  this  can  be  accomplished  by  scanning  through  all  the  points  and  finding  the  leGmost  point.  Next   calculate  the  polar  angles  of  all  remaining  points  with  respect  to  the  edge  point  and  the  ver9cal   line.  Select  the  point  with  minimum  (or  maximum)  polar  angle,  this  point  is  guaranteed  to  be  on   the  hull. Now  that  the  next  point  on  the  hull  is  found,  the  same  process  can  be  repeated,  with  the  new  edge   point  as  the  center  of  the  polar  coordinates  and  the  line  between  it  and  the  previous  point  as  the   reference  line,  un9l  you  are  back  at  the  original  end  point.   http://www.flickr.com/photos/cfaobam/5408859056/
  28. Source: Plejaden M45 by Carsten Frenzi Another  rela9vely  simple  algorithm

     that  has  a  huge  performance  boost  over  brute-­‐force  is  called   the  GiG-­‐wrapping  algorithm  or  Jarvis  march.  First  you  need  to  find  a  point  you  know  is  on  the  edge   –  this  can  be  accomplished  by  scanning  through  all  the  points  and  finding  the  leGmost  point.  Next   calculate  the  polar  angles  of  all  remaining  points  with  respect  to  the  edge  point  and  the  ver9cal   line.  Select  the  point  with  minimum  (or  maximum)  polar  angle,  this  point  is  guaranteed  to  be  on   the  hull. Now  that  the  next  point  on  the  hull  is  found,  the  same  process  can  be  repeated,  with  the  new  edge   point  as  the  center  of  the  polar  coordinates  and  the  line  between  it  and  the  previous  point  as  the   reference  line,  un9l  you  are  back  at  the  original  end  point.   http://www.flickr.com/photos/cfaobam/5408859056/
  29. Source: Plejaden M45 by Carsten Frenzi Another  rela9vely  simple  algorithm

     that  has  a  huge  performance  boost  over  brute-­‐force  is  called   the  GiG-­‐wrapping  algorithm  or  Jarvis  march.  First  you  need  to  find  a  point  you  know  is  on  the  edge   –  this  can  be  accomplished  by  scanning  through  all  the  points  and  finding  the  leGmost  point.  Next   calculate  the  polar  angles  of  all  remaining  points  with  respect  to  the  edge  point  and  the  ver9cal   line.  Select  the  point  with  minimum  (or  maximum)  polar  angle,  this  point  is  guaranteed  to  be  on   the  hull. Now  that  the  next  point  on  the  hull  is  found,  the  same  process  can  be  repeated,  with  the  new  edge   point  as  the  center  of  the  polar  coordinates  and  the  line  between  it  and  the  previous  point  as  the   reference  line,  un9l  you  are  back  at  the  original  end  point.   http://www.flickr.com/photos/cfaobam/5408859056/
  30. Source: Plejaden M45 by Carsten Frenzi Another  rela9vely  simple  algorithm

     that  has  a  huge  performance  boost  over  brute-­‐force  is  called   the  GiG-­‐wrapping  algorithm  or  Jarvis  march.  First  you  need  to  find  a  point  you  know  is  on  the  edge   –  this  can  be  accomplished  by  scanning  through  all  the  points  and  finding  the  leGmost  point.  Next   calculate  the  polar  angles  of  all  remaining  points  with  respect  to  the  edge  point  and  the  ver9cal   line.  Select  the  point  with  minimum  (or  maximum)  polar  angle,  this  point  is  guaranteed  to  be  on   the  hull. Now  that  the  next  point  on  the  hull  is  found,  the  same  process  can  be  repeated,  with  the  new  edge   point  as  the  center  of  the  polar  coordinates  and  the  line  between  it  and  the  previous  point  as  the   reference  line,  un9l  you  are  back  at  the  original  end  point.   http://www.flickr.com/photos/cfaobam/5408859056/
  31. Source: Plejaden M45 by Carsten Frenzi Another  rela9vely  simple  algorithm

     that  has  a  huge  performance  boost  over  brute-­‐force  is  called   the  GiG-­‐wrapping  algorithm  or  Jarvis  march.  First  you  need  to  find  a  point  you  know  is  on  the  edge   –  this  can  be  accomplished  by  scanning  through  all  the  points  and  finding  the  leGmost  point.  Next   calculate  the  polar  angles  of  all  remaining  points  with  respect  to  the  edge  point  and  the  ver9cal   line.  Select  the  point  with  minimum  (or  maximum)  polar  angle,  this  point  is  guaranteed  to  be  on   the  hull. Now  that  the  next  point  on  the  hull  is  found,  the  same  process  can  be  repeated,  with  the  new  edge   point  as  the  center  of  the  polar  coordinates  and  the  line  between  it  and  the  previous  point  as  the   reference  line,  un9l  you  are  back  at  the  original  end  point.   http://www.flickr.com/photos/cfaobam/5408859056/
  32. Source: Plejaden M45 by Carsten Frenzi Another  rela9vely  simple  algorithm

     that  has  a  huge  performance  boost  over  brute-­‐force  is  called   the  GiG-­‐wrapping  algorithm  or  Jarvis  march.  First  you  need  to  find  a  point  you  know  is  on  the  edge   –  this  can  be  accomplished  by  scanning  through  all  the  points  and  finding  the  leGmost  point.  Next   calculate  the  polar  angles  of  all  remaining  points  with  respect  to  the  edge  point  and  the  ver9cal   line.  Select  the  point  with  minimum  (or  maximum)  polar  angle,  this  point  is  guaranteed  to  be  on   the  hull. Now  that  the  next  point  on  the  hull  is  found,  the  same  process  can  be  repeated,  with  the  new  edge   point  as  the  center  of  the  polar  coordinates  and  the  line  between  it  and  the  previous  point  as  the   reference  line,  un9l  you  are  back  at  the  original  end  point.   http://www.flickr.com/photos/cfaobam/5408859056/
  33. Source: Plejaden M45 by Carsten Frenzi Another  rela9vely  simple  algorithm

     that  has  a  huge  performance  boost  over  brute-­‐force  is  called   the  GiG-­‐wrapping  algorithm  or  Jarvis  march.  First  you  need  to  find  a  point  you  know  is  on  the  edge   –  this  can  be  accomplished  by  scanning  through  all  the  points  and  finding  the  leGmost  point.  Next   calculate  the  polar  angles  of  all  remaining  points  with  respect  to  the  edge  point  and  the  ver9cal   line.  Select  the  point  with  minimum  (or  maximum)  polar  angle,  this  point  is  guaranteed  to  be  on   the  hull. Now  that  the  next  point  on  the  hull  is  found,  the  same  process  can  be  repeated,  with  the  new  edge   point  as  the  center  of  the  polar  coordinates  and  the  line  between  it  and  the  previous  point  as  the   reference  line,  un9l  you  are  back  at  the  original  end  point.   http://www.flickr.com/photos/cfaobam/5408859056/
  34. Source: Plejaden M45 by Carsten Frenzi Another  rela9vely  simple  algorithm

     that  has  a  huge  performance  boost  over  brute-­‐force  is  called   the  GiG-­‐wrapping  algorithm  or  Jarvis  march.  First  you  need  to  find  a  point  you  know  is  on  the  edge   –  this  can  be  accomplished  by  scanning  through  all  the  points  and  finding  the  leGmost  point.  Next   calculate  the  polar  angles  of  all  remaining  points  with  respect  to  the  edge  point  and  the  ver9cal   line.  Select  the  point  with  minimum  (or  maximum)  polar  angle,  this  point  is  guaranteed  to  be  on   the  hull. Now  that  the  next  point  on  the  hull  is  found,  the  same  process  can  be  repeated,  with  the  new  edge   point  as  the  center  of  the  polar  coordinates  and  the  line  between  it  and  the  previous  point  as  the   reference  line,  un9l  you  are  back  at  the  original  end  point.   http://www.flickr.com/photos/cfaobam/5408859056/
  35. Source: Plejaden M45 by Carsten Frenzi Another  rela9vely  simple  algorithm

     that  has  a  huge  performance  boost  over  brute-­‐force  is  called   the  GiG-­‐wrapping  algorithm  or  Jarvis  march.  First  you  need  to  find  a  point  you  know  is  on  the  edge   –  this  can  be  accomplished  by  scanning  through  all  the  points  and  finding  the  leGmost  point.  Next   calculate  the  polar  angles  of  all  remaining  points  with  respect  to  the  edge  point  and  the  ver9cal   line.  Select  the  point  with  minimum  (or  maximum)  polar  angle,  this  point  is  guaranteed  to  be  on   the  hull. Now  that  the  next  point  on  the  hull  is  found,  the  same  process  can  be  repeated,  with  the  new  edge   point  as  the  center  of  the  polar  coordinates  and  the  line  between  it  and  the  previous  point  as  the   reference  line,  un9l  you  are  back  at  the  original  end  point.   http://www.flickr.com/photos/cfaobam/5408859056/
  36. Gift Wrapping Algorithm • Find one edge: O(n) • Calculate

    polar angles: O(n) • Repeat for each point on the hull: O(nh) • Worst case: O(n2)
  37. Graham Scan & beyond • Graham Scan • O(n log

    n) • Other Algorithms • Multiple O(n log h) Algorithms For  complex  hulls  where  the  number  of  points  on  the  hull  is  expected  to  be  large,  there  is  a  more   advanced  algorithm  called  Graham  Scan  that  runs  in  O(n  log  n).     Addi9onally,  at  least  8  other  algorithms  have  been  discovered  in  the  last  30  years  that  are  O(n  log   h).  
  38. Source: Marc Levin The  most  appropriate  algorithm  for  any  par9cular

     convex  hull  problem  depends  on  the   expecta9ons  of  the  dataset  as  well  as  the  expected  outright  expense  and  maintainability  of  the   algorithm  itself. These  faster  algorithms  may  not  be  worth  their  larger  implementa9on  cost. http://www.flickr.com/photos/mil8/380092713/
  39. Source: Professor John Frink, Jr. vs. Professor Hubert J. Farnsworth

    by JD Hancock The  field  of  computer  science  strives  to  con9nue  finding  more  efficient  algorithms  to  solve   common  problems,  and  also  to  find  ways  to  solve  new  problems  with  exis9ng  algorithms. Whether  or  not  you  consider  yourself  a  scien9st,  the  code  you  write  and  the  tools  you  build  can  be   used  to  further  our  knowledge  of  compu9ng. http://www.flickr.com/photos/jdhancock/5019503918
  40. ART “The aim of art is to represent not the

    outward appearance of things, but their inward significance” - Aristotle It  is  a  common  idiom  within  the  Ruby  community  that  we  love  Ruby  because  of  its  expressiveness   and  beauty.    This  sen9ment  comes  from  our  ar9s9c  selves;  our  programming  language  can  be  seen   as  our  ar9s9c  medium,  and  Ruby  as  a  medium  is  both  flexible,  powerful  and  enjoyable  to  use.
  41. Source: A Storm in the Rocky Mountains by Albert Bierstadt,

    Brooklyn Museum We  talk  about  the  beauty  of  code,  the  way  that  we  might  talk  about  the  beauty  of  a  pain9ng.  The   structure  of  the  different  components,  the  skill  and  ar9stry  of  our  methods,  and  the  impressive   feeling  when  we  step  back  to  watch  all  these  parts  working  together  to  form  a  larger  whole. http://www.brooklynmuseum.org/opencollection/objects/1558/ A_Storm_in_the_Rocky_Mountains_Mt._Rosalie/image/6534/image
  42. Source: interior landscape by ludwig van standard lamp If  Ruby

     is  our  medium,  then  our  specific  syntax  choices,  our  method  structure,  and  our  coding   guidelines  are  our  ar9s9c  style.     There  are  Rubyists  that  subscribe  to  a  minimalis9c  style,   http://www.flickr.com/photos/charlie_harvey/4103346746/
  43. Source: Farewell India by Trey Ratcliff or  prefer  to  decorate

     their  code  with  qualifiers  to  make  inten9ons  explicitly  clear,   Ruby  pushes  object  oriented  style  aggressively,  but  also  allows  for  a  func9onal  approach.  Our  style   becomes  an  iden9fying  trait. http://www.flickr.com/photos/stuckincustoms/2035748576/
  44. Source: World Map - Abstract Acrylic by Nicolas Raymond Unlike

     many  other  ar9s9c  endeavors,  it  is  almost  assured  that  we  will  not  have  the  luxury  of  coding   in  a  vacuum.    Programming  is  by  defini9on  a  social  ac9vity  –  we  write  soGware  on  teams,  and  the   soGware  we  write  depends  heavily  on  an  expansive  network  of  other  projects,  libraries,  tools  and   frameworks.   http://www.flickr.com/photos/80497449@N04/10012162166/
  45. Source: Chalets by Jostedal Glacier, Smithsonian Institution As  ar9sts  we

     must  learn  how  our  ar9s9c  style  helps  or  hinders  the  teams  that  we  are  working  with.   We  create  coding  style  guidelines  for  a  reason  –  it  is  incredibly  difficult  to  create  a  finished  piece   with  a  variety  of  divergent  styles. http://www.flickr.com/photos/smithsonian/4248040720
  46. Source: Subith Premdas Does  this  mean  that  as  a  community

     we  should  coalesce  down  to  a  single  coding  style?    That  would   be  about  as  exci9ng  as  a  museum  with  a  single  pain9ng  repeated  over  and  over.   http://www.flickr.com/photos/pixotica/9133623752/
  47. Source: Kotsuis and Hohhuq - Nakoaktok, Smithsonian Insitution We  are

     benefited  by  the  ability  to  solve  problems  in  many  different  ways,  by  thinking  about  the   issue  from  different  angles,  by  implemen9ng  different  algorithms.   http://www.flickr.com/photos/smithsonian/2839628686/
  48. Source: Whale by Kyle Boganwright We  should  celebrate  the  differences

     that  make  us  unique,  to  encourage  our  community  of  Rubyists   to  be  free  to  try  new  things.  To  solve  new  problems.   http://www.flickr.com/photos/kylebgalleries/4317292826/
  49. Source: North American detail map of Flickr and Twitter locations

    by Eric Fischer We  should  encourage  the  explorer  that  travels  down  unknown  paths.  You  never  know  what  beauty   they  might  bring  back  to  you.   http://www.flickr.com/photos/walkingsf/5912385701/
  50. Source: Erik Unverdruss Do  not  make  the  mistake  in  thinking

     that  something  complex  is  not  also  simple.  Complex  problems   require  complex  solu9ons,  but  each  part  should  be  the  simplest  cog  that  fits  that  role.  
  51. Source: simplicity by Ron McDeez Art  is  about  simplicity.  

    http://www.flickr.com/photos/mcdeez/3050634141/
  52. Source: Erik Unverdruss We  think  of  code  in  the  same

     way.  We  espouse  DRY  code.  We  rejoice  in  the  Single  Responsibility   Principle.  We  package  up  code  into  libraries  or  frameworks.  This  is  simplicity. The  best  code  is  no  code.  The  best  code  is  the  code  that  already  exists.  The  best  code  is  simple  code
  53. CRAFT “A pastime or profession that requires some kind of

    skilled work” Source: Wikipedia To  become  a  master  craGsperson  takes  9me,  prac9ce,  and  skill.  This  was  codified  with  the  idea  of   appren9ce,  journeyman  and  master  designa9ons.   Theore9cally  anyone  with  enough  prac9ce  could  climb  these  ranks.
  54. CRAFT Source: Wikipedia Crafts “demanded a generally higher level of

    education” And held a “more privileged position in societal hierarchy” To  become  a  master  craGsperson  takes  9me,  prac9ce,  and  skill.  This  was  codified  with  the  idea  of   appren9ce,  journeyman  and  master  designa9ons.   Theore9cally  anyone  with  enough  prac9ce  could  climb  these  ranks.
  55. Source: Smithsonian Insitution If  we  are  craGspeople  or  ar9sans,  this

     might  shake  some  previous  assump9ons  surrounding  innate   intelligence  and  capability.  Instead,  we  should  think  of  programming  as  a  set  of  complex  skills  that   take  years  to  master,  but  with  prac9ce  anyone  is  capable. http://www.flickr.com/photos/smithsonian/2548087053/
  56. Source: Smithsonian Insitution I  think  it’s  fikng  that  the  first

     ‘computer’  was  actually  a  loom,  and  it  was  used  to  create  even  more   intricate  fabrics. http://www.flickr.com/photos/smithsonian/2548928970/
  57. Source: Knitting by elitatt I  am  a  kniQer.  I’ve  goQen

     to  the  point  where  I  feel  extremely  capable  with  the  vast  majority  of   knikng  related  skills.  I’ve  enjoyed  mastering  dozens  of  advanced  techniques.   http://www.flickr.com/photos/elitatt/4338075247/
  58. Source: Jenna Hildebrand Even  with  all  this  previous  experience,  when

     I’m  learning  a  new  technique,  I’m  star9ng  over  as  a   beginner  again.  Yes,  my  previous  experience  makes  it  easier  to  understand  the  instruc9ons,  and   my  built-­‐in  muscle  memory  can  oGen9mes  help.   http://www.flickr.com/photos/terracondannata/8046474367/
  59. Source: Jenna Hildebrand But  many  9mes  my  previous  experience  does

     not  map  en9rely  to  the  new  skill.  And  this  is  the   glory,  right?  The  ability  to  con9nue  learning  and  growing  even  in  an  area  where  you  feel  mastery. http://www.flickr.com/photos/terracondannata/5985794267/
  60. Source: pre-electronic binary code by Erik Wilde Knikng  is  just

     knit  s9tches  and  purl  s9tches.  Just  like  programming  is  just  1s  and  0s.  Ok,  great,  just   knikng  and  purling,  but  how  do  I  start?  There  are  how  many  different  methods  to  cast  on  s9tches?     PreQy  soon  you  are  knee  deep  in  technical  jargon.     http://www.flickr.com/photos/dret/6021263096/
  61. Source: Jenna Hildebrand What  do  you  mean,  swap  these  s9tches

     with  those  s9tches  on  the  needle?    How  exactly  am  I   supposed  to  create  a  s9tch  out  of  thin  air?  You  mean  it  creates  those  lacy  holes  too??     http://www.flickr.com/photos/terracondannata/6004612410/
  62. Source: Jenna Hildebrand But  once  you  figure  it  out  you

     can  make  some  preQy  cool  things.  Then  you  learn  about  steeking   and  all  of  a  sudden  it’s  ‘what  do  you  mean  I  have  to  cut  my  knikng!?’.  That’s  sort  of  how  I  felt   when  I  learned  func9onal  programming,  by  the  way. http://www.flickr.com/photos/terracondannata/7898425940/
  63. Source: Obsession by Daniela Vladimirova Ini9ally  all  kniQers  start  out

     only  being  able  to  follow  paQerns  directly  as  wriQen.  Which,  by  the   way  is  another  really  great  thing  that  kniQers  provide,  which  is  instruc9ons  in  mul9ple  formats.   http://www.flickr.com/photos/danielavladimirova/5638484385/
  64. Source: Dr Who Motif Chart by jwordsmith WriQen  instruc9ons  for

     the  verbal  folks,  charts  for  the  visual,  plus  copious  youtube  videos  when   you  are  feeling  par9cularly  dense  and  need  to  watch  someone  show  you  the  mo9ons  17  9mes   straight,  in  slow  mo9on.   http://www.flickr.com/photos/jwordsmith/1448173391/
  65. Source: Folklife Festival Wales Sock Machine by Mr. T in

    DC In  many  ways,  following  these  direc9ons,  these  algorithms,  means  that  you  yourself  are  the   computer  running  the  program  ‘make  sweater’.  As  long  as  you  don’t  deviate  from  course,  at  the   end  you  will  in  fact  have  a  sweater.   http://www.flickr.com/photos/mr_t_in_dc/3699115093/
  66. Source: Shawl by Hedgehog Fibers Eventually,  some  people  feel  the

     need  to  fiddle  underneath  with  how  all  the  moving  parts  work.   Since  you  are  here  at  this  conference,  I  suspect  that  you  might  be  one  of  these  people. http://www.flickr.com/photos/29825916@N05/9359276958/
  67. Source: Sloths love sweaters Jen Oslislo Maybe  your  propor9ons  (or

     the  propor9ons  of  the  lucky  person  you  are  knikng  for)  are  a  bit   different  than  average.  Perhaps  you  have  a  different  cast-­‐on  or  cast-­‐off  method  that  you  prefer.   Maybe  you  want  to  swap  out  the  design  of  some  subcomponent.  Once  you  have  mastered  the   various  algorithms  and  sub-­‐algorithms,  it  becomes  en9cing  to  try  swapping  things  for  beQer   aesthe9cs  or  performance.  Now  you  are  the  algorithm  creator,  not  just  the  computer.
  68. Source: Granny squared by Hedgehog Fibers Even  though  I  am

     a  kniQer,  some9mes  knikng  is  not  the  right  answer  to  the  problem.  I’m  usually   not  a  fan  of  croche9ng,  but  when  crochet  is  the  right  tool  for  the  job,  then  you  can’t  argue  with   that.   http://www.flickr.com/photos/29825916@N05/7991606637/
  69. Source: sea treasures by semiplume If  a  sweater  needs  more

     support  at  the  shoulders  or  collar  –  crochet.  If  I  want  to  alter  a  garment  –   add  a  decora9ve  hem  at  the  end.  Crochet.   http://www.flickr.com/photos/sugarandtrees/3285989650/
  70. Source: Lilypad Embroidery by Becky Stern Or  perhaps  embroidery!  It’s

     my  craG,  I  can  choose  the  best  tool  for  the  job.  And  by  exploring  other   craGs  and  the  benefits  they  provide,  my  end  product  will  almost  always  be  improved. http://www.flickr.com/photos/bekathwia/2425646723/
  71. Source: Yarn bomb with St Paul’s Cathedral in the background

    by Nagarjun Kandukuru CraG  can  be  a  profession,  or  increasingly  in  our  society,  it  can  be  a  hobby.  I  find  it  interes9ng  that   we  programmers  also  have  a  tendency  to  make  our  work  our  hobby.  We  create  silly  things  to  go   alongside  our  serious  endeavors. http://www.flickr.com/photos/nagarjun/6846634617/
  72. Source: Squid Tree Yarn Bomb by LornaWatt We  create  things

     to  bring  happiness  to  others.  I  don’t  think  this  is  a  coincidence.  Gekng  paid  for   our  9me  is  a  nice  perk,  but  at  the  end  of  the  day,  we  write  code  to  enrich  our  own  lives  and  the   lives  of  others. We  create  things  for  the  sa9sfac9on  of  a  task  well  done.  Of  building  something  func9onal,   whimsical,  efficient,  beau9ful. http://www.flickr.com/photos/lornawatt/9734084839/
  73. Source: know it all by Laura Rokas When  I  was

     a  child,  I  was,  perhaps,  a  bit  of  a  know-­‐it-­‐all.  A  voracious  reader,  I  loved  learning  and   remembering  various  facts  across  many  disciples.   http://www.flickr.com/photos/rokaslaura/6821912764/
  74. Source: Duty Calls by XKCD  And  I  was  not  shy

     about  lekng  people  know  when  they  were,  in  fact,  wrong. http://xkcd.com/386/
  75. Source: Erik Unverdruss I  was  that  kid  that  corrected  tour

     guides.  I  loved  being  able  to  show  off  my  knowledge,  and  thought   that  everyone  would  be  impressed  and  as  happy  as  I  was  to  learn  new  things.
  76. Source: Erik Unverdruss There  is  a  difference  between  being  ‘correct’,

     and  being  ‘right’.  It  took  me  many  further  years  of   awkward  social  development  to  realize  that  it  isn’t  simply  a  maQer  of  knowing  the  correct  things   and  remembering  all  the  correct  answers.  
  77. Source: Erik Unverdruss The  daily  interac9on  we  all  have  with

     our  peers,  providing  and  gathering  informa9on,  forming   social  bonds  –  none  of  these  ac9vi9es  rely  on  knowing  the  correct  answer,  and  some9mes  a   relentless  drive  to  find  accuracy  can  actual  hamper  the  forma9on  of  friendships  and  rela9onships.  
  78. Source: Atavistic Algorithms by Steve Jurvetson If  programming  is  Science,

     then  we  should  always  be  looking  to  expand  our  collec9ve  knowledge,   and  we  should  be  excited  when  others  make  discoveries  or  improvements.   http://www.flickr.com/photos/jurvetson/9565941465/
  79. Source: Meteor Storm by Rodney Campbell Diverging  when  solving  a

     problem  is  a  good  thing.  Exploring  mul9ple  paths,  collec9ng  informa9on,   and  returning  back  to  pull  the  best  parts  together  is  what  moves  us  forward. http://www.flickr.com/photos/rodneycampbell/8560574467/
  80. Source: Modern Art in Prague by BrunoDelzant If  programming  is

     Art,  then  we  should  admit  that  there  are  many  right  answers,  and  to  accept  that   others  have  different  ar9s9c  styles.  Even  if  we  don’t  like  them.  They  are  s9ll  right. http://www.flickr.com/photos/bruno_1802/3393281954/
  81. Source: Head of Bodhisattva by Choo Yut Shing Rather  than

     being  divisive,  this  adds  beauty  and  interest  to  our  community.  This  makes  our   community  welcoming  to  anyone,  no  maQer  their  par9cular  style. http://www.flickr.com/photos/25802865@N08/8954911148/
  82. Source: Blacksmith by Niall Kennedy If  programming  is  CraG,  then

     we  should  know  that  the  par9cular  tools  we  choose  are  irrelevant  to   our  existence  as  craGspeople,  yet  in  many  ways  drive  our  thinking  and  final  result.   http://www.flickr.com/photos/niallkennedy/4878523082/
  83. Source: june garden lookback by knitting iris The  way  we

     solve  problems  as  Rubyists  is  different  than  the  way  that  might  be  best  in  Java,  or   Python,  or  C.  Even  differences  between  Rails,  or  Sinatra,  or  Node.  We  can  learn  from  other   languages  and  frameworks.  We  can  take  advantage  of  their  benefits  when  they  are  the  right  tool   for  the  job. http://www.flickr.com/photos/87255087@N00/3674694970/
  84. Source: Nessebar Old Town, Bulgaria by Vicki Burton If  our

     community  con9nues  to  keep  these  things  in  mind  when  wri9ng  code  and  interac9ng  with   others  who  are  wri9ng  code,  everyone’s  experiences  would  be  improved.  All  of  us  are  here  today   because  we  already  have  the  skills  to  wrangle  computers. http://www.flickr.com/photos/vicki_burton/9395901198
  85. Source: Lord Jim Let’s  make  sure  we  are  prac9cing  our

     skills  of  empathy  and  communica9on.  Con9nue  to  help   others  enter  our  community  and  further  their  own  skills.  What’s  almost  as  good  as  finding  out   someone  already  wrote  the  code  that  you  need?  Mentoring  and  encouraging  someone  new  so  that   in  the  future  you  can  use  the  code  that  they  wrote,  that  you  now  need.  Tech  is  not  a  zero  sum   game  –  let’s  build  our  future  together. http://www.flickr.com/photos/lord-jim/9080091827
  86. Source: Cascadia Dreaming 2009 by Gord McKenna Thanks! Ben &

    Kären Erik, Jenna and Jen Esri PDX http://www.flickr.com/photos/gord99/7277617204/