Hello
my name is Yukihiro Matsumoto
also known as Matz
it's nice to see a bigger crowd this year
in our first year in 2001
we had only 33 or so
and last year, maybe 50
Why are we here ?
we are here because Ruby is good enough for many of our tasks
so we do not have to talk about that
so I'm going to talk about
How Ruby Sucks
and how we can make it better
...
for exemple, it's slow and inconsistent
how can we fix these
with a major version change from 1.0 to 2.0
this is the opportunity to take one big step
and make big changes which may not be
backward-compatible
but will make Ruby better
to clarify, Ruby 2 is the next version of the Ruby language
and Rite is the VM for Ruby 2
the path we will take through Ruby 2
...
...
then in 1.9 we will work on the syntax changes
I do not know what these changes will be yet
but there will be experiments
...
...
...
...
...
thank you.
()
() sorry.
()
OK!
Here we are.
The first thing we do is called the rails command
to generate the skeleton of the application
so it generates a bunch of things,
a bunch of files
and on the next step, the very next step
it's starting the ruby server
so, seeing that everything works
you don't need prerequisites to this
except? that you have Ruby on Rails installed
(oh no!)
() sorry guys...
(laughs)
OK!
we're going to do this again
(laughs)
(more laughs)
anyway, ...
bye!
[_why]
to command? in Ruby
is really to learn
it stirs you inside
when I walk down the street and look into
people's eyes
I can see their excitement about learning Rails
you know?
I can see that they know
David Heinemeier Hansson
that they want to be him
that they want his ???
and his ways
there's rushing out the streets to get here
...and that's pretty cool
(laughs)
so one of the way I've been messing with Ruby
is with cartoons and stuff
and there's a science behind this,
it's incredibly thought out
I mean, wow...
foxes, you know
of all animals
these are the foxes that I use in the book
I'm working on
and
...
...
...
...
is there personality there ?
is there feeling ?
Is there humanism ?
Is there humanity in a technical manual ?
Not really.
there shouldn't be.
Their eyes should be blank, they shouldn't be staring
this is the one I like
...
...
and that's supposed to be sort of frustrating
..
...
...
[Bryan Liles]
Me, I'm going to talk about BDD with RSpec
but I like to test things around
so let's just talk about BDD
or really, let's just talk about testing
for us normal people
and the real thing I'm trying to get out to
everyone here is that
Test all the fucking time
(laughs)
so the bible says, "in the beginning"
and in the beginning there was, what ?
There was Perl !
(laughs)
Perl is what I knew
... Perl ... Java ?
..
...
so then, a couple of years ago
there was this little Danish guy
he looks like a cartoon character
came up with something call Ruby on Rails
and I can't use the logo, 'cause he says I can't
so, with Ruby on Rails
...
and I was still writing bad tests
..
...
some smart guys came up with RSpec
...
wow, this is hot
but I'm still writing brittle tests, with funky syntax
and it wasn't helping anyone
(laughs)
so I decided I wasn't ready to give up with RSpec
and I studied, and studied, and studied
...
...
I don't care if it hurts
write the tests first
...
...
test all the fucking time
(laughs)
[Aaron Patterson]
O-M-G
O-M-G
Happy thursday everybody!
(laughs)
Welcome to RubyConf 10
I love that it's Rubyconf X
because I think of it as the eXtreme RubyConf
(laughs)
...?
every time I give a talk, I'm actually very nervous
up here
and a friend a mine told me:
when you're upstage, just think
what would Freddy Mercury do ?
so I put this up here to remind myself
about that, to calm down
so, today we're going to look at
some tips and tricks
for improving performance in your Ruby code
by looking at things...?
to improve the performance of ARel
so how did I get started with this?
there's a feature I wanted to add to Rails
for a very long time
and that is prepared statement caching
...
...
a deeper understanding of ActiveRecord was required
...
...
and fixing bugs in ActiveRecord
...
...
and I thought to myself,
five times slower?
really, five times slower?
how is that possible?
(laughs)
it is possible
it really was five times slower
...
and I thought
what could possibly go wrong?
so, motivation
why do we care about speed?
...
...
...
...
...
...
it's very simple,
like this
(laughs)
...
...
...?
really, I'm just trolling you
...
...
When should I make my code faster?
We need the answer to this
When it isn't fast enough
but then the question is :
what is fast enough?
Whenever I think about this, I think:
well, do people notice it?
and what are you comparing it to?
...
...
and that is subjective
and really, I'm telling you all these things
but I don't want you to believe it
I want you to think critically
and go out and look at this stuff
and analyse it for yourself
...
...
method calls, branching and looping
and you need to reduce objects
what I think is interesting, is that
for clean code
the things to reduce, are exactly the same
therefore
clean code equals performant code
(laughs)
...in conclusion
AKA the things I've learned
system impact
...
...
...
...
I learned,
when should I rewrite?
I see it like this
the earliest you should rewrite is when Ryan Davis says so
and the latest you should rewrite is when I say so
(laughs)
...
[Sandi Metz]
...?
...
brace yourself, because some of it is hard
everything will change
everything.
...
...
...
I know this is your future
because it is my task
...
...
...
...
...
...
the Internet is at the center of our lives
..
...
...
...
...
...
...
...
so there you go,
that's your future
...
those, unfortunately, are edge cases
this is your real fortune
...
...
...
...
...
...
...
...
...
you wouldn't ignore the inevitable
you'll be writing code for this right now
(laughs)
accepting the truth of this fortune
makes it clear what's important
the MVPs ...?
...
...
...
happiness
live as if you'll know you'll die
do. real. things
tell everyone you love them.
today
you might consider getting a little dog
(laughs)
Health
...
...
...
...
...
...
...
...
...
...
...
...
as a community
...
...
...
showing up in small ways makes a big difference
...
we're bigger than Rails and we're bigger than Ruby
...
...
...
from scrolls to codexes
all the way to composing drums
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
just a second, technical difficulties
(laughs)
(applause)
[Jim Weirich]
...
...
...
...
...
...
these things to mind
so I try not to use that word
so we're trying to talk instead about
flying robots
...
...
...
...
(laughs)
..
....
...
...
...
(drone flying)
so that was the argus library
controlling the drone
and totally not Carol's arm
(laughs)
ok so here's another program,
I'm going to have it take off
using a loop two times,
and making a sweep back and forth
(drone flying)
Take off...
loopy times,
swing back and forth
and land.
How about that !
two successful hardware demos !
(laughs)
(more laughs)
oh who cares...
[Carol] Jeremy,
Jeremy, Jeremy, Jeremy, Jeremy
[Jeremy] hold on, putting my clothes on
What?
Did you hear about this new conference
Keep Ruby Weird?
yeah, I've heard all about it
it sound fun!
OMG, we should submit something!
well, what do we like?
hmm... Conferences!
[Jeremy] Conferences!
(laughs)
but, how do we make that weird?
[Brenna] Puppets!
[All] Puppets!
but, do you think people will like it?
(applause)
alright I'm gonna stand up here for a second
there's this mic hanging around
so, a lot went wrong there
(laughs)
but I don't think anybody had more fun
than we did it
so I am up here on a stage, holding a puppet of myself
it's even wearing my earrings
I'm up here with two of my favorites people
who are still hiding down here
who are also holding puppets of themselves
but this is a amazing moment
and we are so grateful to everyone
that's made it possible
It's actually you, Brenna
that made this happen
for every hour of work I put it
she put in three
so please, everyone,
some thunderous applause
(thunderous applause)
sharing moments with people
is why we did this
some like this one are amazing
and most other are ordinary
...?
maybe those ordinary ones are pretty good
this is a sandy? set, we're doing real things
and it'll keep us coming back
to the keyboard and the frustration
and the endless planning meetings
and the ever-changing tech landscape
Node? will kill me
Jim Weirich passed away early this year,
as everybody knows
and, through putting on Steel City Ruby
with Carol and a bunch of other people
in Pittsburgh
I got some time with Jim that I wouldn't had otherwise
we shared a meal or two
we shared some jokes,
and one time we shared a song
Jim loved to play the ukulele
that was a pretty cool moment
in the hallway outside Steel City Ruby
three years ago
there's a lot we didn't share though
we didn't share code
we never shared ideas about code or
the projects we were working on
we never share a long cab ride
into a airport
or favorites places to get brunch
I never got to share all the weird shit I made with Rake
I guess what we're trying to say up here
is that
we want to share those moments with you
we don't want to miss another opportunity
to let someone know the impact
they'd have on our lives
maybe making a puppet that looks kinda like
Aaron Patterson
is a weird way to do it
but,
we're standing on the shoulder of giants
and many of them were pretty weird
so thank you again
for giving us a place to hang our hats
thank you for keeping your weird
thank you for optimizing for developer happiness
and for being nice because
Matz is nice
thank you for all the pictures of weird cats
thank you for all the terrible puns
and thank you, again, for never forgetting
to test all the fucking time
(applause)