Crowdsourcing a topic (part 1)

My topic at XP2016 will be about what XP can learn from functional programming (FP) and vice-versa. I hope to have some discussion before the conference, so that the discussion at the conference is productive.

First question is: why should I think that a style of teamwork would have anything much to do with a class of programming languages? Why wouldn’t it be that you could do all of XP with no reference to whether the code was being written in Smalltalk, Java, Ruby, Haskell, Clojure, or Elixir?

One reason is that history matters. As Jerry Weinberg has said, “things are the way they are because they got that way.” This note sketches what I know of relevant history. I expect to be corrected by readers.


 

My potted history of XP goes something like this: It started with Smalltalk, which introduced a particular set of people to a language+environment that was highly manipulable: that encouraged the “molding” or “growth” of programs. For reasons including coincidence, Smalltalk led to the patterns movement, which had some interesting characteristics:

  • Reasoning tended toward the metaphorical rather than the mathematical. (Lots of talk about “resolving forces” and “generative patterns”.)
  • Alexander’s A Pattern Language was an explicitly rhetorical work, one whose goal was partly to persuade you that the pattern being described was something you already “had” but hadn’t thought about explicitly. Patterns were written with a particular – though loose – structure that, importantly, wasn’t slavishly followed.
  • Patterns were anti-innovative in the sense that pattern writers were supposed to be collecting solutions that were “in the air” among the experts. They were about making certain tacit knowledge more explicit. As such, the patterns movement was ill-fitted for academia.

Smalltalk also inspired a particular exodus of the Knights of the Square Bracket. Smalltalk seemed to transition rather quickly from something supported by research labs like Xerox PARC and Tektronix Labs to a language that was used in particular odd and unfashionable niches such as insurance companies, tractor manufacturers, and the like. In such cases, you’d expect the researchers to shrug and move onto the next hot thing. Instead, a core set of people moved with their language into environments where technologies (like SQL!) were ugly, and the business logic was… not at all logical. Not even close. Unbearably messy.

XP, I claim, was in part an attempt by a particular set of ambitious, thoughtful, and inventive people to come to grips with a new and forbidding environment, bringing to bear attitudes and habits developed via Smalltalk and patterns.


 

Meanwhile, over in the land of Functional Programming…

Here’s where I make a disclaimer. I was peripherally involved with the Smalltalk -> Patterns -> XP world, mostly as a result of being attached to Ralph Johnson’s patterns reading group. Over at my day job, I was for a time even more peripherally attached to the Lisp world because I was involved in writing a virtual machine for Common Lisp during the AI Boom of the early 1980’s.

Although Lisp and functional programming are lumped together today, and were even in the 1980’s (with a series of conferences on Lisp and Functional Programming), they didn’t really seem so to me. Lisp looked upward to a messy domain (intelligence, artificial or not) and system-building, whereas functional languages looked to the clarity of mathematics for inspiration. The sentence “Functional languages are easier to reason about” was common even back then, and it was even more clear than now that “reason about” entailed “prove theorems about”.

After the AI Boom turned into the AI Winter, Lisp (together with its fancy and expensive personal workstations) fell greatly out of favor. It (in the form of Scheme) was used in teaching, but production uses were limited to die-hards in niches (much like Smalltalk).

Meanwhile, the functional languages chugged along in academia. Because of their mathematical slant and emphasis on innovative applications of core ideas, they could encyst themselves there until a favorable environment allowed a sudden epidemic breakout. It’s perhaps early to say, but we may be in the midst of a global pandemic. I hope so, because – for an awful lot of problems, especially today’s problems – FP programs really are easier to reason about, and not just in the “prove properties of” sense.

When I refer to “functional languages” in this series of posts, I’ll be referring to ones from the academic tradition. I believe that even Clojure, which uses Lisp syntax, is more akin – in style and features and, perhaps, community – to them than it is to the Lisp tradition that culminated in Common Lisp. That’s unfortunate for my talk, in that I don’t have the experience in Haskell or F# programming that I should.


The missing piece in my story is Erlang. Its adoption was long hampered by an obscure syntax. Elixir, which puts a Ruby-like syntax on top of the Erlang virtual machine, is now a valid choice for  early adopters, especially those writing applications like those for which Ruby on Rails is usually used. Unfortunately, I know little about Erlang’s history and have only a very novice understanding of its style and idioms (and that only through Elixir).


So, historians: what have I gotten all wrong?

 

Advertisements
Posted in Uncategorized
2 comments on “Crowdsourcing a topic (part 1)
  1. As someone who was involved with Smalltalk from the beginning at Tektronix, I have a perspective I’d like to share. Smalltalk was initially made practical by the folks at Tek Labs, for sure, but they were not classic researchers. All of Tek Labs was applied research, aimed at directly improving our products.

    I joined the Smalltalk effort when it was becoming a product. As a marketing strategy, Smalltalk at Tektronix was bundled along with List and Prolog on our AI workstation. AI was one way we could get a unique product out to the marketplace. The real attraction for Smalltalk at Tektronix was as a graphical programming environment. Tek and their customers had a strong background in graphics. The visual programming capabilities of Smalltalk liibraries was extremely attractive to us (not just the programming language). The debugging/development environment was amazing. No more printfs!. The XP practics of small design/implementation cycles with testing was definitely how most programmed in Smalltalk. XP captured that practice. Patterns imo were not such a big deal at Tek or with Smalltalkers. But there is more of a legacy of Smalltalk that is worth mentioning. The first refactoring tools were written for Smalltalk and the IDE was a big aid to programmers.

    We deployed the first embedded Smalltalk in our oscilloscopes and wrote a world class analog circuit designers’ workbench in Smalltalk for internal use. Our customers ranged from government agencies to gas and oil companies to ndustrial control sw as well as the insurance and manufacturing companies you mention. Not exactly niche markets imo so much as early adopters and innovators. When I left Tek to work at Instantiations, and later Digitalk and ParcPlace-Digitalk, we were actively selling Smalltalk around the world. It was used in many places I would never have dreamed of.

    That world abruptly changed when Sun came out with Java and dazzled all with the promise of write once run everywhere SW. People wanted sw that could be packaged and deployed (in theory) with smaller footprints. Smalltalk was in the process of moving to that space, but never got there commercially. That is another story for another time.

    Like

  2. brianmarick says:

    Thanks, Rebecca. Imagining a universe that had Smalltalk but not Beck, Cunningham, and Johnson, I don’t think that Smalltalk would still inevitably have led to patterns. But I do think Smalltalk and patterns have some similar appeals: for example, it seems some people resonate to both Alexander’s emphasis on design-while-building and the way Smalltalk affords the same.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: