Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Bridging Ousterhout's Dichotomy

2,509 views

Published on

By Andy Grover. This talk discusses the diversity and dichotomy of languages, and why a programmer who works in either a high- or low-level language would benefit from learning another language.

Published in: Technology
  • Be the first to comment

Bridging Ousterhout's Dichotomy

  1. 1. Bridging Ousterhout's Dichotomy to hone your prog-fu Andy Grover [email_address] [email_address]
  2. 2. John Ousterhout <ul><li>“OH-stir-howt”
  3. 3. Creator of Tcl/Tk
  4. 4. Wrote “Scripting: Higher Level Programming for the 21st Century” </li></ul>
  5. 5. The Dichotomy Two kingdoms of languages: <ul><li>System Languages
  6. 6. Compiled into machine code
  7. 7. Statically typed
  8. 8. Complex data structures & algorithms </li></ul><ul><li>Glue/Scripting Languages
  9. 9. Interpreted
  10. 10. Dynamically typed
  11. 11. No complex structures
  12. 12. Runtimes, VM, byte-compiled </li></ul>
  13. 13. I say: Learn One of Each <ul><li>C and Python </li><ul><li>Or Ruby, Ocaml, Haskell, Lisp </li></ul><li>Not C++ </li><ul><li>Are you crazy?
  14. 14. Java if you must </li></ul><li>Use Python instead of shell scripting </li></ul>
  15. 15. &quot;I am a big proponent of temporarily changing programming scope every once in a while to reset some assumptions and habits.&quot; – John Carmack
  16. 16. The World of C <ul><li>As close as non-masochists get to the “bare metal”
  17. 17. Everything Unix (esp. old stuff) seems to be written in it
  18. 18. The Linux Kernel
  19. 19. Performance*
  20. 20. Anything that needs to be smallish
  21. 21. “Getting” pointers – a big deal?
  22. 22. Edit, compile, run, crash, repeat inspires ...attention to detail </li><ul><li>Like a hand on stove inspires respect for fire </li></ul></ul>
  23. 23. “Code Weight” Weight = running time * size * installed base
  24. 24. C is not for everything Greenspun's 10th Rule: Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.
  25. 25. The World of Python <ul><li>High-level – dicts and lists, exception handling
  26. 26. Easy, Fun libraries to do everything </li><ul><li>Installed modules in src form, just a vi away
  27. 27. Cheeseshop, RubyGems, CPAN </li></ul><li>REPL great for learning
  28. 28. Documentation and introspection
  29. 29. Easy text handling & web programming
  30. 30. Don't Repeat Yourself (DRY) </li></ul>
  31. 31. The World of Python <ul><li>Why is my python process taking 140MB? </li><ul><li>I have no idea
  32. 32. Memory is cheap, no worries! </li></ul><li>Can I use threads to leverage my many-core CPU? </li><ul><li>It will go slower. </li></ul><li>I wrote a webapp 6 months ago and now it is obsolete </li><ul><li>That was 2 major releases ago
  33. 33. You forgot your TDD unit tests, pal </li></ul></ul>
  34. 34. Comparing C and Python <ul><li>They both are awesome and they both are terrible
  35. 35. In a complimentary way
  36. 36. Knowing when to use one or the other should be pretty obvious </li></ul>
  37. 37. Benefits of knowing both <ul><li>Each language learned makes learning an additional language easier </li><ul><li>Unless it's Haskell? </li></ul><li>Or, look at code in a new language and get the gist straight-off
  38. 38. Perspective </li><ul><li>HL informs LL design patterns
  39. 39. LL understanding aids working around HLL's leaky abstractions </li></ul></ul>
  40. 40. Code Co-operation <ul><li>ctypes – trivial to call C libs from Python </li><ul><li>also, SWIG </li></ul><li>More developers using HLL/dynamic langs
  41. 41. Language Bindings are key </li><ul><li>e.g. DBus in C, most/all clients use via bindings
  42. 42. Git </li><ul><li>Could really use a libgit to enable embedded use
  43. 43. Existing wrappers exec cmdline, blech! </li></ul></ul></ul>
  44. 44. Community Co-operation <ul><li>Practice Noosphere Cultural Exchange
  45. 45. Interact with people from distant cultures </li></ul>
  46. 46. Thanks!

×