WRAP UP

And so we come to the end. I’ve never loved writing endings. Beginnings feel natural to me: every human life begins in approximately the same state – human embryos just aren’t that different from one another in the big scheme of things – but everyone follows a different trajectory. Lives end in a myriad of different ways, and there’s not usually a coherent story to tell about them. Endings to books, articles, workshops, courses, etc … either I’m unskilled at writing them, or technical writing just doesn’t have a narrative structure that lends itself to tidy endings.

Oh well.

Still, I have to write something on this page, and maybe it isn’t a bad idea to take a step back and think about the role generative art can play in life, careers, and so on.

Icing the cake

A little while back I had the good fortune to come across Mine Çetinkaya-Rundels wonderful slide deck on best practices when teaching data science, “Let them eat cake (first)!”. In it, she talks about the importance of engaging learner interest in the topic early on. Very few people have ever been motivated to learn R by reading about operator precedence, functions as first class objects, or lazy evaluation. Whatever its other merits, I have never heard anyone argue the case that S4 is “sexy”, or that the R internals manual really really made them love the language. That’s not how this works. People want to be delighted by their tools. We like to play. Code that allows people to experience joy and do things love doing… it provides opportunities for growth, learning, and personal development.

When I make art, my daughter Fiona is frequent collaborator and art critic. She was 6 when I started making generative art: she’s now 9. She’s interested in what I do artistically because she likes to draw, and is fascinated by the fact that I draw with code. In fact, she’s become curious about it enough that she has her own private repo on my GitHub account where – with a little help from me – she makes her own generative art. With her permission I’ll share one of her pieces here. She doesn’t use ggplot2 or ambient (yet!), but instead relies on the jasmines package I wrote to bundle up some of my art functions. Personally I don’t use jasmines anymore because that package really doesn’t do anything except provide a few canned tricks using ambient. But it is a handy package for people who aren’t quite ready to dive into those packages.

Anyway, this is “Lily Pad”:

# https://github.com/djnavarro/jasmines
library(jasmines)
library(dplyr)

dat <- use_seed(769) |>
  entity_heart(grain = 2000) |>
  mutate(ind = 1:n()) |>
  unfold_warp() |>
  unfold_worley(scatter = TRUE) |>
  unfold_breeze(
    iterations = 100,
    scale = .0005,
    drift = 0,
    fractal = ambient::billow,
    octaves = 1
  )  |>
  mutate(val = ind + id * 50)

# https://www.canva.com/colors/color-palettes/lily-leap/
shades <- c("#40c69f", "#2e765e","#d62b83","#05234c")

dat |>
  style_ribbon(
    palette = palette_manual(shades),
    colour = "order",
    alpha = c(.25,.02),
    background = "grey90",
    type = "segment",
    size = .4
  )

It’s one of my favourite pieces of hers. Personally I love it, but maybe more importantly, she loved making it. Every time I find time to make art, she offers comments and critique, and when she’s in the mood she writes her own code.

I love this so much because so much of the world seems hellbent on convincing her that she can’t accomplish “technical” things. No-one says it out loud, but looking at how content is designed for girls and boys it’s pretty hard to escape the conclusion that there’s a cultural bias towards misogyny that kicks in very early on. I mean, this was a girl who stole my copy of Gaussian Processes for Machine Learning at age 5 and got me to teach her “the maths with letters”. She’s quite capable of doing these things, but over time she’s become convinced that she’s not good at mathematics. There’s very little I can do about this as a parent: I can tell her these stories about her own past and about her abilities, yes, but she’s swimming in the same cultural waters as the rest of us, and she picks things up.

And yet… she codes. She codes because no-one has told her she can’t. She codes because she loves it, because she can make beautiful things with it that appeal to her interests, and that motivates her to continue.

All this brings me back to Mine Çetinkaya-Rundels claim about pedagogy. If we want people to learn modern tools for data science, we should let them “eat cake first”. Show them the delightful things first. Don’t start classes by talking about operator precedence, start with ggplot2. Or… start with art. Okay it doesn’t have to be art. But start with something that makes people feel happy to be in the room. It will make a difference to them.