We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Civic Hacking on Rails

00:00

Formal Metadata

Title
Civic Hacking on Rails
Title of Series
Part Number
11
Number of Parts
94
Author
License
CC Attribution - ShareAlike 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
Do you want to use your coding skills for good rather than for evil? Did you ever want to build something to make your city or your community suck less? Here are some lessons from a civic hacker on how to kickstart your project. Hint: it's nothing like writing a gem.
Presentation of a groupSound effectInternetworkingWeb-DesignerWeb 2.0CoroutineComputer animation
BitPower (physics)Core dumpInternetworkingGoodness of fitDependent and independent variablesGodMeeting/Interview
Student's t-testHacker (term)Power (physics)Right angleGoodness of fit
BuildingTowerFamilyGame controllerAreaWindowIncidence algebraSpacetimeData storage deviceDigital electronicsLogicMultiplication signFlow separationMatching (graph theory)Lecture/Conference
AreaPhysical lawCodeProjective planeCorrespondence (mathematics)GodLevel (video gaming)BuildingRule of inferenceContext awarenessSimilarity (geometry)CodeDegree (graph theory)Task (computing)Limit (category theory)
Graph (mathematics)Mobile appSoftwareMultiplication signGroup actionInformationTraffic reportingNeighbourhood (graph theory)Sign (mathematics)TrailComputer animation
Student's t-testProjective planeMobile appExclusive orInsertion lossFocus (optics)Phase transition
Electronic program guideProof theoryPresentation of a groupStudent's t-test
Greatest elementProjective planeCollisionSoftware repositorySet (mathematics)Staff (military)Group actionWeb 2.0MereologyCurvatureMultiplication signLine (geometry)Open setKey (cryptography)Process (computing)Traffic reportingInformationField (computer science)Focus (optics)AutomationState of matterLevel (video gaming)Online helpSound effectDesign by contractSheaf (mathematics)Web-DesignerPressureWordPerturbation theoryHelixHacker (term)Computer animation
Reading (process)Field (computer science)Trail
1 (number)Traffic reportingAreaPoint (geometry)ResultantEmailBuildingField (computer science)VotingStrategy gameCodeLogicMetropolitan area networkContext awarenessData miningProjective plane
Online helpPlanningCore dumpRight angleMultiplication signAreaProjective planeHacker (term)Point (geometry)GodACIDCodeProgrammable read-only memoryMaxima and minimaVideo gameComputer animation
Level (video gaming)Greatest elementMultiplication sign
Graph (mathematics)Dot productLimit (category theory)Reading (process)Field (computer science)Right angleMultiplication signComputer animation
Multiplication signHacker (term)Projective planeData managementLattice (order)HypermediaDependent and independent variablesGoodness of fitProcess (computing)Machine visionCodeComputer clusterSoftware developerGroup actionStrategy gameNumberLengthConfidence intervalAreaRegular graphService (economics)Inheritance (object-oriented programming)EstimatorVideo gameWordProduct (business)WeightReal numberArithmetic meanCellular automatonSet (mathematics)RoboticsMedical imaging
System callHacker (term)Group actionInternetworkingLocal ringProjective planeCodeReading (process)ACIDPower (physics)GodDependent and independent variablesActive contour model
Transcript: English(auto-generated)
So I'd like to start off this presentation today with a quote, any sufficiently advanced technology is
indistinguishable from magic. It's a fact. And it's something that we take for granted. Because as web developers, we work with technology every day, and it starts to become routine. And we forget. If you were to go out onto the street here in Atlanta and you were to ask somebody, how does the internet work?
They would tell you the truth, which is that it is magic. The internet is magic, and we are goddamn wizards. Just look at our beards. We build the internet. We build this thing, this core foundation upon which our very society is built, this thing that our government
depends on, that our economy depends on, that our culture depends on. We build it from bits of HTML and CSS and JavaScript. And it is magic, and we are wizards. And as anyone knows, with great power comes great
responsibility. All of you in the room with me today, you have a responsibility. Nay, you have a duty, a civic duty to yourselves and to all the muggles out there to use your powers for good rather than for evil. Now, some of you I know use your powers simply for your
own amusement or to earn a simple living. Well, today I hope to inspire you to use your powers to bring lightness and good into the world, to take up the quest of civic hacking and make a contribution to our society, to our community. And I hope today not just to inspire you, but to warn
you of some of the perils that you may face on your journey and that I faced on mine, and to equip you with some of the weapons that you may need for your prep or backpack so that, as DHH would call it, you can be ready.
Now, I myself started my journey into civic hacking and into Rails magic in general not so long ago. I was a student at the Flatiron School. And it was a snowy night in New York City, and I was up late on campus in Manhattan downtown in the financial district right by the Wall Street Bowl.
And it was snowing outside, and the icy wind was cutting through the streets. And even in the halls of our ivory tower of technology and academia, it was cold. You may not know this, but New York City, its old
buildings are not just full of history. They're also full of broken boilers and drafty windows, old steam pipes with peeling paint running to rusty radiators, especially in lower income areas. This problem is epidemic. And people who live in buildings like this, they don't have control over their temperature like many of us do.
They don't have a thermostat on the wall. They depend on their landlord to provide sufficient heat because all they have are these steam pipes. And in lower income areas particularly, although the problem isn't limited to that, a lot of people do not get the heat that they need. And this isn't just a problem for New York City. It's a problem all across the northern United States.
It's a problem in Chicago, Philadelphia, Boston. And it's not just a problem in the United States. It's a problem all over the world. We get the same issues in Canada. We get the same things in the UK. Now, it seems every year in New York where this problem is particularly bad, there is a new story coming out of the New York Times. And the year that Heat Seek got started, this is
actually a really hard story. It was the Ortega family. They lived in an old building in Crown Heights in Brooklyn. And Christine Ortega has a daughter with cerebral palsy. She was six years old at the time. She requires a lot of medical equipment.
And they were not getting sufficient heat. She called the landlord. She called the city. She complained. Nothing was happening. So she went out to the store and she bought a space heater. When she plugged that space heater in, the draw from the heater and from the medical equipment was too much and it blew a circuit. So she had to choose one or the other. The best that she could do was to prop a mattress up against the window to try and keep the draft out.
And this is not an isolated incident. I wish that it were. But there are 200,000 heating complaints in New York City alone. God knows how many there are across the United States or across the globe. One of my teammates made this map. We call it the cold map. You can see it's broken down by zip code. And the colder, the more heating complaints there are in that zip code, the darker the blue.
And unsurprisingly, this corresponds really tightly with the areas of the Bronx and Brooklyn that house the most lower income demographic, mostly lower income demographics. So it's a big problem because it's dangerous.
But it's not just dangerous. It's illegal. It's actually against the law. There are housing codes in place that prohibit this. In New York, it has to be at least 68 degrees during the day and 55 at night. There are similar laws in Philadelphia and Chicago with slightly different rules. And the issue isn't that people aren't aware.
It's that it's not practical for a city to know the temperature inside of every old building within its borders. New York City has so many old buildings. I mean, it's an impossible task. It's a limitation of technology. And I remember that night at the Flatiron School looking
out at the snow and trying to come up with a project to work on for school. How hard could it be? How hard could it be? Now granted, it was actually really hard. I didn't know this at the time. I was like really naive. And this was the first app that I ever tried to build.
So I didn't know what I was getting myself into. And I certainly didn't envision what HeatSeq would then go on to try to become. I didn't envision a network of temperature sensors all across these neighborhoods. I did not envision an app that would analyze and produce reports to give to advocacy groups that would then use
that information to bring about justice. All I imagined was just a simple graph that connected to a simple wireless thermometer. I thought, how hard could that be? How hard could that be? And then I fell for the hackathon trap.
So this was the first of five traps that I fell for in my quest into civic hacking, the five that I know of. There are actually probably way more than I haven't discovered yet. But five that I know of, if you've ever been to a hackathon, you know what it's like. And everybody's sitting there thinking, I've got
this great idea. And if I just focus on this one idea for the next 48 hours to the exclusion of everything else, to the exclusion even of bathing, which is why hackathon smells bad, then maybe, maybe it will be cool before I get distracted. Because it's so easy to get distracted.
There are so many other cool projects that we could be working on. And what happens is what happened to me, which is that you burn out. You can't possibly come up. You get through the 48 hours. And afterwards, you have this kind of OK thing that you really just cannot stand looking at because you just burned out so hard on it. And that's what happened to me.
And the app would have died, I think, if it hadn't been for a couple of things that we'd done by mistake. I'd roped another student in with me, who was also starting to lose focus. So how do you stay focused? Well, the first thing that we'd done was we'd agreed to
give a presentation in front of a bunch of students, at least one of whom is in the audience with me today. And we were going to be horribly embarrassed if we didn't have something to produce, something that we could demo at this presentation. Another thing that we did was that we made a promise to a user, somebody who actually had an apartment that
was too cold and who wanted this technology so he could generate some proof and take it to his landlord or take it to the city and get the problem fixed. And, oh my god, squirrel! Just keeping you on your toes, guys. Stay focused.
So put your reputation on the line. That's the key to overcoming the hackathon trap. Put your reputation on the line. Maybe thinking, but I don't have an idea. You had this bolt of inspiration, and you were sitting in the Hogwarts of web development, the Flat Iron School. And I just don't have an idea.
Well, I'm totally exaggerating. I didn't have a bolt of inspiration. I had a project that I needed to come up with. And so I went to open data sets. If you go and you look at some of the data sets that are just coming online, there is so much government data at the city level, at the state level, at the federal level coming online that no one has had a chance to dig into yet. Nobody's dug in yet.
There's a ton of stuff that you can come up with. They just now have traffic information that shows where collisions are happening in certain cities. How cool would it be to map that out and see what's the most dangerous intersection in America? Live update that. Or better yet, don't use other people's technology. Don't use other people's data. Get your own data. 56% of US adults have smartphones.
They have geolocation. They have microphones. They have accelerometers in them. You can collect a ton of data and use it to affect policy. People don't want to invest in infrastructure because it's expensive, and it's not always politically expedient. And some of the old infrastructure in the
United States is in terrible disrepair and really needs help. We have the ability to crowd source that information. We have the ability to make it politically viable to invest in our own infrastructure. And you know, if you really want to have an impact, automate advocacy. Don't just take open data and do something cool with it,
but automate the process of advocating for people who need help. Because the advocates in our society, the social workers and the public defenders and the community activists, these people, they are always underpaid and always overworked. There's never enough of them. And if you can take just some of the hardest parts of
their job and automate it for them, you can have a huge impact. And that's what HeatSeek does. We don't work directly with tenants. We don't have the time or the staff or the skills for it. We empower advocacy groups by automating one of the hardest parts of their job, which is to gather evidence. So you may be thinking, but I don't want to listen to all of
your stupid civic hack ideas. I have a way cooler civic hacking idea. And I bet not only do you have cooler ideas than me, but some of those ideas are actually already better implemented than mine. But I also bet that the majority of those ideas are languishing, unloved, at the bottom of
your GitHub repo. Why is that? I think it's because of the field of dreams fallacy. So it's the second trap that we fell for. We thought, if you build it, they will come, right? And so we built an MVP. And we had it working. We had it connected to temperature sensors.
We had it collecting readings. We had a user in the field who was actually showing violations. And then it started to get boring, and we started to lose interest. Because nobody really cared except for this one guy. And the reason is because, well, nobody knew about it. We didn't tell anybody.
If you build it, they won't come. If you tell them about it, they will come. You need to tell people about it. Hype it up, whatever you're working on. Hype it up. That's the cure for the field of dreams fallacy. But be careful with hype, because it's a double-edged sword. That was the third trap that we fell for.
We got drunk on press coverage. We went on a publicity bender. After we started hyping up our project, we entered a new competition, and there was a popular vote. And we spammed every man, woman, and child to get them to vote for us. I went through my whole Gmail contact list. Everybody who I had ever sent an email to or received
an email from, and spammed them. And my own grandparents, it was embarrassing. It was a low point. But the result was that we got a lot of attention. And at first, it was just blogs. But it got to be bigger and bigger names. And then it was Fast Company, and then it was Reuters, and
then it was CNBC, and then our moms were really excited. And it felt like that was the most important thing for us to focus on. And so we stopped coding, and we started writing talking points. And we ended up concentrating all of our attention on the areas that were most interesting to the reporters, rather than the ones that were most important.
Reporters are not going to ask you, what's your code coverage like? They're going to ask you, what are your uptime metrics? Or how does your retry logic work? They're going to ask you, what's your strategy for growth, and how many users do you have, and how many buildings or whatever you're going to be in. It's all a terrible distraction. We got really sucked into it.
And then it got worse. It got worse. We started pissing off the very people we were trying to help. One of the things that happens if you hopefully eventually have a civic hacking project that innovates in some area, if that area happens to be helping people in a lower income demographic, one of the things that's going to happen is people are going to tell you,
oh, William, you're so noble. You're so magnanimous and generous and dedicating your talent and your time to help these poor, helpless slobs who live in dumps. And it's bullshit. It's not true. But it's really easy to get sucked into. And then you start thinking, well, I am rather magnanimous sometimes.
Why thank you, of course. And then the people you're trying to help, they hear that, and they're like, man, I really don't need your pretension right now. It's already cold. I've been dealing with this project, same problem, for years before you came along. You don't need your help. Why don't you just go back to plan World of Warcraft or whatever it is that you do and stop trying to save us with your code? And that's a valid point.
And then it wasn't just to the tenants. It was also the government agencies that we were hoping, like the housing department that we were hoping would adopt this technology. There's another area civic hackers often innovate in. And I want you to be aware, if you innovate in the public sector at all, people are going to tell you, oh, thank God, that you young, smart innovators are going to come
in to this old government bureaucracy of terribleness, where everyone is just like wanton spending and grossly incompetent. You guys are going to come in with your code, and you're just going to disrupt. It's going to be great. And it's also, again, really easy to get sucked into.
But the truth is that actually those government agencies have been working on these problems for decades. And they have a really deep understanding of the issue. They are usually doing good. And they can foresee a ton of problems that you're definitely going to run into. But if you're going to be a dick about it, then we'll just sit back and watch.
You guys can figure that out on your own. We'll maybe laugh at you. And that's bad enough. But then it got worse. We got inundated with all of these requests for us to pivot. Petitions to pivot, I call them. Usually they were ridiculous. Can you just use this technology to help with
global warming? Or could you guys maybe just become competitors to Nest? Or when are you guys going to start monitoring air quality? It's like at that level, it's pretty easy to brush off. But sometimes they start to sound like plausible feature requests. Can you expose an API for us that we
can consume your data? And yeah, that actually seems like a great idea. I think there's a story on the backlog for making maybe we should just bump that to the top, bang out an API for you. They always say this is a great opportunity. Any time anybody tells you this is a great opportunity, be careful. What they're actually saying is, I want you to focus on
what I want rather than what you're actually doing. That's the great opportunity. And there's a reason that that API was at the bottom of the backlog. And the reason is because we didn't have any data to share yet. We need to focus on actually getting data so that an API would be useful. That was the challenge. We got sucked into all of these distractions. And you're probably thinking now, OK, well, William,
given what a horrible screw up you are and all of these problems that you've had, why am I listening to you? We turned it around. We did help keep the heat on, I think. We had dozens of sensors in the field collecting readings
by the end of it. We had actual violations detected. This is a graph from one of the tenants who's in active litigation right now. You can see it. We've anonymized it, so you can't see the names. But those orange dots at the bottom, those are readings that were recorded when the temperature was below the legal limit.
So how did we turn it around? What were the secret weapons for your prepper backpack, as DHH would say, that brought you through all these trials and tribulations on your quest into civic hacking? There were four secret weapons. The first one is non-developers.
Non-developers, they get a bad rap, I think, especially in that hackathon culture, where you've all been there, there's that one business guy on the team who does nothing for like 95% of the competition. Then at the end, he gets up, and he gives a bad pitch. And then he tries to take credit for vision, and he's slick. Non-devs are actually deadweight at hackathons.
But in real life, though, they're awesome. Because any project, whether it's a civic hacking project or any other project of a meaningful length that has longevity, is going to need more skills than a developer has. Developers, we are narcissists. We think that we can do everything, and that we're the best person to come up with the long-term strategy and
the vision and all of the code and the social media and the marketing. And let's just do the books, you know? But actually, if you turn over those responsibilities to people who actually specialize in those areas, well, all of a sudden, you're free to get back to actually coding.
And that's really powerful. The only issue is that you bring on, if you're a civic hacking project, you bring on all these non-dev volunteers, and then you just spend all of your time coordinating, which brings me to my second weapon, managers. This one I know is controversial, because managers are a particularly hated type of non-developer.
They'll ask for estimates, and then they'll use them as deadlines. They'll make you go to a bunch of stupid meetings that don't matter at all. But actually, that's not managers. That's bad managers. Good managers will protect you from meetings. Good managers are like meeting shields. Somebody tries to make you go to a meeting, and you just grab the manager, and you block it. That's what good managers do.
They keep you focused on what you do best, and keep everybody else focused on what they do best. And once we got some managers, people actually started getting back to work. Third secret weapon is the day job. This is really important, I think. I am very fortunate.
I work at SunGuard Consulting Services. It's a great dev shop. They are super supportive of me and my civic hacking side projects. They paid for me to come to RailsConf because they give this talk. They always tweet about us when we're doing well. And most importantly, they give me that regular paycheck so that I don't have to worry about money. And that means that I don't have to, there's no
temptation to bastardize the original idea, which was about giving something back to the community, and instead turning it into something profitable. We talked to investors. And investors are sharks. Their big idea was, how about, this is great, actually, you have a great technology.
What if we could just change the branding so that instead of focusing on poor people, we just sold this for rich people, though? That's a good idea? No. This is like the whole reason that we started this. So be careful.
If you have a day job, though, if you have a good job by day, then you can fight crime by night. Like Superman had an awesome day job. So the fourth weapon, this one's a little bit cheesy, but it is honestly the most important weapon in your arsenal.
And that's perseverance. Because perseverance will make up for any number of blunders, any number of pitfalls, any number of traps that you fall into, if you get back up on the horse and you keep going, eventually you'll make it through. And I'm not talking about individual perseverance. I'm not talking about just one person.
Because there will come a day when your confidence will fail you. There will come a day when you will be ready to give up. I'm talking about the perseverance of a team. Because if you have a group of people with you to support you, then in those times, you have someone to turn to and
say, why are we doing this? And they'll tell you, this is why we're doing this. This is why we started. This is where we're going. This is why it's worth seeing this through. And we as a project, we have an organizational habit we meet every Sunday to tackle these problems
together as a team. And it's that organizational habit coming back every week, time and time again, that has kept us going for, it's been a year, over a year now. So we Rubyists, we're a community also.
RailsConf, this is another organizational habit. And you may be thinking, well, OK, so I'm prepared now. I'm equipped. I know the perils that I may face in my quest into civic hacking.
I see the value of it. And I have some tools that you've equipped me with so that I might be better prepared. But I've forgotten. I've forgotten why I was excited at the beginning of this talk to actually do any civic hacking. I've forgotten why this is important. Well, like I said, we're a team.
I'm here to remind you that the internet is magic. And we are goddamn wizards. We have a responsibility. Nay, we have a duty, a civic duty to ourselves and to all the muggles out there to use that power for good rather than for evil.
If even 1% of the commits that we put out went to civic hacking projects, we would live in paradise. So this is your call to action after you leave this conference. Join your local Code for America brigade. Fork a civic hacking project on GitHub, or start one of
your own, because the society that we live in, it's got issues. So fork it. Let's make a poll request. Thank you.