Wednesday, October 05, 2016

RailsConf 09: Robert Martin, "What Killed Smalltalk Could Kill Ruby"

we're very excited to welcome to the stage Bob Martin of object mentor bright
so the title of my talk today
oh wait before i do that as black are you here my dear
that timer can start now it says one hour all you can keep it at one hour for
as long as you want to speak
no you don't need to speak I don't think anyone wants to hear from you would you
spread your hands out like this
yeah nonono oh yeah good okay alright so fine it get it rotate like so good hands
out at Jesus style good alright so imagine that the width of as lacks arms
are the lifespan of the earth roughly five billion years from here to here
this is where we are right there and here is the solar nebula just about to
contract now somewhere right around here
there was a supernova about 6 billion years ago some star in our general
neighborhood decided to blow its guts up all over the sky and the shock wave of
that event smashed into a cloud of neutral hydrogen right about here and
caused it to start to collapse we actually have greens of the material
from that original supernova or at least we think they are embedded into comets
and things like that you have to hold your hands up
nice good okay so right here is where the collapse begins now
the collapse is pretty quick the Sun actually ignites within a few tens of
millions of years so that's even before the first knuckle here and the Sun once
it ignited pushes all the gas and dust out there's a lot of radiation it's
alright it's alright so a lot of radiation pressure and stuff like that
the planets form roughly around the first knuckle and there's a ton of
collisions this is not a nice place to live during this period of time there
are collisions amongst all of the planets the earth is growing by
collision there are perhaps up to the middle knuckle here there are perhaps
seven major events which completely melt the earth over and over again because
there's collisions with objects that are several hundred miles in diameter at
some point however
the earth cools and life begins life probably ginz right around here about
250 million years in the first hints of life are there but they get wiped out
because there are still collisions happening all the time
massive collisions but eventually those collisions slow down whatever life does
manage to hide deep down in the in the earth comes back up and survives and we
wind up with a period which is fairly long where virtually nothing happens
life is there it's not doing much its anaerobic there's no oxygen
photosynthesis maybe that starts around here but the photosynthesis can't do
much because any oxygen it puts into the atmosphere gets bound to iron the iron
falls to the bottom of the sea and it's essentially the oceans rust until about
here so almost nothing is going on except about here right here the earth
freezes solid just a total total freeze over ice covering absolutely everything
for about 10 or 15 million years and then the earth thoughts and this doll
freeze-thaw freeze happens over and over again the last one about here this one
big thought freeze event at the oxygen levels have now risen to the point where
they are maybe three times what they are now it right now we've got about twenty
percent oxygen but then they were like fifty or sixty percent oxygen fires just
happened because they thought they ought to there was hardly used a very very
caustic time to live life got very large here is where life finally came out of
the ocean
here is where the dinosaurs roamed the earth here is where the dinosaurs got
okay good
I could remove the entirety of human civilization with 1-click stripe thank
I saved that for people who do me wrong
so what killed small talk and could it kill Ruby now why would I even mention
small talk in this in this context while small talk and Ruby are deeply related
can't cause Ruby small talk without the image that some of you know what that
means the rest of you will wonder for a very long time I much of the style of
ruby is similar in many ways to the style of small talk so in some sense
ruby is a reincarnation of small talk with a little bit of CH like syntax a
very small amount is small talk dead before we can talk about what killed it
is it dead there was a time when small talk was the language to watch during
the late seventies through the eighties into the 90 small talk was the language
everybody wish they could program in but nobody dared except for a few people who
did their there were some pretty impressive projects that were done in
Ruby there were massive financial projects done there were CIA projects
that that Snoop phone lines and snooped network status and things like that that
were written there were pension projects that were written there were payroll
projects that were written but perhaps the most impressive from the point of
view of a an interpreted language like small talk is the oscilloscope the
digital oscilloscope at tektronix which had a small talk core which flew in the
face of the whole notion that while smallpox too slow or smallpox just can't
do it
and of course it can and did what happened why did Smalltalk suddenly
pretty suddenly just stop
it's certainly not alive now no one is contemplating major projects in small
talk any longer who's a squeak programmer here we got people doing
squeak then can see them thing out there what I presume there's one or two people
with their hands in the air squeak has kind of fallen into an academic language
that no one's really considering anything serious
well I'm starting to deal from the bottom of the deck that wouldn't be a
good idea
small talk in its time was at the forefront of object-oriented design it
was the language that kind of characterized or epitomized what o.o was
really about there were other languages that were 00 but they were only sort of
go oh and of course I'm talking about languages like C++ or objective-c those
were the two major competitors odorant they say mid-eighties middle late
eighties c++ I presume there are some old C++ programmers out there
c++ is a man's language now you have to have serious cojones to sling that coat
around right you know use theirs testosterone running through every line
of that coat job is more of an estrogen-like language that we can
stupid kind of left by the way I'm a Java programmer nowadays eighty percent
of the code i write is in Java because that seems to be the language that
everybody is using and I have a lot of projects that i work on written in Java
but it doesn't give me anywhere near this the stone thrill of making a c++
application work C++ programmer is the Wild Hunter that stabs the boar in the
with a spear you get that program to work you have felled the mighty mammoth
c++ and objective-c and eventually Java and C sharp were followers the small
talk led them the these languages learned from small talk anybody doing
objective-c now knows that the syntax of objective-c and many of the library's
come directly from the small talk world small talk ruled it ruled in a way that
no other language could have at the time it ruled technically there was a
productivity enhancement capers Jones measured it at perhaps a factor of 5 a
team of developers could get an application written and shipped five
times faster than a c++ application or see application and those were measured
things that wasn't just capers Jones spouting off he did measurements and he
studied the way these projects went a factor of five is fairly significant in
our world small talk also ruled in ways that we're just beginning to grasp how
many of you
alice is the ruby conference so i guess most of you aren't using refactoring
browsers but i am using a refactoring browser in java and I have a a little
bit of a refracting browser for Ruby i use the IntelliJ Ruby plugin which
allows me to do
rename but in Java I can do amazing things with refactoring the thing about
that is that the small talk people had that in the mid-nineties their browsers
and their IDs were immensely powerful long before most of us and even thought
of a refactoring browser so small block ruled in a whole bunch of interesting
ways and yet it died what killed it
what killed it i talked about how c++ was a testosterone language I i talked
about how java was kind of an estrogen language small talk was fairly
non-hormonal but didn't have this kind of the manly or or insipid kind of feel
small talk was more related to caffeine you could get a lot done in smalltalk it
was maybe we should relate it to oxytocin you know it caused labor to be
stimulated who-knows-who Ward Cunningham is I can't see you but I do see the
shadows of people waving oh good that's a good way to do it yet shout shop
excellent excellent work at those of you who did not shout let me explain to you
who word Cunningham is because it's somewhat surprising Ward Cunningham is
the inventor of things like the wiki design patterns i can't play that he's
got a complete inventor but he was involved at the very start of design
patterns it was he who read the book by Christopher Alexander in the first place
and started circulating that meme around some of you don't know who Christopher
Alexander is you'll have to look that up and read it at the beginning of the
design patterns movement there was a moment in time when Ward Cunningham and
Kent Beck were driving in a Volkswagen bus between Medford Oregon and portland
oregon and more it starts to talk to can't about Christopher Alexander's work
and the notion of design patterns was born at that in that car at that moment
and they called a few people like Eric gamma and jaundice cds and the notion of
the book came about in the notion of the plop conferences game about and so on
and so on award was there at the start of that some of you may have heard of
crc cards that was a ward cunningham invention some of you might have heard
of extreme programming that was a ward cunningham invention as some of you
might have heard of
fit the framework for integration testing that was a ward cunningham
invention in fact if you pluck at any of the threads in our industry the major
events in our industry for the last 20 years or so you start plucking at them
and pulling those threads you will very likely find Ward Cunningham back at the
beginning who started the thread or was somehow involved in that thread and yet
hardly anybody knows who this guy is this is a guy sits in the back and he
has a bunch of ideas and he tosses those ideas around other people run with them
more does not
that's probably because water has a lot of other interesting ideas to you should
go to his website sometime and take a look at what's on their wards spent a
very large amount of time making a machine that would waive the American
flag it's fun to watch it and you know he did the whole technical thing it's a
doublicious you pattern it actually waves it in the proper figure-eight
configuration of this nasty you know back and forth nonsense
it was a proper wave he was at a conference not too long ago some of you
will remember this and he was walking around with these little blinking leds
and it they were called a electronic graffiti he had a little battery little
watch battery and a little ledu soldered to it and in between those little
processor and the processor controlled the blink rate of the LED oh there's a
magnet attached to move to the idea was that you take and throw these things
against metal metal objects and they would stick there and make them look
pretty and he programmed his little this little processor to blink out the
definition of graffiti in Morse code
I once went awards house and he was very excited he took me down in his basement
i'm a geek too so i was very excited to see whatever he was gonna show me and he
SAT me down and and he turned on a little switch in some circles appearing
on a TV set I said isn't that cool yeah ward
that's cool what are these circles and then he proceeded to describe what he
had done that there is an algorithm that will generate circles within a bit of
video signal and he knows this algorithm pretty well so he wrote in assembly
language and he proved that he could manipulate a video signal with a simple
a 2d converter and create circles on the screen but that wasn't good enough
he then said well what I want to do is figure out how to do test-driven
development in deeply embedded software and assembly language so what he then
did is he wrote the exact same algorithm in java using test-driven development
and then he replaced all the function calls with assembly language code
generators and he ran the program again generated the assembly language burned
that into his prom and showed the circles on his television and if by this
point you are going what the hell is he talking about
well that's the kind of guy Ward is Linus Pauling one said people ask me why
I have so many good ideas
it's not that I have so many good ideas that doesn't have a whole lot of ideas
and some of them are good
that's worn the wrong card can keep doing the right thing I once asked ward
a question I asked him ward what is clean code i was in the middle of
writing my clean code book and I asked a whole bunch of people ask Grady Booch is
dave thomas i asked my feathers as a whole bunch of people word was one of
them and words said to me clean code is when you look at a routine uses the word
routine to describe software you know how old this guy is when you look at a
routine and it's pretty much what you expected
alright you know thanks a bunch warden but then I thought about that because
the thing about Ward is he will say things and it's like okay and then you
think wait what did he say when was the last time that you saw a function that
was pretty much what you expected
I mean most of the time when you look at a function that other people right or
that you wrote yesterday you're going look at what what there's a metric yeah
it's in my book I I stole it from a cartoon the best metric for design
refuse is WTS per minute right and words what word said here was that clean code
has a metric of 00 WTF permitted everything is pretty much what you
wouldn't that be great to go read somebody's coat and go yeah whoo yeah
that's yeah pretty much yeah yeah yeah almost boring
wouldn't it be great so when word says something you can't just let it roll off
your head like Oh whatever you've got to go back and think about it because
usually when Ward says something there's some deep profound truth behind it
I asked word an immersion once
what was it that killed small talk actually wasn't me with someone else who
asked word that question i do anybody here at immersions XP immersions I know
Chad was that one these were our training courses that we taught own 1999
through 2001 and we have your 60 70 80 people at these things they were massive
the first one was in chicago in $MONTH 1999 the next one was in monterey the
one in monterey was at a hotel it had internet in it
we've never even heard of anything like that before but they had internet all
throughout this whole to end it was free
the third immersion was in Tarrytown New York and the fourth of the one in New
York was cool because Tom DeMarco was there and he gave a keynote talk that
was one of the best keynote talks I've ever heard and then can't was there and
late one night it was about eleven o'clock at night and can't goes to the
bar and somebody says to can hey can you show us how to do small talk against
sure and we all go back to the classroom with people are literally filing into
this classroom 4050 people sitting on the floor cross-legged with Kent
projecting is his visual visual age ide on the screen typing Smalltalk
explaining what he was doing
very few times have I seen such poignant in a simple coding display it was it was
fairly remarkable but Emerson for which was in chicago in the fall of two
thousand was when someone asked Warren what killed Smalltalk ward i think this
is the only immersion that word was at Ward said what killed small talk is that
it was just too easy to make a mess
he went on to say you C++ programmers are lucky because the language punishes
you if you make a mess your builds dark to take forever
you've got to undo some of the mess just to survive but the small talk people
could add mess upon mess up on mess with no ill immediate it'll affect their
builds didn't run any slower
there was no build right there was nothing that went wrong with them as
long as they could manage to keep all the balls in the air they were all right
but eventually you could build a system that was so indirect and so impenetrable
and so convoluted that no one could understand it or touch it and it would
become impossible to deal with that was what Ward said now there's a whole bunch
of other explanations for why small talk died we could talk about the image the
fact that this language was actually written on top of a database and
everything you ever typed went into that database you could have objects floating
around without any source code to to describe them any longer that was
certainly a problem and we can talk about how java came along in 1995 and it
was free and so people went to the free language instead of language that the
cost money or you could talk about the companies that were doing small talk are
producing small talk and how screwed up they were and they were but words answer
was remarkable
it was just so easy to make a mess
who among you has been significantly impeded by bad code in Ruby where
you can make a mess in ruby ruby is a wonderful language and elegant languages
simple language you its expressive you can do all these wonderful things in it
and yet it's easy to make a mess
how many of you have found that a project starts well but then eventually
it grows to the point where you have violated some basic assumption in the
framework you are using a framework like rails or a framework like active record
and then you must go dig into that framework and try and understand what it
is doing and you find that you are trip chasing a trail of monkey patches to
hell sort of the boys got rule
yeah boys got real Boy Scout rule is you enter a campground you spend the night
at the campground you leave the campground cleaner than when you entered
that's the Boy Scout rule actually the Boy Scout rule i got that name because
the father of the boy scouts whose name I can't remember right now left them a
message on his deathbed it was a posthumous message which was leave life
better than you found it that but it's better to say the campground it's easier
for people to understand the notion of the camp rhinos so they leave the
campground cleaner than when you found it
what if we all did this with our source code
what if every time we checked it out we did some random act of kindness to it
and checked in cleaner than when we had checked it out if everybody did that our
code would not get Messier it would not get more convoluted it would not get
worse and worse as time goes by it would get better and better as time goes by
that we would like to follow this rule but most of the time we don't why
because cleaning code is hard cleaning code
is risky who among you has seen code that you think oh my god I've got to
clean this up and you're next thought is I'm not touching it
if you touch it you will break it and if you break it it becomes yours and so the
best policy is to walk away run do not clean up the mess
the messages are easy to make they are hard to clean but there is a way out of
that there is a discipline that helps that greatly that makes the code much
easier to clean
you know what I'm going to say who here is doing test-driven development that
test driven development is a discipline that has permeated the Ruby and rails
community far more than any other community i believe it is built-in to
the sort of built into the rails framework as a tremendous amount of
effort being putting on by people trying to create testing frameworks and easy
ways to test so i am very encouraged by that but i am not entirely encouraged
because i think that this community is growing very rapidly and the disciplines
may not grow with it other languages certainly had test-driven development in
it at small talk was the birthplace the incubator of test-driven development the
very first xunit derivative and we can't call it an excellent derivative because
the very first one was the one that they were all derived from it was called s
unit small dog unit can't wrote it a long time ago a very very long time ago
and people in smalltalk started using it not many but some there was a TD
community even in small talk they didn't call it TD at that time they didn't
what to call it and at various times it was called test first designer test
first programming and eventually this name TD test-driven development or test
driven design no one knows which it is it was born that was probably 19 orange
2002 maybe 2001 what is test-driven development some of you know intimately
some of you was a lot of people here so let's go through the rules of
test-driven development there are three laws of test-driven development the
first one everybody knows you are not allowed to write a line of production
code until you have written a failing unit test this is called test first and
it is the the rule that everybody kind of sniffs and goes well what does it
really matter i can write my tests after i write my code but follow me for a
moment you are not allowed to write a line of production code until you have
written a failing unit test the second law is that you are not allowed to write
more of a unit test then is sufficient to fail you cannot write the whole unit
test as soon as that unit test fails you must stop writing it now imagine that
you have a little runner and this little runner constantly runs your unit tests
it's stuck in a hard loop it never ever stops it's just always running your unit
tests and as you are typing production code this little loop catches you in
errors you type things into your into textmate or whatever you're using and
this little loop turns things right who's got one of those
yeah okay that you thought I was joking some of you there are people that are
actually doing that the fools right now actually it's a good approach i love the
idea you must stop when that thing turns red and make whatever production code
changes necessary to make them turn green
so if you type the name of a class that does not yet exist you must stop and
then create the class but you can't put anything in the class you then have to
go back to the test and a method call but you can't go on from that because
you've got to add the method called the production code and then you go back to
the testing you had a little
bit more and then you go back to the production code and add a little more
and you are stuck in a loop that loop is perhaps 30 seconds long
then you're going around that loop over and over the third lie is that you are
not around to write more production code that is sufficient to pass the failing
tests so you're stuck in this tight little loop programmers have any
experience will say well that's just stupid
how could anybody get any work done that way it would be slow would be tedious
besides I know how to write a line of code I know how to ride five lines of
code i can write 20 lines of code don't tell me I've got to go around this damn
loop fine
imagine a group of people working this way
pick one doesn't matter who doesn't matter when sometime in the last minute
or so everything they were working on executed and passed all his tests and it
doesn't matter who you pick and it doesn't matter when you pick them
sometime in the last minute or so everything they were working on executed
and passed its test what would life be like if every minute or so everything
executed and passed its test what would programming be like if you had to plan
your programming such that every minute or so everything would execute or past
its test how much debugging do you think you would do the answer to that is well
not very much
there's not a lot of debugging to do if you just executed it and passed its test
a minute ago if you do find a bug where you're going to find that bug pretty
rapidly side you might set a breakpoint here there you might step through the
code here there but you're not going to spend long periods of time debugging how
many of you have gone through long horrendous debugging periods you hours
and hours of setting breakpoints here and watch points there and making sure
this one happens three times and then that 12 times so that you can get the
hero to many times start over
you don't do that you don't do that in test-driven development if you follow
those rules you will write dozens of tests every day hundreds of tests every
week thousands of tests every year and you will have those tests and you will
run those tests all the time now here's the payoff some of you know what i'm
talking about some of you don't if you have a batch of tests and that batch of
test is something you can run at the click of a button and that batch of test
tells you that virtually everything in your system works how afraid are you to
clean up that mess that scared you off and the answer to that is your not
because you can look at the mess now and say well what if i just changed this
I'll just clean this up and I'll push the button
oh it still works alright let's change this thing I push the button oh it still
works change o heart broken all right put that back the test eliminate fear
the tests allow you to make changes without the risk of breaking something
you don't have to run away because you have the test we talking awful lot about
the importance of design and architecture we talked a lot about the
need to make sure our system is well structured because we want our code to
be flexible and maintainable but nothing makes a system more flexible than a
suite of tests by a huge order of magnitude if you have a suite of tests
you are not afraid to change it even if you have a terrible design if you have a
suite of tests you will not be afraid to improve the design on the other hand if
you have a terrific design but you have no tests you will still be afraid
by the way i really like r-spec anybody who use ours back
I really like ours back and cucumber and that whole behavior-driven development
thing is very very cool whenever i do Ruby which is not often enough as far as
i'm concerned i get out the r-spec thing and I right little specks because is it
much better I think than writing the unit test kind of things that i would
write in Java I was just an advertisement
yeah i talked about that already test-driven development was invented in
small talk but never really became part of the culture TD has infiltrated the
Ruby culture but is it enough
ladies and gentlemen boys and girls test-driven development is what will
keep your code clean you may think of yourselves as wonderful programmers who
write clean code that is not necessarily the case code is not ever clean code is
clean a bowl you can improve it but only if you have tests the tests allow you to
clean the code
what is clean today may not be cleaned tomorrow because of changes elsewhere in
the system the structure of the system's the best structure for the system is
something that is instantaneous not long-term so as you make changes to the
system in another part of the system the code that was good last month becomes
bad without even having to change it it is the test that will allow you to go to
back to that code and then clean it again make it more consistent with the
system we if you have tests you are in control if you don't have tests you are
not in control
you do not have control of your codebase if you have not tests what killed small
we talked about tests but there's some other things we need to talk about i'm
going to use the word here and I don't want you to take the word the wrong way
is that the one way you could take this word is evil and the other way you could
take this word is ignorant not quite even ignorant the word that i'm going to
use his arrogance there was an arrogance in the small talk community not the evil
kind but the kind that told them that they were somehow better that the tools
they were using were somehow better that the things they were doing where somehow
better there was the arrogance of those people who believed that victory was
this was not the snap in your face you stupid fool C++ programmer kind of
arrogance although there was plenty of that do instead it was a kind of
arrogance of power because the small talk people were riding a pretty
powerful horse they did have a tiger by the tail
it was a powerful engine it was a powerful language and they knew they
could work miracles and yet I wasn't enough something insidious something
subtle happened that caused a separation they were set aside the rest of the
industry the people who were writing every day programs began to look at the
corner of their eye at these small talk people going
they don't seem to like us very much i don't think we're going to like them
there were quite a few arguments that appeared on the net
some of you might remember the language Wars of the mid-nineties i was actually
a plop once the it was 1995 it was the very first plot conference and for those
of you who don't know what plot means pattern languages of a program design
they were the design patterns conferences Kent Beck was there came our
was there bunch of other people were there and I was in a
a neighbor called writers workshops we were reviewing someone's pattern and we
were in the midst of this pattern and can and can't can our in kent beck
started talking and they started snickering about c++ it wasn't anything
it wasn't anything evil they just were sneaking c++ people that now I was a c++
guy at the time and I don't like that and i had been dealing with language
wars on the net for a couple years and I i said to them at the time do we really
want to have language wars at plop and the interesting thing about there is not
that they were snickering about it because they probably had a right to do
what was interesting about it was my reaction my reaction was defensive my
reaction was well you guys go ahead and do your small talk thing but I'm the one
getting real work done that's the interesting division that got set up at
the time and it was fairly pervasive there was an attitude amongst the small
talk community and again it's not an evil attitude it's not one that's born
out of ill will but there was an attitude that said you know our tools
are so good are languages so good we don't need to follow the rules we can do
something else we don't have to talk to the other people we don't have to do the
other kinds of programs and so there was this affect small talk people didn't
want to do the regular kinds of programs they didn't want to have to deal with
the corporate database they didn't want to have to deal with the horrible schema
that it evolved for 20 years it was distasteful it it it was it was
abhorrent and so they found ways instead to do things like using gemstone and and
nice little tools and they built a little wall around themselves so that
they could live in their technological bubble isolated from the evils of the
outside world
by the way the language works who won that were language war came down to
dynamic vs statics who's won that war dynamics have won the war
hands down even all the static languages are now dynamic java you know
CBC sharp nobody is actually doing c++ anymore and even the ones who are doing
c+ but there are actually plenty of people doing c++ but it's not a growing
community anymore and even that language is adopting some new dynamic be kind of
like things although not exactly but Java Java has become a dynamic language
you can do anything you want to in Java reflection here in this lab there you
want to call a private method you can call a private method nothing will stop
you from doing that you want to take a string and turn it into a method call
you can do that any of the things you can do in a in a dynamic language you
can do in these Kwazii static languages just not very convenient i'm going to
define a word here it's a word you all know and this definition is just one of
many we will find other definitions for this word the word is professionalism
and i'm going to define it for the purpose of this talk as the disciplined
wielding of power we have certain amount of power in our tools in our languages
but it requires a discipline to wield that power and it's not just the
discipline in the use of the tool it's a discipline in the relationship to the
community at large
it is a discipline that says yes this is a powerful tool but powerful tools kill
very quickly and they kill in surprising ways so we're going to be careful and
we're not going to we're not going to denigrate people who are a little bit
less willing to use our tool let us redefine progress to mean that just
because we can do a thing it does not necessarily follow that we must do that
thing who said that
Kennedy that it was the president of the United Federation of Planets in the year
2293 at the meeting which brought the Klingons into the Federation what was it
they killed small target was parochialism the inability to address
the needs of the enterprise boom pump at stellar small talk was a stellar
performer in certain constraints circumstances but it was limited in its
ability or rather in the desire of its users to address the general problems of
the enterprise there was a certain purity amongst those people they didn't
want to step outside and Sully themselves in the soil of real work
there was an us versus them feeling of uncleanliness and those of us on the
other side of that boundary felted palpably parochialism is an fu attitude
it's a way of putting a big banner on the screen saying f you i'm gonna do it
my way and screw the rest of you it's a way to say we are great in our own
little domain and the rest of the world can go to hell
what might save Ruby and rails and all of the under wonderful works that are
going on in this community from that same demise now frankly I don't think
it's anywhere near going down that road
first of all the community is I think more dynamic and larger and I believe
that there's no longer the the antithesis those of us who are strong
c++ hormonal programmers have relented and everybody is looking at
I'm going you know there might be something to this Ruby stuff but still
what is it that might save Ruby and rails and all of those other things from
going down the same path that small talk with them
I've named three things the first one is discipline discipline specifically in
test-driven development i think if there is a technical discipline that can keep
ward Cunningham's problem from happening
it is test-driven development i wear this green band i wear it for a reason
it reminds me every time i sit down at my laptop that i am going to write tests
come hell or high water I am going to write tests and by god that is a hard
thing to do
how many of you have found how hard it is sometimes to sit down and say I'm
going to write the damn test you just want to write the code
I'm gonna write the test first and you're always glad you did
I've been lately writing a lot of them HTML generation code I've been doing a
lot of gooey work HTML GUI not real gooey and that i just want to see it on
the screen and it would be so easy for me to just go in and hack it look on the
screen hack and look on the screen and have a look on the screen be so easy for
me to do that and if I did I would wind up without any tests so I look at my
green band that I go dammit and I write the tests that is a tough discipline it
is the discipline of the doctor who washes his hands every time he leaves
one patient and goes to a next anybody you know doctors that don't do that or
suspect he comes in to examine him that examine you to wonder if that man washed
his hands in dfu didn't wash his hands would you think him a professional the
professionalism of humility is something that may prevent the demise the same
demise that occurred for small talk the us versus them attitude now I know that
there have been some some funny advertisements I was here two rails
conference couple years ago and there was a very funny thing it was based on
the Mac versus PC thing you know I'm a Mac I'm a PC except it was you know I'm
rails I'm java and it's very funny and i left at the time and I don't think
there's any harm in that unless you taken too seriously unless you build the
wall or unless they build the wall in response and the last thing would be
acceptance of solving the dirty problems solving the problems of the horrible
schema we want to be able to get are raised rails application to work with
this nasty schema that's evolved over years and they never used any IDs in
there rose and they thought the cod normal sixth form was wonderful and all
of that stuff and we're going to have to sit down and say now we've got a deal
with that if we're going to if we are going to survive in the end we have to
address problems that everybody has otherwise someone else will address
those problems
remember the fate of probably the most powerful and influential language of the
seventies and eighties the language that was at the start of Ooo the language
that influenced so much of what we are currently doing the fate of that
language was near oblivion and the people who used it and loved it had to
start writing Java for a living and it nearly killed them
we have a great tool in this language we could kill it by making a mess
we could kill it by being arrogant about it we could kill it by ignoring the
enterprise I suggest that we not follow that route
thank you for your attention
can we get these lights down any way to turn those lights that we can see the
waterway surely you have questions and if you do then you should go to the mics
and we've got time for about five minutes of questions then we have to
break for dinner and lightning talks and all that
thank you very much for a fantastic presentation I wanted to ask you a
question about Kent backs presentation last year a lot of us felt while some of
us anyway felt that he was a little disappointed in the results of the
community for XP that was kind of a social movement disguised as a
programming technique can you talk about that for a minute i'm i'm a techie and I
i like to write code I wrote code on the airplane out here i wrote code in the
breaks between the talks and if i'm still awake all right code on the
airplane back home I want to be a techie i'm not a social change agent or at
least I don't think of myself that way I think XP in some people's minds was a
social thing now I believe XP and agile about people certainly but I don't think
it wasn't a social revolution
I don't think it was a new and exciting way to do things i think it was somebody
once said that XP is the way programmers are observed behavior in the wild
I think that's perfectly true i think all of us would like to do XP if there
weren't other things around us that would preventing us and therefore when
we can get close to that idea we
pretty good about it was can't disappointed i really don't know and I
don't I can't I can't I wasn't here for kids talk i can't really figure out what
Kent was worried about a time if anything i can tell you what I feel that
I'm not disappointed by anything that's happened in our community in the last
well i'll just say ten years but it's probably more like 25 because it seems
to me like the arrow of our direction is the right arrow
oh maybe there's a few degrees left to right we could shift it but it seems to
me that we have been doing the right things that we've been moving in the
right direction look what's happened in the last few years look at not just the
technical advances but the discipline advances 20 years ago we had no
disciplines at all now we have some disciplines disciplines like test-driven
development disciplines like continuous integration disciplines like pair
programming anybody out there pair programming these are these are
remarkable because we were a community of people who all did what was right in
our own eyes and we are transforming ourselves into a professional we were
not a profession before but i think we are becoming one and i think we are able
to say to ourselves now i am a profession because of what I do because
of the the rules i followed because this silly damn green band on my arm i am a
professional i have certain standards that I had here too i have certain rules
that i follow come hell or high water and when the pressure mounts and when
the deadline
bloons I fall back on my disciplines not on my fear and that is what a
professional does so I don't know if I answer your question but i really
enjoyed saying that
that thanks
so one of the you mentioned that can said Ruby is like small talk without the
image and then he talked about small talks great tools refactoring tools
introspective tools kind of sneered at how Ruby doesn't have very much
refactoring support i think one of the one of the reasons for Ruby success it
fits in really well with the unix model what are what are some of things that we
can do to get that kind of productivity that small talk had with their tools but
still kinda fit within the rest of the world and capitalize on on Ruby working
with with the existing tools
well I think that's happening yeah there are people trying to figure out how
about a crack the refactoring nut and and are doing it bit by bit
these tools that are coming out of your hand raising was that a question
oh you know you you're writing one of those tools you work for jetbrains well
okay i so the at the intelligence tools a wonderful tool and it can do reading
and it can do extract method and sometimes so you know it's it's getting
better getting better i expect this to continue
I expect eventually we will have you know refactoring browsers that are every
bit as powerful as the ones in Java it's gonna take some time so I'm not too
worried about that what can we do support these guys the guys who are
doing these ide these are our probably holding the key to the next 10 years
right so that's my opinion support those guys text makes a great tool use text me
but keep an eye on these ides because the ids will make the difference
I you know I still use me I sometimes but not for java code and we have enough
time to mark with him
yes I just wanted to get your thoughts on JRuby is that something that you know
how this entire talk i was thinking is that something that helps doesn't help
or it doesn't matter once wanted your opinion on it
oh I'm just so thrilled about JRuby and it's even faster than Ruby is and you
can call it from job although i have yet to do that and you can call java from
JRuby and i have been able to do that Charles mother is here somewhere he's
supposed to show me how I can call Ruby from java I want to do that so much i
think that that in this binding of the languages these languages that can run
in the jvm there's a lot of power
I think JRuby is a way to transition the java community it bit by bit little bit
by little bit into using dynamic languages when it's more appropriate and
they can stay in the Java world as long as I'd like to or for whatever things
they want to i personally am writing a java application fitness i spent a lot
of time writing it and I am dying to be able to write bits of it in Ruby I would
love to be able to
art writing all of my web generation stuff and Ruby and all of my xml
generation stuff in Ruby and then on the verge of starting to do that so I think
that's real important issue
yes so how do we avoid over professionalism because i think that
enthusiasm is to a certain extent like a lot of people are here not because Java
is statically typed but because they had handcuffs on for so long and have been
so professional and they come here and there like a kid in a candy store and
that breeds enthusiasm for the community and for people to just like go crazy
writing whatever they want and that doesn't necessarily that isn't
necessarily overly professional a good example is there i mean i myself have
abandoned Hut tens of libraries over the years and that people may have wanted to
use but they were abandoned
that's not necessarily very professional but that perhaps shows enthusiasm i'm
sure everybody has done that too so there's a there must be a fine balance
in their over professionalism is an interesting concept
can you be too professional
we have to be careful about the definition of the term the
professionalism does not mean rigid formalism professionalism does not need
mean adhering to bureaucracy professionalism is honor professionalism
is being honest with yourself and discipline the way you work
professionalism is not letting fear take over those of you who have had the bad
the experience of having a deadline loom and you threw away all of your rules
just to get the deadline done were behaving unprofessionally because you
allowed fear to rule a professional becomes column when the pressure mount
I've given this metaphor before and I will close with this metaphor imagine
that you are having an out-of-body experience you are on an operating table
and you're out of body floating above it watching the doctor performed open-heart
surgery upon you now here's a man who has a deadline quite literally right
he's got to get this operation done in a certain amount of time
how do you want him to behave calmly following his rules
step by step carefully adhering to his disciplines or do you want him to behave
like the hacker on his terminal looked damn stick

No comments:

Post a Comment