the art and pain of teaching javascript

65
The art and pain of teaching JavaScript Christian Heilmann | http://wait-till-i.com | http://twitter.com/codepo8 <head> 2008

Post on 18-Oct-2014

9.154 views

Category:

Education


0 download

DESCRIPTION

My slides for the head conference 2008 explaining how hard it is to write JavaScript solutions that cater for all the users out there and what can be done to avoid us creating a lot of material that is outdated as soon as it comes out.

TRANSCRIPT

Page 1: The art and pain of teaching JavaScript

The art and pain of teaching

JavaScript

Christian Heilmann | http://wait-till-i.com | http://twitter.com/codepo8

<head> 2008

Page 2: The art and pain of teaching JavaScript

Both teaching and learning JavaScript is tough.

Page 3: The art and pain of teaching JavaScript

Probably the main issue with it is how to get people

interested in learning it.

Page 4: The art and pain of teaching JavaScript

JavaScript information has become a commodity and

there are thousands of ready-made solutions

available.

Page 5: The art and pain of teaching JavaScript

The range of people that want to work with JavaScript

is staggering.

Page 6: The art and pain of teaching JavaScript

Designer

Java/Ruby/Python/C++ coder

Page 7: The art and pain of teaching JavaScript

... which is fun cause 5 years ago neither of these groups

wanted to even touch JavaScript.

Page 8: The art and pain of teaching JavaScript

Still each of these groups want JavaScript to do

different things...

Page 9: The art and pain of teaching JavaScript

...and work the same way they are used to working.

Page 10: The art and pain of teaching JavaScript

And that makes it very hard to teach it.

Page 11: The art and pain of teaching JavaScript

As someone who wants to get to grips with learning JavaScript you are in the

same dilemma.

Page 12: The art and pain of teaching JavaScript

There are hundreds of tutorials on “Learning

JavaScript” online.

Page 13: The art and pain of teaching JavaScript

How could you define which one is good and which isn’t?

Page 14: The art and pain of teaching JavaScript

We have to consider several types of people who want to

use JavaScript.

Page 15: The art and pain of teaching JavaScript

Users

DevelopersTinkerers

Implementers

Page 16: The art and pain of teaching JavaScript

Users simply need a JavaScript solution for a

certain task.

Users

DevelopersTinkerers

Implementers

Page 17: The art and pain of teaching JavaScript

All they are looking for is a copy and paste script that

does something.

Users

DevelopersTinkerers

Implementers

Page 18: The art and pain of teaching JavaScript

You’ll be most successful if you manage to get this

implementation in a format they are used to.

Users

DevelopersTinkerers

Implementers

Page 19: The art and pain of teaching JavaScript

“add this script into a document that also has an element with the ID ‘menu’

to get a sliding menu”

Users

DevelopersTinkerers

Implementers

Page 20: The art and pain of teaching JavaScript

“to add client-side validation of your form simply add the following script and mark

mandatory fields with a class called ‘mandatory’.”

Users

DevelopersTinkerers

Implementers

Page 21: The art and pain of teaching JavaScript

Tinkerers want a JavaScript solution that can be slightly

modified.

Users

DevelopersTinkerers

Implementers

Page 22: The art and pain of teaching JavaScript

This starts with styling the solution differently and ends at heavier customisation (f.e.

label translation)

Users

DevelopersTinkerers

Implementers

Page 23: The art and pain of teaching JavaScript

The easier your solution is to customise, the more

tinkerers will be happy with it.

Users

DevelopersTinkerers

Implementers

Page 24: The art and pain of teaching JavaScript

Implementers will use your solution and will need much

heavier customisation.

Users

DevelopersTinkerers

Implementers

Page 25: The art and pain of teaching JavaScript

Customisation that will be far beyond what you thought your solution was meant to

deliver.

Users

DevelopersTinkerers

Implementers

Page 26: The art and pain of teaching JavaScript

What you’ll need to provide there is a way to build upon and extend your solution.

Users

DevelopersTinkerers

Implementers

Page 27: The art and pain of teaching JavaScript

Developers will see your solution as either a base to build upon, inspiration or

something to improve.

Users

DevelopersTinkerers

Implementers

Page 28: The art and pain of teaching JavaScript

They are the most vocal, critical and at the same time a very interesting group to

reach.

Users

DevelopersTinkerers

Implementers

Page 29: The art and pain of teaching JavaScript

They are people that want to reach under the hood and

play with the cables.

Users

DevelopersTinkerers

Implementers

Page 30: The art and pain of teaching JavaScript

Quo Vadis?

http://www.flickr.com/photos/stephmcg/2756340726/

Page 31: The art and pain of teaching JavaScript

The biggest issue with learning JavaScript is that there are too many old and

outdated sources of information on the web.

Page 32: The art and pain of teaching JavaScript

There are a lot of people who provide amazing and up-to-date information.

Page 33: The art and pain of teaching JavaScript

However, beginners are not likely to ever find this

information.

Page 34: The art and pain of teaching JavaScript

There aren’t any easy ways out of this situation.

Page 35: The art and pain of teaching JavaScript

Experts are not very inclined to write beginner material.

Page 36: The art and pain of teaching JavaScript

And the very nature of the web and the workings of

search engines favour older material that has been

around for a while.

Page 37: The art and pain of teaching JavaScript

Quo Vadis?

http://www.flickr.com/photos/cudmore/31741007/

Rewiring is tough

Page 38: The art and pain of teaching JavaScript

Some people* are working on ideas to tackle this

problem.

* http://www.thecssdiv.co.uk/2008/09/30/barcamplondon5-slides/

Page 39: The art and pain of teaching JavaScript

Let’s however now concentrate on building new

materials in a way that counteracts attrition.

Page 40: The art and pain of teaching JavaScript

The first trick is to document what we do more.

Page 41: The art and pain of teaching JavaScript

“People learn by looking at the source code”

Page 42: The art and pain of teaching JavaScript

This is how we learnt, yes, but that was because of the

lack of good resources.

Page 43: The art and pain of teaching JavaScript

Looking at source code and copying means we know the

how but never the why.

Page 44: The art and pain of teaching JavaScript

Therefore it might be a good plan to marry code and

documentation.

Page 45: The art and pain of teaching JavaScript

That way code updates mean tutorial updates.

http://icant.co.uk/sandbox/tutorialbuilder/

http://jsdoc.sourceforge.net/

http://www.naturaldocs.org/

Page 46: The art and pain of teaching JavaScript

In terms of code solutions users of our code should

never be forced to go in the source and change it to their

needs.

Page 47: The art and pain of teaching JavaScript

Widgets should be easily skinable.

Page 48: The art and pain of teaching JavaScript

There should be configuration objects for

everything that is likely to change.

Page 49: The art and pain of teaching JavaScript

In order to support implementers we should consider APIs and plugin systems for our solutions.

Page 51: The art and pain of teaching JavaScript

Yes, this will make our solutions to be more work and probably make them a

bit more bulky.

Page 52: The art and pain of teaching JavaScript

But it will ensure that we can control the quality even in

the future.

Page 53: The art and pain of teaching JavaScript

Another idea is to consider an update script for widgets

and tutorials that flags outdated local installs.

Page 54: The art and pain of teaching JavaScript

First and foremost all of this needs a change in how we

approach delivering JS information.

Page 55: The art and pain of teaching JavaScript

It shouldn’t be about the quick win and the applause

for being the first.

Page 56: The art and pain of teaching JavaScript

It should be about releasing products that people can use

without needing to know what we know.

Page 57: The art and pain of teaching JavaScript

It should be about releasing without expecting or forcing the users to alter what they

don’t understand.

Page 58: The art and pain of teaching JavaScript

Basically, it should be about not being elitist...

Page 59: The art and pain of teaching JavaScript

...and realising that what we had to go through to get

where we are now shouldn’t be needed any longer.

Page 60: The art and pain of teaching JavaScript

Instead we should try to liberate people to be

creative in new ways that we consider impossible because

of our experience.

Page 61: The art and pain of teaching JavaScript

Or in other words...

Page 62: The art and pain of teaching JavaScript

OMG! Technology!

Page 63: The art and pain of teaching JavaScript

Should turn into...

Page 64: The art and pain of teaching JavaScript

Sharing the joy!

http://www.flickr.com/photos/ptg/2954729291/

Page 65: The art and pain of teaching JavaScript

Thanks!