Beautiful Complexity

Beautiful Complexity

Experienced software developers have been exhorting us for decades to build simple, clear, modular systems and to avoid and reduce complexity at every turn. In software development, and in the English language, we have often ignored this advice and created ambiguous, vague, complex monoliths: The very word 'complexity' is one of them.

In this talk, we'll explore three faces of complexity of interest to programmers: "Big O" complexity, "Tar Pit" complexity, and "NetSci" complexity. In Network Science, I have found inherent, essential complexity that is inspiring, insightful, surprising, ubiquitous...and most importantly for engineers...pragmatic and useful. I'd like to share with you new tools from this emerging discipline that I've been using to describe, understand, and extend elegant, performant software systems and teams.

The presentation is done in a terse Lessig-style: Read the accompanying blog post at for more details.


Bobby Norton

April 17, 2015


  1. 3.
  2. 4.
  3. 5.

    ! Rule 2. Measure. Don't tune for speed until you've

    measured, and even then don't unless one part of the code overwhelms the rest. ! Rule 3. Fancy algorithms are slow when n is small, and n is usually small. Rob Pike - Notes on C Programming
  4. 6.
  5. 7.

    ! 1. Any live cell with fewer than two live

    neighbors dies, as if caused by under-population. 2. Any live cell with two or three live neighbors lives on to the next generation. 3. Any live cell with more than three live neighbors dies, as if by overcrowding. 4. Any dead cell with exactly three live neighbors becomes a live cell, as if by reproduction.
  6. 8.
  7. 9.

    “The stable pattern that results from bunnies has 1744 cells

    and consists of 136 blinkers (including 14 traffic lights), 109 blocks, 65 beehives (including three honey farms), 40 gliders, 18 boats, 18 loaves, seven ships, four tubs, three ponds and two toads.” !
  8. 10.
  9. 11.

    Each of the 10,000 cells in this 100x100 grid can

    be in 2 possible starting states. 2 10,000
  10. 14.
  11. 15.
  12. 17.

    Q Ethan McCallum, Bobby Norton, et al: Bad Data Handbook,

    Chapter 13: Crouching Table, Hidden Network
  13. 18.
  14. 20.
  15. 21.
  16. 23.
  17. 24.
  18. 26.
  19. 27.

    ! Rule 5. Data dominates. If you've chosen the right

    data structures and organized things well, the algorithms will almost always be self-evident. Data structures, not algorithms, are central to programming. Rob Pike - Notes on C Programming
  20. 28.

    نابز یریگدای لاح رد امش ایآ ؟دیتسه یسراف ؟درذگیم امش

    نیرمت زا تدم هچ ؟دیا هتفرگ دای ردقچ نونک ات ار نتشون و ندناوخ ییاناوت امش ایآ ؟دیراد
  21. 29.

    Aya shoma dar hale yad giri-e zabane farsi hastid? !

    Che modat az tamrine shoma migozarad? ! Ta konoon cheghadr yad gerefte ied? ! Aya shoma tavanaie-e khandan va neveshtan ra darid?
  22. 30.

    Are you learning Farsi? ! How long have you been

    practicing? ! How much have you learned so far? ! Are you able to read and write?
  23. 31.
  24. 32.

    The rate at which the rate of change of the

    rate of change is changing…
  25. 33.
  26. 34.

    There is a twofold reason for departing from the usual

    mathematical practice of using single letters for atomic symbols. First, computer programs frequently require hundreds of distinguishable symbols that must be formed from the 47 characters that are printable by the IBM 704 computer. Second, it is convenient to allow English words and phrases to stand for atomic entities for mnemonic reasons. ! John McCarthy, 1960 Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I
  27. 35.

    (define ((L-harmonic m k) local) (let ((q (coordinate local)) (v

    (velocity local))) (- (* 1/2 m (square v)) (* 1/2 k (square q))))) Functional Differential Geometry Gerald Jay Sussman and Jack Wisdom with Will Farr
  28. 36.

    Functional Differential Geometry Gerald Jay Sussman and Jack Wisdom with

    Will Farr The traditional use of Leibnitz’s notation and Newton’s notation is convenient in simple situations, but in more complicated situations it can be a serious handicap to clear reasoning.
  29. 38.

    If you give someone Fortran, he has Fortran. ! If

    you give someone Lisp, he has any language he pleases. ! - Guy L. Steele Jr.
  30. 39.

    user> (source source) ! (defmacro source "Prints the source code

    for the given symbol, if it can find it. This requires that the symbol resolve to a Var defined in a namespace for which the .clj is in the classpath. ! Example: (source filter)" [n] `(println (or (source-fn '~n) (str "Source not found"))))
  31. 41.

    The big idea is “messaging”… ! The key in making

    great and growable systems is much more to design how its modules communicate rather than what their internal properties and behaviors should be. The Japanese have a small word - ma - for "that which is in between" - perhaps the nearest English equivalent is "interstitial". ! Think of the internet - to live, it: ! (a) has to allow many different kinds of ideas and realizations that are beyond any single standard and ! (b) to allow varying degrees of safe interoperability between these ideas. ! - Alan Kay, 1998, Squeak mailing list (
  32. 42.
  33. 43.

    If a problem space is predictable, in theory we can

    find a solution via optimization. ! If a problem space is not predictable, or it changes too fast, very probably optimization will offer obsolete solutions. ! Carlos Gershenson Facing Complexity: Prediction vs. Adaptation
  34. 44.
  35. 45.
  36. 46.
  37. 47.
  38. 48.
  39. 49.
  40. 50.
  41. 51.
  42. 52.
  43. 54.
  44. 55.

    Many real networks, from the cell to the Internet, independent

    of their age, function, and scope, converge to similar architectures. ! It is this universality that allowed researchers from different disciplines to embrace network theory as a common paradigm. Albert-László Barabási Scale-Free Networks: A Decade and Beyond 24 JULY 2009 VOL 325 SCIENCE
  45. 56.

    An essential requirement of these products is that they meet

    the needs of those members of society who will actually use them. ! This concept of fitness for use is universal. It applies to all goods and services, without exception. ! The popular term for fitness for use is Quality, and our basic definition becomes: ! Quality means fitness for use. ! - Joseph Juran
  46. 57.
  47. 58.
  48. 59.
  49. 60.
  50. 61.
  51. 62.
  52. 63.
  53. 64.
  54. 65.

    A distributed system is one in which the failure of

    a computer you didn’t even know existed can render your own computer unusable. ! Leslie Lamport Known for the Byzantine Generals' Problem, vector clocks, and the Paxos algorithm
  55. 66.
  56. 67.
  57. 68.
  58. 69.
  59. 70.
  60. 71.
  61. 72.

    You want to isolate your modules from the complexities of

    the organization as a whole, and design your systems such that each module is responsible (responds to) the needs of just that one business function. The crux of the Single Responsibility Principle. ! This principle is about people. - “Uncle Bob” Martin
  62. 73.

    Maybe enabling and embracing complexity is the essence of computer

    programming: This implies composition from simple parts, clear interfaces, modularity, clarity, self-organization, iteration, and emergence. ! Curb your reductionism.
  63. 74.
  64. 76.

    Image Credits 1: Hurricane Danielle - @Astro_Wheels - Douglas H.

    Wheelock / NASA! 2: Brian Kernighan - Forbes India magazine issue of 18 November, 2011 - !! 3: Bubble sort -! 4:! 6,7:! 8: original work - "Rabbits" -! 10: Game of Life universal Turing machine, by Paul Rendell -! 14: Hubble Ultra Deep Field -! 1122px-NASA-HS201427a-HubbleUltraDeepField2014-20140603.jpg! 15: La Brea Tar Pits -! 16: Sofware Tools -! 17: original work - Bad Data Handbook, O’Reilly 2012 Chapter 13: Crouching Table, Hidden Network! 18: Ruby on Rails -! 33:! 44: Berlin Wall at Brandenburg Gate -! 45:! 46:! 47: AP Photo/Korean Central News Agency -! 48:!/img/httpImage/image.jpg_gen/derivatives/article_635/north-korea.jpg! 49:! 50:! 51: Rube Goldberg -! 52:! 53: Mapping the Structural Core of Human Cerebral Cortex, Hagmann, et al, PLOS Biology! 54: Albert-László Barabási, Scale-Free Networks: A Decade and Beyond, 24 JULY 2009 VOL 325 SCIENCE! 57: Arpanet Logical Map, 1977 -,_march_1977.png! 58: Internet map -! 59,60: 415,808 nodes, 283,317 edges in a Twitter network -! 61: Gource: Openvswitch Repo Visualization (fast) -! 62: CPAN Explorer, screenshot -! 63: CPAN Explorer, screenshot -! 64: Manuel Lima, the Power of Networks, via! 66: Distributed application architecture diagram - original work! 67: RabbitMQ messaging topology - original work! 68: yEd Graph Editor:! 69-71: Obama for America AWS diagram by Miles Ward, via! 74:! ! This presentation may contain copyrighted images the use of which has not always been specifically authorized by the copyright owner.! This material is being used for commentary, criticism, and educational purposes and constitutes a 'fair use' of any such copyrighted material ! as provided for in section 107 of the US Copyright Law.