Latest / Talk Python To Me / #248: Climate change and your Python code
Transcript
- 0:00The most critical issue of our time is climate change.
- 0:03Yet, when you think about our carbon impact in the software industry, what comes to mind?
- 0:08Business travel?
- 0:09Commuting to the office so you don't miss filing that TPS report?
- 0:12Yeah, those are bad.
- 0:14But data centers, servers, and our apps consume a substantial portion of the total energy used by modern humans.
- 0:21In this episode, you'll meet Chris Adams.
- 0:24He's been advocating for a greener software environment and has concrete advice to make your Python programs more climate-friendly.
- 0:30The good news is, generally speaking, what we need to do to make our code easier on the planet is the same things we do to make our code faster.
- 0:38Dive into software and climate on this episode, number 248, recorded December 11th, 2019.
- 0:46Welcome to Talk Python To Me, a weekly podcast on Python, the language, the libraries, the ecosystem, and the personalities.
- 1:05This is your host, Michael Kennedy.
- 1:07Follow me on Twitter, where I'm @mkennedy.
- 1:09Keep up with the show and listen to past episodes at talkpython.fm.
- 1:13And follow the show on Twitter via at Talk Python.
- 1:16This episode is sponsored by Brilliant.org and Datadog.
- 1:19Please check out what they're offering during their segments.
- 1:22It really helps support the show.
- 1:23Chris, welcome to Talk Python To Me.
- 1:25Thank you very much for having me, Michael.
- 1:27I'm really excited to have you on the show.
- 1:29This is a topic that I've not covered a ton.
- 1:32We have had a previous show on studying climate science in Python, but we haven't really dove into how that affects us individually
- 1:40and how the ways that we write software or think about how we host our code or even how fast our website responds directly can correlate to contributing to or alleviating some of the pressure on emissions.
- 1:52So those types of things are going to be so fun to talk about with you.
- 1:55Cool.
- 1:55I'm looking forward to it.
- 1:56The thing I can tell you is that if it's new to you, you're in good company.
- 2:01There's lots and lots of people.
- 2:02And I say this with love who figured out that, yes, the Internet is often someone else's computer,
- 2:08but that means someone else's computer is running electricity.
- 2:10And in many cases, that comes from us burning fossil fuels or things.
- 2:14You're definitely not the only person to be thinking about this.
- 2:17And more and more of us are waking up to this fact and realizing that we are in quite a pivotal position to change how we work and end up working in a more kind of planet-friendly way, I feel.
- 2:27There's so many things that are low-hanging fruit that we can do, right?
- 2:31I mean, obviously, this is a big problem that needs big solutions.
- 2:33But look, if stuff's easy, let's do it.
- 2:35So we're going to talk about that.
- 2:37Now, before we get into that whole side of things, let's just start with your story.
- 2:40How did you get into programming in Python?
- 2:41I actually got into programming not through university or anything like that.
- 2:45I actually studied to become a doctor.
- 2:47And partly because when I was growing up, my parents were really keen on me becoming a doctor.
- 2:52So, yeah, I'll be a good kid.
- 2:53I'll try and become a doctor.
- 2:54Then I kind of discovered photography.
- 2:56And I got really, really into that in high school.
- 2:58And I got so excited about that that my plans for kind of going to, say, kind of Oxbridge or something basically fell by the wayside.
- 3:05And I got really, really into studying things like media and film.
- 3:08And I went from there to basically study, yeah, photography, filmmaking, video production, stuff like that, playing with these things.
- 3:17And I'm showing my age when I say this now.
- 3:19But I was this is around the turn of the century.
- 3:21We were just starting to kind of start playing with things like Final Cut Pro and digital video.
- 3:25Because when I was studying this, we were literally, you know, like cut and paste.
- 3:29Yes.
- 3:29I ran it with cut.
- 3:31We were, when we were making films, we were using like hand winding films, a kind of Bolex camera.
- 3:36We literally had to kind of cut film and paste it to make films.
- 3:40That is a really, really hard way to edit video together, right?
- 3:44I mean, now it's like splice, splice, splice, digital this, transforms that.
- 3:48It's crazy.
- 3:48But that's how it was, right?
- 3:50Like the world has changed so much in 20, 30 years and it's easy to forget.
- 3:54Exactly.
- 3:54So we did this.
- 3:55And at the time there was this thing which was called New Media, which was other ways of kind of expressing yourself or exploring things.
- 4:03And through that, there was this kind of interest in this thing called digital.
- 4:06So I kind of started playing around with things like Dreamweaver or ActionScript or stuff like this.
- 4:13And I thought, wow, this is kind of cool.
- 4:14Like because there was a load of really interesting art in this field right now because people were trying to explore the medium and what any of that's actually meant.
- 4:23What kind of kind of impact it would have socially for us, really.
- 4:27And on the course I was studying, you are basically given quite a lot of freedom, almost too much freedom.
- 4:33So when we end up graduating, a lot of us had kind of black and white films about ourselves, which was I didn't find that interesting myself.
- 4:40But we also had a chance to just like mess around with computers to either explore an idea or I guess like try and build some kind of installation or something, which would help you interrogate an idea that you might have come across in the kind of art culture part.
- 4:54And we had a kind of media education part of the course I did.
- 4:59And a large part was about things like, say, media ownership and things like the California ideology.
- 5:04And there were loads of really wild ideas that came across, which in the turn of the century seemed like bonkers concepts.
- 5:12There was this idea called surveillance, like the way we might kind of relate to computers.
- 5:17Like you had kind of cultural commentators and artists talking about imagine what it's going to be like when everyone has computers and everyone can film everything.
- 5:24Right.
- 5:25Yeah.
- 5:25And now here we are with our cell phones, right?
- 5:28Like it's here.
- 5:28Yeah.
- 5:29Like the thing.
- 5:29So I got into this idea.
- 5:31And one of the things I started working, I really got interested in was this idea by this theorist called Jamekassio.
- 5:38I think I pronounced his name properly.
- 5:39He spoke about this idea of the participatory panopticon.
- 5:42Like when we all have cameras, there will be no real concept of privacy and will forever be kind of recording things and sharing things.
- 5:50And there was this kind of idea that rather than having kind of big brother, there was millions of little brothers.
- 5:55And that has all kinds of ramifications on how like how we relate to each other.
- 5:59So I built I ended up working with a friend of mine because I couldn't really code at this point.
- 6:04I was just like some I don't know, some art student, really.
- 6:07And I lived in a part of town which was kind of rough because I didn't know how hard it would be.
- 6:11I thought, well, maybe we can like get a Linux box, find a way to run it in the car, run it off a like 15 pound webcam, connect to some GPS and some Wi-Fi, run this all off the cigarette lighter of the car and build something like a kind of panopticon thing for ourselves to see how that might change how we think about it.
- 6:29Yeah. And because we had this whole notion of because on the course, there was all this conversation about, say, the kind of Californian ideology and Silicon Valley in this way that in many cases, lots of companies present themselves as changing the world.
- 6:42We figured, well, maybe we can kind of dress up in some of that language to explore this as an idea.
- 6:46So rather than make a film, I figured, let's try to create some kind of intervention using open source software and a kind of cultural, I guess, thing.
- 6:54So I basically built this thing with a friend of mine or more specifically, my friend did all the coding whilst I was learning how to kind of code and kind of do some of this and work out what a ring buffer was and everything.
- 7:03And we built a thing which basically was a giant red button on a dashboard hooked up to a webcam that ran a ring buff in front of you.
- 7:11And what would happen is when you're driving around, if someone cuts you up, rather than screaming at them, because who knows, they might be carrying a knife or a gun or something, you'd pull over and you just hit this button like,
- 7:23Oh, God damn it. Why can't they drive properly? And that would catch where and how that person almost hit you with the idea being that when you drive home, when you're on the Wi-Fi, you'd upload this video to like YouTube or somewhere.
- 7:35And the great thing about this is that, well, cars have really handy foreign keys called number plates.
- 7:41And if you can then expose a feed of this, you could create some kind of business model around this.
- 7:46So we kind of, as a kind of, I don't know, artsy statement, accidentally ended up building dashcams.
- 7:52All right.
- 7:52Right. Yeah, exactly.
- 7:54Yeah. So we figured, wouldn't it be weird if people had something like this?
- 7:58Wouldn't that be like, end up with all these strange implications?
- 8:00Because we kind of designed a business model as an art project around, well, if you provide this information, then maybe the thing that you might get, you might get an incentive to basically film everyone else doing this if you got cheaper insurance premiums.
- 8:13And because like insurance companies don't need to disclose how they price you, you could have this idea where you could present the idea that you're pricing people off the roads for bad driving, but instead create this kind of horrifying dystopian hellscape where everyone's continually filming each other.
- 8:28And that seemed more interesting than making a film.
- 8:31That's a pretty interesting social experiment.
- 8:33Yeah.
- 8:34Where'd it go?
- 8:34Yeah.
- 8:35So, well, we, so there's the other thing.
- 8:37There is an idea called, if you look at work with IP, like intellectual property, there's a phrase called prior arts.
- 8:43And we thought, oh my God, this is, this is, this is horrifying what we're building.
- 8:46Well, now we've explored this, the implications are terrifying.
- 8:48So we figured, well, one thing we can do is let's take this prior art idea quite literally and like put it in a gallery.
- 8:55So it's literally prior art.
- 8:57And if you do it that way, then you cannot patent it because it's kind of toxic and no one can make any money off it.
- 9:02And like, of course we were naive students.
- 9:04All right.
- 9:05So like, I'm pretty sure large companies have found ways to make money out of data now.
- 9:10But this was an idea like, yeah, as if anyone would really do that.
- 9:13Right.
- 9:13And that was kind of my first exposure into coding.
- 9:17And that was, that was actually Ruby initially with little bits of C and stuff.
- 9:22But I found the two of them quite difficult.
- 9:24And especially back then.
- 9:27And then when I graduated, I was looking for something similarly interesting and out there.
- 9:32And I couldn't find much, but the person who I built that with, I mean, he only built this because he was doing a cognitive science course.
- 9:37And he thought some of the ideas, some of my ideas were kind of funny.
- 9:41We ended up setting up a company where we figured we're only going to work on open source, nice things.
- 9:46And we ended up working in a co-working space and find ourselves working on bits of Django or doing some kind of Internet of Things related stuff.
- 9:54And I think I've just shared a link to some of the earliest code I've ever contributed to.
- 9:58And like my first Python as a person who could barely write HTML was diving straight into Twisted.
- 10:05And oh, I'm not sure that was the first code I should have written, right?
- 10:10Yeah, that's definitely mind bending that async stuff.
- 10:14Well, look, if you can start out by building, like recreating dash cams in the software and hardware side,
- 10:21and then you can go contribute or work on code that's for Twisted, I think you'll be all right.
- 10:26Well, that was actually a kind of interesting project.
- 10:28That project, the Twisted stuff, there's a story around that, actually.
- 10:30So what we were doing, we're in this co-working space.
- 10:34And we were thinking, well, wouldn't it be cool if you could help people understand that there is an environmental impact to how we use buildings?
- 10:41And maybe if you can do something what we might call now, like flexible pricing around co-working space to kind of incentivize people to use it when it's not so much.
- 10:51So think of it like, I don't know, load balancing or demand shifting, but with people rather than like servers.
- 10:56So we ended up working on some things to basically work out the carbon footprint per person per hour of space by inferring presence on Wi-Fi,
- 11:06but looking at it by tracking the MAC addresses in a co-working space.
- 11:08Because we could pretty much figure it out that if there is maybe, if every single person has a phone and a laptop,
- 11:15if you can count the laptops and the phones and you can more or less associate them with each other,
- 11:19then you get a rough idea of occupancy and usage of spaces here.
- 11:22And if you know how much energy you're using, you can work that out as well.
- 11:26Right. And mostly that's probably heating, cooling, that kind of stuff, not people plugging in their laptops.
- 11:30So if there's one person versus 10 people, it costs almost 10 times as much for that one person in terms of energy.
- 11:36Absolutely. Right.
- 11:37So this was one thing you could do.
- 11:39So if you can encourage people to kind of scrunch together to use that space more efficiently,
- 11:44then you've got a much more efficient use of that space per person.
- 11:47And if you think in terms of not buildings, but providing working space, again, which is kind of what you see now,
- 11:53there are so many kind of lucrative businesses that I've failed to kind of take forward.
- 11:58You were really early at a lot of these things, right?
- 12:00Yeah, we ended up doing a lot of stuff like that.
- 12:03And that was my exposure to messing around with like Python and Twisted because we said,
- 12:07oh, yeah, we could do that because we figured you're just reading RFID cards, right?
- 12:10And then my friend Fred Fix, who now lives in Berlin and as a CTO of some of the same companies we were working on part time with that,
- 12:17we basically had to find a way to make these things speak to some parts of a building to trigger some actuators for sliding doors to work.
- 12:24And in order to do that, we figured, well, we use Twisted and we need a server to make a door work.
- 12:29So the link I've shared is door D because it's like a demon for a door.
- 12:33Oh, nice.
- 12:34Yeah.
- 12:35And we had like all these ideas to look to this because the space we're in, they had like an open LDAP installation for the members.
- 12:42So we, at one point, we kind of hooked this up so that when you walked in or tapped to RFID card,
- 12:47because you could make that speak to the speakers, you could have like your theme song walk in, right?
- 12:51Or you could have like loads of silly ideas like that.
- 12:53Because if you could, yeah, I mean, it's, if you can think of an entire building as like a gigantic Linux box,
- 12:58then there's kind of fun things you can do.
- 13:00Yeah, that's really clever.
- 13:01I like it.
- 13:02Yeah.
- 13:02Yeah.
- 13:02We also realized there's loads of silly things you can do as well.
- 13:05I mean, I learned firsthand that, so we, yeah, in 2000, I think seven,
- 13:09I've realized that if you put a door on the internet and you expose an IP address for anyone to use, right?
- 13:15Then we ended up with scenarios where you had like loads of hacking attempts from China trying to kind of like pwn the door because they just saw it as an IP address.
- 13:22And we ended up having quite a few phone calls like, Chris, yeah, the door's going a bit weird again.
- 13:27Can you fix that, please?
- 13:28Yeah.
- 13:28The door's got a DDoS attack on it.
- 13:32What are we going to do?
- 13:32Yeah, yeah, yeah, yeah.
- 13:33Like, I'm sure there's a joke about doors and DD doors or something there, right?
- 13:37But yeah, the DDoS door.
- 13:38But anyway, there was something like, but we also, when we were working with this,
- 13:42I realized that there's a reason hardware is called hardware.
- 13:45And I decided to make, okay, let's work with software a bit more.
- 13:48And then I started working with Django a bit on a couple of other projects.
- 13:50And I found Django really, really nice as a framework to work with because it was really well documented.
- 13:55And I found the community quite friendly.
- 13:57And yeah, that's probably how I got into programming was kind of artsy student trying to implement things,
- 14:03realizing that I didn't know what I was doing.
- 14:05And then realized I had to actually run some of this myself and had to learn how to use servers and stuff.
- 14:10So I have a bit of a patchy background.
- 14:14And only in like 2016 did I really start reading about data structures.
- 14:17And like, oh, God, this would have been so much easier if I didn't know this 10 years ago.
- 14:21Exactly.
- 14:22This would have totally, we created this.
- 14:23Why did I create this?
- 14:25It just existed.
- 14:25Yeah.
- 14:26Man, what a cool series of sort of getting into it, getting into programming experiences.
- 14:32Those are great.
- 14:32So what are you doing now?
- 14:33At the moment, I am splitting my time working with one group called the Green Web Foundation,
- 14:38where I am currently helping them in kind of rebuild chunks of their stuff in Django and
- 14:44splitting my time working with a group called climateaction.tech.
- 14:47And generally working as a kind of consultant, product manager consultant, I've still got where
- 14:51groups will basically work with me and hire me to help them think through their process.
- 14:56But I've still got a few old Django clients who I've been looking after and still work
- 15:01with them every now and again.
- 15:02So I do a kind of bit of a mixed grab bag of all this stuff.
- 15:05But increasingly, I find myself doing a lot more work with tech and climate, specifically
- 15:09speaking to techies who have said, hey, I want to do something more responsible with my
- 15:14skills, or we're building a project and we figured out that we're using electricity to
- 15:19run computers.
- 15:19And maybe we should think about that part there.
- 15:22Or I'm planning to set up some kind of practice around how we build digital projects.
- 15:26And we want to be a bit more responsible about the unintended consequences that we might have
- 15:32when working on that.
- 15:33So I do a bunch of these things.
- 15:34And I've started writing about this stuff in a newsletter called Greening Digital, because,
- 15:39well, greening how we do digital.
- 15:41It seemed like a relatively straightforward thing.
- 15:43So that's what I do.
- 15:44And so, yeah, basically, bits of coding and evangelism stuff with the Green Web Foundation
- 15:50and a grab bag of mixed stuff, which tends to be Python in many cases, because it's what's
- 15:56become the language I'm most comfortable working in.
- 15:58And it's useful because it's the second most popular language in the world now.
- 16:01So the chances are that things have been implemented by someone who's thought about it longer than
- 16:05you have.
- 16:06Absolutely.
- 16:06There's so many different libraries you can grab.
- 16:08Those are a bunch of cool projects and organizations.
- 16:11So the Green Web Foundation idea is one day the internet will run entirely on renewable energy,
- 16:16and they develop tools to help speed that up, right?
- 16:19So you're helping them with that.
- 16:20And then the Climate Action is a global community of tech professionals using their expertise to
- 16:25support solutions for climate change.
- 16:27Yeah, that's pretty much it.
- 16:28Nice.
- 16:29You'll have to give me the link to your newsletter so I can put it in the show so people can
- 16:33subscribe to it.
- 16:33Yeah, absolutely.
- 16:33This portion of Talk Python To Me is brought to you by Brilliant.org.
- 16:39It's early 2020, and many of us have made New Year's resolutions.
- 16:43The best resolution you can keep is investing in your STEM skills.
- 16:47Whether you're a student, a professional brushing up on cutting-edge topics, or someone who just
- 16:53wants to understand the world better, Brilliant.org makes it easy with interactive explorations
- 16:58and a mobile app that you can use on the go.
- 17:00If you're naturally curious, want to build out your problem-solving skills, or need to
- 17:05develop confidence in your analytical abilities, then get Brilliant Premium to learn something
- 17:10new every day.
- 17:11Brilliant's thought-provoking math, science, and computer science content helps guide your
- 17:16mastery by taking complex concepts and breaking them into bite-sized, understandable chunks.
- 17:22Get started by visiting talkpython.fm/brilliant, or just click the link in your podcast player.
- 17:27Let's talk about climate change at the high level just before we dive into how can we write
- 17:35code that alleviates that pressure and maybe is a better citizen of the world, digitally speaking,
- 17:41and also the real effects that it actually has.
- 17:43And you talked about all this using energy, in particular electricity, right?
- 17:48Servers running electricity, MacBooks running electricity.
- 17:51There's a lot of negative news here, but one of the things that I see as a real sliver of hope,
- 17:56let's put it like that, in terms of this part of the slice, is electricity is awesome because
- 18:01it often does come from nasty sources like burning coal, but it can come from solar panels.
- 18:08It can come from wind.
- 18:08It can come from, right?
- 18:09It can come from renewable places.
- 18:11So it's like, you don't have to change anything.
- 18:13You don't have to change anything at all to completely turn all that stuff to renewable
- 18:17foundations.
- 18:18You just need to change the generation of it, right?
- 18:21Yes.
- 18:21If it was like airplanes are a serious problem, right?
- 18:24Or cars, we're working on electric cars.
- 18:26We're getting there.
- 18:27But it's diesel trucks.
- 18:28It's super hard to just say, well, all you got to do is plug it into a different source.
- 18:32Like, no, diesel comes from a place where it's really hard to make that carbon neutral or
- 18:37renewable, right?
- 18:37So in some sense, the story around tech climate is kind of positive in that regard,
- 18:42I think.
- 18:42What do you do?
- 18:43Yeah.
- 18:43I'm really, really glad you started and started framing it this way, because I think it's really
- 18:49important for us to realize that a lot of the things that we know and love, like the
- 18:55internet, for example, it doesn't need to be running on fossil fuels.
- 18:58And what you spoke about before was the issue is, in many cases, it's our use of fossil fuels
- 19:05and where we get energy from, not necessarily some of the kind of life choices we make.
- 19:10Like, yes, there is obviously going to be consequences of burning huge amounts of fossils if we, say,
- 19:15if we're flying across the Atlantic every second week, for example.
- 19:19But if there is a way to basically do that without the CO2 emissions from burning fossil
- 19:24fuels, and increasingly, we are seeing options to make that possible, then I think it's actually
- 19:29that suggests to us that there's actually a kind of more positive future that we can have
- 19:34available to us.
- 19:34And when you, I don't know about you folks, but I don't remember the internet changing or
- 19:39my experience of Google changing when they switched to green power or when Facebook switched
- 19:44to running on renewable power.
- 19:45It's not like the internet started juddering to a halt and it started working different.
- 19:49It used to be really fast, but now it's kind of clunky.
- 19:51It doesn't quite burn as well or whatever.
- 19:53No, it's not a steam engine, right?
- 19:55It's electricity.
- 19:55Beautiful.
- 19:56Yeah, this is the thing.
- 19:57I mean, this is actually, when we zoom out outside of technology, you'll see that there's
- 20:00a whole conversation around how do we address some of the wider scales?
- 20:04And there is this phrase kind of electrification.
- 20:07Like, we need to electrify a lot of the sources of energy that we use because a lot of it comes
- 20:12down to our use of energy, not fossil fuels.
- 20:14But we have, in many cases, kind of grown up with this idea that the only way you can
- 20:19get energy is from fossil fuels.
- 20:21And even when it comes to something like aviation, there are actually ways where you can use, say,
- 20:27excess electricity to create the kind of chemical energy in a way that you could use for, say,
- 20:32something which needs a high amount of energy density, like, say, flying or trucks or something
- 20:38like that.
- 20:38The only problem is we often, or for the last 40 or 100 years or so, we've been not really
- 20:45accounting for all the costs of getting fossil fuels out of the ground and put them into the sky.
- 20:50And as a result, we default to basically drilling for fossil fuels when there are other better ways
- 20:57of experiencing a lot of the same upsides without the unintended consequences that end up causing
- 21:02avoidable harm.
- 21:03Yeah, I totally agree. This whole externality thing is frustrating, for sure. You know, Elon Musk,
- 21:09as much as he does crazy stuff and is kind of weird in some ways, I'm a fan of how he's pushing some of
- 21:15these ideas forward around like electric cars and so on and solar panels. He came out and said, look,
- 21:20if we just took some part of the Southwest United States, like Arizona or something, I think maybe he
- 21:26said Nevada, he said, Nevada, and just took 100 square miles and just covered it in solar panels, that's enough
- 21:31energy for the entire United States. He also threw in, I don't know, like a five mile square battery or something
- 21:36ridiculous to carry us through the night. But, you know, I only know that in terms of the US energy, but that's a huge
- 21:41amount of energy used by the world. It doesn't seem like we as collective citizens of the world are incapable of
- 21:48generating that much renewable energy. It just seems like a matter of will, almost, because surely we could
- 21:54create enough solar panels to cover 100 square miles. Like we paved the earth constantly, right? And that's
- 21:59way more work or, you know, whatever, right? I mean, it just seems like there are these steps that we could
- 22:03take that would not be, they're not science fiction. We've got to like create a Dyson sphere around the
- 22:09whole universe or hold the solar system and channel it back. No, it's just like, it's pretty attainable.
- 22:13So I think this is one of the things that I find both frustrating and inspiring when we have these
- 22:18conversations, because you've mentioned Elon Musk, and it's very easy for us to immediately kind of
- 22:23reach for the closest figure to Ironman that we can think of. Yeah, exactly. And like when I grew up
- 22:27totally like, yeah, he's like Ironman, but his stuff is open source. This is awesome, right? Like we think
- 22:31about this, but it's also, and when you look at things like the effect, the impact that say, well, just
- 22:37the kind of like mindset that people think about when it comes to things like EVs and making that
- 22:40reality, that's really, really, really good. But you've touched on a few really, really important
- 22:44and interesting things. You need to be able to look things that are kind of more systemic level.
- 22:47Like there's a reason why you have these things. And in many cases, it's not down to us not having
- 22:52the technology because we do have the technology. Like right now in 2019, we have seen the cost of
- 22:58batteries fall by something like, I think more than 85% or around 85% since 2010. And we've seen an even
- 23:06steeper fall when it comes to solar panels. So it's not like these things are, and to the extent
- 23:11now that in many cases, deploying new solar is cheaper than continuing to run coal or continuing
- 23:17to run gas-fired power stations and things like that now. And in Europe, for example, which is where I'm
- 23:22from and where I'm most familiar, more than half of the coal-fired power stations that we have now are
- 23:27running at a loss simply because people have started pricing into taking, you know, more accurately pricing
- 23:34the unintended consequences of coal as well.
- 23:37Even in the US where the current administration is doing everything they can to prop up coal,
- 23:42there's still tons, like many, many large coal plants shutting down for the same reason you're
- 23:48talking about. And you're going to talk about the UK.
- 23:49Yeah. Yeah. I was going to talk about the UK because the UK and the US are, so the UK has been one of the
- 23:54fastest countries in Europe to decarbonize its energy, its electricity to the point now that I think
- 24:00recently we've got around 40% of the grid being powered by renewables.
- 24:05The often, and this is a, in many cases, this is because essentially it's become so expensive to
- 24:10run fossil fuels. And you've seen that and you're seeing a similar thing in America. America's emissions
- 24:15or like a, you know, for every kind of unit of electricity is actually falling quite, it has been
- 24:20falling pretty quickly. If we just looked at the kind of economics, it would probably be falling even
- 24:25faster. But in many cases, you have cases where basically there is a, you don't have that, you
- 24:30have political support to kind of slow down a transition away from a dirty, harmful fuel, which
- 24:36employs, I think there are more hairdressers than coal miners in America now. Right. So we have these
- 24:42ridiculous kinds of figures, you know, propping up these industries at the expense of, you know,
- 24:46hundreds of that millions of jobs in other industries here. And I kind of think that we need
- 24:52to like, when we spoke about Elon Musk here, right, I think there's a degree that yes, it's really cool
- 24:56that we have electronic cars, but we also got to think about, well, if we are going to be doing,
- 25:01if we're going to give someone all the props for that, and basically kind of seeing them like some
- 25:06kind of Ironman, but open source kind of hero, hero figure, then I think it's fair for us to expect
- 25:11them to be a bit consistent about how they, about who they support politically, and who they,
- 25:17and who they fund. And if they're going to be funding groups, which basically slow down climate action,
- 25:21then I think we need to be prepared to say, hey, it's cool that you're building electric cars,
- 25:25but can you not do the thing which stops us moving away from fossil fuels? Yeah, because I think it's
- 25:29we're adults, and we need to be able to have these complex thoughts on our minds. And we also need to be brave
- 25:35enough to actually address the scale of the situation, because there a lot of it is really,
- 25:40really freaking scary. But we are capable of addressing this and facing this, if we as long as we actually
- 25:46just are basically a bit more rational about it in many cases.
- 25:49Yeah, absolutely. Absolutely. I totally agree. And it's really interesting how it's not really a
- 25:54technology problem, right? It's a technology challenge, but it's not like it's incapable.
- 25:59It's not like we have to envision, we have to invent vision or something like that, right?
- 26:03Now, I guess let's just round out this really, this sort of high level view just by pointing out that I
- 26:09think yesterday, it was yesterday that Greta Thunberg, the young girl from, is she from Sweden?
- 26:15One of the Nordic countries.
- 26:16Yes, one of the Nordics, yeah.
- 26:17Like climate activists. She was voted or made the time person of the year, which is pretty
- 26:24interesting. So that I think kind of speaks to a little bit of, you know, people are starting to
- 26:28pay attention.
- 26:28Absolutely. I am. She's so, so cool. I'm so, so pleased. And I find this, this child inspiring.
- 26:35I think we need to be able to be prepared to be able to say, yeah, the actions of these people,
- 26:40and them having that kind of moral clarity and consistency, I think is really, really inspiring
- 26:45for the rest of us. And like, we don't all need to be Greta, but I think there are the things she
- 26:50asks us to do, but basically, Hey, I'm a kid adults. Can you pay attention to the science and do something
- 26:55with this and basically act like adults? I think that's something that we can respond to. And I
- 27:02think that speaks to a part of us, which I feel that we, you know, if we look inside ourselves,
- 27:06we can answer and work in a kind of responsible kind of authentic way. So yeah, it's really,
- 27:12nice to see that. And I, and I think that we need people like that to be reminding us of what
- 27:18our responsibilities are as adults are really.
- 27:20Yeah, absolutely. So let's bring this back to software, right? That's why we're here talking
- 27:24about this because as software developers or people that use computing in significant ways,
- 27:30there's actually a lot of concrete stuff that we can do. And code runs everywhere. Code runs on our
- 27:34phones, code runs on our laptops, but a lot of code, more than people realize, I think runs on data
- 27:40centers. And so there's an interesting stat that I got from Forbes. I think this is, yeah,
- 27:44this is only for the U S but the U S data centers use 90 billion kilowatt hours of electricity a year,
- 27:50which is roughly equivalent to 34 giant coal powered plants. And I think this is 3% of all
- 27:57either energy or electricity consumption in the United States. Yeah. Total electricity, 3%.
- 28:02Okay. So these numbers actually feel, is this maybe low? no, these numbers are actually,
- 28:06yeah, there are, I mean, I was, so this is, you, you get a number of different estimates for this
- 28:12ranging from like 200 gigawatts, which I think is a billion kilowatts, a hundred gig in a gigawatts,
- 28:18or 200 gigawatts. It kind of ranges. The estimates vary depending on who you look at.
- 28:24Right. Does the data center inside a company count or maybe only public data centers or what do they
- 28:29count? Right. It could really vary who they're counting there. Yeah. So it's kind of mind blowing,
- 28:33right? I was at, in my role as someone working with the Greenberg foundation, I ended up at this
- 28:39event, which, was organized, a workshop organized by the European commission on how they're going to do
- 28:45green public procurement. Because in Europe, they spend something in the region of 45 billion euros each
- 28:49year on technology and, they want to do that in a more, in a fashion, which is more in line with
- 28:55the science. And when in line with the fact that they have basically declared a climate emergency as
- 29:01like the block of Europe. So the, because they too have realized that the internet runs on
- 29:06electricity and servers run electricity, they want to work out how to do this. And even inside that,
- 29:11when you've got people from Amazon, Google, Microsoft, all of these places, they are still trying to
- 29:15like saying, Oh, we need a definition of cloud that we can use across this. We need a definition of
- 29:19what data centers are. And it's kind of bonkers that you do have, you have this ambiguity. And
- 29:24when you see these numbers, lots of the studies, they will have often use slightly different definitions
- 29:29of the same thing. Like, does it include Bitcoin mining? Does it not? Is that a data center? Is it
- 29:33not a data center? Because that kind of power profile is different to how you might use something else.
- 29:37So it's a long story short is basically these numbers you've shared are, they're not wildly out.
- 29:43And, the figures that people tend to use for data centers and like the internet in general,
- 29:48or like a kind of tech is between 2% and 4% of, well, between one and 4% of all CO2 emissions.
- 29:55So that's in the same ballpark figure as all of shipping or all of aviation.
- 30:00Yeah, exactly. All flying is like 2.5 or something like that. Yeah.
- 30:03Yeah. Or Germany. So like, these are like significant numbers and just for like a streaming
- 30:07video, for example, the figures we see from a recent report by the shift project, they say, well,
- 30:14all streaming video, that's about the same carbon footprint as Spain, like the country of Spain.
- 30:19Yeah. And it's cats. It's like viral videos, right? No, of course not all of it.
- 30:24Actually, I know. it's crazy. I like a quarter of that is porn. All right. So a quarter of Spain is
- 30:31porn, right? And it's just, yeah, you like the numbers are mind blowing when you look at this,
- 30:35because we tend not to really be thinking about this kind of stuff because we are so
- 30:40cause program, because we've done such a good job of abstracting the eventual kind of
- 30:45implementation details of whatever it is that we're doing that we're not aware of this stuff.
- 30:49One of the feelings that I have that is like a realization that blows my mind is I can go sit
- 30:53in a coffee shop or somewhere with my MacBook and I have a pretty high end MacBook, but even if it was
- 30:58like just a MacBook air, right, I could sit there and I could write my code. I have a little database
- 31:01server running and get the web app working and whatnot. And then I push a button and
- 31:05and it goes out and runs on incredible high end servers and massive data centers with like
- 31:10its own database server and you know, the web front end. And, and it's just like,
- 31:15it's almost like a disconnect for me that I can work on these little tiny devices and I push a
- 31:19button and then it's like this great big thing. And of course, I mean, it could scale huge, right?
- 31:22Like I could, I could scale that out to a hundred servers that for some reason that was a thing.
- 31:26And it's really easy to disconnect that from your mind to like, I'm actually running a hundred
- 31:29desktop type things when I just push, push deploy, right?
- 31:33Oh yeah, you're right. And like, this is, but it's, it's worth being worth being aware that in
- 31:37many cases that when you put something into the cloud, for example, like over the last say few
- 31:42years, like at least five years, actual energy usage that was reported by the IEA, the international
- 31:48energy agency, they've generally said that emissions have been like, so energy use has roughly been
- 31:54pretty stable in America, at least largely because this has been this massive growth or move from lots and
- 32:00not sort of relatively inefficient data centers to the cloud, but cloud is massively more efficient.
- 32:05Right. You have a virtual machine and it's, it's sharing that CPU and that hardware with many other
- 32:10virtual machines, rather than having a hardware device in my own company's data center.
- 32:14This portion of Talk Python To Me is brought to you by Datadog. Datadog is a monitoring and analytics
- 32:20platform that unifies metrics, logs, and distributed traces from your Python applications. Datadog's
- 32:26tracing client auto instruments, popular frameworks and libraries such as Django, Flask, PostgreSQL,
- 32:31and AsyncIO. So you can quickly get deep visibility into your applications. Trace requests across
- 32:37service boundaries, correlate traces with logs and metrics, and plot your application architecture with
- 32:42the service map. Get started today. Sign up for a free trial at talkpython.fm/Datadog. And Datadog
- 32:49will send you a free t-shirt.
- 32:50There is also a flip side to this. And there's a guy and so there's a gentleman called William
- 32:55Stanley Jevons. 200 years ago, he observed the same impact that we see now when he was looking at how
- 33:02steam engines were becoming more and more efficient. They were like every individual new generation of
- 33:07steam engine uses much less coal for the same amount of work. So that's going to result in a kind of fall
- 33:12in coal usage by the industry. Right. And it turned out not to be the case. It turned out to be the,
- 33:17it was called William, the Jevons paradox is the phrase. We might also call it the rebound effect
- 33:22in some cases where as you make something more efficient, you end up seeing more use of it.
- 33:27So the total amount grows even higher. If you want to sound really posh, you can call it the
- 33:31Kazum Brooks postulate. And that's one for Wikipedia, right? And that sounds really, really posh. But
- 33:36basically, as things get more efficient, we end up using them more, which can often result in greater
- 33:42emissions. If we do not find a way to decouple the emissions, basically, there's a line and
- 33:47you need to, there's a degree at which it ends up with more emissions or not emissions.
- 33:51And this is kind of why tech in many cases is being presented as one of the kind of wonderful
- 33:55hopes of the future. Because if we could only find a way to make better use of the tools we have,
- 34:00often through technology, then there's a chance that we could kind of steer this economy away from
- 34:05the iceberg and into something more like, I don't know, Star Trek than Mad Max, I suppose.
- 34:09Yeah, let's definitely stay away from Mad Max. Now, you've given a couple of presentations on this,
- 34:17and I'll link to those in the show notes. You've got the slides up, and those are really helpful
- 34:22with cool pictures. One company that you called out that I use for credit card, when people buy
- 34:26courses on my platform, it goes through Stripe. The company you called out is Stripe for being a good
- 34:30citizen on how they report and account for their emissions. Can you talk to that real quick?
- 34:35Yes. I'm wary about kind of diving too deeply into this. And it's probably useful to have the slide
- 34:39that we are going to refer to. But if an organization is going to talk about carbon,
- 34:43or talk about being kind of environmentally responsible, if they're not really talking
- 34:47about scoped emissions, then they're kind of doing it wrong. All right. Because this is generally
- 34:51considered the sensible way to talk about it. And you have three main kinds of scopes, which are
- 34:58generally kind of considered ways to account for emissions from different things you do. So scope one might be
- 35:04emissions from you burning fossil fuels yourself. I've burned 100 gallons of gas. So that's my
- 35:09carbon footprint. Yeah. Yeah. The example I use in talks is coffee, because lots of us like coffee.
- 35:14So if you burn gas to heat up a kettle to make coffee, that's like scope one emissions, right?
- 35:19Scope two is emissions from electricity that you use. So that might be someone else miles away burning
- 35:25coal so that you can use a kettle to heat up some water to make coffee. All right. So companies like,
- 35:31Amazon and Google, who tend to use a lot of electricity, they're going to have very,
- 35:35very high scope two emissions in most cases.
- 35:38Right. Because some is lost on the wire, there's some inefficiencies at the plant,
- 35:41all that kind of stuff, right?
- 35:42Yeah, absolutely. And that kind of speaks to the fact that a lot of us don't tend to,
- 35:46like we don't physically burn coal ourselves to power a computer, but someone's burning it
- 35:51somewhere in our behalf, right? So in many cases, that might be kind of those large companies scope
- 35:55two emissions. And we wouldn't really have very high scope one emissions ourselves in many cases.
- 36:00But scope three is the kind of biggest source of emissions for most of us. And the slide that I
- 36:05think you're referring to shows Stripe having quite low scope one and scope two, which makes sense,
- 36:10because they are large, large customers of kind of cloud giants. So therefore, scope three is basically,
- 36:17the example I use is imagine you're walking into Starbucks and paying for coffee. So someone somewhere
- 36:23has burned fossil fuels to generate the heat to make that coffee or to make sure you're in a nice,
- 36:28warm space. So it's kind of in your supply chain, really, that needs to exist for you to make coffee.
- 36:32And for most of us, our emissions are going to be in scope three, because we are mostly purchasing
- 36:39services and selling services to other people, if we're developers rather than, I don't know,
- 36:43miners ourselves, you know?
- 36:45Right, right. There's a lot of knock on effects out in three, right? Like,
- 36:48we've got to fund the military who sends a bunch of people to some unstable place. And
- 36:53how much carbon do they spend to just ensure political stability so that then the oil company
- 36:58can send, you know, a bunch of machines over there to mine it up and ship it? Like, there's a lot of
- 37:02stuff happening that's not just the carbon captured in that, you know, bit of oil.
- 37:06Yes.
- 37:06We should think about this for basically our code as well, is what you're saying.
- 37:10Yeah.
- 37:11As developers, I think the concept that we have a dependency chain to the stuff we do
- 37:16shouldn't be an alien one. Like, we're continually using dependencies from lots of other people.
- 37:21And this is how people in the kind of climate world think about dependency chains, really.
- 37:26Because this is something that we're used to using anyway. Like, if we have a requirements.text file,
- 37:31then there's something happening there that we're aware of. So intuitively, it should be
- 37:34something that we can kind of internalize as a concept, really. It's just that we tend not to
- 37:38quantify this.
- 37:40Yeah. I mean, that was sort of what my example of the coffee shop push was. It's kind of like,
- 37:45it's so easy to, like, it stops here. You know what I mean? But it really, that's just the beginning.
- 37:49To be concrete, you have some interesting mental models that you talk about that help bring this and
- 37:53think about it and some tools we're going to talk about and some steps. So you have platform,
- 37:57which is the infrastructure that you run, right? This is, I guess, the cloud directly,
- 38:01a lot of times. Packets, which is the stuff that flows between you and your other services or
- 38:07people who are considering them. And then process about how your organization works, which is maybe
- 38:12a little more tangential to that. So let's start a platform.
- 38:15Yeah. Okay. So I've tried to take this concept of scopes and find some kind of comparison for
- 38:22what you might do as a developer or as a kind of tech professional, because it feels like speaking
- 38:27about scopes is often quite abstract for a lot of us. And it kind of makes sense to
- 38:31talk about things we would use ourselves. So I talk about packets, because in many cases,
- 38:36a lot of us, that might be infrastructure that you might use yourself or the servers that you run.
- 38:40And when you have something like that, you've got kind of like levers. So one lever might be how you
- 38:45provision the infrastructure that you use to kind of meet demand. And, you know, we could go back to
- 38:50examples where you used to kind of physically provision servers in a rack. And then you just hope that
- 38:54you and your provision for the most possible load, because it's going to be really hard to scale that up.
- 39:00Right. Right. Especially if you have to buy machines. And like you said, put them in a rack.
- 39:03If on Fridays, you have to handle 100 concurrent requests, but most times it's 10, you buy machines
- 39:09for 120 and you run them all the time.
- 39:11Yeah, exactly.
- 39:11Probably.
- 39:12Yeah. And most of the time that results in you, because computers don't scale all the way down,
- 39:16you're basically burning loads of money. But it turns out that because computers use fossil fuels,
- 39:21a lot of the time they're burning lots of fossil fuels. There are unintended consequences to that,
- 39:27which result in lots and lots of CO2 emissions. And yeah, you have that. And as we've got better
- 39:33at provisioning, or if you are a kind of developer, the way you might provision might have an impact.
- 39:37So rather than having a giant, giant physical server, one thing you might do instead is have
- 39:42some kind of scaling thing or working with VMs or dockers or whatever thing that makes it possible
- 39:47to kind of scale that way. That's one way.
- 39:49Yeah.
- 39:49Like Kubernetes is pretty easy for them.
- 39:51It also seems to me, I would like to hear your thoughts on this, that if you're purchasing
- 39:56VMs in the cloud, I know there's other stuff like serverless and so on that kind of does this
- 40:00automatically. But if you're say purchasing, I guess even Docker, but if you're purchasing say servers
- 40:04and virtual machines, you can buy them or provision them with dedicated CPUs so that you're guaranteed
- 40:10to have that CPU core available for you, or you can do it with shared. And I feel a little bit like
- 40:16if you go and buy the dedicated server, fully dedicated CPU machine, you're kind of locking
- 40:21out that thing to run all the time, right? Because you've got 12 cores, only 12 people can buy
- 40:25dedicated machines on that and that's it. Whereas if you're in the more floating kind, you might
- 40:30suffer a little bit in performance, but it's definitely going to scale down massively when
- 40:34it's not busy because it's going to be able to share that with other VMs. What do you think?
- 40:38It's a bit like, okay, let's just use the example of cars, right? I could buy, if I run a business,
- 40:42I could have like 12 cars, yeah? Or I could like pay for a taxi service to scale up, to scale the
- 40:47amount of things I'm using at any one point, right? Yes, you having to purchase exclusive use of
- 40:52something will do that. And in many cases, we will make that decision. But in many cases, we, there's
- 40:58going to be, there'll be trade-offs that we make and there'll be consequences of us doing that kind
- 41:01of stuff. And it's very difficult to really kind of give specific guidance on this because it's going
- 41:06to rely so much on context. And this is why I think in many cases, we kind of need to be able
- 41:11to understand the full cost of what we do and understand that and be able to make those judgments
- 41:16in an informed way. Because in many cases, there is an argument for using something like say serverless,
- 41:22where the kind of economics and the incentives are aligned much, much better.
- 41:26Right. Serverless, it doesn't even run at all if it's idle, right? It only processes the demand.
- 41:31Yes. So that's good in some ways. I mean, to be honest, the amount of the kind of energy savings
- 41:37that come from that, it's quite difficult to really quantify because most of the large organizations that
- 41:43do provide this tend not to be prepared to share these numbers. And if there are groups who can
- 41:48share these numbers, it would be fantastic for the good of science because even the professors say,
- 41:53we don't know either. Like no one knows right now. And it's very difficult.
- 41:57It's all these giant corporate places that data serve, the whole data center infrastructure.
- 42:02That's a huge area of competitive advantage. They're making their own hardware. They're doing
- 42:07all sorts of crazy stuff around cooling and energy. I mean, they don't want to share that. Why would
- 42:11they want to share that?
- 42:12Yeah. And like you see this now, even when, absolutely. And even down to just like how long
- 42:17you hold on to servers in the first place. Like you might assume that in many cases, you, you know,
- 42:23we might hold, we might assume a server, which takes a lot of energy to turn into a server.
- 42:27Cause remember like chips are sand initially, right? Like there's a lot of energy from turning
- 42:32sand into a server or the chips right there. Like we don't really think about it until it's not
- 42:37something we have to face, but yeah, there's going to be a member because if energy is coming from fossil
- 42:41fuels and it doesn't need to, but often does, then that's where there's going to be lots of emissions.
- 42:44If you have a server, which only lasts, if people are swapping out servers every year versus every
- 42:49three years, that's going to have an impact on the calculations that you actually might have.
- 42:52So yes, you're, you're absolutely right there.
- 42:54So one question I have about serverless, like on the face value, it seems obviously that's
- 42:58going to be better than VMs. Let's say the shared kind, right? I mean, the dedicated ones clearly
- 43:02are just constantly running, but it also seems to me like each individual requests might take a lot
- 43:08more energy because it's got to maybe start up some kind of Docker. It's not just running a few lines
- 43:13of code and already running process. It's every one of those is kind of a fresh go at a new environment.
- 43:18So even though you can scale infinitely, cause you could hit a hundred thousand servers.
- 43:22You hit that hard enough, right? But that may per request cost more. There's just like an
- 43:27interesting trade-off that I was thinking about as we were talking about this.
- 43:30Yeah. I mean, this is exactly what you see with servers anyway, right? Like we know that if you,
- 43:34if you're going to buy a physical server, then I mean, when, when Amazon, when various,
- 43:39when kind of cloud computing products came out in the first place, you know, people say,
- 43:42Hey, that, why, why would I spend money on cloud when I can buy a server to give me those,
- 43:46the same resources over a longer period for less money? Like you're paying for the flexibility and
- 43:51you're paying for the fact that you don't have a giant great server to kind of decommission at the
- 43:55end of three or five years or something. So in most cases, there will be a higher per request trade-off,
- 44:01but with the idea being that you're not, you pay slightly more per request for the flexibility
- 44:05and the efficiency at kind of systemic level, I suppose. But once again, who knows for sure?
- 44:11Yeah. Who knows? I would, I would guess that serverless is more efficient in terms of energy
- 44:15in general, but, but I don't really know. All right. So one thing I do want to talk about in this
- 44:20area is, you have some tools, like at each one of these three levels, you have tools in the
- 44:25Python toolbox, stuff that you can run or things you can do or libraries you can use. So maybe tell us
- 44:30about the ones that you have for this and I'll throw in a few that I came up with as well.
- 44:34Yeah. Okay. So basically any tool that can track the amount of CPU usage you're using can also give
- 44:39you an idea because energy uses fossil fuels, what the climate impacts of a lot of this stuff will
- 44:43actually be. You know, there is now a moral argument for basically optimizing your code
- 44:47because, so like that is good news for developers who like performance, right?
- 44:51Right. You already want fast code now because it means you can, obviously users want it because
- 44:56faster software feels better and more professional. You want it because it's fewer machines to manage.
- 45:01it costs less. The data centers want it. And then of course that's all lined up with CO2 emissions.
- 45:07You found this thing called energy dash usage, which is an npm tool, right? You can run.
- 45:13This is actually from, this is a Python.
- 45:15Oh, Python. Okay. Uh-huh. Oh, it's another one down later. That's NPM, right?
- 45:18Yeah. So this was designed specifically to address the, I think it was designed as a response to
- 45:24basically revelations amongst people who are working in technology, working with say AI that, the
- 45:29kind of, you know, we speak about Moore's law, like it doubles every 18 months, right? So that is,
- 45:34you know, you know, we see some kind of changing impacts there. I think a year and a half ago,
- 45:38a paper was released with, showing that the kind of average amount of compute used to achieve
- 45:43various kinds of goals or breakthroughs with, with AI is doubling every three and a half months.
- 45:48Right. And, over, I think over a two year period, please don't, I'll share the link
- 45:52specifically, but because of this, this doubling feature is, it basically results in massively more
- 45:58energy use. So the point that like something like that might double seven times in the set period,
- 46:03if you're looking at a three and a half month doubling period compared to 18 months,
- 46:06it's like 200 X, 200,000 X versus seven X. So you're seeing like a big increase. And, this
- 46:13was generated. This Python module is basically a tool to allow you to kind of profile some code.
- 46:18It'll give you an idea of the emissions associated, the energy usage for that by kind of reading some of
- 46:23the energy usage stuff from some, some, some, I think from some Intel processors share this,
- 46:29and then they converted that to the CO2 per kilowatt hour, for example.
- 46:32Right. And then it ties it back to where like you're actually located even.
- 46:36Yeah, absolutely. That's what it does. And this was designed for people working with machine
- 46:41learning to get an idea of what algorithms are going to have an impact so that you could make
- 46:46these decisions upfront or be aware of the trade-offs of using one thing over another. Because
- 46:51as I understand, and I'm not a data scientist, different machine learning tools or approaches
- 46:56use wildly different amounts of compute. And this was designed as a tool to show you that. And there's
- 47:02also a whole kind of syllabus tied to this because this was shared by a professor
- 47:06who I follow on Twitter when I saw it. I've totally forgot her, the woman's name who did
- 47:10it. And I feel I'm really, really embarrassed for forgetting her name, but she's been sharing
- 47:14a load of really interesting stuff in this. And this was work from, I think, a group called
- 47:17Climate Change AI, who invested a bunch of time into this. So yeah, that's one thing that you've
- 47:22got.
- 47:23That's really interesting. I'm trying to look up her name as well, but I couldn't find either.
- 47:26So another thing in this platform part is, like we just mentioned right before, is faster code is more
- 47:32efficient code, means fewer servers, means smaller servers, and so on. And there's just a bunch of
- 47:37techniques that you can apply to your code, right? Like if you use a database, make sure you're using
- 47:43an index. It's not just faster. It uses less energy, right? If it responds in 10 milliseconds versus
- 47:48a second, that is a whole lot less work it's doing. Not always, but most of the time when your code is
- 47:53stuck or waiting, it's something in the chain is cranking as hard as it can to get back to you. Maybe if
- 47:59you're calling a remote service and there's like a 100 millisecond ping time, that's different. But if it's
- 48:03not far away, the delay is sort of computation time for something, I would suspect.
- 48:08Yeah. So some of the concrete examples that I think that might be of some use here would be, and you could
- 48:14kind of like take a leaf out of some of the nodes book, right? When you have things like
- 48:18async, if you've got a way of working where you're not blocking and you're able to serve another
- 48:23request, then theoretically you don't need to be running quite so many machines to do the same
- 48:27amount of work. Absolutely. If you're using the async and await-based frameworks like Sanic or some
- 48:33of those, yeah. Yeah. So there are some ways that you can, basically anything that tend to improve
- 48:38performance, because you're generally using fewer resources to achieve the same kind of result,
- 48:42it makes a lot of sense. So yeah, you already know these techniques in many cases,
- 48:48if you're working with Python, for example, and some of the things are directly applicable.
- 48:53Right. And sometimes people don't bother because it's not slow enough. You know, if you have a
- 48:57pretty busy web page that loads in 100 milliseconds, but the load is not so high, it's still fast enough,
- 49:02right? You don't need to necessarily optimize it. But if you could get it down to 25,
- 49:05it would use a quarter of the energy, right? Yeah.
- 49:08Like, so profile your code and see where it's at. And just, I don't know, just put that as one of the
- 49:13trade-offs you think about as you build code and care about it.
- 49:15Yeah. And this is partly, this is a nice kind of takes us back to the kind of platform packets
- 49:18process thing that I was just talking about before. So I found platform as a useful thing to talk about.
- 49:23And like, we've been doing some work with an agency. Actually, there's a group called the Panoply.
- 49:28They're a kind of transformation agency in the UK. And we did some work as the Greenway Foundation to
- 49:33basically help them think about how they build, do run digital projects and where,
- 49:37and we started looking at some of their own projects. And we found that like the platform
- 49:42part was quite a significant chunk from at least one of the projects they're working on. But there
- 49:46are also other leverage points that they had, like the packets part and the process stuff.
- 49:50Yeah. Yeah. Let's talk about packets because that's way harder for us to understand how we pull
- 49:54those levers. I can choose the type of server I get. I write the code that runs.
- 49:58I could decide serverless or virtual servers, but I can't decide how my packets get from my server in
- 50:04New York to you over where you are, right? I can't control that part of the world. Or can I?
- 50:10No. I mean, well, okay. So there's a dream we have. Yeah. There's a dream like, because if you
- 50:15actually look into the networks, like there seems like BGP, which control how packets get rooted around.
- 50:20And if you had knowledge about which kind of parts of the internet are run on green power,
- 50:24then in the wonderful world, in a perfect world, you might have some kind of green BGP
- 50:29that knows and favors the greener nodes more than the other nodes.
- 50:33Right. Not just use latency or something like that.
- 50:35Yeah.
- 50:35But until this one gets bad, we're going to flow through this part of the world because
- 50:39this is the best possible path in terms of CO2 to get this from America to Europe or something.
- 50:45Well, yeah. So there is, I mean, this is one of the reasons we, at the Green Web Foundation,
- 50:48we've started releasing open data sets in the hope that someone might take this idea and do something
- 50:53cool with it. Because so we've got like, we're working on a thing called IP2Green, which will
- 50:57basically, and there's another thing called GreenTrace, where we're basically building trace
- 51:00route that hops and shows you whether hops are green or not green, based on what the information
- 51:04that we have available to ourselves to make something of this possible.
- 51:07But this is like way in the future, because we're quite a small group. And we were at the
- 51:12kind of wouldn't it be cool if stage at the moment. But if anyone is interested in doing something like
- 51:16this, I would love to chat about it in more detail. But until then, yeah, you're right, because you
- 51:21don't have direct control over the internet. And to be honest, for many of us, that's a feature. And I
- 51:25think as a feature, because, you know, we root around lots of things. And we know you by treating
- 51:30censorship like damage, for example, it's good. But it means that because you can't control things
- 51:34directly, you have to control things indirectly. So you might resort to other techniques that we
- 51:39already have.
- 51:40Yeah, and there are a bunch. So there's two, let's start with the projects. There's a project from
- 51:45Google called Lighthouse. And the idea is it measures the effective user oriented performance
- 51:52of your web application. And I've spoken about Lighthouse a little bit before I came across this.
- 51:57And I thought, you know, my sites are super fast. If you go into the web logs, and you look at it,
- 52:02it says it's sending the response out the door in 10, 15 milliseconds. And I thought, well,
- 52:07how much more can I improve over 10 milliseconds? You know, no one is going to perceive that,
- 52:11whatever. And I'll throw it in here. Let's just see how it does. I threw it in there. And it said,
- 52:15your site is average to slow. What is this thing talking about? Like, no, there's no, what is it
- 52:21doing? And it considers all these different things that the user perceives. And I spent days rebuilding
- 52:26all my sites. So I can get it up now to almost 100. Sometimes on a good day, I can get it to hit 100
- 52:31out of 100. But the idea is it has very concrete steps. And it says you should do things like you
- 52:37should resize this image to exactly the size that's being displayed instead of shipping a huge one and
- 52:42letting the site, the client do it. You should use gzip on your stuff you're exchanging on your HTML and
- 52:49your CSS. You should use really proper caching. All of these things are good. And they're all
- 52:54perceived by the user to be awesome. So if I have, you know, 100k of CSS, maybe not that much, but a lot
- 53:00of CSS and a lot of JavaScript, if you only request it once, but you hit the site 100 times rather than
- 53:05over and over and over again, that is a huge amount of traffic you're alleviating, right? So this tool
- 53:10actually is really good for controlling what you put on the wire. This is one of the levers that you do have.
- 53:14And what we decided to do was basically fork this. So we took Lighthouse, forked it, made it refer to
- 53:20say which parts of the websites were green, and we called it Greenhouse. So it's a plugin. So
- 53:24anywhere that you use Lighthouse, you can use this to get an idea of which parts of your supply chain
- 53:28or your dependency chain are running on renewable power. And the thing that we're also doing with
- 53:32this is to convert some of this. We haven't implemented this yet, but we actually have the data out there and
- 53:37we've been doing it with some consulting clients. So basically, take this and give people rough ideas of the
- 53:42CO2 emissions from doing this. But absolutely, like basically green websites are usually good
- 53:46websites because they're fast and they make good use of the resources that we do already have. And
- 53:50once again, we already know how to do so much of this. And there are clear steps that you can actually
- 53:55follow. So yeah, it's a this is kind of what we did. And this is what I've spoken about a few places
- 54:00before. Like you already have a lot of the tooling already to do this. And in many cases, depending on what
- 54:05you're building, this may be a more effective place to spend your time than say on say the platform part,
- 54:10depending on how well optimized your website is or what it's for. And this is this is why it's
- 54:16important for us as professionals to understand the things and know where we would be where we were
- 54:20going to spend the limited amounts of time that we do have to improve the full interim experience for
- 54:26like end users.
- 54:26Right. And it can be incredibly simple things like turning on caching is oh, I just didn't even realize
- 54:32that we had forgot to turn on caching for these static files or turning on. Yeah.
- 54:35Another one is optimizing images. And I talked about resizing them to the right size. But there's a
- 54:41bunch of cool programs. The one I use called image optimum. Yeah, I'll link to it. But basically,
- 54:46you grab a folder, you can just grab your whole website and throw it on there. And it'll traverse
- 54:50it hierarchically to find all the images. And it applies about 10 different algorithms. Yeah,
- 54:54to shrink it and it'll shrink it like 50% without even losing inequality. It's ridiculous.
- 54:58Yes. So there's a there's a woman called Hannah. Oh, God, I forgot. She's on Twitter as Hannah P.
- 55:04And I'll share the link to her. She said a really good deck all about this information. And it's
- 55:09that basically explains all these things. There's loads of tools out there that we can use to have a
- 55:14measurable improvement in a bunch of in this stuff here. And in many cases, like that, I'm glad you
- 55:20mentioned the compression thing. Because when Netflix did this, they basically half the bandwidth bill
- 55:24for a bunch for a bunch of the projects that implemented this because we just forgot to kind
- 55:29of switch on like compress or GZIP in something on the server. And there's actually some open source
- 55:34plugins to existing servers that will do a bunch of this stuff for you on the fly. If you look through
- 55:39the look for the I think Google page speed plugins, you'll see some of this stuff for Apache and for
- 55:43Nginx. So there's already stuff out there. And there are also services like ordinary that will do this
- 55:48stuff. But again, it's worth remembering that useful to know where the impact is going to be because
- 55:53depending on the usage profile of what you do, this might not be the most effective place to
- 55:58invest your time if you're going to be thinking about, I guess, the kind of climate impacts of the
- 56:02way we work.
- 56:02Yeah. It's something as simple as throwing your images into one of these optimizers. That doesn't
- 56:06take any thought, right? You're not like, well, if I do this, I might break something. You know,
- 56:11long as the algorithms are lossless, you really don't have to think at all. You just do it. But if
- 56:15they're served millions of times, that's a big deal.
- 56:17Yes, absolutely.
- 56:18Yeah, there's a lot. I guess the point I'm trying to make is there's a lot of low hanging fruit here.
- 56:22And the tools that you talked about, Lighthouse, which is a plugin for Chrome,
- 56:25or Google PageSpeed, which I'm linking to in the show notes is the online version. And then the
- 56:30greenhouse fork of it that you talked about.
- 56:32Yeah.
- 56:32So that was the thing that we have. But there's also, but there's other things as well. There's
- 56:35one called sitespeed.io, which is basically like a Docker container. You can literally,
- 56:39if you can run Docker, you run Docker and then point a URL at it and it will give you a report of all
- 56:44this stuff automatically. Like you don't, I've referred to some things from Google, but there are other
- 56:48tools around there that will help that you can use. And the nice thing that I've seen with
- 56:52sitespeed that I really like is that they can give you like, it talks to Grafana and Graphite. So you
- 56:57can kind of start charting and graphing this stuff so you can see changes. And I believe they're
- 57:02announcing GitHub actions. So every single time you make a change, you can see whether it's going to
- 57:06be an improvement or a regression on what you had previously.
- 57:10Yeah. Yeah. Very neat. All right. So there's a lot more stuff we could talk about on the packet
- 57:14side, but let's just for the sake of time, let's move on to process, which is more about how your
- 57:19possibly tech company, possibly other company where you do tech stuff works in more general, right?
- 57:24Yeah. And like, this is actually, this is the one which in many cases is probably some of the biggest
- 57:29leverage points available to you, but they're often some of the harder ones to actually start because
- 57:34they often rely on organizational changes because things like, it's going to be stuff like,
- 57:39okay, how we think about travel or how we, how we work. I mean, when you look at say the report from,
- 57:45if you look at Apple sustainability report, right, you'll, I mean, I've shared a link to it. There's
- 57:49a few things that are really interesting. So, because I did in the talk that I gave recently,
- 57:53or one of the talks that I've been doing recently is just showing like the emissions from
- 57:57large companies that we know and admire. So Amazon kind of emissions from Amazon are roughly
- 58:01same size as Finland for 2018, right? The country of Finland has basically the same emissions as
- 58:07Amazon, according to their report. Google is about the same footprint as Liberia. So a kind of small
- 58:11country in Africa and Apple's figures were for the Gambia, right? So that's what I think 0.6 million
- 58:18tons of emissions. If you don't include the hardware, like making of iPhones and stuff like that,
- 58:22if you include that, it's basically Mongolia. So the country of Mongolia, all of the output is
- 58:27basically all the iPhones and all the things we have there. But if you look at just the non,
- 58:32non-electronics part, most of the emissions, like half of that, half of the emissions from Apple is
- 58:38from business travel. And more than a third comes from employee commuting. Because in many cases,
- 58:43a lot of, if you look at, you know, Apple's wonderful campus that everyone has to drive to,
- 58:47you've just embedded. Yes, it's cool that you've got a nice round canvas and stuff. But now if everyone
- 58:51has to drive there, there's all these emissions associated with it.
- 58:54And it's right in the middle of greater San Francisco, which is notoriously gridlocked,
- 58:59right? There's just like tons of driving and whatnot there. You know, I mean, from that perspective,
- 59:04they could put it somewhere more remote and that would be better because people could live near it.
- 59:08But of course, they're not in San Francisco or Silicon Valley. I mean, yeah.
- 59:11Yeah. Like this is the thing. Like in many cases, lots of remote friendly companies,
- 59:15there's a very strong environmental argument for it. Because in addition to it being...
- 59:18There's a huge one. Yeah, you're right.
- 59:20And this is like, I mean, we're basically in the process of like releasing a spreadsheet to kind of
- 59:25help you work it, understand the emissions at project level. So you and your team can see where
- 59:30the levers are that you might actually have. Because on some cases, when we've looked at some
- 59:34projects, we found that, oh, wow, getting rid of the video on the front page had the same impact
- 59:37of all of our commuting over the last year, for example, depending on the scale of the company,
- 59:42right? But in some cases, if you're working where there's loads and loads of driving,
- 59:46because someone has like a two hour commute each way, then one of the most impactful things you can
- 59:51do on a project might just be, yes, we're gonna do remote working better, because we don't need to
- 59:56be driving. And it has all kinds of nice side effects. I mean, in many cases, if you think about
- 1:00:01how you work, you can have these other kind of what people refer to as co benefits. So remote work will
- 1:00:07often make it more accessible to people with kids, for example, or people who might have mobility
- 1:00:12problems. There's all these things that we can do, which also end up having things making things a
- 1:00:17bit greener, or just things like thinking about how much we do need to fly, for example,
- 1:00:22right? Could that meeting be in zoom? Or do I have to fly from New York to London to have it in person,
- 1:00:27right? Yeah, Microsoft is a good example of this. They have an internal carbon price on top of their
- 1:00:32flights as a disincentive for them doing this. But also they've set up a kind of green cloud advocacy
- 1:00:37kind of group now. And also, like this, this was just a few weeks ago, I know, I think it was last
- 1:00:42week that it was it became public. But also, one of the people that he was giving a talk at
- 1:00:46DevRelCon about kind of low carbon developer relations, like low co DevRel. And one thing he
- 1:00:53was looking at doing is he gets the teams to just track the carbon from what they're doing, or if
- 1:00:58they're going to fly, make sure they get a good sense of make sure they make the use of that flight
- 1:01:02they're going to do make the carbon count, essentially. Yeah, in many cases, it's a there's
- 1:01:06a big argument for just getting better at remote work, which is kind of embarrassing that in tech,
- 1:01:11so many of us still aren't all that good at it, really. Yeah, yeah, I did for about 10 years,
- 1:01:16I did remote work. And then finally, now I have my own company, I just but I work from a little office
- 1:01:20in my house. It's quite nice. Once you get used to it, there's a lot of stuff you got to get used to,
- 1:01:24right? Like, you don't want to distractions around the house to mess things up. You don't want to
- 1:01:29feel like you're stuck in the office, because it's 8pm. But you're thinking about something,
- 1:01:33you go work on it. But at the same time, you got to focus and not just watch TV. There's a lot of
- 1:01:37challenges, but I think people can pull those off. They're definitely all better than being in traffic.
- 1:01:41So yeah, this is one example. So one thing might have been about commuting, but for the model that
- 1:01:45we've been using for process, the other thing was basically, we took into account the efficiency of
- 1:01:49the building that you're actually in. And in the UK, and across Europe, there is like a directive,
- 1:01:53which basically mandates that every single building has to have a kind of energy certificate,
- 1:01:58kind of bit like how fridges might have energy ratings on them. So you have graded grades for
- 1:02:03most buildings. And in the UK, if you know the kind of zip code or postcode for that building,
- 1:02:07you can work out the emission, you can get a figure straight away for the kind of emissions per square
- 1:02:12metre. So if you know that most employees have like 10 square metres of space over a year,
- 1:02:16then you can quickly work out this stuff. And if someone's working on a year, you can compare that to,
- 1:02:20say, the emissions from running service, or using this much electricity, or the emissions from
- 1:02:25sending things over the wire, you can get an idea of where the impacts might actually be.
- 1:02:29So this is why I talk about process. And I'm just speaking specifically on the project level,
- 1:02:33because there's, we can work a bit more widely as well, and think about the other things that
- 1:02:38we actually do. But I'm mindful that it would take a more than the single podcast to talk about some of
- 1:02:44the wider things.
- 1:02:45Yeah, absolutely. So one final thing I do want to talk about is offsetting air travel. Now,
- 1:02:50flying is not good. But if you do have to fly, we already talked about having a carbon values,
- 1:02:55but it's really a good idea, I think, to at least offset it with something you can do. There's
- 1:03:00places that allow you to do that. It's not perfect, but it's better than doing nothing, right?
- 1:03:03Yeah.
- 1:03:04No, I agree. I agree with you, yeah.
- 1:03:06Yeah, but obviously, like, less travel is clearly, clearly better. But I did want to point out that
- 1:03:10there are places that you can go that are pretty good. You talked about Atmosphere.de?
- 1:03:15Yeah. So this is a German company that only use one of the, and use what are called the kind of
- 1:03:20gold certificates for offsets, which are generally considered to be offsets which do not have
- 1:03:25unintended harmful consequences. And where they, the projects that are on this are related to at least,
- 1:03:32I think it's three, maybe four of the sustainable development goals. These are kind of one of 17
- 1:03:38goals, which are generally considered, these are the things we need to be focusing on to make the
- 1:03:42world a better place. So that's what these are. Actually, the person I spoke to on a market,
- 1:03:47they, the guy, Asim Hussain, who is doing, he was just doing a talk today at DevRelCon about the
- 1:03:52different kinds of offsets and what things you have available and what decisions you need to actually
- 1:03:56make for that. And yeah, there's one, there's one in the atmosphere as one example. There's the one
- 1:04:00in America called Terra Pass. But generally, if you don't have much time and you cannot avoid travel,
- 1:04:05it's safer to just go with something like the gold standards. And I've linked to a gentleman who I,
- 1:04:11I kind of have a lot of time for a lot of respect for Kenneth Bowles. He is a, he's a consultant and
- 1:04:16he does need to travel sometimes. And he's basically said, look, this is my air travel policy. He's got
- 1:04:20a personal travel policy, not like company, you know, companies might have sustainability policies.
- 1:04:23This is policy on air travel. He says, look, this is what we're going to do. And if I have to travel,
- 1:04:27then these are the things I, you need to take into account if you want me to be joining you for
- 1:04:31something. And I feel that there are lots of people who could also do the same thing. And like,
- 1:04:35you could literally just copy and paste this.
- 1:04:37I'm sure he would be happy and not frustrated if you also adopted his policy verbatim, right?
- 1:04:42Basically.
- 1:04:43Yeah. I mean,
- 1:04:44one of the things he does is say, I'm going to expense the offset if I have to fly to you,
- 1:04:48which is totally reasonable. He says, if I have to travel internationally, it might be a hundred
- 1:04:52dollars offset, but that's part of the bill. If you invite me to come because I'm not traveling
- 1:04:57without them.
- 1:04:57Well, this actually speaks to something which is more interesting. I'm seeing some agencies,
- 1:05:01some forward looking agencies do now where they basically have, they have carbon budgets on projects
- 1:05:05now, because if basically depending on where around the world and the UK does have quite good data on
- 1:05:10this, you can have, you can basically work out the rough emissions from say, I know a hundred K of
- 1:05:15spend or something like that. So if you have maybe a project where there's going to be,
- 1:05:19well, which would cost like 200 K, then it's not a huge leap to say, well, this is, if we know that
- 1:05:24there's going to be a hundred kilos of carbon emitted per thousand pounds spent, and this is
- 1:05:28a 20 K project to 200 K project, then that might leave us with a budget of if we want to be better
- 1:05:33than average and we need to be better than average or improving on what's happening each year to kind
- 1:05:37of stand a chance of meeting the scary goals. We spoke at the beginning of the year, they say,
- 1:05:41well, we're going to have a carbon budget of 20 tons. So everything we do has to stay inside
- 1:05:45that budget. And this is a shared responsibility for us and also the client that we're working with.
- 1:05:51So I think there are some ways, yeah, because this stuff can be quantified. And once you have
- 1:05:55some numbers like that, in the same way that you have performance budgets for websites, I think you
- 1:05:59can use budgets like this to help, you can essentially create the incentives to make it easier to have,
- 1:06:05say a remote call versus having to fly or having to travel somewhere. And I think that without this
- 1:06:11stuff, it's going to be very difficult for us to basically face the challenges that are raised,
- 1:06:16that the science dictates. But we do have the tools and the numbers to actually do this. And I
- 1:06:21think many of us like the tech industry is such a rich industry compared to others. And there are so
- 1:06:26many people with so much professional mobility who are able to basically say, look, this is how we're
- 1:06:31going to work because this is how we chose to come into the industry for this. I think there's a lot to
- 1:06:36there's a lot to be said for thinking about this and considering it part of just being a kind of
- 1:06:41responsible professional in tech, not in technology to think about these things.
- 1:06:45Yeah, well said. One final thought I want to throw out there around this travel stuff. I
- 1:06:49try to travel less to conferences. I'm going to PyCon this year as I did last year because it's
- 1:06:54important and I have to fly to, right? I went to one other conference this year that I had to fly to,
- 1:06:58which is Microsoft Ignite in Florida. It was an interesting opportunity that I had. It was worth it. So I
- 1:07:05bought offsets for this and that's all fine and good. That's just what I did and still not my favorite,
- 1:07:09but whatever. So one thing I would like to see though, is that have conferences make it almost
- 1:07:14the default to have not just me do that. The reason I mentioned that conference in Florida by name is
- 1:07:19they had 30,000 attendees. How many of those people do you think offset their carbon?
- 1:07:23So this is actually really, no, you're absolutely right. And I think this is, there's two things which
- 1:07:27I could share with you, which I think might be interesting for you. So I did some work. I helped
- 1:07:32organize a conference called Map Camp, where we basically had a climate sponsor specifically to account for
- 1:07:37the fact that we knew that some people were, you know, we made the decision to run a conference
- 1:07:42and cause people to be flying here and we chose the venue. So therefore we felt like it's on us to be
- 1:07:47accounting for this stuff. And if you kind of just shift it onto the end user, that kind of is a bit
- 1:07:53unfair in many cases because you're often already making people to pay for something. And if you budget
- 1:07:58for this as part of just how you work, then it's, it makes a lot more sense. And, there are more
- 1:08:04group organizations doing this. But the thing that we've done is we actually hired some consultants
- 1:08:08to help us work out the emissions associated with that conference. And we also were in the process
- 1:08:12of releasing a report, which has all this stuff where we've got the numbers for this. And we could
- 1:08:16see what the trade-offs were so that other people can take this information. And, there's also a
- 1:08:21really, really cool Django project called Open Footprint, which is exactly related to this kind of stuff.
- 1:08:25There's a guy called, Sylvan. Oh, I totally forgot his surname. He's on Twitter as Sylvanus,
- 1:08:30but he's been building, him and his team. they've been building Open Footprint, which is a
- 1:08:35conference carbon footprint calculation tool to allow you to see what the impact of these things would
- 1:08:40actually be. And, for a 600 person conference, it was about, I think we spent, we raised 5k for that.
- 1:08:45So some of it was education. Some of it was kind of offsetting is what we used, we used for this,
- 1:08:50but I think it should be a norm if we're going to be responsible people organizing these events.
- 1:08:55Sure. Absolutely. And it would be ideal if the people putting on the conference did it. I can
- 1:08:59imagine there's sometimes like smaller conferences or something. They just feel like they're barely
- 1:09:03able to even fund this thing and whatnot. So if they can't do that, you know, maybe they could have a
- 1:09:08little checkbox on the registry. It's $230 to join this conference. And it has a little pre-check,
- 1:09:14maybe even pre-check it carbon offset, $30 I'm flying or something like that. And you can uncheck it,
- 1:09:19but if it's pre-checked and you just hit go, you know, how many people would just expense that back to
- 1:09:23their company, right? It seems like such a small thing that would make a huge difference. If you
- 1:09:26have to say 30,000 people go into your conference, all of a sudden that's tremendous.
- 1:09:29So RussConf does something really interesting in this field. So RussConf EU, they had an event in
- 1:09:34Barcelona and because Europe has pretty good trail rail links, they basically said, okay,
- 1:09:39we're running this conference. If you want to get here by train and we'd really, really support you
- 1:09:44doing that if you can, there's an interrail pass. And here's a way that you can get here by train.
- 1:09:48And it's a different way of traveling because interrail is basically, it's a bit like you pay
- 1:09:53for a set amount to be able to take any train or almost any train over a set period of like a week
- 1:09:59or so or a month. And I did the same thing as an experiment in like low carbon developer relations
- 1:10:03by having a two month interrail pass to travel around all little bits of Western Europe. And they
- 1:10:09said, here's how to do this. These are the places you might want to drop a visit along the way as part of
- 1:10:14this process. So there are groups who do do this and they think of it, they think of the travel as
- 1:10:20part of the conference itself. And I've had people talking about like having a sprint bus where people
- 1:10:25kind of work and code on something together. Oh, that's cool. Yeah. Like there's loads of ideas.
- 1:10:29We just need to be more creative about this if we're going to have events where people physically
- 1:10:33need to be around. And that's totally okay. As long as we think about the full cost of this stuff.
- 1:10:38Right. Well, I already told you I'd lived in Germany for a year and I'm very jealous of the
- 1:10:42rail system you all have over there. So yeah, let's leave it at that. But yeah, I think even things like
- 1:10:47conferences, tech conferences could do a lot, even just little default, just check boxes like,
- 1:10:51hey, we're going to donate. You're paying 30 bucks to send some money here unless you uncheck this when
- 1:10:55you register or whatever. Right. Give some people some levers, but make it at least the default option
- 1:11:00to not make it so impactful in a negative sense.
- 1:11:03There's a group who are working on, and I'm part of it as a group working on a kind of climate code
- 1:11:07of conduct for conferences to address these kinds of issues. And I really like if people do have an
- 1:11:13interest, it'd be really nice to hear from them because there's a bunch of us. There's a group
- 1:11:16called climateaction.tech, which I invest a bunch of time working on because I find it useful for,
- 1:11:21which is basically full of other professionals who are trying to do this. And there's a bunch of us
- 1:11:25trying to figure out how to do events greener. So if any of this is interesting to you,
- 1:11:28I'd really recommend a joining the community that we have. And yeah, let's talk about some of this
- 1:11:32because it's easier to face this stuff as a group and to compare notes together.
- 1:11:36Yeah, absolutely. All right. Well, we are over time on this topic, but it was well worth it. It
- 1:11:41was a fun conversation, Chris. Now, before you get out of here, let me ask you the final two questions.
- 1:11:45If you're going to write some Python code, try to make it fast and energy efficient,
- 1:11:48what editor would you use?
- 1:11:49Oh, I've gone through a number of editors. I started initially with TextMate ages ago,
- 1:11:53and then I started using Sublime. And then I kind of started using Vim because I thought that's
- 1:11:58what cool people should be using. I'm not a proper programmer if I use Vim.
- 1:12:01And I tried using Emacs, didn't get much luck. And I quite liked Vim. I found myself,
- 1:12:05because I do a number of other things rather than just coding, I really am enjoying VS Code. And I'm
- 1:12:10finding the, yeah, VS Code is my editor now. It's free. It's quite, it's well designed and-
- 1:12:16Super flexible. All the extensions.
- 1:12:18Yeah. Yeah, exactly. I'm a big fan of VS Code. It helps me. It saves me from myself in many cases.
- 1:12:24Sweet. All right. And then a notable PyPI package that you maybe found interesting or
- 1:12:29is relevant to the conversation?
- 1:12:31I'd probably say, I think the energy usage one for the AI thing, I think is really interesting. But
- 1:12:37otherwise, I think I would really point people to OpenFootprint, the open source carbon calculator,
- 1:12:43because we are so good at calculating, you know, we pride ourselves on being informed by data and
- 1:12:48being able to quantify things. And I think that if we take that kind of approach to other domains and
- 1:12:54domains like this, it will help us make informed decisions about the things we do as responsible
- 1:12:58tech professionals.
- 1:12:59Right on. All right. Final call to action. People are interested in doing more,
- 1:13:03giving them some concrete steps. What do you say?
- 1:13:05I think it's important to stress that it's okay to, if you don't know what to do right now.
- 1:13:10But I think it's also on you as a professional to invest in developing these skills that we will
- 1:13:15need to face when we think about like the science and what, and what basically like children are
- 1:13:21saying every Friday, because they're scared and they're expecting adults to kind of step up and
- 1:13:25do something about it. And I think it's important to learn to invest in thinking systemically.
- 1:13:29And this information is out there and there are books and resources out there. I mean,
- 1:13:33I think that's the key thing that I would call people to do is be prepared to invest in skills
- 1:13:38that are maybe outside of your kind of traditional domain of technology and learn to think a bit
- 1:13:42systemically. And the thing I would say is that there are lots of other people doing this too.
- 1:13:46You're not alone. In the group that I help run, climateaction.tech, it's basically full of other
- 1:13:51techies who are trying to figure this stuff out and how to do this. And a bunch of the messages and
- 1:13:55the links I've shared, I found through really enriching, useful conversations with people who are saying,
- 1:14:00what should I do about the fact that I cannot avoid the flying thing? In fact,
- 1:14:03the thing with Kenneth, I remember the conversation that directly informed that and the conversations
- 1:14:08with say Microsoft saying, okay, here's how we're going to do low carbon developer relations.
- 1:14:11I remember seeing the conversation there and the conversation about say, how do we take in,
- 1:14:15do something about the fact that, you know, AI and the use of machine learning is this massive growth
- 1:14:21in there. What can we do there? Or in say the UK with kind of the government taking a real,
- 1:14:26real kind of ownership on the emissions from their infrastructure. I remember the conversation
- 1:14:30there saying, yeah, we should be doing this. There are people out there trying to solve this
- 1:14:33and it's okay to feel a bit overwhelmed as long as there are, but it's worth remembering there are
- 1:14:39other people around to solve this and it's easier to solve this when there are other people and to share
- 1:14:44this across organizational boundaries. So yeah, those are the two things. Be prepared to invest and
- 1:14:48yeah, join the community.
- 1:14:49Super. And we can do it. It runs on electricity. We don't have to change everything. We just can just
- 1:14:53change a few things and it'll be, we'll be good, but we got to do it right. Thank you,
- 1:14:56Chris, for coming on the show and sharing all this. It was super interesting.
- 1:14:59Okay. Thank you again, Michael. And have a lovely round.
- 1:15:02Yeah, you as well.
- 1:15:03This has been another episode of Talk Python To Me. Our guest in this episode was Chris Adams,
- 1:15:08and it's been brought to you by Brilliant.org and Datadog. Brilliant.org wants to help you level up
- 1:15:13your math and science through fun guided problem solving. Get started for free at
- 1:15:18talkpython.fm/brilliant. Datadog gives you visibility into the whole system running your code.
- 1:15:24Visit talkpython.fm/datadog and see what you've been missing. They'll throw in a free t-shirt.
- 1:15:29Want to level up your Python? If you're just getting started, try my Python Jumpstart by Building 10 Apps
- 1:15:36course. Or if you're looking for something more advanced, check out our new async course that digs
- 1:15:41into all the different types of async programming you can do in Python. And of course, if you're interested in
- 1:15:46more than one of these, be sure to check out our Everything Bundle. It's like a subscription that never expires.
- 1:15:51Be sure to subscribe to the show. Open your favorite podcatcher and search for Python. We should be right at the top.
- 1:15:57You can also find the iTunes feed at /itunes, the Google Play feed at /play, and the direct RSS feed at
- 1:16:03/rss on talkpython.fm. This is your host, Michael Kennedy. Thanks so much for listening. I really appreciate it.
- 1:16:10Now get out there and write some Python code.
- 1:16:12Thank you.
- 1:16:13Thank you.
- 1:16:13Thank you.
- 1:16:13Thank you.
- 1:16:13Thank you.
- 1:16:14Thank you.
- 1:16:14Thank you.
- 1:16:14Thank you.
- 1:16:15Thank you.
- 1:16:16Thank you.
- 1:16:16Thank you.
- 1:16:16Thank you.
- 1:16:16Thank you.
- 1:16:16Thank you.
- 1:16:16Thank you.
- 1:16:16Thank you.
- 1:16:17Thank you.
- 1:16:17Thank you.
- 1:16:17Thank you.
- 1:16:17Thank you.
- 1:16:17Thank you.
- 1:16:17Thank you.
- 1:16:18Thank you.
- 1:16:18Thank you.
- 1:16:18Thank you.
- 1:16:18Thank you.
- 1:16:18Thank you.
- 1:16:18Thank you.
- 1:16:18Thank you.
- 1:16:18Thank you.
- 1:16:18Thank you.
- 1:16:18Thank you.
- 1:16:18Thank you.
- 1:16:19Thank you.
- 1:16:19Thank you.
- 1:16:19Thank you.
- 1:16:19Thank you.
- 1:16:19Thank you.
- 1:16:19Thank you.
- 1:16:19Thank you.
- 1:16:19Thank you.
- 1:16:19Thank you.
- 1:16:20Thank you.
- 1:16:20Thank you.
- 1:16:20Thank you.
- 1:16:20Thank you.
- 1:16:21Thank you.
- 1:16:21Thank you.
- 1:16:22Thank you.
- 1:16:23Thank you.
- 1:16:23Thank you.
- 1:16:24Thank you.
- 1:16:25Thank you.
- 1:16:26Thank you.
- 1:16:27Thank you.
- 1:16:28Thank you.
- 1:16:29you
- 1:16:29you
- 1:16:30Thank you.