The attentive programmer

This video features Daniele Procida at DjangoCon Europe 2024 in Vigo, Spain.

The attentive programmer
0:22:41
Published July 11, 2024
317 views

Talk: The attentive programmer by Daniele Procida

https://pretalx.evolutio.pt/djangocon-europe-2024/talk/JX9H3D/

Summary

Programming gives us unusual power: through words and symbols, we can bring things into existence and make our intentions happen. But Daniele Procida argues that programmers should value attention as much as intention—the ability to be present, notice meaning, and respond creatively to what is already there. He connects this to photography, especially Gary Winogrand’s extraordinary attentiveness, and describes a Python model of his Canonet QL17 camera as a “love program”: software created not to perform a useful task, but to understand and express what he had noticed and valued.

Key takeaways

  • Programming lets us make things exist and behave through carefully expressed intention.
  • Attention is not passive: it can create meaning by noticing relationships and responding to them.
  • Gary Winogrand’s photography shows how being fully present can capture unique patterns in a chaotic world.
  • Procida modeled his Canonet QL17 camera in Python as a program about something, motivated by care and understanding rather than practical utility.
  • Mary Oliver’s instruction—pay attention, be astonished, and tell about it—can guide programmers as well as photographers and writers.

Summarised automatically from the transcript.

Chapters

  1. 0:00 Introduction and Artistic Programming Daniele Procida introduces the talk through poetry, programming, and the shared creative power of working with words.
  2. 2:21 Programming as Creation Programming is presented as a special power to bring things into existence through language and declarations.
  3. 4:38 Intention in Programming The talk explores programming as an intentional practice centered on commands, will, testing, and making things happen.
  4. 6:11 Attention and Presence Procida contrasts intention with attention and considers how programming can diminish the ability to be present.
  5. 6:58 Gary Winogrand and Photographic Attention Examples from Gary Winogrand’s photography illustrate the extraordinary attention required to notice and capture singular moments.
  6. 10:08 A Personal Photograph Procida reflects on one of his own photographs and the difference between directing others and being fully attentive to the world.
  7. 12:27 Developer Exhaustion and Darkroom Craft A playful analogy between software developers and photographic developers leads into the pleasures of home film development.
  8. 14:12 Understanding Mechanical Cameras Taking apart and repairing vintage cameras becomes an exercise in attention, care, and understanding encoded mechanical logic.
  9. 15:45 A Love Program for a Camera Procida presents a detailed Python model of a Canonet QL17 as a program created to express attention and affection rather than utility.
  10. 18:50 The Active Power of Attention The talk challenges the idea that attention is passive, using language and photography to show how attention can create meaning.
  11. 21:07 Pay Attention, Be Astonished, Tell About It The conclusion returns to Mary Oliver’s instructions as a model for meaningful programming, photography, and creative work.

Transcript

3,865 words · auto-generated Show

Automatically transcribed, so expect mistakes in names and technical terms.

0:00

Hi everyone, sorry, I'm um I'm Daniela. You probably have uh met me before. I'm jumping in to fill in, so I'm gonna do my best. Um That's me, that's what I look like on television. I work at Canonical, one time Django core developer when that was uh well it still is a badge of honor Um I've been involved in Django and Python for several years. Come and talk to me about anything. Here's the wrong QR code because it's from a different conference, so I won't show that to you now, but come and talk to me about stuff. I'm hiring, by the way, for lots of different roles at Canonical, including about one hundred and twenty Technical authors. I was thinking about Mary Oliver, the poet. Because I wanted to write a talk about being attentive.

0:46

And this is a little section from her poem Sometimes. It's a little section called Instructions for Living a Life. Pay attention Be astonished and tell about it. And if you um if you ask Chat GPT to write you a poem in the style of Mary Oliver, all of them will have the words wild and life in them. So um we're programmers. We're like poets because we do things with words. That's what we have in common. And I've got this uh fascination between the connection uh the connection between programming and other arts because programming is an art don't ignore what they tell you about computer science it's it's not true. So you know what are the the what are the values and meanings in in these arts?

1:32

There are lots of things that I like doing that I'm not terribly good at, like programming actually. I'm not gonna win the Nobel Prize for Programming anytime soon or playing the guitar or cooking and happy to be a bad programmer. You know, anything I get out of programming is a bonus. Some of those things hurt a bit more because like photography. I understanding not all photography But it really hurts that I can't do it better. Um Henri Cartier Bresson said your first ten thousand photographs are the wor are your worst, which is true. What he didn't mention is that it gets reset every time you stop taking photographs. at least for me. Still, I find some consolations in the machinery of these worlds. I love actually like computers and messing about with them and I love cameras and messing about with

2:21

uh them and it gives me a bit of consolation even knowing i'm not going to be very good either at photography or uh programming um but I think there's something really interesting about programming. I think there's a special fascination about it. I was interviewing a candidate and I asked her Um what do you enjoy about programming? And she said, when I'm programming, I feel like a little god. I mean my own little world that I've created. And I know how she feels And I know how God feels actually. You know, there's God at the beginning of time with his blank text editor window open and a blank page and a blinking cursor. It's the moment before creation, you know. So I know how I I know how you feel.

3:06

And God said, yeah, looks, let there be light, and there was light. And that's how it is in our programs. We say, let such and such be the case, and then it's the case. Because we said it. Which is amazing. Um it doesn't happen anywhere else in life. So um The form that we use in programming, we say let such and such be the case. In Python, we don't actually use the word let, although we should It it would be better. We should use the subjunctive mood. But instead we say x equals one and then we have to use that rather ugly double equal sign to indicate uh equality. Whereas I think it would look better like that If anybody wants advice on designing a programming language, come and talk to me at lunchtime. So

3:52

in programming, we bring things into being. Or we can do, just like God can, through our will. And we can't do it anywhere else in life. I challenge any of you to bring something into being right now. You can't Um and it's not the same as doing. You know, I can move something, I can move a chair or or shake a computer. Uh I can pour a glass of water, I can do stuff. And in Python I can also do things. I can break out of a loop or add to numbers. And it's not the same as commanding because I can tell my children to be quiet or a colleague to schedule a meeting and I can tell Python to do something. But in Python, I can do something That I can't do in the world. I can make something the case just by saying it. In Python, I can make something exist

4:38

by bringing it into existence just through a form of words. So programming is about willing things, the will of doing, the will of commanding, and this special will of bringing things into existence, this will of making things so. That's amazing power. Um so programming is this world of intention. We're programmers. Thy will be done. That's what our world is. So automated testing, agile methodologies, it's all about making our will come to pass. Every bit of it. It's like you know automated testing. It's like you send your child to the shop to buy bread and then you send the other child after after him saying go and check that he does it properly. So everything is about getting what we want.

5:24

And so in programming, meaning and creativity are all about intention. I love it. It's a would be such a great experience to sit down with God and have a bonding experience about all this will and intention that we share as programmers and deities. And intention is such an interesting word. So you know it spirals out from this uh Latin root of stretching or reaching towards the constellations of verbs and nouns. It's like you even trace them like rivers and uh uh boundaries on maps. Um now this doesn't prove anything. Um but you can see all these things like um the words Spanish word for shop, tienda, also um or tent, they all come from uh the same roots. But it's easy to become wrapped up in all this

6:11

intention Um because there are other clusters of words and meanings that tell different stories. There's attention, which is again the same route, but this time it's To attend to, to pay attention to something, same origins, but now we're not reaching towards, but reaching to. This time we are actually making contact Not about something that doesn't yet exist or that's out of reach, but something that we can reach. So I want to ask, where is the attention in programming? Or what has being a programmer done to my attention? And I love programming, but I'm not really good at it, but it's not because I don't will it. You know, I will it desperately, but I'm just not that good at it. But I can tell you why I'm not a better photographer. It's because my power of attention is diminished.

6:58

My power of being there, my power of being uh present. So I showed a photograph by Gary Weinegrand at the start. He's one of my favourite photographers. Staggeringly prolific. If you stretched out all the nigg his 35mm negatives um in a long line, it would be about 40 kilometers long. Um he made over about a million photographs. Um most of which well uh nearly half of which he never even got to see. Because he didn't bother developing them. Stephen Shaw said, you know, he didn't need to see the photographs any more than Beethoven needed to hear the music that he was composing. Wynogrand said, I photograph to see what things look like photographed. I photograph to see what the world looks like in photographs.

7:46

A photograph is what something looks like to a camera. And if you look at a lot of his photographs, it looks like somebody in them wants to punch him in the face, which is probably because somebody in them wanted to punch him in the face because he was going around with a 28mm lens. So He was very close to people. That's how you get a photograph with people like that because he was waving the cameras into their faces. And no wonder he would get looks like these. And the reason he didn't get punched is he was so fast, you know, one two hundred and fifty of a second, and he'd moved on even before people had realized what what had happened. But what does this say about the power of attention? So look at this. This is one day in 1964 at the Texas State Fair. All that noise and confusion and and and things happening.

8:35

There's an animal and its handler, and there's this one moment, this one instant in time. And this picture, this meaning in this picture, this symmetry of I hope you can see of the the curve of the animal's tongue and the hat of the handler, they came together for one split second in time, available from one point on the earth, looking in a certain direction. Maybe in the whole history of the universe that will never be available again to us. And Gary Weinegrand was there to capture it, to make that photograph. So what kind of power is that to be there so much that you can do something like that? That's the power of attention. I look at that and my we my knees go a little bit weak.

9:21

Um I think this might be the photograph. In the world that I love the best. I get lost in this photograph. I play it back to myself when I'm falling asleep, reminding myself of what's in it, its its rhythms, its patterns, its disjunctions, the variations It's like a piece of music. You know, I will never exhaust its forms and relationships, all those combinations, there's every every a look at the angles and the directions, the crooks of knees and elbows, the eyes and and and mouths. This is a truly superhuman feat of attention to capture a photograph uh like that. It's cutting through time and movement. And I don't blame myself for not being a superhuman or even an ordinary Olympian of attention, but that is really something else

10:08

in the world. I think this is the best photograph I've ever taken. You know, the one of the few that I'd be willing to show you. Two August 2010. It came at a time when I was concentrating hard on paying attention to things, on being there, on being ready for things, on resolving order and meaning out of the shifting uh moving components of of life. I spend so much of my life in intention rather than attention as a programmer. As a in my job, director of engineering, intention. I direct, I direct other people, I make sure that my will is done. Enacted by a thousand or so people at Canonical. And I'm reasonably good at that, but I look at this and I remind myself that once, just every so often, I got a taste of another kind of power, this power of

10:56

being able to be present to attend to things, the power of attention. And I also want that power as well as the power of intention. So, you know, like um poets and like God, we programmers we can do things with symbols, with words, uh symbols that express our will. We make things happen, we make we command, we instruct, direct and we bring things into existence. And we can make things happen in the world with them. So, you know, I can write um I could write a love letter to try to make something happen, or send a blackmail letter to my enemies with the hope of making something happen But that's not the only kind of thing I do with words in the world. Maybe I write a love letter, not to have an effect, to express my will

11:41

or as an act of intention, but to say something that I want to say. To say something about something that I have noticed or observed or felt to express something, to say, I'm here and I've paid attention to this and I want to show it to you. And it doesn't take I don't take a photo to express my will. A photograph has meaning, but it expresses my attention, not my intention. It's about my being there. Have you ever written a program about something? Are there such things? A story or a photograph can be about something. But can a program be about something? You know, we we don't hear of uh we don't often hear of that.

12:27

Maybe it maybe we've missed it Or we write love songs and poems, but what would a love program look like if such a thing could exist? And I mentioned I'm earlier earlier that I'm fascinating by this relationship between programming and other crafts and particularly photography. I love those connections. So you're working in the engineering, you're probably aware of the problem of developer exhaustion. The overworked developer, burnout. I think some people have spoken about that. It's what happens when you ask more of the developer than the developer has available to give. And what happens is familiar, it's a known problem. Um I'll show uh uh a couple of pages on a on the subject from a book that was published even before I was born. Developer exhaustion is what happens when there are not enough active chemicals left in your developing solution to react with those in the film.

13:20

It's a well-known development problem. The danger of overworked solutions, developer exhaustion. Oops sorry. So I am a developer and I do my developing at home. I don't have a dark room, but I do it in the bathroom. In the bath and like the rest of my photography, not very expertly, but I enjoy it a lot and I'm always thrilled by my results. Did you know you can develop film Using a developing solution made of instant coffee, um uh sodium carbonate, and vitamin C powder. Um and that's one of my photographs um developed using instant coffee and vitamin C Powder. So I have a lot of fun with photography, and it's not all about taking the photographs, it's also about messing around with the machinery of stuff.

14:12

I I told you I I love cameras. I spend a lot of time taking them apart and fixing them. That's one of my favorites. They're not expensive ones, they're all Very old 35mm cameras that I buy on eBay. I I know this camera intimately. I know it inside out because I've taken apart down to the smallest pieces and some of my pleasure comes from paying attention to it to understanding it I want to know that camera in the same way that I want to know a person that I love. I want to be with it and kind of get into its soul. In fact I'm pretty sure cameras have souls, I've got doubts about some people, but you know that camera, I'm sure that camera has a soul And when I'm working on these delicate

14:59

physical, these intricate mechanisms, I they encode logic and processes in their levers and cams and springs. There are sequences of events and logic described there in front of you. Those that's alive with meaning and intention and a pleasure for me is that I understand that I know it. It's like understanding a person. I understand you, I understand what you're saying. And that camera's more than 50 years old. So Understanding something in there for me is like receiving a message that traveled through time to reach me 50 years later. You know, the the designers of that camera, I think they're dead. But it's like reading their words

15:45

to work on that camera. Um yeah, it's the Canonet QL17. I uh I I love that camera. Um but it's it's this experience of really paying attention to something Is a kind of pleasure. Um I've attended to this thing. I really wanted to be there with it to understand it to know it. I I have Paid attention to it. I've I've repaired it. I have tended to it. I have taken care of it. So I said, you know, can a program be about something? Can a love program exist? Well it can, because I've written a love program. It's It's a program about that camera. It doesn't do anything, but it's about that camera. It's

16:33

um models the entire camera in Python using object-oriented programming, the logic of its mechanisms, the relations of its parts In Python. So the camera in software behaves like the real thing. I bring it into existence like God. And then I can do things with it. It comes ready loaded with um a roll of 100 ASA film. So I advance the film lever. And what happens in the software is exactly what happens in the real-life camera. The machinery engages, that same machinery I showed you. I press the shutter release button, the light meter energizes, it takes a reading which is applied to the iris, the shutter uh

17:19

opens for a fraction of a second and closes again and um uh Different things, things you don't even see come into spring into action at different moments, like when it's applying the uh aperture value of f16 um to the iris and one by one its components parts interact with each other. Those are some of the things that I've modeled in in Python. I 've modelled it so completely that some of the parts I've modeled are not even listed in the repair manual because I needed to in order to capture their logic. What happens when you open your film camera in the daylight without rewinding the film? The film counter is sets to zero and you ruin the film.

18:04

If it were dark outside in the camera's environment, which is also modelled, it wouldn't ruin the film. That's how complete the modeling is, was the camera has a world You can find this on on on GitHub. Uh it's well documented of course, that's my job. Um single Python file, camera. py. Um Maybe if somebody else likes cameras it will say something to them. So why? W what's the point of all that? Well it's for me. That's all. It's because I love the camera. Uh because of the experience I had in my encounter with the camera, because it moved me. Because I encountered something that astonished me and I wanted to say it somehow. It's not a program really that does anything, but it's a program about something.

18:50

It's I think it's a love program. And it was a program about paying attention rather than a programme about having intention. But we seem to value intention over attention Intention enjoys all the associations involved with being active and creative, and attention seems to uh have connotations of of passivity and weighting. You'll see it in different languages English and Italian for example. But you'll also notice that there's a lot of slippage. So for example, you know, to study in English is fairly passive. There's something over there and you study it. In Italian studiare means also to design

19:36

something. The emergency, you know, to attend, you attend a conference. But in French or Italian, it means to wait or to listen. But in English, the emergency services attend An accident. You know, they're not passive, they're active. Um and so on. You know, to in English to assist is to help. In Italian, it's more like to attend, it becomes more so these meanings Are not just what they seem to be on the surface. There are other things moving around under there. There is active creation here. The arrangement of those bodies in the world, that's just a plain, uninteresting root fact. It doesn't have meaning. But in his seeing

20:21

With his magnificent, astonishing power to see, Gary Weinabrand created that photograph. The form and the meeting and the meaning are all his work, his creation, created out of his attention. So don't confuse the relationship between attention and intention with that between um passivity and activity or or or anything like that. You know when I was at school I The most awful thing I heard was to pay attention. You know, you have this little body that wants to be moving and doing things you're told to pay attention and pay is the right word because uh you know they really make you pay. And you get nothing in return. So that's not a very fair thing to demand. So to for somebody should pay without getting anything in return. And I think that amongst the things it cost

21:07

me, I'm still in my life paying for Is that it took me decades of my life to understand and value attention as much as I do intention We live in an attention deficit world. And I'm not the only one I think who might find new value and meaning and pleasure in attention. And this was in my um proposal For the talk. And I think that's actually rubbish. I don't give a shit about whether it makes a difference to practically minded programmers. It's not about that. And anybody who thinks they can take advice from me about being a practically minded programmer needs to have their head examined.

21:52

I'm not talking about it because of that. I'm talking about it because it matters to me. Because I found something meaningful and I hope you did too. So here's Mary Oliver again with her instructions for living a life to pay attention. Be astonished. Tell about it. And you have to do all three of those things and do them well. To pay attention, to notice things, to be there with them, to be astonished, to record them, to respond to them, to give something back of equal value in your encounter with them and then to tell about it, to find a way to share it. And they seem like instructions for being a programmer, sorry, for being a photographer, or writing a program out a camera, or perhaps for giving a talk about something you noticed at a conference and that's what I've um tried to do. So thank you very much.

22:38

I'm probably out of time.

Questions this talk answers

What’s the difference between intention and attention in programming?

Intention is the programmer’s power to make things happen, issue commands, and bring things into existence. Attention is being present with something, noticing it deeply, understanding it, and expressing what was observed rather than trying to impose a will on it.

Discussed at 6:11

How can you develop photographic film without a darkroom?

Film can be developed at home using a solution made from instant coffee, sodium carbonate, and powdered vitamin C. Procida describes doing this in his bathroom and shows a photograph developed that way.

Discussed at 13:20

Can a program be about something, rather than just do something?

Yes. Procida’s Python model of his Canonet QL17 camera does not serve a practical task; it expresses his close attention to and love for the camera by modeling its parts, mechanisms, and behavior in detail.

Discussed at 15:45

What does it mean to pay attention creatively?

It means to be present with things, notice and be astonished by them, respond by making or recording something of value, and then find a way to share it. The talk presents these as connected practices for programmers, photographers, and speakers.

Discussed at 22:12

Note: We understand that names change, people change, and bodies change. We respect each individual's journey and privacy. If you have any concerns about a video or need us to remove content, please don't hesitate to contact us. We will handle your request with care and promptly address any issues.

More videos by Daniele Procida

More videos from DjangoCon Europe