RubyConf 2014

Aplica el TDD sobre ti mismo para mejorar como persona y programador

Abraham Sangha  · 
TDD

Transcripción

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

welcome to my talk it's called TDD for your soul subtitle as you can read virtue and software engineering so TDD just for those of you that weren't sure what that meant it's an acronym for test-driven development for most of you know that already

but test-driven development is this it's an approach to writing software it's a lot of people find it profitable I like it myself it helps in a lot of ways in your process and what I'm doing in this talk is considering what could it mean to apply

that process to ourselves as people ultimately so that we don't just become better at coding or an engineering but that would be better people better human beings that's where we're going if you're in this room expecting something else it's

too late because the doors are locked so you can't leave you're stuck with me as it is but hopefully you didn't pick up something along the way even if that's the case so like I said a TD is this process test driven development and it's

usually you can shorthand it by saying something like red green refactor so red means writing this test you write a test specifying some behavior and because you haven't implemented the code to make that behavior happen that test is going to fail so that's

the red piece the test is failing so the next piece of that is getting that test to go green mean that getting a test to pass so you write the code right the implementation you need to make that test pass and on third piece is often forgotten but it's

refactoring so now that you have a test that locks in that behavior that you want you can feel free to refactor to rename to my drawer relies to do whatever you need to do the driver code whatever you want to refactor and improve on it and the test should

still be passing and so so you're you feel free to do something like that and then you just repeat again you start again with red writing a new test so that's the process of TDD and I started thinking about this concept of applying this process to

ourselves because it's I don't think you can really argue that science itself right the process of discovery Learning inquiry these things don't necessarily lead to virtue themselves technologists you know people that are in the know on the cutting

edge of engineering they're not necessarily good people are not necessarily virtuous just because they know how to do certain things right i mean probably the best example of the point i'm trying to make is Walter White anybody breaking bed anyone

know and recut the pretty popular show glad to see that you should watch this not now but watch it later but the premise is right Walter White he's genius he's a chemist and brilliant man high school teacher at first but he uses these powers for ill

he starts cooking meth right i mean is happy think anything worse than that right so it becomes this meth kingpin innocence so that's someone using this brilliant mind is capacity for science and engineering and not using it virtuously but so yes so you

know we're clear just a week you know you and I we we know where we're standing I'm not this person that came into software engineering with all these ideals you know I got into software engineering to get paid okay I just wanted to make money

I want to eat out olives out of a goblet I wanted to have dogs play poker in my living room and have some bodyguards just there just in case you know that's right this is what I was aspiring towards and I couldn't help it through the process of becoming

an engineer you know I started to think that that there's a real opportunity here is our opportunity for me to do more than just make money and make some cool stuff you know there's a process for me to embrace this journey and and work on some vulnerabilities

that I have some weaknesses some some flaws and try to become the best person I can be now if you're anything like me you will resist a process like this cuz I did the whole time I still do even as I try to undergo it and so just for the sake of a you

know injecting little energy in here i'm going to try something since we're all friends and you're not used to this right to tech conferences you just sit there usually you're half on the phone half paying attention I know I've done it

myself but I want you to help me out no I want you to help me out today and verbalize this this natural tendency to just resist thinking about our character virtue and and who we are as people the way i did it i talked to myself like something like this you

know but Abraham I just wanted code I want you guys to say that with me real quick but Abraham I just want to Co let's try one more time what Abraham I just want to code so this is verbalizing what you're already thinking anyway right like you don't

want to deal with any of this stuff and so when i cue you i want you to say it back let's try one more time but Abraham I just want to code alright so yeah you know any animosity you have towards me just put it into that phrase and we'll be good to

go you know a high energy is good for me negative or positive so let's consider what what the virtuous could mean for software engineering and for ourselves the four classical virtues we're going to use as a framework or I mean everyone here knows

what they are already look very virtuous people in the back they look shady so for them the four virtues are self control courage justice and wisdom self-control courage justice Wiz and that's we're going to talk about but Abraham I just want a code

I know but the whole I got the Hulk slide ready so let's just talk about first virtue to self-control self-control a soft control I have to do with software engineering number one well when i started i started learning ruby ruby is known for being friendly

and just being accessible for learners that's one of the things I love about Ruby right and and its expressive good documentation lots of resources somesing is starbucks learning how to code working through exercises little puzzles trying to become an

algorithmic thinker you know working on my use of data structures that kind of thing and often I would hit something like this you know it's often I have a nil object and I'm trying to call method on it and at first this was super dispiriting you know

I I get really upset get frustrated i'm a starbucks all by myself that's part of the issue by the way of being new is uh is if you don't have resources it's gonna be really lonely and once you hit a stumbling block feels like you know you might

take the rest day off and so i would get very frustrated learning how to code so my lack of self-control came out in that context but you know in general it's hard that maybe you're not as impatient as I am but but you know as developers as engineers

it's sort of difficult to talk about self-control because we often work in places that look like this it just looks very indulgent to anyone outside of our world my dad worked in the sewers in the city of Chicago I don't think he would even understand

this place right like so so yeah Slough control as developers it's kind of an interesting topic I mean maybe for most of you none of what I said applies to you but maybe this is your situation it's from XKCD maybe anyone been here I was doing this

[ ... ]

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