Django Retrained

By • • NICAR in Louisville

Slides

Show the extracted slide text

Slide 1

DJANGO
RETRAINED
Five ways coding like a web developer can
make you a better investigative reporter

Slide 3

END
DRUDGERY

Slide 4

PREVENT
MISTAKES

Slide 5

IMPROVE
TEAMWORK

Slide 6

COMMAND
ROBOTS

Slide 8

NUMBER ONE:
YOUR LAPTOP
 SHOULD BE
 DISPOSABLE

Slide 9

NEVER AGAIN

Slide 10

REVISION
CONTROL

Slide 11

DATABASE
BACKUPS

Slide 12

NUMBER TWO:
FIND A RELIGION

Slide 13

NIHILISM

Slide 14

SAY WHAT YOU WANT ABOUT
THE TENETS OF
MICROSOFT
SHAREPOINT,
DUDE...
AT LEAST IT'S AN ETHOS

Slide 15

NUMBER THREE:
STOP FEEDING YOUR
  DATABASE CRAP

Slide 16

SHALL WE
STOP THIS
BLEEDING?

Slide 17

PULLDOWNS
 CAN END
 THE PAIN

Slide 18

NUMBER FOUR:
   FOLLOW THE
FOURFOLD PATH OF
  REUSABLE APPS

Slide 19

DO ONE THING
AND DO IT WELL

Slide 20

DON'T BE AFRAID
OF MULTIPLE APPS

Slide 21

WRITE FOR
FLEXIBILITY

Slide 22

PACKAGE
TO DISTRIBUTE

Slide 23

NUMBER FIVE:
  AUTOMATE
YOURSELF OUT
   OF A JOB

Slide 24

How we code now
                      You
      Your computer




Photo: ThomasHawk

Slide 25

The story




   Your computer     Your computer



How we ought to code

Slide 26

DJANGO
RETRAINED
Five ways acting like a reporter can
make you a better web developer

Slide 27

TRUST
NO ONE

Slide 28

PICK UP
THE PHONE

Slide 29

SEEK A
RABBI

Slide 30

TAKE
THE STORY
 AND RUN

Slide 31

FINISH

Slide 32

ALL THAT SAID

Slide 33

WE ARE VAST

Slide 34

palewi.re/talks

Recording

Show the timestamped transcript
  1. So, next up is Ben Welsh, who, that's water, right, you're drinking?
  2. So Ben Welsh of the Los Angeles Times is, wow, okay, so movie themes.
  3. There isn't really much of an introduction, so Ben's going to talk about using Django
  4. to make you a better investigative reporter.
  5. Thanks Derek.
  6. I'm Ben.
  7. This is my rant.
  8. So I've had a strange journey in journalism.
  9. I started out in television news in Chicago and through a wonderful thing called Nykar,
  10. sort of went on this odd journey that brought me here today in which I've spent a lot of
  11. time being a web developer and learning a lot of weird geeky web developer things.
  12. I just thought this might be a fun opportunity to kind of trot a few of those out and yell
  13. about them.
  14. So why should you act more like a web developer, right?
  15. One, you can end some drudgery, make your life easier.
  16. Two, you can prevent mistakes and screw ups and, you know, have a happier life.
  17. Three, you can improve teamwork, which I know is hard for reporters to hear, but it's true.
  18. And three, you can command robots.
  19. You can ultimately get good enough at it that you sort of, you make extensions of yourself
  20. that go out there, all right?
  21. So, the talk is called Django Unchained because Django is a Python framework for helping you
  22. build websites.
  23. It's really nice.
  24. It was also the title of a movie the last year, but really it's just symbolic and it's just
  25. meant to stand in for web developer techniques in general and not specifically Django, but
  26. I'm using it because I love it, okay?
  27. Django.
  28. All right.
  29. Number one, your laptop should be disposable, all right?
  30. Your laptop should be disposable.
  31. Never again.
  32. Never again should your laptop crash and you lose everything.
  33. Should your project be fucked?
  34. Should you be up shit quick?
  35. Should not happen.
  36. The worst thing you should do, use version control.
  37. Get on GitHub.
  38. Put your code.
  39. It doesn't have to be on the web.
  40. It can be on a server in your newsroom, but put it someplace else and start sharing it
  41. this way.
  42. All right.
  43. Two, database backups.
  44. Please, just write that ten-line conscript to back up that database every night.
  45. You will thank yourself so much in the future.
  46. All right.
  47. Two, find a religion.
  48. Any religion.
  49. All right.
  50. This.
  51. This is nihilism.
  52. This has to stop.
  53. Exactly.
  54. Exactly.
  55. You know just what I'm talking about, right?
  56. I don't really care what system you pick.
  57. It can be anything.
  58. Okay.
  59. I'm going to say go with Django and just like work everything into a Django project.
  60. You don't have to do that.
  61. Doug Smith in the back.
  62. Doug Smith has a beautiful system that spans six network drives and only he understands,
  63. but it's a freaking system.
  64. All right.
  65. You need one.
  66. All right.
  67. Number three, stop feeding your database crap data, right?
  68. Stop using Excel to clean shit up.
  69. We've all seen this.
  70. We go through an Excel, we add a new column, and we go down and we code it one by one,
  71. and then we run the pivot at the end, and what's it look like?
  72. Garbage.
  73. Right?
  74. All you have to do is just use an admin, Django admin, have a pull down.
  75. Validate the data that goes into your database so you don't come out with crap at the end.
  76. Right?
  77. Simple, really nice.
  78. Right?
  79. Number four, follow the four-fold path of reusable apps.
  80. Now this is one I picked up from my favorite web developer in the world, this guy James
  81. Bennett who worked at the Lawrence Journal World where they built Django, not as famous
  82. as the other ones, works at Mozilla now, and he gave this awesome talk about how if you
  83. follow these four simple principles, you're going to come out with great reusable code.
  84. And I think about this every day.
  85. The talk really changed my life.
  86. One, your code should do one thing and do it well.
  87. It's the Unix philosophy.
  88. When you write a function, a class, a method, an app, anything, just think about it that
  89. way.
  90. How do I keep it simple?
  91. How does the code do one thing and do it well, not become spaghetti code?
  92. Two, don't be afraid of multiple apps.
  93. Your app can have a hundred different apps coming in, each doing one thing, and the hundred
  94. things they do do better is going to be even more awesome.
  95. Right?
  96. Number three, write for flexibility.
  97. You need to take your code and think about it.
  98. How can I abstract this back so it doesn't just work for the thing I'm currently writing
  99. but can work more generally?
  100. And four, my favorite, you've got a package to distribute.
  101. You've got to take that package, you've got to set it up in a way that it can go onto
  102. PyPy or GitHub or wherever and somebody else can use it, right?
  103. Number five, automate yourself out of a job.
  104. This is sort of a probably apocryphal catchphrase at Google where any time you see yourself
  105. doing something repeatedly and it's drudgery, you've got to find a way to automate it.
  106. This is how we act now.
  107. This is how we act in iCar.
  108. We say the story's out there, my computer's my gun and I'm going to hunt it and I'm going
  109. to kill it and shoot it and shoot it and shoot it.
  110. And that's awesome and we get great stories but we can take it to another level, right?
  111. We should be more like minority report.
  112. The code we write should be these spiders that sweep the city and find the story and
  113. bring it back to us.
  114. And that's the next level and that's where we got to go.
  115. We got to think about how do we write apps that are algorithms that find stories, bring
  116. them and then we have a hundred of those out there sweeping the city while we sleep.
  117. Okay, now, or while we drink bourbon, right?
  118. So, okay, now the real reason I gave this talk, the real reason I gave this talk is
  119. to flip the script.
  120. There's five things that you geeks need to learn from reporters so that you can be better
  121. at what you do, right?
  122. Number one, trust no one.
  123. Don't trust your stupid data.
  124. This is a hilarious goddamn map that somebody made at Los Angeles who I will not name that
  125. claims that it is crime hotspots but because the person making it didn't have a freaking
  126. clue what they were putting in, Santa Monica is the reddest place on the goddamn map.
  127. That's on a major website right now, right?
  128. Number two, pick up the goddamn phone.
  129. Make a phone call.
  130. Find out what's going outside the office.
  131. Don't expect all these other people to bring data to you on a silver platter and have it
  132. just work perfectly.
  133. That's on you.
  134. You got to make it work.
  135. All right, number three, seek a rabbi.
  136. When you're on the phone, you got to find the people in the system who make the data,
  137. who know the data and nobody ever asked them how it works and when you do, they're going
  138. to love you and they're going to tell you everything about it and you're going to come
  139. out with a better story that nobody else has that really gets to the heart of it, right?
  140. Number four, once you have that story, just take it and run.
  141. Don't spend the next six months saying, oh, I need an app that does everything and has
  142. all these magic features and runs forever.
  143. If you've got a story, run, tell that, right?
  144. You don't need to sit and wait.
  145. You need to pivot.
  146. You need to cut and you need to take it to the end zone.
  147. And that's why I mean I say finish.
  148. There is nothing a geek likes more than starting a new project.
  149. Am I right?
  150. So that's awesome.
  151. I love that about geeks, but you got to finish every once in a while.
  152. You got to take it to the end zone.
  153. You got to score that A1 story, that awesome app, and you just got to dance with it, all
  154. right?
  155. Now, all that said, rant over.
  156. Just before I finish, I want to say that, you know, we are vast here at Nitecar.
  157. This is the biggest Nitecar ever, which has me totally juiced up and, you know, I remember
  158. the time at Nitecar when there were concerns, oh, we got people to do analysis, people to
  159. do presentation.
  160. I don't know.
  161. That's a little weird, right?
  162. But I really got to give credit to the leadership of the organization and all the people in
  163. this room for not being afraid of that, for not putting up walls, for not dividing us,
  164. but for saying we are together, we are one, we are the future, we can do this.
  165. Yes.
  166. And so with that, I just want to take a drink, a drink to all you who came and made this
  167. the biggest one ever.
  168. Way to go.
  169. Thank you.
  170. Great.
  171. Great.
  172. So.
  173. So how do I break it to my wife that Methodism isn't really working as a religion for me anymore?
  174. Okay.
  175. So Ben gets his own lightning talks next time.

Downloads

Slides PDF · Recording video · Extracted slide text · Timestamped transcript