Learn Python with Talk Python's 270 hours of courses

#248: Climate change and your Python code Transcript

Recorded on Wednesday, Dec 11, 2019.

00:00 The most critical issue of our time is climate change.

00:03 Yet, when you think about our carbon impact in the software industry, what comes to mind?

00:08 Business travel?

00:09 Commuting to the office so you don't miss filing that TPS report?

00:12 Yeah, those are bad.

00:14 But data centers, servers, and our apps consume a substantial portion of the total energy used by modern humans.

00:21 In this episode, you'll meet Chris Adams.

00:24 He's been advocating for a greener software environment and has concrete advice to make your Python programs more climate-friendly.

00:30 The 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.

00:38 Dive into software and climate on this episode, number 248, recorded December 11th, 2019.

00:46 Welcome to Talk Python to Me, a weekly podcast on Python, the language, the libraries, the ecosystem, and the personalities.

01:05 This is your host, Michael Kennedy.

01:07 Follow me on Twitter, where I'm @mkennedy.

01:09 Keep up with the show and listen to past episodes at talkpython.fm.

01:13 And follow the show on Twitter via at Talk Python.

01:16 This episode is sponsored by Brilliant.org and Datadog.

01:19 Please check out what they're offering during their segments.

01:22 It really helps support the show.

01:23 Chris, welcome to Talk Python to Me.

01:25 Thank you very much for having me, Michael.

01:27 I'm really excited to have you on the show.

01:29 This is a topic that I've not covered a ton.

01:32 We have had a previous show on studying climate science in Python, but we haven't really dove into how that affects us individually

01:40 and 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.

01:52 So those types of things are going to be so fun to talk about with you.

01:55 Cool.

01:55 I'm looking forward to it.

01:56 The thing I can tell you is that if it's new to you, you're in good company.

02:01 There's lots and lots of people.

02:02 And I say this with love who figured out that, yes, the Internet is often someone else's computer,

02:08 but that means someone else's computer is running electricity.

02:10 And in many cases, that comes from us burning fossil fuels or things.

02:14 You're definitely not the only person to be thinking about this.

02:17 And 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.

02:27 There's so many things that are low-hanging fruit that we can do, right?

02:31 I mean, obviously, this is a big problem that needs big solutions.

02:33 But look, if stuff's easy, let's do it.

02:35 So we're going to talk about that.

02:37 Now, before we get into that whole side of things, let's just start with your story.

02:40 How did you get into programming in Python?

02:41 I actually got into programming not through university or anything like that.

02:45 I actually studied to become a doctor.

02:47 And partly because when I was growing up, my parents were really keen on me becoming a doctor.

02:52 So, yeah, I'll be a good kid.

02:53 I'll try and become a doctor.

02:54 Then I kind of discovered photography.

02:56 And I got really, really into that in high school.

02:58 And 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.

03:05 And I got really, really into studying things like media and film.

03:08 And I went from there to basically study, yeah, photography, filmmaking, video production, stuff like that, playing with these things.

03:17 And I'm showing my age when I say this now.

03:19 But I was this is around the turn of the century.

03:21 We were just starting to kind of start playing with things like Final Cut Pro and digital video.

03:25 Because when I was studying this, we were literally, you know, like cut and paste.

03:29 Yes.

03:29 I ran it with cut.

03:31 We were, when we were making films, we were using like hand winding films, a kind of Bolex camera.

03:36 We literally had to kind of cut film and paste it to make films.

03:40 That is a really, really hard way to edit video together, right?

03:44 I mean, now it's like splice, splice, splice, digital this, transforms that.

03:48 It's crazy.

03:48 But that's how it was, right?

03:50 Like the world has changed so much in 20, 30 years and it's easy to forget.

03:54 Exactly.

03:54 So we did this.

03:55 And at the time there was this thing which was called New Media, which was other ways of kind of expressing yourself or exploring things.

04:03 And through that, there was this kind of interest in this thing called digital.

04:06 So I kind of started playing around with things like Dreamweaver or ActionScript or stuff like this.

04:13 And I thought, wow, this is kind of cool.

04:14 Like 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.

04:23 What kind of kind of impact it would have socially for us, really.

04:27 And on the course I was studying, you are basically given quite a lot of freedom, almost too much freedom.

04:33 So 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.

04:40 But 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.

04:54 And we had a kind of media education part of the course I did.

04:59 And a large part was about things like, say, media ownership and things like the California ideology.

05:04 And there were loads of really wild ideas that came across, which in the turn of the century seemed like bonkers concepts.

05:12 There was this idea called surveillance, like the way we might kind of relate to computers.

05:17 Like 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.

05:24 Right.

05:25 Yeah.

05:25 And now here we are with our cell phones, right?

05:28 Like it's here.

05:28 Yeah.

05:29 Like the thing.

05:29 So I got into this idea.

05:31 And one of the things I started working, I really got interested in was this idea by this theorist called Jamekassio.

05:38 I think I pronounced his name properly.

05:39 He spoke about this idea of the participatory panopticon.

05:42 Like when we all have cameras, there will be no real concept of privacy and will forever be kind of recording things and sharing things.

05:50 And there was this kind of idea that rather than having kind of big brother, there was millions of little brothers.

05:55 And that has all kinds of ramifications on how like how we relate to each other.

05:59 So I built I ended up working with a friend of mine because I couldn't really code at this point.

06:04 I was just like some I don't know, some art student, really.

06:07 And I lived in a part of town which was kind of rough because I didn't know how hard it would be.

06:11 I 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.

06:29 Yeah. 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.

06:42 We figured, well, maybe we can kind of dress up in some of that language to explore this as an idea.

06:46 So 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.

06:54 So 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.

07:03 And 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.

07:11 And 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,

07:23 Oh, 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.

07:35 And the great thing about this is that, well, cars have really handy foreign keys called number plates.

07:41 And if you can then expose a feed of this, you could create some kind of business model around this.

07:46 So we kind of, as a kind of, I don't know, artsy statement, accidentally ended up building dashcams.

07:52 All right.

07:52 Right. Yeah, exactly.

07:54 Yeah. So we figured, wouldn't it be weird if people had something like this?

07:58 Wouldn't that be like, end up with all these strange implications?

08:00 Because 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.

08:13 And 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.

08:28 And that seemed more interesting than making a film.

08:31 That's a pretty interesting social experiment.

08:33 Yeah.

08:34 Where'd it go?

08:34 Yeah.

08:35 So, well, we, so there's the other thing.

08:37 There is an idea called, if you look at work with IP, like intellectual property, there's a phrase called prior arts.

08:43 And we thought, oh my God, this is, this is, this is horrifying what we're building.

08:46 Well, now we've explored this, the implications are terrifying.

08:48 So 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.

08:55 So it's literally prior art.

08:57 And 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.

09:02 And like, of course we were naive students.

09:04 All right.

09:05 So like, I'm pretty sure large companies have found ways to make money out of data now.

09:10 But this was an idea like, yeah, as if anyone would really do that.

09:13 Right.

09:13 And that was kind of my first exposure into coding.

09:17 And that was, that was actually Ruby initially with little bits of C and stuff.

09:22 But I found the two of them quite difficult.

09:24 And especially back then.

09:27 And then when I graduated, I was looking for something similarly interesting and out there.

09:32 And 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.

09:37 And he thought some of the ideas, some of my ideas were kind of funny.

09:41 We ended up setting up a company where we figured we're only going to work on open source, nice things.

09:46 And 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.

09:54 And I think I've just shared a link to some of the earliest code I've ever contributed to.

09:58 And like my first Python as a person who could barely write HTML was diving straight into Twisted.

10:05 And oh, I'm not sure that was the first code I should have written, right?

10:10 Yeah, that's definitely mind bending that async stuff.

10:14 Well, look, if you can start out by building, like recreating dash cams in the software and hardware side,

10:21 and then you can go contribute or work on code that's for Twisted, I think you'll be all right.

10:26 Well, that was actually a kind of interesting project.

10:28 That project, the Twisted stuff, there's a story around that, actually.

10:30 So what we were doing, we're in this co-working space.

10:34 And 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:41 And 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:51 So think of it like, I don't know, load balancing or demand shifting, but with people rather than like servers.

10:56 So 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:06 but looking at it by tracking the MAC addresses in a co-working space.

11:08 Because we could pretty much figure it out that if there is maybe, if every single person has a phone and a laptop,

11:15 if you can count the laptops and the phones and you can more or less associate them with each other,

11:19 then you get a rough idea of occupancy and usage of spaces here.

11:22 And if you know how much energy you're using, you can work that out as well.

11:26 Right. And mostly that's probably heating, cooling, that kind of stuff, not people plugging in their laptops.

11:30 So if there's one person versus 10 people, it costs almost 10 times as much for that one person in terms of energy.

11:36 Absolutely. Right.

11:37 So this was one thing you could do.

11:39 So if you can encourage people to kind of scrunch together to use that space more efficiently,

11:44 then you've got a much more efficient use of that space per person.

11:47 And if you think in terms of not buildings, but providing working space, again, which is kind of what you see now,

11:53 there are so many kind of lucrative businesses that I've failed to kind of take forward.

11:58 You were really early at a lot of these things, right?

12:00 Yeah, we ended up doing a lot of stuff like that.

12:03 And that was my exposure to messing around with like Python and Twisted because we said,

12:07 oh, yeah, we could do that because we figured you're just reading RFID cards, right?

12:10 And 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:17 we 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:24 And in order to do that, we figured, well, we use Twisted and we need a server to make a door work.

12:29 So the link I've shared is door D because it's like a demon for a door.

12:33 Oh, nice.

12:34 Yeah.

12:35 And 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:42 So we, at one point, we kind of hooked this up so that when you walked in or tapped to RFID card,

12:47 because you could make that speak to the speakers, you could have like your theme song walk in, right?

12:51 Or you could have like loads of silly ideas like that.

12:53 Because if you could, yeah, I mean, it's, if you can think of an entire building as like a gigantic Linux box,

12:58 then there's kind of fun things you can do.

13:00 Yeah, that's really clever.

13:01 I like it.

13:02 Yeah.

13:02 Yeah.

13:02 We also realized there's loads of silly things you can do as well.

13:05 I mean, I learned firsthand that, so we, yeah, in 2000, I think seven, I've realized that if you put a door on the internet and you expose an IP address for anyone to use, right?

13:15 Then 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:22 And we ended up having quite a few phone calls like, Chris, yeah, the door's going a bit weird again.

13:27 Can you fix that, please?

13:28 Yeah.

13:28 The door's got a DDoS attack on it.

13:32 What are we going to do?

13:32 Yeah, yeah, yeah, yeah.

13:33 Like, I'm sure there's a joke about doors and DD doors or something there, right?

13:37 But yeah, the DDoS door.

13:38 But anyway, there was something like, but we also, when we were working with this,

13:42 I realized that there's a reason hardware is called hardware.

13:45 And I decided to make, okay, let's work with software a bit more.

13:48 And then I started working with Django a bit on a couple of other projects.

13:50 And I found Django really, really nice as a framework to work with because it was really well documented.

13:55 And I found the community quite friendly.

13:57 And yeah, that's probably how I got into programming was kind of artsy student trying to implement things,

14:03 realizing that I didn't know what I was doing.

14:05 And then realized I had to actually run some of this myself and had to learn how to use servers and stuff.

14:10 So I have a bit of a patchy background.

14:14 And only in like 2016 did I really start reading about data structures.

14:17 And like, oh, God, this would have been so much easier if I didn't know this 10 years ago.

14:21 Exactly.

14:22 This would have totally, we created this.

14:23 Why did I create this?

14:25 It just existed.

14:25 Yeah.

14:26 Man, what a cool series of sort of getting into it, getting into programming experiences.

14:32 Those are great.

14:32 So what are you doing now?

14:33 At the moment, I am splitting my time working with one group called the Green Web Foundation,

14:38 where I am currently helping them in kind of rebuild chunks of their stuff in Django and

14:44 splitting my time working with a group called climateaction.tech.

14:47 And generally working as a kind of consultant, product manager consultant, I've still got where

14:51 groups will basically work with me and hire me to help them think through their process.

14:56 But I've still got a few old Django clients who I've been looking after and still work

15:01 with them every now and again.

15:02 So I do a kind of bit of a mixed grab bag of all this stuff.

15:05 But increasingly, I find myself doing a lot more work with tech and climate, specifically

15:09 speaking to techies who have said, hey, I want to do something more responsible with my

15:14 skills, or we're building a project and we figured out that we're using electricity to

15:19 run computers.

15:19 And maybe we should think about that part there.

15:22 Or I'm planning to set up some kind of practice around how we build digital projects.

15:26 And we want to be a bit more responsible about the unintended consequences that we might have

15:32 when working on that.

15:33 So I do a bunch of these things.

15:34 And I've started writing about this stuff in a newsletter called Greening Digital, because,

15:39 well, greening how we do digital.

15:41 It seemed like a relatively straightforward thing.

15:43 So that's what I do.

15:44 And so, yeah, basically, bits of coding and evangelism stuff with the Green Web Foundation

15:50 and a grab bag of mixed stuff, which tends to be Python in many cases, because it's what's

15:56 become the language I'm most comfortable working in.

15:58 And it's useful because it's the second most popular language in the world now.

16:01 So the chances are that things have been implemented by someone who's thought about it longer than

16:05 you have.

16:06 Absolutely.

16:06 There's so many different libraries you can grab.

16:08 Those are a bunch of cool projects and organizations.

16:11 So the Green Web Foundation idea is one day the internet will run entirely on renewable energy,

16:16 and they develop tools to help speed that up, right?

16:19 So you're helping them with that.

16:20 And then the Climate Action is a global community of tech professionals using their expertise to

16:25 support solutions for climate change.

16:27 Yeah, that's pretty much it.

16:28 Nice.

16:29 You'll have to give me the link to your newsletter so I can put it in the show so people can

16:33 subscribe to it.

16:33 Yeah, absolutely.

16:33 This portion of Talk Python to Me is brought to you by Brilliant.org.

16:39 It's early 2020, and many of us have made New Year's resolutions.

16:43 The best resolution you can keep is investing in your STEM skills.

16:47 Whether you're a student, a professional brushing up on cutting-edge topics, or someone who just

16:53 wants to understand the world better, Brilliant.org makes it easy with interactive explorations

16:58 and a mobile app that you can use on the go.

17:00 If you're naturally curious, want to build out your problem-solving skills, or need to

17:05 develop confidence in your analytical abilities, then get Brilliant Premium to learn something

17:10 new every day.

17:11 Brilliant's thought-provoking math, science, and computer science content helps guide your

17:16 mastery by taking complex concepts and breaking them into bite-sized, understandable chunks.

17:22 Get started by visiting talkpython.fm/brilliant, or just click the link in your podcast player.

17:27 Let's talk about climate change at the high level just before we dive into how can we write

17:35 code that alleviates that pressure and maybe is a better citizen of the world, digitally speaking,

17:41 and also the real effects that it actually has.

17:43 And you talked about all this using energy, in particular electricity, right?

17:48 Servers running electricity, MacBooks running electricity.

17:51 There's a lot of negative news here, but one of the things that I see as a real sliver of hope,

17:56 let's put it like that, in terms of this part of the slice, is electricity is awesome because

18:01 it often does come from nasty sources like burning coal, but it can come from solar panels.

18:08 It can come from wind.

18:08 It can come from, right?

18:09 It can come from renewable places.

18:11 So it's like, you don't have to change anything.

18:13 You don't have to change anything at all to completely turn all that stuff to renewable

18:17 foundations.

18:18 You just need to change the generation of it, right?

18:21 Yes.

18:21 If it was like airplanes are a serious problem, right?

18:24 Or cars, we're working on electric cars.

18:26 We're getting there.

18:27 But it's diesel trucks.

18:28 It's super hard to just say, well, all you got to do is plug it into a different source.

18:32 Like, no, diesel comes from a place where it's really hard to make that carbon neutral or

18:37 renewable, right?

18:37 So in some sense, the story around tech climate is kind of positive in that regard,

18:42 I think.

18:42 What do you do?

18:43 Yeah.

18:43 I'm really, really glad you started and started framing it this way, because I think it's really

18:49 important for us to realize that a lot of the things that we know and love, like the

18:55 internet, for example, it doesn't need to be running on fossil fuels.

18:58 And what you spoke about before was the issue is, in many cases, it's our use of fossil fuels

19:05 and where we get energy from, not necessarily some of the kind of life choices we make.

19:10 Like, yes, there is obviously going to be consequences of burning huge amounts of fossils if we, say,

19:15 if we're flying across the Atlantic every second week, for example.

19:19 But if there is a way to basically do that without the CO2 emissions from burning fossil

19:24 fuels, and increasingly, we are seeing options to make that possible, then I think it's actually

19:29 that suggests to us that there's actually a kind of more positive future that we can have

19:34 available to us.

19:34 And when you, I don't know about you folks, but I don't remember the internet changing or

19:39 my experience of Google changing when they switched to green power or when Facebook switched

19:44 to running on renewable power.

19:45 It's not like the internet started juddering to a halt and it started working different.

19:49 It used to be really fast, but now it's kind of clunky.

19:51 It doesn't quite burn as well or whatever.

19:53 No, it's not a steam engine, right?

19:55 It's electricity.

19:55 Beautiful.

19:56 Yeah, this is the thing.

19:57 I mean, this is actually, when we zoom out outside of technology, you'll see that there's

20:00 a whole conversation around how do we address some of the wider scales?

20:04 And there is this phrase kind of electrification.

20:07 Like, we need to electrify a lot of the sources of energy that we use because a lot of it comes

20:12 down to our use of energy, not fossil fuels.

20:14 But we have, in many cases, kind of grown up with this idea that the only way you can

20:19 get energy is from fossil fuels.

20:21 And even when it comes to something like aviation, there are actually ways where you can use, say,

20:27 excess electricity to create the kind of chemical energy in a way that you could use for, say,

20:32 something which needs a high amount of energy density, like, say, flying or trucks or something

20:38 like that.

20:38 The only problem is we often, or for the last 40 or 100 years or so, we've been not really

20:45 accounting for all the costs of getting fossil fuels out of the ground and put them into the sky.

20:50 And as a result, we default to basically drilling for fossil fuels when there are other better ways

20:57 of experiencing a lot of the same upsides without the unintended consequences that end up causing

21:02 avoidable harm.

21:03 Yeah, I totally agree. This whole externality thing is frustrating, for sure. You know, Elon Musk,

21:09 as 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:15 these ideas forward around like electric cars and so on and solar panels. He came out and said, look,

21:20 if we just took some part of the Southwest United States, like Arizona or something, I think maybe he

21:26 said Nevada, he said, Nevada, and just took 100 square miles and just covered it in solar panels, that's enough

21:31 energy for the entire United States. He also threw in, I don't know, like a five mile square battery or something

21:36 ridiculous 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:41 amount of energy used by the world. It doesn't seem like we as collective citizens of the world are incapable of

21:48 generating that much renewable energy. It just seems like a matter of will, almost, because surely we could

21:54 create enough solar panels to cover 100 square miles. Like we paved the earth constantly, right? And that's

21:59 way more work or, you know, whatever, right? I mean, it just seems like there are these steps that we could

22:03 take that would not be, they're not science fiction. We've got to like create a Dyson sphere around the

22:09 whole universe or hold the solar system and channel it back. No, it's just like, it's pretty attainable.

22:13 So I think this is one of the things that I find both frustrating and inspiring when we have these

22:18 conversations, because you've mentioned Elon Musk, and it's very easy for us to immediately kind of

22:23 reach for the closest figure to Ironman that we can think of. Yeah, exactly. And like when I grew up

22:27 totally like, yeah, he's like Ironman, but his stuff is open source. This is awesome, right? Like we think

22:31 about this, but it's also, and when you look at things like the effect, the impact that say, well, just

22:37 the kind of like mindset that people think about when it comes to things like EVs and making that

22:40 reality, that's really, really, really good. But you've touched on a few really, really important

22:44 and interesting things. You need to be able to look things that are kind of more systemic level.

22:47 Like there's a reason why you have these things. And in many cases, it's not down to us not having

22:52 the technology because we do have the technology. Like right now in 2019, we have seen the cost of

22:58 batteries fall by something like, I think more than 85% or around 85% since 2010. And we've seen an even

23:06 steeper fall when it comes to solar panels. So it's not like these things are, and to the extent

23:11 now that in many cases, deploying new solar is cheaper than continuing to run coal or continuing

23:17 to run gas-fired power stations and things like that now. And in Europe, for example, which is where I'm

23:22 from and where I'm most familiar, more than half of the coal-fired power stations that we have now are

23:27 running at a loss simply because people have started pricing into taking, you know, more accurately pricing

23:34 the unintended consequences of coal as well.

23:37 Even in the US where the current administration is doing everything they can to prop up coal,

23:42 there's still tons, like many, many large coal plants shutting down for the same reason you're

23:48 talking about. And you're going to talk about the UK.

23:49 Yeah. 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:54 fastest countries in Europe to decarbonize its energy, its electricity to the point now that I think

24:00 recently we've got around 40% of the grid being powered by renewables.

24:05 The often, and this is a, in many cases, this is because essentially it's become so expensive to

24:10 run fossil fuels. And you've seen that and you're seeing a similar thing in America. America's emissions

24:15 or like a, you know, for every kind of unit of electricity is actually falling quite, it has been

24:20 falling pretty quickly. If we just looked at the kind of economics, it would probably be falling even

24:25 faster. But in many cases, you have cases where basically there is a, you don't have that, you

24:30 have political support to kind of slow down a transition away from a dirty, harmful fuel, which

24:36 employs, I think there are more hairdressers than coal miners in America now. Right. So we have these

24:42 ridiculous kinds of figures, you know, propping up these industries at the expense of, you know,

24:46 hundreds of that millions of jobs in other industries here. And I kind of think that we need

24:52 to like, when we spoke about Elon Musk here, right, I think there's a degree that yes, it's really cool

24:56 that we have electronic cars, but we also got to think about, well, if we are going to be doing,

25:01 if we're going to give someone all the props for that, and basically kind of seeing them like some

25:06 kind of Ironman, but open source kind of hero, hero figure, then I think it's fair for us to expect

25:11 them to be a bit consistent about how they, about who they support politically, and who they,

25:17 and who they fund. And if they're going to be funding groups, which basically slow down climate action,

25:21 then I think we need to be prepared to say, hey, it's cool that you're building electric cars,

25:25 but can you not do the thing which stops us moving away from fossil fuels? Yeah, because I think it's

25:29 we're adults, and we need to be able to have these complex thoughts on our minds. And we also need to be brave

25:35 enough to actually address the scale of the situation, because there a lot of it is really,

25:40 really freaking scary. But we are capable of addressing this and facing this, if we as long as we actually

25:46 just are basically a bit more rational about it in many cases.

25:49 Yeah, absolutely. Absolutely. I totally agree. And it's really interesting how it's not really a

25:54 technology problem, right? It's a technology challenge, but it's not like it's incapable.

25:59 It's not like we have to envision, we have to invent vision or something like that, right?

26:03 Now, I guess let's just round out this really, this sort of high level view just by pointing out that I

26:09 think yesterday, it was yesterday that Greta Thunberg, the young girl from, is she from Sweden?

26:15 One of the Nordic countries.

26:16 Yes, one of the Nordics, yeah.

26:17 Like climate activists. She was voted or made the time person of the year, which is pretty

26:24 interesting. So that I think kind of speaks to a little bit of, you know, people are starting to

26:28 pay attention.

26:28 Absolutely. I am. She's so, so cool. I'm so, so pleased. And I find this, this child inspiring.

26:35 I think we need to be able to be prepared to be able to say, yeah, the actions of these people,

26:40 and them having that kind of moral clarity and consistency, I think is really, really inspiring

26:45 for the rest of us. And like, we don't all need to be Greta, but I think there are the things she

26:50 asks us to do, but basically, Hey, I'm a kid adults. Can you pay attention to the science and do something

26:55 with this and basically act like adults? I think that's something that we can respond to. And I

27:02 think that speaks to a part of us, which I feel that we, you know, if we look inside ourselves,

27:06 we can answer and work in a kind of responsible kind of authentic way. So yeah, it's really,

27:12 nice to see that. And I, and I think that we need people like that to be reminding us of what

27:18 our responsibilities are as adults are really.

27:20 Yeah, absolutely. So let's bring this back to software, right? That's why we're here talking

27:24 about this because as software developers or people that use computing in significant ways,

27:30 there's actually a lot of concrete stuff that we can do. And code runs everywhere. Code runs on our

27:34 phones, code runs on our laptops, but a lot of code, more than people realize, I think runs on data

27:40 centers. And so there's an interesting stat that I got from Forbes. I think this is, yeah,

27:44 this is only for the U S but the U S data centers use 90 billion kilowatt hours of electricity a year,

27:50 which is roughly equivalent to 34 giant coal powered plants. And I think this is 3% of all

27:57 either energy or electricity consumption in the United States. Yeah. Total electricity, 3%.

28:02 Okay. So these numbers actually feel, is this maybe low? no, these numbers are actually,

28:06 yeah, there are, I mean, I was, so this is, you, you get a number of different estimates for this

28:12 ranging from like 200 gigawatts, which I think is a billion kilowatts, a hundred gig in a gigawatts,

28:18 or 200 gigawatts. It kind of ranges. The estimates vary depending on who you look at.

28:24 Right. Does the data center inside a company count or maybe only public data centers or what do they

28:29 count? Right. It could really vary who they're counting there. Yeah. So it's kind of mind blowing,

28:33 right? I was at, in my role as someone working with the Greenberg foundation, I ended up at this

28:39 event, which, was organized, a workshop organized by the European commission on how they're going to do

28:45 green public procurement. Because in Europe, they spend something in the region of 45 billion euros each

28:49 year on technology and, they want to do that in a more, in a fashion, which is more in line with

28:55 the science. And when in line with the fact that they have basically declared a climate emergency as

29:01 like the, the block of Europe. So the, because they too have realized that the internet runs on

29:06 electricity and servers run electricity, they want to work out how to do this. And even inside that,

29:11 when you've got people from Amazon, Google, Microsoft, all of these places, they are still trying to

29:15 like saying, Oh, we need a definition of cloud that we can use across this. We need a definition of

29:19 what data centers are. And it's kind of bonkers that you do have, you have this ambiguity. And

29:24 when you see these numbers, lots of the studies, they will have often use slightly different definitions

29:29 of the same thing. Like, does it include Bitcoin mining? Does it not? Is that a data center? Is it

29:33 not a data center? Because that kind of power profile is different to how you might use something else.

29:37 So it's a long story short is basically these numbers you've shared are, they're not wildly out.

29:43 And, the figures that people tend to use for data centers and like the internet in general,

29:48 or like a kind of tech is between 2% and 4% of, well, between one and 4% of all CO2 emissions.

29:55 So that's in the same ballpark figure as all of shipping or all of aviation.

30:00 Yeah, exactly. All flying is like 2.5 or something like that. Yeah.

30:03 Yeah. Or Germany. So like, these are like significant numbers and just for like a streaming

30:07 video, for example, the figures we see from a recent report by the shift project, they say, well,

30:14 all streaming video, that's about the same carbon footprint as Spain, like the country of Spain.

30:19 Yeah. And it's cats. It's like viral videos, right? No, of course not all of it.

30:24 Actually, I know. it's crazy. I like a quarter of that is porn. All right. So a quarter of Spain is

30:31 porn, right? And it's just, yeah, you like the numbers are mind blowing when you look at this,

30:35 because we tend not to really be thinking about this kind of stuff because we are so

30:40 cause program, because we've done such a good job of abstracting the eventual kind of

30:45 implementation details of whatever it is that we're doing that we're not aware of this stuff.

30:49 One of the feelings that I have that is like a realization that blows my mind is I can go sit

30:53 in a coffee shop or somewhere with my MacBook and I have a pretty high end MacBook, but even if it was

30:58 like just a MacBook air, right, I could sit there and I could write my code. I have a little database

31:01 server running and get the web app working and whatnot. And then I push a button and

31:05 and it goes out and runs on incredible high end servers and massive data centers with like

31:10 its own database server and you know, the web front end. And, and it's just like,

31:15 it's almost like a disconnect for me that I can work on these little tiny devices and I push a

31:19 button and then it's like this great big thing. And of course, I mean, it could scale huge, right?

31:22 Like I could, I could scale that out to a hundred servers that for some reason that was a thing.

31:26 And it's really easy to disconnect that from your mind to like, I'm actually running a hundred

31:29 desktop type things when I just push, push deploy, right?

31:33 Oh yeah, you're right. And like, this is, but it's, it's worth being worth being aware that in

31:37 many cases that when you put something into the cloud, for example, like over the last say few

31:42 years, like at least five years, actual energy usage that was reported by the IEA, the international

31:48 energy agency, they've generally said that emissions have been like, so energy use has roughly been

31:54 pretty stable in America, at least largely because this has been this massive growth or move from lots and

32:00 not sort of relatively inefficient data centers to the cloud, but cloud is massively more efficient.

32:05 Right. You have a virtual machine and it's, it's sharing that CPU and that hardware with many other

32:10 virtual machines, rather than having a hardware device in my own company's data center.

32:14 This portion of Talk Python to Me is brought to you by Datadog. Datadog is a monitoring and analytics

32:20 platform that unifies metrics, logs, and distributed traces from your Python applications. Datadog's

32:26 tracing client auto instruments, popular frameworks and libraries such as Django, Flask, PostgreSQL,

32:31 and AsyncIO. So you can quickly get deep visibility into your applications. Trace requests across

32:37 service boundaries, correlate traces with logs and metrics, and plot your application architecture with

32:42 the service map. Get started today. Sign up for a free trial at talkpython.fm/Datadog. And Datadog

32:49 will send you a free t-shirt.

32:50 There is also a flip side to this. And there's a guy and so there's a gentleman called William

32:55 Stanley Jevons. 200 years ago, he observed the same impact that we see now when he was looking at how

33:02 steam engines were becoming more and more efficient. They were like every individual new generation of

33:07 steam engine uses much less coal for the same amount of work. So that's going to result in a kind of fall

33:12 in coal usage by the industry. Right. And it turned out not to be the case. It turned out to be the,

33:17 it was called William, the Jevons paradox is the phrase. We might also call it the rebound effect

33:22 in some cases where as you make something more efficient, you end up seeing more use of it.

33:27 So the total amount grows even higher. If you want to sound really posh, you can call it the

33:31 Kazum Brooks postulate. And that's one for Wikipedia, right? And that sounds really, really posh. But

33:36 basically, as things get more efficient, we end up using them more, which can often result in greater

33:42 emissions. If we do not find a way to decouple the emissions, basically, there's a line and

33:47 you need to, there's a degree at which it ends up with more emissions or not emissions.

33:51 And this is kind of why tech in many cases is being presented as one of the kind of wonderful

33:55 hopes of the future. Because if we could only find a way to make better use of the tools we have,

34:00 often through technology, then there's a chance that we could kind of steer this economy away from

34:05 the iceberg and into something more like, I don't know, Star Trek than Mad Max, I suppose.

34:09 Yeah, let's definitely stay away from Mad Max. Now, you've given a couple of presentations on this,

34:17 and I'll link to those in the show notes. You've got the slides up, and those are really helpful

34:22 with cool pictures. One company that you called out that I use for credit card, when people buy

34:26 courses on my platform, it goes through Stripe. The company you called out is Stripe for being a good

34:30 citizen on how they report and account for their emissions. Can you talk to that real quick?

34:35 Yes. I'm wary about kind of diving too deeply into this. And it's probably useful to have the slide

34:39 that we are going to refer to. But if an organization is going to talk about carbon,

34:43 or talk about being kind of environmentally responsible, if they're not really talking

34:47 about scoped emissions, then they're kind of doing it wrong. All right. Because this is generally

34:51 considered the sensible way to talk about it. And you have three main kinds of scopes, which are

34:58 generally kind of considered ways to account for emissions from different things you do. So scope one might be

35:04 emissions from you burning fossil fuels yourself. I've burned 100 gallons of gas. So that's my

35:09 carbon footprint. Yeah. Yeah. The example I use in talks is coffee, because lots of us like coffee.

35:14 So if you burn gas to heat up a kettle to make coffee, that's like scope one emissions, right?

35:19 Scope two is emissions from electricity that you use. So that might be someone else miles away burning

35:25 coal so that you can use a kettle to heat up some water to make coffee. All right. So companies like,

35:31 Amazon and Google, who tend to use a lot of electricity, they're going to have very,

35:35 very high scope two emissions in most cases.

35:38 Right. Because some is lost on the wire, there's some inefficiencies at the plant,

35:41 all that kind of stuff, right?

35:42 Yeah, absolutely. And that kind of speaks to the fact that a lot of us don't tend to,

35:46 like we don't physically burn coal ourselves to power a computer, but someone's burning it

35:51 somewhere in our behalf, right? So in many cases, that might be kind of those large companies scope

35:55 two emissions. And we wouldn't really have very high scope one emissions ourselves in many cases.

36:00 But scope three is the kind of biggest source of emissions for most of us. And the slide that I

36:05 think you're referring to shows Stripe having quite low scope one and scope two, which makes sense,

36:10 because they are large, large customers of kind of cloud giants. So therefore, scope three is basically,

36:17 the example I use is imagine you're walking into Starbucks and paying for coffee. So someone somewhere

36:23 has burned fossil fuels to generate the heat to make that coffee or to make sure you're in a nice,

36:28 warm space. So it's kind of in your supply chain, really, that needs to exist for you to make coffee.

36:32 And for most of us, our emissions are going to be in scope three, because we are mostly purchasing

36:39 services and selling services to other people, if we're developers rather than, I don't know,

36:43 miners ourselves, you know?

36:45 Right, right. There's a lot of knock on effects out in three, right? Like,

36:48 we've got to fund the military who sends a bunch of people to some unstable place. And

36:53 how much carbon do they spend to just ensure political stability so that then the oil company

36:58 can send, you know, a bunch of machines over there to mine it up and ship it? Like, there's a lot of

37:02 stuff happening that's not just the carbon captured in that, you know, bit of oil.

37:06 Yes.

37:06 We should think about this for basically our code as well, is what you're saying.

37:10 Yeah.

37:11 As developers, I think the concept that we have a dependency chain to the stuff we do

37:16 shouldn't be an alien one. Like, we're continually using dependencies from lots of other people.

37:21 And this is how people in the kind of climate world think about dependency chains, really.

37:26 Because this is something that we're used to using anyway. Like, if we have a requirements.text file,

37:31 then there's something happening there that we're aware of. So intuitively, it should be

37:34 something that we can kind of internalize as a concept, really. It's just that we tend not to

37:38 quantify this.

37:40 Yeah. I mean, that was sort of what my example of the coffee shop push was. It's kind of like,

37:45 it's so easy to, like, it stops here. You know what I mean? But it really, that's just the beginning.

37:49 To be concrete, you have some interesting mental models that you talk about that help bring this and

37:53 think about it and some tools we're going to talk about and some steps. So you have platform,

37:57 which is the infrastructure that you run, right? This is, I guess, the cloud directly,

38:01 a lot of times. Packets, which is the stuff that flows between you and your other services or

38:07 people who are considering them. And then process about how your organization works, which is maybe

38:12 a little more tangential to that. So let's start a platform.

38:15 Yeah. Okay. So I've tried to take this concept of scopes and find some kind of comparison for

38:22 what you might do as a developer or as a kind of tech professional, because it feels like speaking

38:27 about scopes is often quite abstract for a lot of us. And it kind of makes sense to

38:31 talk about things we would use ourselves. So I talk about packets, because in many cases,

38:36 a lot of us, that might be infrastructure that you might use yourself or the servers that you run.

38:40 And when you have something like that, you've got kind of like levers. So one lever might be how you

38:45 provision the infrastructure that you use to kind of meet demand. And, you know, we could go back to

38:50 examples where you used to kind of physically provision servers in a rack. And then you just hope that

38:54 you and your provision for the most possible load, because it's going to be really hard to scale that up.

39:00 Right. Right. Especially if you have to buy machines. And like you said, put them in a rack.

39:03 If on Fridays, you have to handle 100 concurrent requests, but most times it's 10, you buy machines

39:09 for 120 and you run them all the time.

39:11 Yeah, exactly.

39:11 Probably.

39:12 Yeah. And most of the time that results in you, because computers don't scale all the way down,

39:16 you're basically burning loads of money. But it turns out that because computers use fossil fuels,

39:21 a lot of the time they're burning lots of fossil fuels. There are unintended consequences to that,

39:27 which result in lots and lots of CO2 emissions. And yeah, you have that. And as we've got better

39:33 at provisioning, or if you are a kind of developer, the way you might provision might have an impact.

39:37 So rather than having a giant, giant physical server, one thing you might do instead is have

39:42 some kind of scaling thing or working with VMs or dockers or whatever thing that makes it possible

39:47 to kind of scale that way. That's one way.

39:49 Yeah.

39:49 Like Kubernetes is pretty easy for them.

39:51 It also seems to me, I would like to hear your thoughts on this, that if you're purchasing

39:56 VMs in the cloud, I know there's other stuff like serverless and so on that kind of does this

40:00 automatically. But if you're say purchasing, I guess even Docker, but if you're purchasing say servers

40:04 and virtual machines, you can buy them or provision them with dedicated CPUs so that you're guaranteed

40:10 to have that CPU core available for you, or you can do it with shared. And I feel a little bit like

40:16 if you go and buy the dedicated server, fully dedicated CPU machine, you're kind of locking

40:21 out that thing to run all the time, right? Because you've got 12 cores, only 12 people can buy

40:25 dedicated machines on that and that's it. Whereas if you're in the more floating kind, you might

40:30 suffer a little bit in performance, but it's definitely going to scale down massively when

40:34 it's not busy because it's going to be able to share that with other VMs. What do you think?

40:38 It's a bit like, okay, let's just use the example of cars, right? I could buy, if I run a business,

40:42 I could have like 12 cars, yeah? Or I could like pay for a taxi service to scale up, to scale the

40:47 amount of things I'm using at any one point, right? Yes, you having to purchase exclusive use of

40:52 something will do that. And in many cases, we will make that decision. But in many cases, we, there's

40:58 going to be, there'll be trade-offs that we make and there'll be consequences of us doing that kind

41:01 of stuff. And it's very difficult to really kind of give specific guidance on this because it's going

41:06 to rely so much on context. And this is why I think in many cases, we kind of need to be able

41:11 to understand the full cost of what we do and understand that and be able to make those judgments

41:16 in an informed way. Because in many cases, there is an argument for using something like say serverless,

41:22 where the kind of economics and the incentives are aligned much, much better.

41:26 Right. Serverless, it doesn't even run at all if it's idle, right? It only processes the demand.

41:31 Yes. So that's good in some ways. I mean, to be honest, the amount of the kind of energy savings

41:37 that come from that, it's quite difficult to really quantify because most of the large organizations that

41:43 do provide this tend not to be prepared to share these numbers. And if there are groups who can

41:48 share these numbers, it would be fantastic for the good of science because even the professors say,

41:53 we don't know either. Like no one knows right now. And it's very difficult.

41:57 It's all these giant corporate places that data serve, the whole data center infrastructure.

42:02 That's a huge area of competitive advantage. They're making their own hardware. They're doing

42:07 all sorts of crazy stuff around cooling and energy. I mean, they don't want to share that. Why would

42:11 they want to share that?

42:12 Yeah. And like you see this now, even when, absolutely. And even down to just like how long

42:17 you hold on to servers in the first place. Like you might assume that in many cases, you, you know,

42:23 we might hold, we might assume a server, which takes a lot of energy to turn into a server.

42:27 Cause remember like chips are sand initially, right? Like there's a lot of energy from turning

42:32 sand into a server or the chips right there. Like we don't really think about it until it's not

42:37 something we have to face, but yeah, there's going to be a member because if energy is coming from fossil

42:41 fuels and it doesn't need to, but often does, then that's where there's going to be lots of emissions.

42:44 If you have a server, which only lasts, if people are swapping out servers every year versus every

42:49 three years, that's going to have an impact on the calculations that you actually might have.

42:52 So yes, you're, you're absolutely right there.

42:54 So one question I have about serverless, like on the face value, it seems obviously that's

42:58 going to be better than VMs. Let's say the shared kind, right? I mean, the dedicated ones clearly

43:02 are just constantly running, but it also seems to me like each individual requests might take a lot

43:08 more energy because it's got to maybe start up some kind of Docker. It's not just running a few lines

43:13 of code and already running process. It's every one of those is kind of a fresh go at a new environment.

43:18 So even though you can scale infinitely, cause you could hit a hundred thousand servers.

43:22 You hit that hard enough, right? But that may per request cost more. There's just like an

43:27 interesting trade-off that I was thinking about as we were talking about this.

43:30 Yeah. I mean, this is exactly what you see with servers anyway, right? Like we know that if you,

43:34 if you're going to buy a physical server, then I mean, when, when Amazon, when various,

43:39 when kind of cloud computing products came out in the first place, you know, people say,

43:42 Hey, that, why, why would I spend money on cloud when I can buy a server to give me those,

43:46 the same resources over a longer period for less money? Like you're paying for the flexibility and

43:51 you're paying for the fact that you don't have a giant great server to kind of decommission at the

43:55 end of three or five years or something. So in most cases, there will be a higher per request trade-off,

44:01 but with the idea being that you're not, you pay slightly more per request for the flexibility

44:05 and the efficiency at kind of systemic level, I suppose. But once again, who knows for sure?

44:11 Yeah. Who knows? I would, I would guess that serverless is more efficient in terms of energy

44:15 in general, but, but I, I don't really know. All right. So one thing I do want to talk about in this

44:20 area is, you have some tools, like at each one of these three levels, you have tools in the

44:25 Python toolbox, stuff that you can run or things you can do or libraries you can use. So maybe tell us

44:30 about the ones that you have for this and I'll throw in a few that I came up with as well.

44:34 Yeah. Okay. So basically any tool that can track the amount of CPU usage you're using can also give

44:39 you an idea because energy uses fossil fuels, what the climate impacts of a lot of this stuff will

44:43 actually be. You know, there is now a moral argument for basically optimizing your code

44:47 because, so like that is good news for developers who like performance, right?

44:51 Right. You already want fast code now because it means you can, obviously users want it because

44:56 faster software feels better and more professional. You want it because it's fewer machines to manage.

45:01 it costs less. The data centers want it. And then of course that's all lined up with CO2 emissions.

45:07 You found this thing called energy dash usage, which is an NPM tool, right? You can run.

45:13 This is actually from, this is a Python.

45:15 Oh, Python. Okay. Uh-huh. Oh, it's another one down later. That's NPM, right?

45:18 Yeah. So this was designed specifically to address the, I think it was designed as a response to

45:24 basically revelations amongst people who are working in technology, working with say AI that, the

45:29 kind of, you know, we speak about Moore's law, like it doubles every 18 months, right? So that is,

45:34 you know, you know, we see some kind of changing impacts there. I think a year and a half ago,

45:38 a paper was released with, showing that the kind of average amount of compute used to achieve

45:43 various kinds of goals or breakthroughs with, with AI is doubling every three and a half months.

45:48 Right. And, over, I think over a two year period, please don't, I'll share the link

45:52 specifically, but because of this, this doubling feature is, it basically results in massively more

45:58 energy use. So the point that like something like that might double seven times in the set period,

46:03 if you're looking at a three and a half month doubling period compared to 18 months,

46:06 it's like 200 X, 200,000 X versus seven X. So you're seeing like a big increase. And, this

46:13 was generated. This Python module is basically a tool to allow you to kind of profile some code.

46:18 It'll give you an idea of the emissions associated, the energy usage for that by kind of reading some of

46:23 the energy usage stuff from some, some, some, I think from some Intel processors share this,

46:29 and then they converted that to the CO2 per kilowatt hour, for example.

46:32 Right. And then it ties it back to where like you're actually located even.

46:36 Yeah, absolutely. That's what it does. And this was designed for people working with machine

46:41 learning to get an idea of what algorithms are going to have an impact so that you could make

46:46 these decisions upfront or be aware of the trade-offs of using one thing over another. Because

46:51 as I understand, and I'm not a data scientist, different machine learning tools or approaches

46:56 use wildly different amounts of compute. And this was designed as a tool to show you that. And there's

47:02 also a whole kind of syllabus tied to this because this was shared by a professor

47:06 who I follow on Twitter when I saw it. I've totally forgot her, the woman's name who did

47:10 it. And I feel I'm really, really embarrassed for forgetting her name, but she's been sharing

47:14 a load of really interesting stuff in this. And this was work from, I think, a group called

47:17 Climate Change AI, who invested a bunch of time into this. So yeah, that's one thing that you've

47:22 got.

47:23 That's really interesting. I'm trying to look up her name as well, but I couldn't find either.

47:26 So another thing in this platform part is, like we just mentioned right before, is faster code is more

47:32 efficient code, means fewer servers, means smaller servers, and so on. And there's just a bunch of

47:37 techniques that you can apply to your code, right? Like if you use a database, make sure you're using

47:43 an index. It's not just faster. It uses less energy, right? If it responds in 10 milliseconds versus

47:48 a second, that is a whole lot less work it's doing. Not always, but most of the time when your code is

47:53 stuck or waiting, it's something in the chain is cranking as hard as it can to get back to you. Maybe if

47:59 you're calling a remote service and there's like a 100 millisecond ping time, that's different. But if it's

48:03 not far away, the delay is sort of computation time for something, I would suspect.

48:08 Yeah. So some of the concrete examples that I think that might be of some use here would be, and you could

48:14 kind of like take a leaf out of some of the nodes book, right? When you have things like

48:18 async, if you've got a way of working where you're not blocking and you're able to serve another

48:23 request, then theoretically you don't need to be running quite so many machines to do the same

48:27 amount of work. Absolutely. If you're using the async and await-based frameworks like Sanic or some

48:33 of those, yeah. Yeah. So there are some ways that you can, basically anything that tend to improve

48:38 performance, because you're generally using fewer resources to achieve the same kind of result,

48:42 it makes a lot of sense. So yeah, you already know these techniques in many cases,

48:48 if you're working with Python, for example, and some of the things are directly applicable.

48:53 Right. And sometimes people don't bother because it's not slow enough. You know, if you have a

48:57 pretty busy web page that loads in 100 milliseconds, but the load is not so high, it's still fast enough,

49:02 right? You don't need to necessarily optimize it. But if you could get it down to 25,

49:05 it would use a quarter of the energy, right? Yeah.

49:08 Like, so profile your code and see where it's at. And just, I don't know, just put that as one of the

49:13 trade-offs you think about as you build code and care about it.

49:15 Yeah. And this is partly, this is a nice kind of takes us back to the kind of platform packets

49:18 process thing that I was just talking about before. So I found platform as a useful thing to talk about.

49:23 And like, we've been doing some work with an agency. Actually, there's a group called the Panoply.

49:28 They're a kind of transformation agency in the UK. And we did some work as the Greenway Foundation to

49:33 basically help them think about how they build, do run digital projects and where,

49:37 and we started looking at some of their own projects. And we found that like the platform

49:42 part was quite a significant chunk from at least one of the projects they're working on. But there

49:46 are also other leverage points that they had, like the packets part and the process stuff.

49:50 Yeah. Yeah. Let's talk about packets because that's way harder for us to understand how we pull

49:54 those levers. I can choose the type of server I get. I write the code that runs.

49:58 I could decide serverless or virtual servers, but I can't decide how my packets get from my server in

50:04 New York to you over where you are, right? I can't control that part of the world. Or can I?

50:10 No. I mean, well, okay. So there's a dream we have. Yeah. There's a dream like, because if you

50:15 actually look into the networks, like there seems like BGP, which control how packets get rooted around.

50:20 And if you had knowledge about which kind of parts of the internet are run on green power,

50:24 then in the wonderful world, in a perfect world, you might have some kind of green BGP

50:29 that knows and favors the greener nodes more than the other nodes.

50:33 Right. Not just use latency or something like that.

50:35 Yeah.

50:35 But until this one gets bad, we're going to flow through this part of the world because

50:39 this is the best possible path in terms of CO2 to get this from America to Europe or something.

50:45 Well, yeah. So there is, I mean, this is one of the reasons we, at the Green Web Foundation,

50:48 we've started releasing open data sets in the hope that someone might take this idea and do something

50:53 cool with it. Because so we've got like, we're working on a thing called IP2Green, which will

50:57 basically, and there's another thing called GreenTrace, where we're basically building trace

51:00 route that hops and shows you whether hops are green or not green, based on what the information

51:04 that we have available to ourselves to make something of this possible.

51:07 But this is like way in the future, because we're quite a small group. And we were at the

51:12 kind of wouldn't it be cool if stage at the moment. But if anyone is interested in doing something like

51:16 this, I would love to chat about it in more detail. But until then, yeah, you're right, because you

51:21 don't have direct control over the internet. And to be honest, for many of us, that's a feature. And I

51:25 think as a feature, because, you know, we root around lots of things. And we know you by treating

51:30 censorship like damage, for example, it's good. But it means that because you can't control things

51:34 directly, you have to control things indirectly. So you might resort to other techniques that we

51:39 already have.

51:40 Yeah, and there are a bunch. So there's two, let's start with the projects. There's a project from

51:45 Google called Lighthouse. And the idea is it measures the effective user oriented performance

51:52 of your web application. And I've spoken about Lighthouse a little bit before I came across this.

51:57 And I thought, you know, my sites are super fast. If you go into the web logs, and you look at it,

52:02 it says it's sending the response out the door in 10, 15 milliseconds. And I thought, well,

52:07 how much more can I improve over 10 milliseconds? You know, no one is going to perceive that,

52:11 whatever. And I'll throw it in here. Let's just see how it does. I threw it in there. And it said,

52:15 your site is average to slow. What is this thing talking about? Like, no, there's no, what is it

52:21 doing? And it considers all these different things that the user perceives. And I spent days rebuilding

52:26 all 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:31 out of 100. But the idea is it has very concrete steps. And it says you should do things like you

52:37 should resize this image to exactly the size that's being displayed instead of shipping a huge one and

52:42 letting the site, the client do it. You should use gzip on your stuff you're exchanging on your HTML and

52:49 your CSS. You should use really proper caching. All of these things are good. And they're all

52:54 perceived by the user to be awesome. So if I have, you know, 100k of CSS, maybe not that much, but a lot

53:00 of CSS and a lot of JavaScript, if you only request it once, but you hit the site 100 times rather than

53:05 over and over and over again, that is a huge amount of traffic you're alleviating, right? So this tool

53:10 actually is really good for controlling what you put on the wire. This is one of the levers that you do have.

53:14 And what we decided to do was basically fork this. So we took Lighthouse, forked it, made it refer to

53:20 say which parts of the websites were green, and we called it Greenhouse. So it's a plugin. So

53:24 anywhere that you use Lighthouse, you can use this to get an idea of which parts of your supply chain

53:28 or your dependency chain are running on renewable power. And the thing that we're also doing with

53:32 this is to convert some of this. We haven't implemented this yet, but we actually have the data out there and

53:37 we've been doing it with some consulting clients. So basically, take this and give people rough ideas of the

53:42 CO2 emissions from doing this. But absolutely, like basically green websites are usually good

53:46 websites because they're fast and they make good use of the resources that we do already have. And

53:50 once again, we already know how to do so much of this. And there are clear steps that you can actually

53:55 follow. So yeah, it's a this is kind of what we did. And this is what I've spoken about a few places

54:00 before. Like you already have a lot of the tooling already to do this. And in many cases, depending on what

54:05 you're building, this may be a more effective place to spend your time than say on say the platform part,

54:10 depending on how well optimized your website is or what it's for. And this is this is why it's

54:16 important for us as professionals to understand the things and know where we would be where we were

54:20 going to spend the limited amounts of time that we do have to improve the full interim experience for

54:26 like end users.

54:26 Right. And it can be incredibly simple things like turning on caching is oh, I just didn't even realize

54:32 that we had forgot to turn on caching for these static files or turning on. Yeah.

54:35 Another one is optimizing images. And I talked about resizing them to the right size. But there's a

54:41 bunch of cool programs. The one I use called image optimum. Yeah, I'll link to it. But basically,

54:46 you grab a folder, you can just grab your whole website and throw it on there. And it'll traverse

54:50 it hierarchically to find all the images. And it applies about 10 different algorithms. Yeah,

54:54 to shrink it and it'll shrink it like 50% without even losing inequality. It's ridiculous.

54:58 Yes. So there's a there's a woman called Hannah. Oh, God, I forgot. She's on Twitter as Hannah P.

55:04 And I'll share the link to her. She said a really good deck all about this information. And it's

55:09 that basically explains all these things. There's loads of tools out there that we can use to have a

55:14 measurable improvement in a bunch of in this stuff here. And in many cases, like that, I'm glad you

55:20 mentioned the compression thing. Because when Netflix did this, they basically half the bandwidth bill

55:24 for a bunch for a bunch of the projects that implemented this because we just forgot to kind

55:29 of switch on like compress or GZIP in something on the server. And there's actually some open source

55:34 plugins to existing servers that will do a bunch of this stuff for you on the fly. If you look through

55:39 the look for the I think Google page speed plugins, you'll see some of this stuff for Apache and for

55:43 Nginx. So there's already stuff out there. And there are also services like ordinary that will do this

55:48 stuff. But again, it's worth remembering that useful to know where the impact is going to be because

55:53 depending on the usage profile of what you do, this might not be the most effective place to

55:58 invest your time if you're going to be thinking about, I guess, the kind of climate impacts of the

56:02 way we work.

56:02 Yeah. It's something as simple as throwing your images into one of these optimizers. That doesn't

56:06 take any thought, right? You're not like, well, if I do this, I might break something. You know,

56:11 long as the algorithms are lossless, you really don't have to think at all. You just do it. But if

56:15 they're served millions of times, that's a big deal.

56:17 Yes, absolutely.

56:18 Yeah, there's a lot. I guess the point I'm trying to make is there's a lot of low hanging fruit here.

56:22 And the tools that you talked about, Lighthouse, which is a plugin for Chrome,

56:25 or Google PageSpeed, which I'm linking to in the show notes is the online version. And then the

56:30 greenhouse fork of it that you talked about.

56:32 Yeah.

56:32 So that was the thing that we have. But there's also, but there's other things as well. There's

56:35 one called sitespeed.io, which is basically like a Docker container. You can literally,

56:39 if you can run Docker, you run Docker and then point a URL at it and it will give you a report of all

56:44 this stuff automatically. Like you don't, I've referred to some things from Google, but there are other

56:48 tools around there that will help that you can use. And the nice thing that I've seen with

56:52 sitespeed that I really like is that they can give you like, it talks to Grafana and Graphite. So you

56:57 can kind of start charting and graphing this stuff so you can see changes. And I believe they're

57:02 announcing GitHub actions. So every single time you make a change, you can see whether it's going to

57:06 be an improvement or a regression on what you had previously.

57:10 Yeah. Yeah. Very neat. All right. So there's a lot more stuff we could talk about on the packet

57:14 side, but let's just for the sake of time, let's move on to process, which is more about how your

57:19 possibly tech company, possibly other company where you do tech stuff works in more general, right?

57:24 Yeah. And like, this is actually, this is the one which in many cases is probably some of the biggest

57:29 leverage points available to you, but they're often some of the harder ones to actually start because

57:34 they often rely on organizational changes because things like, it's going to be stuff like,

57:39 okay, how we think about travel or how we, how we work. I mean, when you look at say the report from,

57:45 if you look at Apple sustainability report, right, you'll, I mean, I've shared a link to it. There's

57:49 a few things that are really interesting. So, because I did in the talk that I gave recently,

57:53 or one of the talks that I've been doing recently is just showing like the emissions from

57:57 large companies that we know and admire. So Amazon kind of emissions from Amazon are roughly

58:01 same size as Finland for 2018, right? The country of Finland has basically the same emissions as

58:07 Amazon, according to their report. Google is about the same footprint as Liberia. So a kind of small

58:11 country in Africa and Apple's figures were for the Gambia, right? So that's what I think 0.6 million

58:18 tons of emissions. If you don't include the hardware, like making of iPhones and stuff like that,

58:22 if you include that, it's basically Mongolia. So the country of Mongolia, all of the output is

58:27 basically all the iPhones and all the things we have there. But if you look at just the non,

58:32 non-electronics part, most of the emissions, like half of that, half of the emissions from Apple is

58:38 from business travel. And more than a third comes from employee commuting. Because in many cases,

58:43 a lot of, if you look at, you know, Apple's wonderful campus that everyone has to drive to,

58:47 you've just embedded. Yes, it's cool that you've got a nice round canvas and stuff. But now if everyone

58:51 has to drive there, there's all these emissions associated with it.

58:54 And it's right in the middle of greater San Francisco, which is notoriously gridlocked,

58:59 right? There's just like tons of driving and whatnot there. You know, I mean, from that perspective,

59:04 they could put it somewhere more remote and that would be better because people could live near it.

59:08 But of course, they're not in San Francisco or Silicon Valley. I mean, yeah.

59:11 Yeah. Like this is the thing. Like in many cases, lots of remote friendly companies,

59:15 there's a very strong environmental argument for it. Because in addition to it being...

59:18 There's a huge one. Yeah, you're right.

59:20 And this is like, I mean, we're basically in the process of like releasing a spreadsheet to kind of

59:25 help you work it, understand the emissions at project level. So you and your team can see where

59:30 the levers are that you might actually have. Because on some cases, when we've looked at some

59:34 projects, we found that, oh, wow, getting rid of the video on the front page had the same impact

59:37 of all of our commuting over the last year, for example, depending on the scale of the company,

59:42 right? But in some cases, if you're working where there's loads and loads of driving,

59:46 because someone has like a two hour commute each way, then one of the most impactful things you can

59:51 do on a project might just be, yes, we're gonna do remote working better, because we don't need to

59:56 be driving. And it has all kinds of nice side effects. I mean, in many cases, if you think about

01:00:01 how you work, you can have these other kind of what people refer to as co benefits. So remote work will

01:00:07 often make it more accessible to people with kids, for example, or people who might have mobility

01:00:12 problems. There's all these things that we can do, which also end up having things making things a

01:00:17 bit greener, or just things like thinking about how much we do need to fly, for example,

01:00:22 right? Could that meeting be in zoom? Or do I have to fly from New York to London to have it in person,

01:00:27 right? Yeah, Microsoft is a good example of this. They have an internal carbon price on top of their

01:00:32 flights as a disincentive for them doing this. But also they've set up a kind of green cloud advocacy

01:00:37 kind of group now. And also, like this, this was just a few weeks ago, I know, I think it was last

01:00:42 week that it was it became public. But also, one of the people that he was giving a talk at

01:00:46 DevRelCon about kind of low carbon developer relations, like low co DevRel. And one thing he

01:00:53 was looking at doing is he gets the teams to just track the carbon from what they're doing, or if

01:00:58 they're going to fly, make sure they get a good sense of make sure they make the use of that flight

01:01:02 they're going to do make the carbon count, essentially. Yeah, in many cases, it's a there's

01:01:06 a big argument for just getting better at remote work, which is kind of embarrassing that in tech,

01:01:11 so many of us still aren't all that good at it, really. Yeah, yeah, I did for about 10 years,

01:01:16 I did remote work. And then finally, now I have my own company, I just but I work from a little office

01:01:20 in my house. It's quite nice. Once you get used to it, there's a lot of stuff you got to get used to,

01:01:24 right? Like, you don't want to distractions around the house to mess things up. You don't want to

01:01:29 feel like you're stuck in the office, because it's 8pm. But you're thinking about something,

01:01:33 you go work on it. But at the same time, you got to focus and not just watch TV. There's a lot of

01:01:37 challenges, but I think people can pull those off. They're definitely all better than being in traffic.

01:01:41 So yeah, this is one example. So one thing might have been about commuting, but for the model that

01:01:45 we've been using for process, the other thing was basically, we took into account the efficiency of

01:01:49 the building that you're actually in. And in the UK, and across Europe, there is like a directive,

01:01:53 which basically mandates that every single building has to have a kind of energy certificate,

01:01:58 kind of bit like how fridges might have energy ratings on them. So you have graded grades for

01:02:03 most buildings. And in the UK, if you know the kind of zip code or postcode for that building,

01:02:07 you can work out the emission, you can get a figure straight away for the kind of emissions per square

01:02:12 metre. So if you know that most employees have like 10 square metres of space over a year,

01:02:16 then you can quickly work out this stuff. And if someone's working on a year, you can compare that to,

01:02:20 say, the emissions from running service, or using this much electricity, or the emissions from

01:02:25 sending things over the wire, you can get an idea of where the impacts might actually be.

01:02:29 So this is why I talk about process. And I'm just speaking specifically on the project level,

01:02:33 because there's, we can work a bit more widely as well, and think about the other things that

01:02:38 we actually do. But I'm mindful that it would take a more than the single podcast to talk about some of

01:02:44 the wider things.

01:02:45 Yeah, absolutely. So one final thing I do want to talk about is offsetting air travel. Now,

01:02:50 flying is not good. But if you do have to fly, we already talked about having a carbon values,

01:02:55 but it's really a good idea, I think, to at least offset it with something you can do. There's

01:03:00 places that allow you to do that. It's not perfect, but it's better than doing nothing, right?

01:03:03 Yeah.

01:03:04 No, I agree. I agree with you, yeah.

01:03:06 Yeah, but obviously, like, less travel is clearly, clearly better. But I did want to point out that

01:03:10 there are places that you can go that are pretty good. You talked about Atmosphere.de?

01:03:15 Yeah. So this is a German company that only use one of the, and use what are called the kind of

01:03:20 gold certificates for offsets, which are generally considered to be offsets which do not have

01:03:25 unintended harmful consequences. And where they, the projects that are on this are related to at least,

01:03:32 I think it's three, maybe four of the sustainable development goals. These are kind of one of 17

01:03:38 goals, which are generally considered, these are the things we need to be focusing on to make the

01:03:42 world a better place. So that's what these are. Actually, the person I spoke to on a market,

01:03:47 they, the guy, Asim Hussain, who is doing, he was just doing a talk today at DevRelCon about the

01:03:52 different kinds of offsets and what things you have available and what decisions you need to actually

01:03:56 make for that. And yeah, there's one, there's one in the atmosphere as one example. There's the one

01:04:00 in America called Terra Pass. But generally, if you don't have much time and you cannot avoid travel,

01:04:05 it's safer to just go with something like the gold standards. And I've linked to a gentleman who I,

01:04:11 I kind of have a lot of time for a lot of respect for Kenneth Bowles. He is a, he's a consultant and

01:04:16 he does need to travel sometimes. And he's basically said, look, this is my air travel policy. He's got

01:04:20 a personal travel policy, not like company, you know, companies might have sustainability policies.

01:04:23 This is policy on air travel. He says, look, this is what we're going to do. And if I have to travel,

01:04:27 then these are the things I, you need to take into account if you want me to be joining you for

01:04:31 something. And I feel that there are lots of people who could also do the same thing. And like,

01:04:35 you could literally just copy and paste this.

01:04:37 I'm sure he would be happy and not frustrated if you also adopted his policy verbatim, right?

01:04:42 Basically.

01:04:43 Yeah. I mean, one of the things he does is say, I'm going to expense the offset if I have to fly to you,

01:04:48 which is totally reasonable. He says, if I have to travel internationally, it might be a hundred

01:04:52 dollars offset, but that's part of the bill. If you invite me to come because I'm not traveling

01:04:57 without them.

01:04:57 Well, this actually speaks to something which is more interesting. I'm seeing some agencies,

01:05:01 some forward looking agencies do now where they basically have, they have carbon budgets on projects

01:05:05 now, because if basically depending on where around the world and the UK does have quite good data on

01:05:10 this, you can have, you can basically work out the rough emissions from say, I know a hundred K of

01:05:15 spend or something like that. So if you have maybe a project where there's going to be,

01:05:19 well, which would cost like 200 K, then it's not a huge leap to say, well, this is, if we know that

01:05:24 there's going to be a hundred kilos of carbon emitted per thousand pounds spent, and this is

01:05:28 a 20 K project to 200 K project, then that might leave us with a budget of if we want to be better

01:05:33 than average and we need to be better than average or improving on what's happening each year to kind

01:05:37 of stand a chance of meeting the scary goals. We spoke at the beginning of the year, they say,

01:05:41 well, we're going to have a carbon budget of 20 tons. So everything we do has to stay inside

01:05:45 that budget. And this is a shared responsibility for us and also the client that we're working with.

01:05:51 So I think there are some ways, yeah, because this stuff can be quantified. And once you have

01:05:55 some numbers like that, in the same way that you have performance budgets for websites, I think you

01:05:59 can use budgets like this to help, you can essentially create the incentives to make it easier to have,

01:06:05 say a remote call versus having to fly or having to travel somewhere. And I think that without this

01:06:11 stuff, it's going to be very difficult for us to basically face the challenges that are raised,

01:06:16 that the science dictates. But we do have the tools and the numbers to actually do this. And I

01:06:21 think many of us like the tech industry is such a rich industry compared to others. And there are so

01:06:26 many people with so much professional mobility who are able to basically say, look, this is how we're

01:06:31 going to work because this is how we chose to come into the industry for this. I think there's a lot to

01:06:36 there's a lot to be said for thinking about this and considering it part of just being a kind of

01:06:41 responsible professional in tech, not in technology to think about these things.

01:06:45 Yeah, well said. One final thought I want to throw out there around this travel stuff. I

01:06:49 try to travel less to conferences. I'm going to PyCon this year as I did last year because it's

01:06:54 important and I have to fly to, right? I went to one other conference this year that I had to fly to,

01:06:58 which is Microsoft Ignite in Florida. It was an interesting opportunity that I had. It was worth it. So I

01:07:05 bought offsets for this and that's all fine and good. That's just what I did and still not my favorite,

01:07:09 but whatever. So one thing I would like to see though, is that have conferences make it almost

01:07:14 the default to have not just me do that. The reason I mentioned that conference in Florida by name is

01:07:19 they had 30,000 attendees. How many of those people do you think offset their carbon?

01:07:23 So this is actually really, no, you're absolutely right. And I think this is, there's two things which

01:07:27 I could share with you, which I think might be interesting for you. So I did some work. I helped

01:07:32 organize a conference called Map Camp, where we basically had a climate sponsor specifically to account for

01:07:37 the fact that we knew that some people were, you know, we made the decision to run a conference

01:07:42 and cause people to be flying here and we chose the venue. So therefore we felt like it's on us to be

01:07:47 accounting for this stuff. And if you kind of just shift it onto the end user, that kind of is a bit

01:07:53 unfair in many cases because you're often already making people to pay for something. And if you budget

01:07:58 for this as part of just how you work, then it's, it makes a lot more sense. And, there are more

01:08:04 group organizations doing this. But the thing that we've done is we actually hired some consultants

01:08:08 to help us work out the emissions associated with that conference. And we also were in the process

01:08:12 of releasing a report, which has all this stuff where we've got the numbers for this. And we could

01:08:16 see what the trade-offs were so that other people can take this information. And, there's also a

01:08:21 really, really cool Django project called Open Footprint, which is exactly related to this kind of stuff.

01:08:25 There's a guy called, Sylvan. Oh, I totally forgot his surname. He's on Twitter as Sylvanus,

01:08:30 but he's been building, him and his team. they've been building Open Footprint, which is a

01:08:35 conference carbon footprint calculation tool to allow you to see what the impact of these things would

01:08:40 actually be. And, for a 600 person conference, it was about, I think we spent, we raised 5k for that.

01:08:45 So some of it was education. Some of it was kind of offsetting is what we used, we used for this,

01:08:50 but I think it should be a norm if we're going to be responsible people organizing these events.

01:08:55 Sure. Absolutely. And it would be ideal if the people putting on the conference did it. I can

01:08:59 imagine there's sometimes like smaller conferences or something. They just feel like they're barely

01:09:03 able to even fund this thing and whatnot. So if they can't do that, you know, maybe they could have a

01:09:08 little checkbox on the registry. It's $230 to join this conference. And it has a little pre-check,

01:09:14 maybe even pre-check it carbon offset, $30 I'm flying or something like that. And you can uncheck it,

01:09:19 but if it's pre-checked and you just hit go, you know, how many people would just expense that back to

01:09:23 their company, right? It seems like such a small thing that would make a huge difference. If you

01:09:26 have to say 30,000 people go into your conference, all of a sudden that's tremendous.

01:09:29 So RussConf does something really interesting in this field. So RussConf EU, they had an event in

01:09:34 Barcelona and because Europe has pretty good trail rail links, they basically said, okay,

01:09:39 we're running this conference. If you want to get here by train and we'd really, really support you

01:09:44 doing that if you can, there's an interrail pass. And here's a way that you can get here by train.

01:09:48 And it's a different way of traveling because interrail is basically, it's a bit like you pay

01:09:53 for a set amount to be able to take any train or almost any train over a set period of like a week

01:09:59 or so or a month. And I did the same thing as an experiment in like low carbon developer relations

01:10:03 by having a two month interrail pass to travel around all little bits of Western Europe. And they

01:10:09 said, here's how to do this. These are the places you might want to drop a visit along the way as part of

01:10:14 this process. So there are groups who do do this and they think of it, they think of the travel as

01:10:20 part of the conference itself. And I've had people talking about like having a sprint bus where people

01:10:25 kind of work and code on something together. Oh, that's cool. Yeah. Like there's loads of ideas.

01:10:29 We just need to be more creative about this if we're going to have events where people physically

01:10:33 need to be around. And that's totally okay. As long as we think about the full cost of this stuff.

01:10:38 Right. Well, I already told you I'd lived in Germany for a year and I'm very jealous of the

01:10:42 rail system you all have over there. So yeah, let's leave it at that. But yeah, I think even things like

01:10:47 conferences, tech conferences could do a lot, even just little default, just check boxes like,

01:10:51 hey, we're going to donate. You're paying 30 bucks to send some money here unless you uncheck this when

01:10:55 you register or whatever. Right. Give some people some levers, but make it at least the default option

01:11:00 to not make it so impactful in a negative sense.

01:11:03 There's a group who are working on, and I'm part of it as a group working on a kind of climate code

01:11:07 of conduct for conferences to address these kinds of issues. And I really like if people do have an

01:11:13 interest, it'd be really nice to hear from them because there's a bunch of us. There's a group

01:11:16 called climateaction.tech, which I invest a bunch of time working on because I find it useful for,

01:11:21 which is basically full of other professionals who are trying to do this. And there's a bunch of us

01:11:25 trying to figure out how to do events greener. So if any of this is interesting to you,

01:11:28 I'd really recommend a joining the community that we have. And yeah, let's talk about some of this

01:11:32 because it's easier to face this stuff as a group and to compare notes together.

01:11:36 Yeah, absolutely. All right. Well, we are over time on this topic, but it was well worth it. It

01:11:41 was a fun conversation, Chris. Now, before you get out of here, let me ask you the final two questions.

01:11:45 If you're going to write some Python code, try to make it fast and energy efficient,

01:11:48 what editor would you use?

01:11:49 Oh, I've gone through a number of editors. I started initially with TextMate ages ago,

01:11:53 and then I started using Sublime. And then I kind of started using Vim because I thought that's

01:11:58 what cool people should be using. I'm not a proper programmer if I use Vim.

01:12:01 And I tried using Emacs, didn't get much luck. And I quite liked Vim. I found myself,

01:12:05 because I do a number of other things rather than just coding, I really am enjoying VS Code. And I'm

01:12:10 finding the, yeah, VS Code is my editor now. It's free. It's quite, it's well designed and-

01:12:16 Super flexible. All the extensions.

01:12:18 Yeah. Yeah, exactly. I'm a big fan of VS Code. It helps me. It saves me from myself in many cases.

01:12:24 Sweet. All right. And then a notable PyPI package that you maybe found interesting or

01:12:29 is relevant to the conversation?

01:12:31 I'd probably say, I think the energy usage one for the AI thing, I think is really interesting. But

01:12:37 otherwise, I think I would really point people to OpenFootprint, the open source carbon calculator,

01:12:43 because we are so good at calculating, you know, we pride ourselves on being informed by data and

01:12:48 being able to quantify things. And I think that if we take that kind of approach to other domains and

01:12:54 domains like this, it will help us make informed decisions about the things we do as responsible

01:12:58 tech professionals.

01:12:59 Right on. All right. Final call to action. People are interested in doing more,

01:13:03 giving them some concrete steps. What do you say?

01:13:05 I think it's important to stress that it's okay to, if you don't know what to do right now.

01:13:10 But I think it's also on you as a professional to invest in developing these skills that we will

01:13:15 need to face when we think about like the science and what, and what basically like children are

01:13:21 saying every Friday, because they're scared and they're expecting adults to kind of step up and

01:13:25 do something about it. And I think it's important to learn to invest in thinking systemically.

01:13:29 And this information is out there and there are books and resources out there. I mean,

01:13:33 I think that's the key thing that I would call people to do is be prepared to invest in skills

01:13:38 that are maybe outside of your kind of traditional domain of technology and learn to think a bit

01:13:42 systemically. And the thing I would say is that there are lots of other people doing this too.

01:13:46 You're not alone. In the group that I help run, climateaction.tech, it's basically full of other

01:13:51 techies who are trying to figure this stuff out and how to do this. And a bunch of the messages and

01:13:55 the links I've shared, I found through really enriching, useful conversations with people who are saying,

01:14:00 what should I do about the fact that I cannot avoid the flying thing? In fact,

01:14:03 the thing with Kenneth, I remember the conversation that directly informed that and the conversations

01:14:08 with say Microsoft saying, okay, here's how we're going to do low carbon developer relations.

01:14:11 I remember seeing the conversation there and the conversation about say, how do we take in,

01:14:15 do something about the fact that, you know, AI and the use of machine learning is this massive growth

01:14:21 in there. What can we do there? Or in say the UK with kind of the government taking a real,

01:14:26 real kind of ownership on the emissions from their infrastructure. I remember the conversation

01:14:30 there saying, yeah, we should be doing this. There are people out there trying to solve this

01:14:33 and it's okay to feel a bit overwhelmed as long as there are, but it's worth remembering there are

01:14:39 other people around to solve this and it's easier to solve this when there are other people and to share

01:14:44 this across organizational boundaries. So yeah, those are the two things. Be prepared to invest and

01:14:48 yeah, join the community.

01:14:49 Super. And we can do it. It runs on electricity. We don't have to change everything. We just can just

01:14:53 change a few things and it'll be, we'll be good, but we got to do it right. Thank you,

01:14:56 Chris, for coming on the show and sharing all this. It was super interesting.

01:14:59 Okay. Thank you again, Michael. And have a lovely round.

01:15:02 Yeah, you as well.

01:15:03 This has been another episode of Talk Python to Me. Our guest in this episode was Chris Adams,

01:15:08 and it's been brought to you by Brilliant.org and Datadog. Brilliant.org wants to help you level up

01:15:13 your math and science through fun guided problem solving. Get started for free at

01:15:18 talkpython.fm/brilliant. Datadog gives you visibility into the whole system running your code.

01:15:24 Visit talkpython.fm/datadog and see what you've been missing. They'll throw in a free t-shirt.

01:15:29 Want to level up your Python? If you're just getting started, try my Python Jumpstart by Building 10 Apps

01:15:36 course. Or if you're looking for something more advanced, check out our new async course that digs

01:15:41 into all the different types of async programming you can do in Python. And of course, if you're interested in

01:15:46 more than one of these, be sure to check out our Everything Bundle. It's like a subscription that never expires.

01:15:51 Be sure to subscribe to the show. Open your favorite podcatcher and search for Python. We should be right at the top.

01:15:57 You can also find the iTunes feed at /itunes, the Google Play feed at /play, and the direct RSS feed at

01:16:03 /rss on talkpython.fm. This is your host, Michael Kennedy. Thanks so much for listening. I really appreciate it.

01:16:10 Now get out there and write some Python code.

01:16:12 Thank you.

01:16:13 Thank you.

01:16:13 Thank you.

01:16:13 Thank you.

01:16:13 Thank you.

01:16:14 Thank you.

01:16:14 Thank you.

01:16:14 Thank you.

01:16:15 Thank you.

01:16:16 Thank you.

01:16:16 Thank you.

01:16:16 Thank you.

01:16:16 Thank you.

01:16:16 Thank you.

01:16:16 Thank you.

01:16:16 Thank you.

01:16:17 Thank you.

01:16:17 Thank you.

01:16:17 Thank you.

01:16:17 Thank you.

01:16:17 Thank you.

01:16:17 Thank you.

01:16:18 Thank you.

01:16:18 Thank you.

01:16:18 Thank you.

01:16:18 Thank you.

01:16:18 Thank you.

01:16:18 Thank you.

01:16:18 Thank you.

01:16:18 Thank you.

01:16:18 Thank you.

01:16:18 Thank you.

01:16:18 Thank you.

01:16:19 Thank you.

01:16:19 Thank you.

01:16:19 Thank you.

01:16:19 Thank you.

01:16:19 Thank you.

01:16:19 Thank you.

01:16:19 Thank you.

01:16:19 Thank you.

01:16:19 Thank you.

01:16:20 Thank you.

01:16:20 Thank you.

01:16:20 Thank you.

01:16:20 Thank you.

01:16:21 Thank you.

01:16:21 Thank you.

01:16:22 Thank you.

01:16:23 Thank you.

01:16:23 Thank you.

01:16:24 Thank you.

01:16:25 Thank you.

01:16:26 Thank you.

01:16:27 Thank you.

01:16:28 Thank you.

01:16:29 you you Thank you.

Back to show page
Talk Python's Mastodon Michael Kennedy's Mastodon