so you want to teach ruby and rails

Post on 18-Nov-2014

3.411 Views

Category:

Technology

1 Downloads

Preview:

Click to see full reader

DESCRIPTION

My RubyConfPH 2014 talk on how to introduce intermediate-level web development to newbies.

TRANSCRIPT

So You Want to TeachRuby and Rails...

Bryan Bibat

So You Want to TeachRuby and Rails...

Bryan Bibat

Not as easy as it looks...

You have to take many things into account in order to be an

effective teacher.

Unfortunately, I only have 30 minutesso I'll just cover the main points.

0. Students

1. Domain

Web Development Knowledge Layersin

crea

sin

g c

om

ple

xity

Web Development Knowledge Layersin

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

Web Development Knowledge Layersin

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

AP

PLI

CA

TIO

N

Web Development Knowledge Layersin

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

AP

PLI

CA

TIO

N

DA

TA

Web Development Knowledge Layersin

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

AP

PLI

CA

TIO

N

DA

TA

INFR

AST

RU

CT

UR

E

Web Development Knowledge Layersin

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

AP

PLI

CA

TIO

N

DA

TA

INFR

AST

RU

CT

UR

E

Web Development Knowledge Layersin

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

AP

PLI

CA

TIO

N

DA

TA

INFR

AST

RU

CT

UR

E

EN

GIN

EE

RIN

G

Web Development Knowledge Layersin

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

AP

PLI

CA

TIO

N

DA

TA

INFR

AST

RU

CT

UR

E

EN

GIN

EE

RIN

G

PR

AC

TIC

E

Rails is an intermediate-level toolin

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

AP

PLI

CA

TIO

N

DA

TA

INFR

AST

RU

CT

UR

E

EN

GIN

EE

RIN

G

PR

AC

TIC

E

Rails is an intermediate-level toolin

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

AP

PLI

CA

TIO

N

DA

TA

INFR

AST

RU

CT

UR

E

EN

GIN

EE

RIN

G

PR

AC

TIC

E

1. Domain

0. Students

1. Domain

Beginners

True Beginner

True Beginnerin

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

AP

PLI

CA

TIO

N

DA

TA

INFR

AST

RU

CT

UR

E

EN

GIN

EE

RIN

G

PR

AC

TIC

E

True Beginnerin

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

AP

PLI

CA

TIO

N

DA

TA

INFR

AST

RU

CT

UR

E

EN

GIN

EE

RIN

G

PR

AC

TIC

E

True Beginnerin

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

AP

PLI

CA

TIO

N

DA

TA

INFR

AST

RU

CT

UR

E

EN

GIN

EE

RIN

G

PR

AC

TIC

E

Ruby is great for True Beginnersin

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

AP

PLI

CA

TIO

N

DA

TA

INFR

AST

RU

CT

UR

E

EN

GIN

EE

RIN

G

PR

AC

TIC

E

Rails is notin

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

AP

PLI

CA

TIO

N

DA

TA

INFR

AST

RU

CT

UR

E

EN

GIN

EE

RIN

G

PR

AC

TIC

E

Web Beginner

Web Beginnerin

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

AP

PLI

CA

TIO

N

DA

TA

INFR

AST

RU

CT

UR

E

EN

GIN

EE

RIN

G

PR

AC

TIC

E

Web Beginnerin

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

AP

PLI

CA

TIO

N

DA

TA

INFR

AST

RU

CT

UR

E

EN

GIN

EE

RIN

G

PR

AC

TIC

E

Veteran

Veteran Web

Veteran Webin

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

AP

PLI

CA

TIO

N

DA

TA

INFR

AST

RU

CT

UR

E

EN

GIN

EE

RIN

G

PR

AC

TIC

E

Veteran Webin

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

AP

PLI

CA

TIO

N

DA

TA

INFR

AST

RU

CT

UR

E

EN

GIN

EE

RIN

G

PR

AC

TIC

E

Veteran Webin

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

AP

PLI

CA

TIO

N

DA

TA

INFR

AST

RU

CT

UR

E

EN

GIN

EE

RIN

G

PR

AC

TIC

E

Ninja

Polyglot / Full Stack Developer

Polyglotin

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

AP

PLI

CA

TIO

N

DA

TA

INFR

AST

RU

CT

UR

E

EN

GIN

EE

RIN

G

PR

AC

TIC

E

Polyglotin

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

AP

PLI

CA

TIO

N

DA

TA

INFR

AST

RU

CT

UR

E

EN

GIN

EE

RIN

G

PR

AC

TIC

E

When I started Rails...

me c.2009 - Veteran Webin

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

AP

PLI

CA

TIO

N

DA

TA

INFR

AST

RU

CT

UR

E

EN

GIN

EE

RIN

G

PR

AC

TIC

E

me c.2009 - Veteran Webin

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

AP

PLI

CA

TIO

N

DA

TA

INFR

AST

RU

CT

UR

E

EN

GIN

EE

RIN

G

PR

AC

TIC

E

me c.2009 - Veteran Webin

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

AP

PLI

CA

TIO

N

DA

TA

INFR

AST

RU

CT

UR

E

EN

GIN

EE

RIN

G

PR

AC

TIC

E

me c.2009 - Veteran Webin

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

AP

PLI

CA

TIO

N

DA

TA

INFR

AST

RU

CT

UR

E

EN

GIN

EE

RIN

G

PR

AC

TIC

E

Migrations

class CreateUsers < ActiveRecord::Migration def self.up create_table :users do |t| t.string :email t.string :password t.string :crypted_password t.string :password_salt t.string :persistence_token t.timestamps end end def self.down drop_table :users endend

Migrationsin

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

AP

PLI

CA

TIO

N

DA

TA

INFR

AST

RU

CT

UR

E

EN

GIN

EE

RIN

G

PR

AC

TIC

E

Migrationsin

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

AP

PLI

CA

TIO

N

DA

TA

INFR

AST

RU

CT

UR

E

EN

GIN

EE

RIN

G

PR

AC

TIC

E

Migrations made sense to me.

Migrations

mind = blown

Migrations - experience overlapin

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

AP

PLI

CA

TIO

N

DA

TA

INFR

AST

RU

CT

UR

E

EN

GIN

EE

RIN

G

PR

AC

TIC

E

now compare this with newbies'...

Migrationsin

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

AP

PLI

CA

TIO

N

DA

TA

INFR

AST

RU

CT

UR

E

EN

GIN

EE

RIN

G

PR

AC

TIC

E

Migrations - WTF?!?in

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

AP

PLI

CA

TIO

N

DA

TA

INFR

AST

RU

CT

UR

E

EN

GIN

EE

RIN

G

PR

AC

TIC

E

Migrations

MigrationsRouting

ActiveRecordConvention over Configuration

Test Driven Development

MigrationsRouting

ActiveRecordConvention over Configuration

Test Driven DevelopmentRuby Idioms

Higher Order Functions

MigrationsRouting

ActiveRecordConvention over Configuration

Test Driven DevelopmentRuby Idioms

Higher Order FunctionsAsset Pipeline

TurbolinksDevOps

Wow

such migrations

much unit tests

very omakaserailz so amaze

@doge ||= 9000

so turbolinks

so restful

Wow

such migrations

much unit tests

very omakaserailz so amaze

@doge ||= 9000

so turbolinks

so restfulscrew this, I'm going back to [language]

You have to bridge the gapin

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

AP

PLI

CA

TIO

N

DA

TA

INFR

AST

RU

CT

UR

E

EN

GIN

EE

RIN

G

PR

AC

TIC

E

2. Purpose

To understand how our students think,we must first ask ourselves:

Why are we here?

To understand how our students think,we must first ask ourselves:

Why are we here?

How did it come to this?

The Hype Cycle

Image: http://en.wikipedia.org/wiki/User:Jeremykemp

But there are other hype cycles...

original image: http://en.wikipedia.org/wiki/User:Jeremykemp

Also the technology is far from perfect...

Ruby - a multi-paradigm scripting language

Ruby...● is slow● is memory intensive● developers are hard to find● has all the cons of a dynamically typed language

Ruby on Rails - an MVC framework

Rails...● is huge and bloated● has magical abstractions● is hard to deploy

So why?

It's not the technologybut the way of thinking

History of Web Languages/Platformsup to mid-00s

CGI/Perl scripting →

CGI/Perl scripting →

Compiled Language (Java, C#)Templating Language (PHP)

CGI/Perl scripting →

Compiled Language (Java, C#)Templating Language (PHP)

→ Object/Functional Scripting as an option

● is slow● is memory intensive● developers are hard to find● has all the cons of a dynamically typed language

BUT ALSO

● expressive● functional, OO, with metaprogramming● developers examples of the Python Paradox● has all the pros of a dynamically typed language

History of Web Applicationsup to mid-00s

big ball of mud →

big ball of mud →

over-designed frameworks

big ball of mud →

over-designed frameworks

→ a compromise

● is huge and bloated● has magical abstractions● is hard to deploy

BUT ALSO

● a decent package of design patterns● good for prototyping ie. has a good amount of

features built-in while being extensible● continuously improving along recent trends

A way of thinking that worked

AND...

It took advantage of the hype cycle.

original image: http://en.wikipedia.org/wiki/User:Jeremykemp

It took advantage of the hype cycle.

original image: http://en.wikipedia.org/wiki/User:Jeremykemp

One of the first to use it successfullyto achieve critical mass

history lesson over...

2. Purpose

0. Students

The HYPE is what got us in...

Image: http://en.wikipedia.org/wiki/User:Jeremykemp

The HYPE is what got us in...

Image: http://en.wikipedia.org/wiki/User:Jeremykemp

The HYPE is what got us in...

Image: http://en.wikipedia.org/wiki/User:Jeremykemp

...but the HYPE is also what keeps newbies out.

Image: http://en.wikipedia.org/wiki/User:Jeremykemp

Image: http://en.wikipedia.org/wiki/User:Jeremykemp

Expectations are not met.

Image: http://en.wikipedia.org/wiki/User:Jeremykemp

Manage Expectations

● is slow● is memory intensive● developers are hard to find● has all the cons of a dynamically typed language

BUT ALSO

● expressive● functional, OO, with metaprogramming● developers examples of the Python Paradox● has all the pros of a dynamically typed language

● is huge and bloated● has magical abstractions● is hard to deploy

BUT ALSO

● a decent package of design patterns● good for prototyping ie. has a good amount of

features built-in while being extensible● continuously improving along recent trends

Don't stop explainingin

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

AP

PLI

CA

TIO

N

DA

TA

INFR

AST

RU

CT

UR

E

EN

GIN

EE

RIN

G

PR

AC

TIC

E

3. Retention

Tailor your course according to the students you wish to teach

Veterans need only a little pushin

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

AP

PLI

CA

TIO

N

DA

TA

INFR

AST

RU

CT

UR

E

EN

GIN

EE

RIN

G

PR

AC

TIC

E

Of course, teaching beginners is hardin

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

AP

PLI

CA

TIO

N

DA

TA

INFR

AST

RU

CT

UR

E

EN

GIN

EE

RIN

G

PR

AC

TIC

E

Especially total beginnersin

crea

sin

g c

om

ple

xity

PR

ESE

NT

AT

ION

AP

PLI

CA

TIO

N

DA

TA

INFR

AST

RU

CT

UR

E

EN

GIN

EE

RIN

G

PR

AC

TIC

E

One-day workshops will not cut it.

You'll need to use some techniques for them to continue learning on their own.

One technique that people often misuse:

rails generate scaffold

rails generate scaffold

rails generate scaffold

● gives students a "taste of power", piquing their interest

rails generate scaffold

● gives students a "taste of power", piquing their interest● produces good sample code (esp. tests) for future study

rails generate scaffold

● gives students a "taste of power", piquing their interest● produces good sample code (esp. tests) for future study

● many students (and workshops) don't go past it

Wow

such migrations

much unit tests

very omakaserailz so amaze

@doge ||= 9000

so turbolinks

so restful

rails generate scaffold

● gives students a "taste of power", piquing their interest● produces good sample code (esp. tests) for future study

● many students (and workshops) don't go past it● in turn, it gives others the wrong impression

rails generate scaffold

● gives students a "taste of power", piquing their interest● produces good sample code (esp. tests) for future study

● many students (and workshops) don't go past it● in turn, it gives others the wrong impression

"Rails? Oh, that's just scaffolding scripts."

Follow through

Give them a road map

http://techiferous.com/2010/07/roadmap-for-learning-rails/

Let them try things on their own pace

and this also leads us to the last point...

4. Culture

Wow

such migrations

much unit tests

very omakaserailz so amaze

@doge ||= 9000

so turbolinks

so restful

original image: http://en.wikipedia.org/wiki/User:Jeremykemp

Polyglot / Full Stack Developer

Constantly Improving

http://blog.newrelic.com/2013/10/10/infographic-state-stack-ruby-edition/

Sharing Knowledge

On the other hand...

Myopia

most obvious:

You need to accept that most of your trainees will be Windows

users...

...so give them a clear path for migrating to *nixie. not just "Get a Mac!"

and other stuff in the culture that may turn off interested developers...

and other stuff in the culture that may turn off interested developers...

tl;dr:You have to introduce them to the culture.

In closing...

1. Domain

2. Purpose

3. Retention

4. Culture

0. Students

( °□°)╯ ╯︵

Or you could just teach Ruby

Thank you for listening!

bryanbibat.net | @bry_bibatspeakerdeck.com/bryanbibat

top related