Good afternoon everybody. I want to thank you for coming. I know it's been a long conference So when we're reaching the point where everybody's kind of wilting in their seats Okay, more stuff. Oh god, but And especially for like an editorial thing any designers and developers CMS conference I'm really thankful that you are here with me And I am thankful that you are willing to be part of what it's become a little bit of an experiment I started this up on and again. It was going to tell you all about the CMS tools and the things of coral and then What has happened over and over again news happened? And so if you've been reading the news, we're not going to go too in-depth it right now But you open up your news and it's just like oh, oh god time to change everything again and I wanted to do something different and Based on my assumptions it might have been good, which is great So this is the title of this is lessons learned from open source journalism. My name is Sidette Harry I am currently editor at Mozilla. I was project I was community lead for the coral project and I'm editor at large of the coral project and I wanted to talk about Journalism But more importantly I wanted to talk about communities. I am speaking today as Sidette I am going to talk about some of the tools we've built with coral and then talk about the work that I'm going to go forward in doing with Mozilla, but what's really important to me personally is that I talk with you and we talk together as people I am a person trying to work a problem Do not hold anyone who who employs me responsible for anything I say that you don't like if you like it to tell them I'm wonderful, but It is very important to me that we talk about Communities and it's we talk about people because Drupal is open source content management it's communities and Mozilla is open source and corals builds open source and I as with most of my life love the idea of it, but then kind of want to poke the wound because St. Thomas was my favorite saint and Think about how that relates to journalism and what we do and what we need to go forward So I like to reference books because I'm made me mainly a research head and this is considered one of the seminal books about communities Benedict Anderson's imagine communities and It believes that there are three levels social historical and the imagination where print media and he talks about print capitalism and it goes off and off and off into the idea of Cong of we congregate spread identifiers into communities.  So we make a tool or we make print and we Center around this and one of the things that I've always looked at looking at this book and whether or not it translates to the common Age both in journalism and coding in context is it doesn't necessarily talk about how creators work in this So creators and makers of tools and how we've streamlined things help develop cultures of community We don't they don't talk about that But a lot of how we do the things is part of the cultural community and I want to pull that in there and the I kind of just went we and we did this is I Really in one of the big things I want to think about is I Feel that often Programmers coders people who make the things are left out of the discussion about what we need to change about journalism What we need to change about communities Because those skills aren't as valued as they should be and not in a monetary way But in a very these are the people who notice patterns these are the people who put things together and We don't think about how do we bring that voice into the room and It's work and working with journalism Especially at the last two years who there has been a lot of discussion About who we are and what we do and who aren't we listening to and I think that that often goes external But I also think it needs to come internal as well Who does not feel empowered to speak within and because that will also influence who does not feel empowered to speak without So the first thing I like to talk about because I always love to big up my project And I even though I am now editor at large deep love is coral project Started in 2014 Washington Post New York Times open news, which was under Missila at the time. We're now under Missila Specifically Sasha corn Aaron pill Hall forget to get an angle comments are terrible. This is not untrue how do we build better comments and They said that 2014 we got an endowment from the Knight Foundation. We thank you so much and in 2015 They hire our project lead Andrew Lozowski and then me So it's the two of us and we promptly get together with a Technical advisor who becomes our tech lead and we get a whiteboard and we decide We're gonna put this together and what do we need to do and we look at it and we go Nah We don't need to build better comments. We need to think about the communities around news This is what happened and it was I did because it is modular So it was like little bits of coral and we're gonna build multiple things and they were gonna fit together The first tool we built was not a comment system. It was ask and I have all of these up and if necessary I have the slide deck together But it was based off of a story. I read possibly powerful possibly not About Benjamin Franklin when he was asked, how do you get someone who dislikes you to like you? Get them to do you a favor So he asked someone for a small book and Benjamin Franklin it found the school I went to so that's probably part of how I received it and He asked for someone for a small book and rather than giving something He made that person feel that they were useful that they were part of that community they were part of his community because he had taken something from them and When it comes to content management and developing for systems One of the things we found was that there's so much of this development was done in spaces that was like Google form or type or Survey monkey or something for doodles where it was designed not for the journalistic workflow It was not designed for the way journalists work. So we're trying to take people who work in a very literary Put together way and then asking them to use data that doesn't work for them as well news is happening People personal identifying information People's Addresses their trauma all of this when they are submitting things They're just sending it willy-nilly from immigration rates to anything you're soliciting information and people go You are the one place I can send information because journalism is where we go to tell people things and we don't have a way of saying Okay, I want your story, but I don't necessarily need all of this I don't have a way of being good at intermediaries. So what we did was Did a lot of research and we figured out a way to solicit asks how to put together personal identifying information separate from Original information how to look at if I edited this. How can we backtrack? How can we track those things? How can we maintain the integrity of a journalistic process? While also being kind of warm and being able to control what happens and deal with debate and deal with polarization It's been used in Philly comm by the Boston Globe and Newsday And I use those three examples because Philly comm it was used the day after the election and We used emojis to ask people to tell us how we feel about the election So it had a plug-in and it was able to be moderated. So we got to see what you said before we put it on We'll get to that in a second Boston Globe Boston Globe did that very big race story That is a touchy subject in the city of Boston. It's a very topic touchy subject and parts of it Good didn't go the way it necessarily needed to go but people submitted thousands of stories and We were able to anonymize them talk to them get back to them and keep that in a way that the story presentation the ability for people to combine in you was preserved and Newsday we asked the We asked people how the current administration was doing and we allowed them to grade them and it produced graphics so it plugged into the back and people were able to produce graphics and Talk about it and what was important for this is that it both the Benjamin Franklin story and the idea of When you think of a community when you think of a community how it participates You think holistically letting people just ride and yell at each other would not have been a good idea in this current Climate there's a lot of that and one of the things I say is I designed for communities that I would kick myself out of but How do you start to deal to get people who see themselves as together in some way but can't necessarily talk to Participate how do you ask? And we built that tool before we built talk which was strange to some people, but there is this Thing with communities where it's always. What do we tell? What do we sell? What do we tell and that what do they need? Who are they? What do they feel? How do we get better in journalism? You think that would be the first thing we do We are not in a culture of that so we built this and I love everything my team is fantastic, but this is the fact that this came first has always Made me really happy Because this is how you show people you're interested you ask questions you connect to them The other thing we built which is now at the Washington Post the Wall Street Journal the intercept Which said they would never have comments, but now they do and IGN register is How do we make it possible to have the conversations that best serve the purposes of the community? People feel however they feel about comments a lot of people will like you'll never ship anything comments are terrible You don't need comments, and I'm like you are completely correct comments are awful People are often shot when people go so what do you do when what do you think we should do for our comments? How should our comments be I'm like you shouldn't have comments You specifically should not have comments You don't have the bandwidth. You don't have muscle you your arms are not long enough for that fight But You should have a way for people to give you feedback How does your community tell you what they need and even if you decide not to use our fantastic service when you talk to us? What do you want? What do you what is your purpose and in a lot of failures people go? Well, I'll build this tool. I'll build this new thing and our tools are great. They're wonderful Please go to our website. Look at them what we find is not a failure of tools But a failure of purpose not that they don't have purpose. But like can you tell me that your community now? And with core we were very specific about an interdisciplinary approach. So the next thing we built were guides Strong community is about more than software How do people know what to do when they get to a community space? When you look at a community space from software to design to journalism to theater to sports I actually used a lot of theater of the oppressed from Augusto Boal So kind of like circle back to myself. I was talking about news newspaper theory and newspaper theater Do you know how to act I Use the fact that I'm from New York and I'm from far Rock a lot because there is this deep there's an unspoken thing of These are ultimately literary forms. We are dealing with forms that deal with the spoken word We haven't expanded to different ways of communication different levels of a community of expression different modes and We like people who talk a certain way. We like people who display a certain amount of education a certain kind of education We prioritize English speakers So when I asked these questions, I asked them how would ask people where I'm from and what does it mean that you can or Cannot understand that and it is important because that is how your users are going to come into a space If your users are hit by jargon if they're hit by people who do not seem to have an onboarding process where you're looking around going I just got here. I just wanted to know about this and there's no space Who lets them know what the space is people talk often derisively about eternal September? Where oh we were always onboarding newbies and it's there's it's like September and they're all moving in and I like We feels like eternal September because you don't have any way from to move to October It feels like eternal September because someone is always coming in and you have no place for them to go Here's where you learn here's where you go where you learn how to act and then this is how you participate in the rest of it And I think that that is super important So the thing that was most important in the lesson that I thought was most useful is we are people We design and build for people If that is the one lesson I could take and give to everyone that is the most important thing We have to people better and we have to give space for people to people better and What does that mean?  We will all fail There is no one who will hit a hundred that a thousand we will not be perfect at this We will have spectacular failures one of our first communities I forgot one of the basic rules I tell everyone and left the comments on over the weekend and watch them include it was gifts happened Lyrics happened. I just I came back on Monday. It was like, oh That's not the problem. It's sending places and processes for people to fail and then moving forward Based on a purpose is a question. We have to answer It's not a moment. We are often within I shipped. It's done I wrote it's done in the process of making community of improvement of iteration of making every change We're looking at process. We're looking at how do I handle this thing? How do I have space for this thing? How do I? Make some room for if something goes terribly wrong who has the stop button who has the start button Who knows how this works and can my community tell me that So the question I often ask is not How do we inclusive this is like what is your process? so That's why I said this is an experiment and we're doing things very differently You're gonna indulge me for a little bit. Do you mind indulging me? Okay, because this is a very big on permission and consent and we're going to do this together and We might share because it's small enough that I'd actually like y'all to talk to each other If you might if you want to if you don't you can stay and then we have a question and answer But we want to ask three questions And I'm going to do it with you and I'm also going to jump off the stage and walk around But I'm going to give you time and when I say I'm going to give you time I mean I have a timer and I am working it and I want you to take Three minutes per question and I'm going to set it up and then say But whatever your project whatever you're thinking of wherever you're thinking of making a community I want you to think about These three questions. Who is we? Bam them is capitalizing with emphasis because I'm from New York City and Too often with communities. There's this idea of we're making a community and we who's the we do you mean The programmers. Do you mean the consumers? Do you mean your advertisers? Do you mean content contributors? Who's that we and here's the thing I believe you can I might not like your answer But you've got to have one the thing that is most terrifying to me is not you have an answer that I don't like We work across the political spectrum. We have there's certain there are certain people I don't talk to but we work across the political spectrum It is more frightening for me to hear someone say I don't know who I'm doing this for Then for them to say I don't say an answer I don't like because if you don't know that means that someone is not being thought of and someone is walking into a Space that is not safe for them and someone is walking into a space where you might not want them there And they're going to feel that And it is better for someone to know out the gates You don't want them in the space then for them to come and invest in a space and then feel unwanted So that's question one The next question Why is we here? And I phrase it that specifically both for the vernacular But moment to moment every single moment You want someone to do something you want your community to do something you want people to be present So at that moment, what do you want those people to do? Can you answer that question? Can they answer that question? Where would they go to find it? And Three what is we fixing to do? I talked in the beginning about imagination And they are imaginations realities And what I think is often derided so much is that people make fun of dreamers dreamers or innovators dreamers or creators Just because a dream don't mean I don't work But if you want to make something that's never been made before You have to be able to envision it you have to be able to think about it And too often in our workspaces we go real real fast and we're not supposed to think we're supposed to innovate and lean and agile And It's not a thing we do And we have to do and there's also the reality of The tabula rasa does not exist There is no blank slate. We are formed the moment We are in society and we are trying to make something happen And we're fixing Things with ourselves, but we're bringing our whole selves in and we want to do a thing Even if it's to sell add dollars we want to do a thing So how do we do the thing? And Write it down even if it's notes for each questions Imagine people overjoyed and please don't you don't have to do it yourself You don't have to share for sharing time, but I would like you to take a moment whatever projects in your head with these questions and do it Think about not the project, but the people on the other end the goals and the things that you are trying to accomplish And it is 406 And i'm not going to do it so that we all have three minutes per question. I've realized that that's going to be shorter I am going to say for Five minutes just five minutes Can you work on those three questions and I will do it as well with you? sound like a good plan Everybody feel okay anybody writing material water anything? Okay. I'm on the timer Go Welcome if you want we're working on a five three questions Two minute 30 second warning and if you're sharing that's cool if you're not that's cool, but we will have time to share just to let you know okay So that was five minutes And I love that I can walk around with this like I hate standing we had podiums But how did it feel to answer those questions and we're a small enough group? I think you can like pop up How did it feel to answer those questions? Oh, that's important because transcripts are important and No, because accessibility is important and that's another thing that we have to think about is it a lot of people go Well, I have theater training and I can be loud, but it's like well if we don't have the transcript. What about everybody else? but These are the questions in almost anything if you deal with you deal with me is that I'll ask is like so who is the we and That is an important question to ask And When we think of people How did you decide you're who the we was and I'm now that remembering the recording if anybody would like to tell Would you come up to the mic so people can hear? But how did you decide who the we was? I'm interested in processes We found somebody who had an interesting project going on they talked to us about what their project was cool Come on. It's a conversation. So, um, we're a client service agency. So it was kind of weird because We're not Them they hired us to help and so we're kind of becoming part of that team, but we're not like in that community and the current client is trying to You ask them who their we would be and it would be residents of the region that they're providing news to But the problems that we're finding are a lot within their own Organization and my thought in the last couple minutes was like we is we need to fix you first Before you can go out to the space Or the region But that is a really excellent thing to figure out and to do Because what is often because the interesting thing is the problems you have within your own group of people creating stuff Are usually the problems you walk right out into the other groups and make So if you can't communicate you ain't gonna communicate well with other people and Does anybody else have a we that they're interested in talking about or want to open up to the room? I think we all are right. Um, and so Oh, sorry. Yeah, um, I landed on the weave that is the reason I am here Which is I work for a college. Okay But even there we are a lot of weeks We we get siloed into staff faculty student Um, we get siloed into I am in communications, which is different from admissions, which is different from this Um, but it's more interesting to me to to talk to to think about who are we the college who is our identity who who Who would Who am I allowed to be in a space with that? I wouldn't be if I weren't at a college and on top of that a small college. We're only 2000 people, right? um And so looking at at you know who who we are as a community of learners as a a community that does service and I I positioned myself in that but I don't know. Um, I decided to answer on behalf of the college, but I don't know that that was If that was my week And here's the thing. I like those answers Because I think that there is it was very important to me that we bring this that I did not have an answer That we started and we are going to continue to do some more work with questions. I see a hand communications and publishing and you know in journalism Um, oftentimes the problems that we have to solve are these kind of internal the internal we But we have to think about them in terms of what we're trying to do with the audience the people that we're trying to reach Because if we're too inward facing If that we is only inward facing then then we just get caught up in the cycle of what Inner problems are rather than actually our whole purpose for being there, you know And that's the second question Why is we here? Who has ever been to a meeting that could have been an email You get somewhere around minute 15 and you're like this could have been a bullet point And that is an important thing the questions as I have fine-tuned them and redone them is They're not necessarily supposed to be answered in sequence. It's in total So sometimes why are we here if I'm being proper versus why is we here? But usually I'm like, why is we here? It Helps us to find the who we are So it might be we just need the we of the folks who Are doing x thing and if we only need the we of the folks that are doing x thing we need The this is our way And what are we trying to do if we need the folks who are doing x thing? And the thing that we're trying to do is do x thing We might be trying to do it better We might be trying to do it faster and that might inform who is or is not in the room One of the big issues that I think comes up a lot In journalism and programming and whatever Is that because we don't define these things you get a lot of people who stand up and go This is the we and we are going to do the thing and we're gonna and who is we Like I stand there and go I actually speak french. So no one's telling me. Yes. I don't there's a lot of french going on I did not sign up for this thing so that is important to think about and think about it in aggregate because It's not necessarily bad To start small. It's not necessarily bad to be clear What happens and I think that this is what happens over and over again is the disappointment And this is what I think specifically that I've learned from community journalism when you ask people Is the disappointment people face when you tell them that you're there for them and you have no process to actually be there for them You have no way of taking in their feedback. You have no way of adjusting yourselves for this isn't safe for me This doesn't work for me. So you're not there for them And that is this very specific kind of resentment that you have to work through That is different than Hey, do you think you could do that thing that you do really well for those folks for us? The second one does always get you a lot more Space than the you promised me. You told me you were here for us And then you weren't We're going to do This exercise again But and this is from one of my favorite books by one of my favorite authors and she has a new one out But I like to recommend it to people Is sarah walker walker doctor is Design for real life And she talks about stress cages over edge cases and What I would like to do with this Collection of questions and we'll get another five minutes going is What would you do for that group this group that you've imagined in your head? And we're going to work it a little more we have Do we do it? We set the well in time Go me is In notes Imagine this group is under stress Something the worst thing has happened terrible thing has happened for the group that you are thinking of How how does this is so weird how does that Change these Can you imagine them under stress? Can you imagine them under duress and I'm going to give you five minutes again and then I'll share my own is Think about it and see how it affects and I'll give you a half minute warning And then the one minute warning But how would that change if they were not an edge case? But a stress case Because edge cases imagine that no one will ever need this But what happens is something terrible happens and everybody's stressed Everybody needs some care or concern or guidance. How are we going to handle that? How does that change how we do this? and I'm keeping time I'm on my mr. Rogers Go And if you had a group reconvene Two minute warning 30 seconds Okay, okay, we get it apple So How did that change the exercise? How did that feel for folks with any remember as we are recording? People have to go to the mic, but did anything change substantially? For anyone What we are trying to do I had to drop out the creativity part, you know a little bit So I work with a content delivery team We are providing the tools that creators and editors use to produce news content and in a stress case All sense of you know, this would be really cool And let's be super creative about this kind of goes out the window in favor of Speed and time to market Yes, I got the thinking of Identifying a point person. So one person who the community can go to Preferably somebody who is calm and can listen And take in feedback, but not necessarily respond or do something But somebody who could be that person who helps calm the people in the stressful situation So mine isn't journalism related. It's local government related. I work for a local government and we have a number of Local governments that in our region who are now all using Drupal and those of us who all use Drupal Nobody talks to each other and the people who live in our jurisdiction in our region When they need help or services or information, they often don't know which You know, which agency provides it which government they don't care if it's the county or the city They need to know when their garbage is getting picked up or if it's the regional government So my we is a group who You know meets up of all of those people who touch Drupal for the different local governments And in the situation of a stress situation You know now that people all know Hopefully have all known each other because they've connected through this one becoming a we We spend a lot of times either having an emergency We have to spin up a website because there's this new collaboration between the city and the county And nobody knows who to do it or where to do it. So somebody goes off and gets a square space site And or there's now been a dissolution of this partnership And somebody has to own the website going forward and nobody knows each other So these things just kind of float around and they get kicked back and forth and it wastes a lot of time So hopefully after this we has been established this we can then be more efficient when situations like this arise Anyone else and I share my mic if you haven't guessed I don't necessarily like the standing on the podium thing So i'm also in higher ed and my we was my marketing communications team And we are always under stress From from the other we's around us. There's a lot of silos. I think someone here had mentioned before And breaking those down but something I just heard in a leadership seminar last week Was about the owning Who you are first before trying to bridge gaps with others? So we we have a hard time saying no, we don't feel empowered to say no to anyone We're not we're not a charge back scenario. So we have to do stuff and we can't just say well bill you more No, they just keep coming So what I would like to do and I think it's going to get a little more stress But then hopefully get more comfortable would be to Own who we are own our expertise more identify who we are and say listen. We're the communications professionals We want to help you but let us help you with Our expertise so I think one of the important things about this is sometimes know is the best answer That one of the things that's like one of the reasons and I talked about ask and just so you know It is very important for me to say this coral is compatible with Drupal Ask and talk are compatible if you're wondering I have cards is some when you do specifically for these group of three exercises that I think about and do is It's okay if your answer isn't software It's okay if your answer isn't the same software for the same thing So you might have a situation where you have one piece of software for we have time We are easy. We are breezy. We are a couple girl and we can do whatever we want And then you might have something that's just like nope This just has to get out that has to be a different thing and you might have that the your question was a Process question this might need to be a better process Now there are tools we can build there are things we can do And that was part of what we did with ask and tell where we put parts of those process into the software But that is a thing where you start thinking about how do we do this thing? And that is what curl was and that is one of the biggest lessons I learned from journalism is that To actually Design for people we have to remember people and so often so so often it becomes just the task It just becomes just the thing But that task and that thing is going to be done by a person and in the spirit of sharing I am going to tell you a little bit about the thing that i'm doing now in addition to coral is I don't want to get back on the stage. I just want to hit the space bar So now I am editor for mozilla foundation And one of the things that we are thinking about and this is part of the reason I wanted to come in addition of telling you how wonderful coral is is We work right now and trying to work around the language of internet health So how do you help people think of a healthy internet? How do you help people talk about a healthy internet? And also, how do you help people become involved and speak a language? And when people ask me, what is my way my way is People who need the people who use the internet and don't understand why they have to And don't understand how they're doing it because it's very easy to get in a room of people who know exactly what's up And you talk to everyone and they talk about bitcoin and blockchain and I understand those intellectually and then I roll my eyes and go Can anyone say that in a paragraph under? Of 170 words anybody My kingdom I got $50 No, I seriously to this day. I laid out a bet That I will give 50 bucks to the person who can explain electronic currency bitcoin at all to me in under 170 words No word can have more than two syllables I still have my 50 bucks And Also, how do we look at we started with Benedict Anderson and the imagined communities So how do we look at a community and make them feel? Included not just in the I want to include everybody so must say it a lot But how do you make design and the words and the work include people and I get to look at fun stuff But it also makes me look further afield. I'm looking right now at churches I've never known so much about painted doors in Dublin in my life Did you know that in the Gregorian England English time period people in Dublin painted their doors to indicate that they were resisting or non-resisting People the way we set up churches the way we put up iconography if you look up a lot of those symbols tell people What happens here?


And the Defence Headquarters has released the names of terrorist King Pings killed during different operations in the northern part of the country. The Defence Headquarters noted that the terrorist commanders were killed in separate operations between January and March 2024. The Director of Defence Media Operations Major General Edward Bubba, while revealing the names to journalists during a briefing in Abuja, added that the total of 2,351 terrorists were killed while 2,308 were arrested and 1,241 keylapped hostages were rescued during the period under review. We have employed significant firepower to neutralize several terrorists as well as disrupt their activities. Troops have killed several of their leaders, their commanders, and their foot soldiers within the period. Significant commanders killed.  Hello, hope you enjoyed the news. Please do subscribe to our YouTube channel and don't forget to hit the notification button so you get notified about fresh news updates.


I went through a phase of embarrassment around just the word Jesus. I felt I could notice some embarrassment coming up in certain contexts or publicly. It's funny to say it to somebody in a conversation, but in a public way it was almost like a threat to an image. And so I think for a lot of people it will say the Judeo-Christian world, which is pretty far-reaching. And I think that took me a number of years to kind of like be rinsed of it, so it wasn't something that was like just a quick pop it was gone. It was actually through a lot of rinse cycles and I think it's more of what the mind is associated with and comfortable with and familiar with. So in that's the general context for this, it's taking you out of the familiar. So I think there was a time when I think when you were here, Chris knew the latter part of you being here and there was a whole association with just the teaching don't ever take the Lord's name in vain and you just had a lot of anger that day in church and just decided to curse a blue streak in the chapel because it was part of that rinsing of that almost like threat. Like don't ever take the Lord's name in vain, like some of us were told that when we were children as if the Lord has an ego to be offended by profanity or that. It was more just like that God and love is sacred and don't ever forget how sacred love is or how sacred you are, that's really the positive interpretation but when it comes out as don't take the Lord's name in vain it's almost like there's a threat that there will be some huge consequence if you ever do, but that's more of an anthropomorphic God and it's a lot of washing free of any of the connotations around the words. Yeah, he does say in the Course, forgive me your illusions so you might say that when you do see the images and so forth that that's part of the forgiveness of letting go of whatever meaning the Christ is neither male or female or man or woman and it's a washing free of all that and the neighbor even came over and said, what happened to you? And she said, I've been forgiven. And I said, what are you talking about? And she said, it's just love, it's all God and love and then the woman asked what church do you go to and she said no church and then the woman was, well, it just started off with that but so now it's kind of gone more to just an expression that comes through but it's not so much of what the world would call Christianity, it's just coming from an experience but it is good just to watch any feelings you have around the words and I had to watch that when I was just beginning to go to Course groups and just being in and noting those little tinges of embarrassment and what's that? It felt like I was going on there, it was a good mind-watcher. I remember I was in Columbia and a young woman had come up and said, I have a question to ask but I'm way too embarrassed to ask it in front of this large crowd in Cali, Columbia with around homosexuality which she was identified with and which in this predominantly Catholic country just the very idea of bringing up the question, she couldn't even imagine doing it so she told the translator who was doing it in an enclosed booth to tell me after the break to explore the topic so we did but that was just the way the spirit took it so it could be explored in a way where it wasn't too threatening and she could benefit from the whole answer but there was no personal threat to that and that's also why we encourage a lot of mind-watching with movies because a lot of times you can identify with what's going on with the characters and you can see the transfer value in your own life, your own mind without that it was happening directly to you it would be way too intense I've always seen that as the value of travel just like fish out of water when you're in the same environment and they say familiarity breeds contempt it's that there is something very sneaky about familiarity that can seem to be cozy and comfortable and yet it can be delusional as well and not seen as delusional and that's the sneakiest of all traps to have self-deception and not be aware of it


Good morning, I'm very honored to be the person to kick off this conference for you all. You probably know from all the banners we have around downtown, the theme of this year's conference is one industry, one stage. The last few years have been exceptionally great for our industry and with all of us here at one stage, our industry is stronger than ever. So ladies and gentlemen, welcome to Clean 2015, the biggest straight show for the laundry and dry cleaning industry. Nah, I'm just kidding. If you're here from the dry cleaning industry, unfortunately, your conference actually ended two days ago, you should probably stick around anyway because as you will find out, our industry is also very obsessed with keeping things dry and clean. Alright, let's try this again. Welcome to 2015, defense industry. No, but really, welcome to RailsConf 2015 everyone. I'm Gottry Chan, you can find me on the internet as Chink and Code. I love coming to RailsConf, this is actually my fourth RailsConf and this is actually a conference with a lot of sentimental value for me personally. Four years ago I was at RailsConf, my first tech conference ever on the RailsConf scholarship program. I came back the year after, went to the RailsCore office hour and had my pre-quest merged since then, I've been making regular contributions to Rails and shortly after RailsConf last year, I was accepted into RailsCore team and a year later here, I'm speaking at RailsConf for the first time. So I would like to thank the community for supporting me in what I do and if you were at Austin four years ago, I would like to personally thank you for shipping in for my ticket and I hope that was a worthwhile investment for you. And if you're here for the first time or if you just recently picked up Rails, I would like to welcome you on behalf of the Ruby and the Rails community. I promise that you will have a good time here. In fact, I had such a good time from RailsConf last year, I took one of the sign with me and traveled around the country with it. As you can see, we have been free a lot. We went to Hollywood, we went on the Conan show together. We sat at the pocket table and we even made it to Canada after spending a few days on a big boat. By the way, if you're thinking about this, please don't steal a RailsConf sign, at least not until the conference is over. Like I mentioned earlier, I'm on the RailsCore team. I also work on the newsletter called This Week in Rails. If you would like to keep up with the latest changes in Rails, this would be a pretty good way to do it. You can subscribe to the newsletter at that URL. Or if you're interested in writing this newsletter, we should have a chat after this. I work for a small agency in Vancouver, Canada called Ruby House. Yeah, speaking of Canada, if you have never been there and if you would like to experience Canada for yourself, I rolled a gem for that. You can run gem.canada and all you need to do is require Canada and you'll be able to program like a Canadian. If you want to actually experience Canada though, we're organizing a Ruby conference in Vancouver later this year. The details are a little bit sparse right now, but if you're interested in coming, you can follow the Vancouver Ruby Twitter account to stay in the loop. All right, let's actually get on to the real talk. Like many of you, I watched David Skeeno last year and I stopped calling myself an engineer and I became a software writer instead. After carrying this job title around for a year, I realized that perhaps this didn't really fully capture what I do for work. You see, when I work on clients project, I get to work on some pretty complex Rails apps and when I work on these complex Rails apps, I spend most of the time fixing things instead of making my code look pretty. So either I'm fixing an existing bug in the app or perhaps I'm writing some new code and then new code somehow broke the app in unexpected ways and I have to figure out why. So this is something that I take a lot of pride in and you can see it, I take myself very seriously. But of course, in reality, what I actually do is pretty boring. All I do is I dig into the code, I figure out what's wrong and I fix it, rinse and repeat. By the way, that's my coworker, Horse Can Code. If you see him around the conference, please do not be alarmed. As boring as my job is, in reality though. Because I work on the Rails code base, so when I get dropped in into these projects, sometimes people think that I'm doing something really special for them. In fact, you've probably heard of this before and you might even feel the same way personally about it. This Rails thing is basically just magic and it might be cool for a while, but as soon as things stop working the way you expected, magic becomes black magic and black magic is obviously bad because you can't understand it and the only way out is to hire a wizard to fix your code for you. One of the Rails 14 members have recently tweeted about this topic, so it turns out that there's actually no magic in Rails. It has some sane default and conventions, but all you need to do is actually just read the documentation, learn about these things yourself. One of the, this tweet sparked a conversation on Twitter and one of the replies kind of summed it up pretty eloquently. Perhaps what it really is is that Rails work a little bit too well out of the box. You can be really productive without actually spending a lot of time studying the documentation, so it almost feels like it can read your mind. And that's basically the key. The cost of learning Rails is not piled up front. You do not need to spend a lot of time learning before you can start writing code. And with that lens, perhaps, Rails is not really magic after all. Perhaps we're just treating it as a black box because we don't really understand what's inside the black box. So today we're gonna pry open the black box together so you don't have to be afraid of it anymore. You probably had this happen to you before. You wrote some code in Rails app and it blew up on you and you have no idea why. The first thing you need to do is don't panic. Take a deep breath, it's not too bad. You see, what actually happened here is that you wrote some code and you try to run the code, you expected the code to do something for you and that didn't happen. Perhaps the code did something else, perhaps nothing happened or perhaps you get an exception. But you see, you actually have some pretty solid advantages here. Well, first of all, you wrote the code so presumably you probably understand the code that you wrote and because you wrote the code, you have access to the code, you can run it, you can modify it, you can do whatever you want with the code. And first, because you wrote the code, you understand exactly what went wrong here. Now, you might not know why or how it went wrong yet but what you do know is that you expected A and B happened. And that's pretty key. Finally, because there's no magic involved, your bug is not going anywhere, it's not gonna magically disappear on you so you have time to fix it. So with that in mind, we're gonna look at some of the weapons you have to help you figure these things out when they do not work the way you expect. This is probably a little bit obvious but as Chef Riaff pointed out on Twitter, you should probably start with checking the documentation. Surprisingly, not a lot of people know where to go look for Rails documentation. This is not an API for Rails that spits out JSON, this is actually the official documentation. So this is where you get the documentation for a latest stable release and if you're using not the latest stable release, that's not a problem, you can get the docs for any tagged version from the same website. And finally, if you're on the bleeding edge, if you're running edge Rails, or if you're using beta or an RC, you can go to edgeapi.rubyandrails.org and you'll see the latest documentation for what is on master. There's also this thing called Rails Guides which is basically more detailed and hence on articles about specific topics and same thing, you can get a tagged version or you can get the edge version as well. Another seemingly obvious thing is that you should probably be using the latest version of Rails because the problem you're having might already been fixed but this is easier set than done because which version is the latest, how do I find out? If you're new to this, this might not be very obvious because the Rails versioning scheme might not work the way you expect. The first digit in the version there is the major version and the one in the middle is called the minor version and the last thing is called a patch version. Now the major minor thing doesn't really matter so much because the first two digit together is called release series and basically for this purpose, as long as you stay on the same release series, it should be 100% compatible with what you're using only with more bug fixes applied. So in other words, you should try to stay on the latest patch version of the release series that you're using. When a bug is yet fixed for a particular version, they get backported into this thing called the stable branches for a particular release series. So if you see that someone fixed the bug on GitHub, the pull request was merged but there's no released patch version for that yet. You can change your gem file and point that to the corresponding stable branch and you'll get the code instantly. Okay, so the easy stuff is out of the way.  So this is a good time to get serious and dig in and get to the bottom of the problem. The first and the most powerful weapon you have is called the stack trace. You've probably seen it before. You get one of these things whenever you get an error in your app. And the first line is basically telling you what the error was and the rest of them is the stack trace. Stack trace is basically a bedroom trail of your code. It's a range and chronological order. The bottom is the oldest thing that it ran and the top is the most recent thing that was executed. There are apparently some talks of reversing this order in Ruby 2.3. I just heard that yesterday. But either way, one of them is the latest, one of them is the oldest, and it goes in that order. Perhaps a visualization will make it easier to understand. What this stack trace is really telling you is that at some point this create method and your post controller, can you, okay. Yeah, this create method in the post controller is executed. I wonder if I can fix this real quick. Sorry, give me half a second. Oh well, I guess it's just gonna be that way. Anyway, so this is the post controller and at some point Rails executed the create method here and that's the blue frame at the bottom of the screen. And now the create method eventually calls the respond to block and that's the purple frame on the stack trace and that purple block eventually called post.save. Ah, it's fixed, thank you whoever did that. It calls post.save which eventually calls the ensure author before save callback which is the red thing on the stack trace and finally that calls this ensure permission method somewhere and that's the yellow frame. And at this point something, we don't know what yet but something went wrong in here and an exception was raised. So really the stack trace is really just a snapshot of the last breadcrumb trail that led to the point where things started going south. Sorry, I know this is a lantern, no offense intended. But something is not right here. Well, first thing, someone must have called the post controller create method, right? Like it cannot just, you know, call itself in thin air and if you look at the, if you remember we didn't really call the before create or the before save callback directly. All we're calling is the dot save method and somehow that calls the ensure author and it's not showing up in the stack trace. So I don't think Rails is being completely honest with us here and yeah, come on Rails, we need the full story here. So it turns out that Rails is in fact hiding something from us here. Rails ships with this thing called the backtrace cleaner by default it will only show you the application stack trace, sorry, it will only show you the application stack frames in the stack traces and it will remove everything else. And in fact, if you look at your initializer folder you probably see one of these files and it tells you how you can customize this backtrace cleaner and at the bottom of there, there's a line that you can uncomment. If you do that, then Rails is gonna give you the full stack trace, which now looks like this. This is exactly the same error and because it doesn't fit on the screen anymore, I adjusted the font size a little bit. I hope you can still read it. If you can, I made another slide that zooms in for you, I tried to highlight the four lines that we see in the original stack trace. As you can see, it is embedded in this like sea of very tall stack trace. So, but you know, once we disabled the backtrace cleaner we see everything that's actually going on here. As it turns out this Rails things, it's just really cold on your computer that's executing somewhere and it's just, what it's really doing is it's just trying really hard to stay out of your way. This is pretty reasonable because when something went wrong it's most likely in your app code and by having the backtrace cleaner it helps you to focus on what is most likely to be wrong but at the same time, if you suspect Rails is responsible for your problems then you really need to see everything and to get the full picture and understand what's going wrong. Okay, so now we have learned to read the stack traces. You might start to appreciate how useful they could be but you only get stack traces when you have an error. What if you don't have an error? What if your code basically just silently failed or perhaps your app somehow executed some code and you have no idea how it got there? Well, you can just raise your own error. This is actually like, this might look very simple but this is actually a very useful thing to do. For example, let's say you have no idea it got to the ensure permission method and you can just raise an error within there and boom, you have a stack trace and you know exactly what lets you the execution of that code. Sometimes a stack trace just doesn't give you enough information to develop the problems though. As we mentioned earlier, a stack trace is a snapshot of the state of the system right before it when the exception happened. In reality, a bunch of other things probably happened before that point and the root cause of the problem can be anywhere within there. So as an example, let's say you got a no method error and you look at the stack trace and you understand why that's happening. You're trying to call a current user dot name but because current user is nil, you end up calling nil dot name and obviously that doesn't work. But looking at the stack trace here doesn't really help you though because you understand, yes, I'm getting a no method error because I'm trying to call dot name on nil but what you really want to know is why current user is nil to begin with and current user is set in the before filter all the way at the left. So the stack trace does not capture any of that information for you and that's not very helpful. So to find out why current user is nil, we're gonna look at this really advanced debugging method called the put statement. This is probably the first thing you learn when you learn Ruby but it can actually be a pretty powerful weapon for debugging as well. This is how you use it. You go into the piece of code that you want to investigate and you put so my god a thousand times. Well it doesn't actually have to be that but basically the idea is you want to print something ridiculous onto the console so that you can possibly miss it. So whenever it runs this code, it prints so my god a thousand times in your console and you will immediately spot it that is happening. And with that you can print a lot of other stuff in there. You can look at the variables you have access to. You can print anything you need on the screen to help you understand the problem. There are some other things that you can try to do here. For example you can put scholar which basically gets you a stack trace without actually throwing exception. So your code is gonna continue to run after that point but you still have a stack trace to tell you what exactly led to the execution of that code. There's also this thing called pp in the standard library which stands for pretty print. It gets you a little bit more organized output of complex objects when you print them to the console. And Rails also gives you this thing called instance values which basically gives you a hash of all the instance variables on the current object which is also pretty handy when you're debugging problems. The problem with the advanced debugging technique other than the fact that it's gonna pollute your logs with a lot of so my gods is that you need to know ahead of time exactly what you need to find out. So if you forgot to put up put statements for the session user ID variable then like you don't get the information in your log and you have to basically change your code add that back, rerun everything and restart over. Fortunately there's a better way to do this. Even more advanced debugging technique called a debugger. And if you're using Rails 4.2 or above you'll notice that you already have a debugger in your gem file called buy bug. And if you don't have one you can just add that yourself. So to use it basically just replace all the put statements with a buy bug call and when it reaches that line you get something like this in your console. From here you can execute arbitrary Ruby code so you can check the colors, you can check instance variables and so on. Besides the usual Ruby code there are some buy bug specific commands that you can run. I don't have time to get into that but you can look up the documentation yourself. And finally in Rails 4.2 you can also add this console helper in your ERB templates which allows you to do similar things but in the browser. All right so, but we still have another problem. Even the really advanced debugging technique of using a debugger does not do enough for us because if you look at the stack trace you will see that the first few frames that we actually want to investigate they're all Rails code. So it's not like you can actually open up the file and add the debugger call to the method. Or can we? Now if you look very closely you will see that there is a file name and a line number in each frame of the stack trace and you might be wondering hmm perhaps these are just regular Ruby files sitting on my computer somewhere so maybe if I open this file in my text editor and change it and save it perhaps that would just work and you would be absolutely right. This is one of the nice things about working with interpret language like Ruby. Most of the things you're executing they're just like plain text files sitting on your computer somewhere and you can modify them without recompiling them or relinking them or whatever. So you can totally just open up your text editor point it to this file, change it and it will work or there's a more convenient way called bundle open. So because you're using bundler for Rails app anyway you can just type bundle open the gem name for example bundle open i18n is gonna bring up i18n gem in your favorite text editor. And you can modify these files however you like you can add put statements in there or you can add debugger calls or you can change stuff around to experiment with any theories that you might have. You literally go crazy with this and not feel too bad about breaking things because once you're done you can run this command called gem pristine and it will basically restore every changes that you like all the damages made to the gem so you don't have to feel too cautious about doing this. There's one thing to remember because all the gems are loaded once when you start your Rails app if you made any changes to the gems, Rails or any other libraries you would need to restart your Rails server and if you're using Spring you have to stop that as well which gets pretty annoying if you're gonna make a lot of changes to these files constantly so you can temporarily disable Spring by setting the disable Spring environment variable and Spring will be disabled for that terminal session. Okay so now if you have your computer view and you actually try this in your app and you try running bundle open Rails you will notice something pretty strange. Yes, your text editor opened. Yes, you're in the Rails gem but the gem is empty. So this is actually because Rails is divided into a few smaller libraries and the Rails gem is actually just a meta gem that requires all of them so some of these libraries you might be familiar with is active record or active support but you don't really need to know what's the difference between each library because your stack trades already tell you which library you're looking at so in this case it's pretty obvious that you need to do bundle open active record so that's bundle open. Right so as an alternative if you happen to have a Rails called locally on your computer instead of using bundle open you can also modify your gem file and point it to a directory and this directory could happen to be the Rails checkout that you have locally and this is pretty cool because the Rails checkout that you have is obviously a git repository so all the commands that you know about git already works in there you can stash stuff, you can reset stuff to clean after yourself, you can even check out specific branches or specific text to like if you suspect that the latest 4.2.1 has a regression you can compare between 4.2.0 and 4.2.1 simply by checking out the corresponding text in the repository and restarting a Rails server so that's pretty convenient. Okay so going back to the stack trace so let's say you finally figure out how to make this bundle open thing work and you finally open the first file in the stack trace it looks like this you can if you have 2020 vision you can probably read it but I don't and this file is like 300 lines and I have no idea what it is about what do you do? Well first of all take deep breath it's not that bad. There are a lot of stuff going on in the file but most of them doesn't actually matter to you what you need to do is you need to stay laser focused on the problem you're working on and ignore everything else otherwise you would just get overwhelmed like trying to learn all of Rails and the one hour debugging session that you have is not gonna work so to help you with that you can basically ask yourself four questions whenever you're looking at method try to as quickly as possible find out what this method is supposed to do what are the inputs to this method now that could come in the form of the arguments in the method or it could be instance variables or it could be global variables but given the specific set of inputs what is the expected output of this method and finally the actual output match to the expected outcome so let's follow the breadcrumbs and see what happens we are in this method this is the method that the stack trace pointed us to it's called find SDI class now without knowing anything else about this method you can quickly notice that this is probably the right place to look because in our stack trace we're getting as a class not found error and this line is raising as a class not found error so this is probably what is ultimately causing a problem what is unclear though is why is this code raising this error like it just is an unconditional race why is that so it turns out that is rescuing name error and then ignoring the origin name error and raise this subclass not found error okay so now the problem shifts into this because we know that the code rescued name error so something from here must be throwing a name error for some reason and because you learn to use the debugger you can quickly check the value of this store full SDI class thing it might be a variable it might be a method but it doesn't really matter because it's gonna return a boolean or like a true V or false C thing and based on that you can quickly eliminate either one of these branch so let's say store full SDI class is false so all you need to do is look at this compute type method and figure out why is raising a name error but there's a problem though we know that we need to look inside this method but we don't know where this method is actually defined because Ruby allow you to mix in a lot of modules in the classes the answer to this question might not be immediately obvious to you the first thing you might try to do is open up your text editor and do a project-wide search but this doesn't usually go very well in Rails because we override the same method like 50 times and call super in num so you're probably gonna find a lot of definitions for the same method but fortunately because Ruby knows about where this method is otherwise it can't call it right so we can actually just ask Ruby for this information to do this you add a debugger like we always do and as to be in the same context that calls a method but once you're in there you can call the method helper which is a method that takes the name of the method you wanna check in the form of symbol and it returns some pretty useful metadata so for example you can ask for the source location which is a string that tells you where which file you find this method and which line number you find this method or you can ask for the owner which is the module or the class that contains this method that you're looking at if you add the method source gem to your gem file which by the way will be a part of Rails 5 it will be in the default gem file if you have this gem then you can even ask for the source of this method so if you type method compute type dot source it will literally print out the method definition and your debugger for you you can even get the comments that goes before the method so perhaps that would help you understand what the method is intended to do so with that information let's say we got to this method somehow it looks like a lot again but once again we need to stay laser focused so we quickly eliminated one of the branches and now we're left with this unfortunately after reading the code a few times you still have no idea why the code is written in this specific ways in particular you might think that something is fishy in the free lines that I pointed out and unfortunately there are not a lot of comments around it to help you understand what the code is supposed to do what do you do then well at some point in time some human being wrote this code presumably with a clear purpose in mind usually we don't just put code in Rails for reasons so one thing you can do is you can probably go back in time look at the initial implementation and go through the incremental changes that it's been through and perhaps that would help you understand the current implementation and the rationale behind it and this is exactly what GitLock will tell you it will tell you all the commits on this file you can get the same thing on GitHub by using the history view but what is even cooler is GitBlame so GitBlame basically tells you who touched the last who is the person that touched each line in the file last and more importantly it tells you the commit that touches that line and with the SHA you can do a Git show and it will show you the commit and it gives you the full context of the change and you can obviously do this on GitHub as well there's a blame button that does the same thing but unfortunately this commit turns out to be a refactoring commit that basically just moves a few things around so it doesn't really explain anything about the purpose of the method so what you actually want to do is you want to see the second most recent commit that touched the line that you're interested in and to do that you can run GitBlame with the SHA and the carrot after it the carrot is very important so I would like to highlight that and if you can see it from the back I will zoom in for you and zoom in a little bit more so yes, this is how you tell GitBlame to start from the parent of the SHA you have given and that basically achieves the result of you want to blame the second most recent commit that touched that line and if you prefer to do this on GitHub I wrote a Chrome extension to make it easier unfortunately there's a button there I need to fix but hopefully it will be fixed by the time you have a chance to try this at home or if you are interested in working on this you can compare with me later at the conference okay so after all the work you have established a pretty good understanding of the problem but with everything else that's going on your app you have so many gems, you have so many libraries it could be so many things, too many variables what do you do? naturally one of the solutions is to generate a new Rails app and see if you can reproduce a problem there and if you can then it's probably a Rails bug and if you cannot then it's probably some other gems that you use in your app you might not know this but if you do specify the depth flag when you generate a new Rails app it will set it up to point to your local checkout so a few other nice things like a disabled spring and stuff so basically it's a more convenient way for you to do some of the stuff that I mentioned earlier sometimes you don't really need a full-blown Rails app to reproduce a problem for example if you're having an active record issue all you need to do is set up a model connectivity base and then you can test that problem without being in the full context of a Rails app for that we have these bug report templates on the Rails repository it's in the guides folder and then there's the bug report template folder they're basically minimum boilerplate code required to run the test case against the Rails libraries and there's one for active record one for action pack and we just recently added a generic template for you to test everything else so with your problem reproducing fresh application and isolated test case it's very easy for others to help you so you can probably if you can consistently reproduce your problem it makes it very easy for other to investigate and maybe fix the problem for you so being able to reproduce a problem on a fresh Rails apps or in one of those bug report templates and then attach that to your issue would greatly increase your odds of getting helped or with everything you've learned from this talk you probably know enough to nail down where exactly the problem is happening and you can probably just fix it yourself and you can send a pro quest for that at this point you might be like wow I really know all these stuff I did not learn anything new from this talk I already use all these things you talk about in my own app and you are 100% right you probably know these things already and you're probably debugging your applications every day at work and that's kind of the point this Rails thing it turns out is just Ruby and when things doesn't work in Ruby well it just quickly turned into Ruby and it turns out that Rails is just another big legacy code base which is probably not that different from all the other code bases that you have to work with so you probably know how to deal with this already and if you would like to practice any of these things or if you would like to refund because you tried these on your app and it doesn't work we are hosting a Rails core community office hour on Wednesday during the happy hour at the HeroCube so you can bring your app and you can come talk to us and then we can probably help you with that or you should probably do this if you haven't already Eileen one of the Rails contributor is running a lab later this afternoon on contributing to Rails and she's gonna cover a lot of the things that I didn't have time to go into so if you haven't already sign up for the lab it's this afternoon that's all I've prepared for you today once again you can find me on the internet as changing code and thank you very much and enjoy the rest of the conference