Golden Gate Ruby Conference 2014

Aplicando el método científico para resolver problemas de programación

Blithe Rocher  · 




Extracto de la transcripción automática del vídeo realizada por YouTube.

First of all, I just want to start off by thanking the organizer. They really put in a lot of effort to make me feel really special as a speaker. Also as an attendee, watching these other talks so I just want to give them a huge thanks Can I get an extra

round of applaud for the organizers And also, thanks everyone for being here. So, I'm Blithe You can find me @blithe on Twitter and Github I work for a company call Big Nerd Ranch It's based in Atlanta and some people know it. Alright! It's based

in Atlanta and I work remotely full time in Oakland We do a couple of things at Big Nerd Ranch We develop apps, we write books and we also teach courses. And of course, we're hiring good people, always. As you heard, I used to be a scientist I have a

PhD in Physical Chemistry And a lot of people ask me what is physical chemistry? what does that mean? Well, if you think about it It's right on the border between what you know as physics and what you know as chemistry That means I spent a long time

in grad school It also means I've done a lot of experiments A lot of people asked me "How did you do it? How did you make it through 6 years of grad school make it to the end?" And I did it by using the scientific method and I'm still using

it everyday I'm a developer, but I'm still using the scientific method everyday How many of you have gotten an error Google it pull the first answer straight from StackOverflow and put it in your code and run it I think we all tried it And did it solve

your problem? Maybe Maybe it did. Maybe if you were lucky But probably not Most of the time, probably not and it was pretty inefficient and the more important question is Did you learn anything from that? The most important part of troubleshooting is learning

If you solved a problem without learning from it, It's only a temporary fix It's either going to come back later or you're going to make the same mistake in the future Learning is how you level up as a developer by learning from your experiences

And that bring me back to the scientific method How can using the scientific method help you level up as a developer? Well, What is it? Well, if you Google it and go straight to Wikipedia you'll see this definition It's a set of techniques for acquiring

knowledge And I love this definition because it can apply to anything any career, including being a developer The scientific method, it's methodical It's an established procedure and scientists have been using it since the 17th century It's also

systematic It's a step-by-step process and it's for gaining knowledge and incorporating that into your process and the time for reflection is built right into the scientific method The other day, a coworker of mine popped up in the company chat room

and said "Has anyone seen Ruby string interpolation fail?" and I thought that's a pretty interesting question Why do you ask? Why are you asking that? So we dug a little deeper and they were using factory girl sequencing method to create a series

of users with unique email addresses. So email 1, email 2, email 3... and it wasn't working. It was failing. It was trying to create users with the same email address and it was failing and they couldn't figure out why and their solution, they ended

up just rolling their own sequencing method Well, that may have solved their problem temporarily, that wasn't really the most elegant solution and it turned out, the real problem was that they were missing the hash symbol that was required for interpolation

so simple mistakes, but we all make simple mistakes like that We all make them all the times But maybe using the scientific method would have helped in this case The first step of the scientific method is defining the problem As a scientist, this means saying

what is the information that you're trying to gain? What knowledge are you trying to gain or learn? What's important to keep in mind when you're defining the problem is forget what you think you know and question everything Just think about open

up your mind, question everything and just define the problem It's also important to get rid of your emotions at this point You want to, maybe you're on a tight deadline maybe you think you know what the answer is I'm just going to go do this.

I already know what's wrong blah blah blah Get rid of all that and just define the problem You can do that by answering a few questions What is behavior that you're expecting to happen? What's actually happening? and how are those two things

[ ... ]

Nota: se han omitido las otras 2.231 palabras de la transcripción completa para cumplir con las normas de «uso razonable» de YouTube.