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

The Language of Programming

The Language of Programming

Humans use language to communicate with one another; humans use programming to communicate with machines (or do they?). In this talk we’ll look at the practice and culture of programming from the perspective of linguistics, the scientific study of the form, meaning, and function of language. We’ll explore what lessons we as programmers can learn from subfields as varied as grammar theory, language acquisition, psycholinguistics and sociolinguistics.

(Presented at Deconstruct 2018, GOTO Chicago 2019)

Anjana Sofia Vakil

May 22, 2018
Tweet

More Decks by Anjana Sofia Vakil

Other Decks in Programming

Transcript

  1. The Language of
    Programming
    @AnjanaVakil

    View Slide

  2. @AnjanaVakil
    what is code?

    View Slide

  3. @AnjanaVakil
    language

    View Slide

  4. @AnjanaVakil
    language
    for machines?

    View Slide

  5. @AnjanaVakil
    language
    for machines?

    View Slide

  6. @AnjanaVakil
    language
    for machines?

    View Slide

  7. @AnjanaVakil
    “a computer language is not just a
    way of getting a computer to
    perform operations…”
    -Structure & Interpretation of Computer Programs

    View Slide

  8. @AnjanaVakil
    “…it is a novel formal medium for
    expressing ideas about
    methodology.”
    -Structure & Interpretation of Computer Programs

    View Slide

  9. @AnjanaVakil
    “Thus, programs must be written
    for people to read, and only
    incidentally for machines to
    execute.”
    -Structure & Interpretation of Computer Programs

    View Slide

  10. @AnjanaVakil
    language
    for machines?
    humans

    View Slide

  11. @AnjanaVakil
    it's all about collaboration

    View Slide

  12. @AnjanaVakil
    language is power

    View Slide

  13. @AnjanaVakil
    language
    with many faces

    View Slide

  14. @AnjanaVakil
    every language matters

    View Slide

  15. @AnjanaVakil
    every language matters
    Gender distinctions in Independent Personal Pronouns

    View Slide

  16. @AnjanaVakil
    deconstructing language

    View Slide

  17. @AnjanaVakil
    deconstructing language

    View Slide

  18. @AnjanaVakil
    deconstructing language
    texts
    words
    syllables
    phrases
    morphemes
    phones
    turns
    sentences
    phonemes
    …etc

    View Slide

  19. @AnjanaVakil
    deconstructing programs
    modules
    expressions
    statements
    types
    lines
    bytes
    functions
    objects
    instructions
    …etc

    View Slide

  20. @AnjanaVakil
    “There are no theory-neutral
    structures in linguistics.”
    -Michael Tomasello, Linguist

    View Slide

  21. @AnjanaVakil
    deconstructing paradigms

    View Slide

  22. @AnjanaVakil
    “Each paradigm supports a set of
    concepts that make it the best for a
    certain kind of problem.”
    -Peter van Roy, Computer Scientist

    View Slide

  23. @AnjanaVakil
    prescriptivism

    View Slide

  24. @AnjanaVakil
    prescriptivism
    “FORTRAN [is an] ‘infantile disorder’”
    “BASIC [coders are] ‘mentally mutilated’”
    “COBOL … cripples the mind”
    “APL is a mistake”
    -Edsger Dijkstra, Curmudgeon

    View Slide

  25. @AnjanaVakil
    prescriptivism
    “FORTRAN [is an] ‘infantile disorder’”
    “BASIC [coders are] ‘mentally mutilated’”
    “COBOL … cripples the mind”
    “APL is a mistake”
    -Edsger Dijkstra, Curmudgeon
    NOPE

    View Slide

  26. @AnjanaVakil
    APL ain't no mistake

    View Slide

  27. @AnjanaVakil
    APL ain't no mistake
    life←{↑1 ⍵∨.∧3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵}

    View Slide

  28. @AnjanaVakil
    APL ain't no mistake
    life←{↑1 ⍵∨.∧3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵}
    Conway's Game of Life in Dyalog APL

    View Slide

  29. @AnjanaVakil
    APL ain't no mistake
    MATLAB®

    View Slide

  30. @AnjanaVakil
    APL ain't no mistake

    View Slide

  31. @AnjanaVakil
    “Languages are cultural artifacts that
    differ radically among different
    cultures, and languages change in
    important ways as the communicative
    needs of their speakers evolve over time.”
    -Michael Tomasello, Linguist

    View Slide

  32. @AnjanaVakil
    language
    in context

    View Slide

  33. @AnjanaVakil
    language

    View Slide

  34. @AnjanaVakil
    gender
    nationality
    power
    family
    status
    oppression
    politics
    religion
    economics
    race
    language

    View Slide

  35. @AnjanaVakil
    gender
    nationality
    power
    family
    status
    oppression
    politics
    --------
    religion
    economics
    ----
    ---
    race
    --------
    -
    -----
    ---- ------
    --
    -
    language

    View Slide

  36. @AnjanaVakil
    gender
    nationality
    power
    family
    status
    oppression
    politics
    --------
    religion
    economics
    ----
    ---
    race
    --------
    -
    -----
    ---- ------
    --
    -
    code

    View Slide

  37. @AnjanaVakil
    words are actions

    View Slide

  38. @AnjanaVakil
    words are actions

    View Slide

  39. @AnjanaVakil
    words are actions
    s/whitelist/safelist
    s/blacklist/blocklist
    s/master/leader
    s/slave/follower

    View Slide

  40. @AnjanaVakil
    “If we're going to teach programming
    around the world, we have to be aware of
    what the cultural biases are.”
    -Ramsey Nasser, Creator of بﻠﻗ

    View Slide

  41. @AnjanaVakil
    teaching in context
    Noor:
    a beginner-friendly
    Arabic programming
    language
    by Ahmed Abdalla
    github.com/SimplyAhmazing/noor

    View Slide

  42. @AnjanaVakil
    language
    to be acquired

    View Slide

  43. @AnjanaVakil
    we learn through context

    View Slide

  44. @AnjanaVakil
    we learn through context
    foo = bar('baz')

    View Slide

  45. @AnjanaVakil
    we learn through context
    result = analyze('data')

    View Slide

  46. @AnjanaVakil
    we learn out loud
    result = analyze('data')

    View Slide

  47. @AnjanaVakil
    result = analyze('data')
    “result equals analyze data” ?
    “set result to analyze of data” ?
    “analyze string data becomes result” ?
    … ?
    we learn out loud

    View Slide

  48. @AnjanaVakil
    “… can we really comprehend and
    communicate source code if we cannot
    vocalise it?”
    - Felienne Hermans, Computer Scientist
    we learn out loud

    View Slide

  49. @AnjanaVakil
    we can't learn alone

    View Slide

  50. @AnjanaVakil
    we can't learn alone
    The
    Recurse
    Center
    recurse.com

    View Slide

  51. @AnjanaVakil
    we can't learn alone
    The
    Recurse
    Center outreachy.org
    recurse.com

    View Slide

  52. @AnjanaVakil
    we can't learn alone
    The
    Recurse
    Center outreachy.org
    recurse.com
    mapbox.com/careers

    View Slide

  53. @AnjanaVakil
    code
    is
    language
    is
    collaboration
    is
    power

    View Slide

  54. @AnjanaVakil
    what will we
    do with it?

    View Slide

  55. @AnjanaVakil
    Thank you!
    GOTO Chicago team
    István "Flaki" Szmozsánszky, Perry Eising, Nicole
    Orchard, Max Rabkin, John Sylak-Glassman &
    everyone else who let me talk their ear off
    The Recurse Center
    Mapbox

    View Slide

  56. @AnjanaVakil
    - H. Abelson, G.J. Sussman, & J. Sussman, Structure and Interpretation of Computer Programs (1996), via
    mitpress.mit.edu/sicp
    - World Atlas of Language Structures, "Gender distinctions in Independent Personal Pronouns", via
    wals.info/feature/44A
    - M. Tomasello, "Language is Not an Instinct", in Cognitive Development 10 (1995)
    - P. van Roy, "Programming Paradigms for Dummies: What Every Programmer Should Know", in New
    Computational Paradigms for Computer Music (2009), via UCL
    - E. Dijkstra, "How do we tell truths that might hurt?" (1975), cited in V. Chandra, Geek Sublime (2014)
    - K.E. Iverson, "Notation as a tool of thought" (awarded 1979), in ACM Turing award lectures (2007), via ACM
    - Conway's Game of Life in Dyalog APL, from "APL (programming language)", Wikipedia
    - K. Thomas tweet (2015) via Twitter, via A. van Kesteren, "Avoid whitelist/blacklist" on Github
    - R. Nasser, "Arabic Programming Language at Eyebeam" (2013) via nas.sr/بﻠﻗ
    - A. Abdalla, "Creating an Arabic Programming Language!", !!Con 2018
    - F. Hermans, "Code Phonology" (2018), via felienne.com/archives/5947
    Image Credits
    - Icons by EmojiOne
    - "The Tower of Babel" painting by Pieter Bruegel the Elder (1563), via Wikimedia
    - "Syntax tree diagram of a sentence from Syntactic Structures (1957) by N. Chomsky" by Gringer, via Wikipedia/Wikimedia
    - Figure from Peter van Roy, "Programming Paradigms for Dummies: What Every Programmer Should Know"
    - Image from "Conway's Game of Life" via Cornell Math Explorers' Club
    - MATLAB logo image via MathWorks, R logo image via The R Foundation
    - Poster for Tron ©1982 Disney, image via IMDb
    References

    View Slide