Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Programming and Programmers

Programming and Programmers

As delivered at PyCon AU 2013

Edcdfd5affb524e0f88ec1a00ed3fe5d?s=128

Alex Gaynor

July 06, 2013
Tweet

Transcript

  1. 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.
  2. 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.
  3. 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.
  4. 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!
  5. • 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.
  6. 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.
  7. 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.
  8. 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.
  9. 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.
  10. 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.
  11. And now you’re regularly scheduled programming Saturday, July 6, 13

    And now back to the actual topic of this talk.
  12. 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.
  13. 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.
  14. 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.
  15. 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).
  16. 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.
  17. 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.
  18. 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.
  19. 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.
  20. How do other people do it? Saturday, July 6, 13

  21. 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?
  22. 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.
  23. 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?
  24. 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?
  25. 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.
  26. 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.
  27. 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.
  28. 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.
  29. 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.
  30. How can we know what our programs do? Saturday, July

    6, 13 So given these attributes, how can we know what our programs do?
  31. 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?
  32. Benchmarking Saturday, July 6, 13 We can know how fast

    our programs go.
  33. 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.
  34. 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.
  35. 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.
  36. 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.
  37. 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.
  38. 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.
  39. 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.
  40. Thank you! Questions? https://speakerdeck.com/alex Saturday, July 6, 13 Thank you,

    questions?