Slide 1

Slide 1 text

Programming and Programmers Alex Gaynor PyCon AU! Saturday, July 6, 13 Hi everyone, thanks for coming out, I’m super excited to be here to speak with you! Today. So today we’re going to be talking a bit about programming and programmers.

Slide 2

Slide 2 text

About me • Django, PyPy, CPython, Topaz developer • Former DSF board member, current PSF board member • Engineer at Rackspace Saturday, July 6, 13 But first, I thought I’d tell you guys a little bit about myself. I’ve been hacking a lot of open source python stuff for a while. I’m also an engineer at rackspace, and I’m on the board of the PSF.

Slide 3

Slide 3 text

Saturday, July 6, 13 I work for Rackspace, we just opened a datacenter in Sydney, so that’s pretty cool. I work on the developer relations group, so feel free to find me and ask questions about Rackspace later.

Slide 4

Slide 4 text

A message from our sponsors Saturday, July 6, 13 Before I get into the meat of this talk, I want to spend a few minutes and speak on behalf of the PSF. We’re extremely excited about PyCon AU and PyCons around the world. Hundreds of pythonistas gathering across the globe, that’s fantastic!

Slide 5

Slide 5 text

• Fundraising and legal arm. • Here to enable. • Represent the community • Not the developers of (C)Python What is the PSF? Saturday, July 6, 13 What is the PSF. We raise money, we protect Python’s trademark, we operate the python.org servers and other infrastructure. We give grants to people and groups to help them do great things. The PSF doesn’t do great things itself, we’re here to empower you, however we can.

Slide 6

Slide 6 text

New membership model Saturday, July 6, 13 Show of hands, how many people in here are PSF members. Show of hands, how many people consider themselves “members of the Python community”. Everybody’s hands should be up, if you’re at PyCon you’re a member of the community. So the PSF’s membership model is currently “you get invited by an existing member”, we’re shaking that up.

Slide 7

Slide 7 text

Members • Sponsor • Supporting • Fellows Saturday, July 6, 13 We’ll have three membership classes, sponsor members are corporate sponsors, supporting are individuals who choose to become members, anyone can join. Fellows are elected by existing fellows, as recognition of technical excellence, be it in software, documentation, working with the community etc.

Slide 8

Slide 8 text

Our goal: build a a bigger, better, more open community Saturday, July 6, 13 This is the PSF’s mission. To build the best Python community we can. To open our doors to as many new people as we can. To build a technically excellent community that welcomes everyone.

Slide 9

Slide 9 text

CI for our community Saturday, July 6, 13 And if you think we’re doing ok now, we plan to keep getting better. We need to strive to continuously improve, to be the best that we can be. And we really hope you’ll be a part of that. Because we know we can be even better than we are now. This is why we’re so focused on education, and diversity; because we’re making a long term investment in the health of our community.

Slide 10

Slide 10 text

And one more thing... PyCon 2014! Montreal, Canada April 9-17, 2014 http://us.pycon.org/ Saturday, July 6, 13 PyCon US is coming up. It’s in Canada. We are not good at naming things. It’ll be in April next, year and the call for proposals is up. Everyone should submit a talk, and we’d also love if you served on the program commitee to help decide which talks to accept, come talk to me about that.

Slide 11

Slide 11 text

And now you’re regularly scheduled programming Saturday, July 6, 13 And now back to the actual topic of this talk.

Slide 12

Slide 12 text

Saturday, July 6, 13 So this is a picture of me and my best friend, many years ago. This is actually relevant to the talk, stop laughing. So a year ago I graduated with a degree in computer science. And this year he graduated with a degree in computer science. We’re both programmers. His degree was in engineering and mine was in science.

Slide 13

Slide 13 text

Engineers Scientists Artists Saturday, July 6, 13 So this question led me to thinking about, what kinds of professions are there, and how is programming like them, how is it not. Programming is a really young profession, at the absolute oldest 70 years, and in practice as young as 40 years; and I don’t think we’re good at it.

Slide 14

Slide 14 text

What problems do we have? Saturday, July 6, 13 So, I want us to learn from other professions. Why? Because I want to solve problems, what are those problems.

Slide 15

Slide 15 text

Software has bugs Saturday, July 6, 13 Lots of bugs. About half the time when I take my MacBookPro out of sleep it immediately goes back to sleep. If I were a normal person I would think “computers suck”. Because I am talented professional software engineer, I can tell you definitely: “computers suck”. (Talk a bit about the NASA bug reduction thing, order of magnitude or more cost increase).

Slide 16

Slide 16 text

Software is slow Saturday, July 6, 13 Number of transistors doubles every 18 months. In practice this means over the course of my life, computers have gotten more than 16,000 times faster. Why do they still feel so slow? Every resource the hardware engineer giveth, the software engineer taketh away.

Slide 17

Slide 17 text

Software is slow to deliver Saturday, July 6, 13 Well, it’s probably not that slow to deliver. But we really suck at estimating how long it’ll take. And I think this is probably indicative of a broader issue.

Slide 18

Slide 18 text

We don’t know how to build software Saturday, July 6, 13 And I mean this in a very fundamental way; we build software, but there’s no methodology to it. How do you folks design your programmers? I think about it for a while, then I scribble on paper for a while, then I remember I hate writing, and I start typing. This isn’t a way to build an industry, it’s something out of a bad comedy sketch. I have no idea what I’m doing.

Slide 19

Slide 19 text

Saturday, July 6, 13 Seriously. No clue. I’m just doing whatever makes sense, and that’s working out really nicely for me. I ship a lot of code, people think it’s good, it seems to go fast. But I can’t explain to anyone how to achieve the same result. And reproducibility is kind of an important thing.

Slide 20

Slide 20 text

How do other people do it? Saturday, July 6, 13

Slide 21

Slide 21 text

Engineers • Applied science • Materials, structures, and physical systems • “Science, technology, and society” Saturday, July 6, 13 So engineers right. What we do is kind of like them. My friend has a degree in engineering. They’re methodology is based on the application of science. Does anyone here feel like the way they write code is based on the application of science, or based on good modeling of the world?

Slide 22

Slide 22 text

Science • Scientific method • Develop understanding of nature • Research Saturday, July 6, 13 Scientists, I have a degree in science (tell graduation anecdote)! Formal science is based on a pretty rigorous methodology for how to know if we know something, which is really important for research.

Slide 23

Slide 23 text

Artists • ‘I can’t define it, but I know it when I see it’ Saturday, July 6, 13 I tried to write this slide for a bit, I read a bunch of resources. And I failed miserably. I don’t know how artists work, I can’t define art, but I think our profession is pretty connected to it. Who here thinks the aesthetics of their code is important?

Slide 24

Slide 24 text

Better know an epistemology Saturday, July 6, 13 What is epistemology: it’s the philosophy of how we know things. How do we know that the sky if blue, that gravity makes things fall, or that human cells contain DNA?

Slide 25

Slide 25 text

How do we know our programs do what we want? Saturday, July 6, 13 How do you know? Common answers: I ran it and it looked about right, we have some tests, and my personal favorite; we have millions of users and none of them are complaining.

Slide 26

Slide 26 text

What makes programming neat? Saturday, July 6, 13 So, we want to better know that our programs do what we want, and ideally uses this as a basis for developing them, from the ground up. So I want to step back and think about what makes programming cool.

Slide 27

Slide 27 text

Isolation Saturday, July 6, 13 We can run our programs in little tiny boxes and observe exactly what they do. We’re really good at eliminating external factors when we try.

Slide 28

Slide 28 text

Composability Saturday, July 6, 13 We can combine two programs. Even when the programs are terribly designed we can usually shim them together with some duct tape.

Slide 29

Slide 29 text

Observability Saturday, July 6, 13 We have the ability to programmatically instrument out code to know what it does. Is it printing to stdout, is it firing off network packets, we can observe all these things automatically.

Slide 30

Slide 30 text

How can we know what our programs do? Saturday, July 6, 13 So given these attributes, how can we know what our programs do?

Slide 31

Slide 31 text

Testing! Saturday, July 6, 13 So unit testing! We can put our programs in a box, and observe that they do the right things, and the computer will tell us when our programs are wrong. Is there an equivalent to this for any other industry?

Slide 32

Slide 32 text

Benchmarking Saturday, July 6, 13 We can know how fast our programs go.

Slide 33

Slide 33 text

logging and metrics Saturday, July 6, 13 We can know what our programs are doing, how quickly they do it, how often they do it. We can reproduce the steps out programs took, and when they explode we can see the exact state they were in before.

Slide 34

Slide 34 text

Application of the scientific method Saturday, July 6, 13 But we should probably apply the scientific method to all of this. I’ve got a whole slide deck on how to do the scientific method with benchmarking. We need to be more methodical. We need to design to take advantage of the best our profession lets us.

Slide 35

Slide 35 text

Programming is like other industries Saturday, July 6, 13 We have a lot in common with scientists, engineers, and artists we need to learn from them.

Slide 36

Slide 36 text

Programming is not like other industries Saturday, July 6, 13 It’s really neat, and different and we need to understand how, because in a lot of ways I think we can do better.

Slide 37

Slide 37 text

We need to teach programming better Saturday, July 6, 13 And we need to get better at teaching it. Why are most people who want to be programmers studying computer science? CS is great, but it’s not the same as programming, and it’s not sufficient to being a good programmer.

Slide 38

Slide 38 text

Average CS curriculum • Learn some C/C++/Java/Python/Scheme • Learn about data structures, and algorithms, and type theory, and other theoretical things • Learn about design patterns Saturday, July 6, 13 If someone let me design a 4 year software engineering curriculum, there’d be a semester long course on how version control. You’d spend a month talking about the philosophy of logging. You’d write a compiler and learn type theory. You’d learn to build giant programs. We need to give SE as a discipline this level of focus.

Slide 39

Slide 39 text

Help me understand how I build programs Saturday, July 6, 13 That’s the main takeaway I want. I don’t know how I reach the decisions I do, I stare at some code, I have some intuition, and it seems to work, and I believe I have an underlying methodology, I want to identify it, and I want to be to analyze it. And I need your help in making software engineering a better discipline.

Slide 40

Slide 40 text

Thank you! Questions? https://speakerdeck.com/alex Saturday, July 6, 13 Thank you, questions?