annotate source/europython-tutorial.rst @ 94:454054afcc0a europython-2011

$ cp -piv ../python-classes-tutorial/source/javascript-objects.rst source/ # and some other changes
author Jonathan Fine <jfine@pytex.org>
date Sun, 19 Jun 2011 20:24:03 +0100
parents 347e10783e7f
children a2fb6c95d156
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
89
d57a5582a475 Start making revisions for presentation next week.
Jonathan Fine <jfine@pytex.org>
parents: 53
diff changeset
1 EuroPython 2011 Tutorial
41
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
2 ========================
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
3
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
4 Time, date and location
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
5 -----------------------
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
6
90
347e10783e7f Minor changes.
Jonathan Fine <jfine@pytex.org>
parents: 89
diff changeset
7 This tutorial will take place on Tuesday 21st June, from 14.30 to
347e10783e7f Minor changes.
Jonathan Fine <jfine@pytex.org>
parents: 89
diff changeset
8 18.30 (2.30pm to 6.30pm) in Training Pizza Napoli.
41
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
9
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
10
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
11 Installed software
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
12 ------------------
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
13
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
14 Participants should bring with them a laptop computer with the
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
15 following installed:
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
16
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
17 1. The Firefox web browser, with the Firebug add-on.
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
18
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
19 2. A programmer's editor, preferably with a JavaScript mode.
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
20
90
347e10783e7f Minor changes.
Jonathan Fine <jfine@pytex.org>
parents: 89
diff changeset
21 I use emacs, together with js2-mode.
347e10783e7f Minor changes.
Jonathan Fine <jfine@pytex.org>
parents: 89
diff changeset
22
41
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
23 3. A command line JavaScript interpreter.
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
24
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
25 * For Linux I suggest SpiderMonkey.
89
d57a5582a475 Start making revisions for presentation next week.
Jonathan Fine <jfine@pytex.org>
parents: 53
diff changeset
26
41
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
27 .. code-block:: bash
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
28
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
29 $ sudo apt-get install spidermonkey-bin # Ubuntu
48
d3ef1c9d4ca2 europython-2010-tutorial.rst: spidermonkey-bin not in Ubuntu 10.4.
Jonathan Fine <jfine@pytex.org>
parents: 41
diff changeset
30
d3ef1c9d4ca2 europython-2010-tutorial.rst: spidermonkey-bin not in Ubuntu 10.4.
Jonathan Fine <jfine@pytex.org>
parents: 41
diff changeset
31 (No longer, I'm told, available for Ubuntu 10.4.)
89
d57a5582a475 Start making revisions for presentation next week.
Jonathan Fine <jfine@pytex.org>
parents: 53
diff changeset
32
41
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
33 * For Windows and Mac I suggest JSDB, from
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
34 http://www.jsdb.org/download.html. It also works on Linux.
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
35
89
d57a5582a475 Start making revisions for presentation next week.
Jonathan Fine <jfine@pytex.org>
parents: 53
diff changeset
36 4. This documentation, downloaded from
41
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
37 `Bitbucket downloads <http://bitbucket.org/jfine/javascript-for-python-programmers/downloads>`_.
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
38
89
d57a5582a475 Start making revisions for presentation next week.
Jonathan Fine <jfine@pytex.org>
parents: 53
diff changeset
39 5. The Python documentation, download from
41
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
40 `Python docs site <http://docs.python.org/download.html>`_.
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
41
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
42
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
43 Timetable
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
44 ---------
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
45
90
347e10783e7f Minor changes.
Jonathan Fine <jfine@pytex.org>
parents: 89
diff changeset
46 We start at 14.30 prompt, with software already
347e10783e7f Minor changes.
Jonathan Fine <jfine@pytex.org>
parents: 89
diff changeset
47 installed if possible.
41
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
48
90
347e10783e7f Minor changes.
Jonathan Fine <jfine@pytex.org>
parents: 89
diff changeset
49 I hope to run seven sessions, each about 30 minutes long. They'll be
347e10783e7f Minor changes.
Jonathan Fine <jfine@pytex.org>
parents: 89
diff changeset
50 about 20-30 minutes for breaks, as we need then. I hope each session
41
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
51 will be 15 minutes of me talking followed by 15 minutes of
53
e0b35ddff586 europython-2010-tutorial.rst: Minor revisions.
Jonathan Fine <jfine@pytex.org>
parents: 48
diff changeset
52 programming. The topics I'm intending to cover are
89
d57a5582a475 Start making revisions for presentation next week.
Jonathan Fine <jfine@pytex.org>
parents: 53
diff changeset
53
41
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
54 1. Demonstration and discussion of the counters example application.
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
55
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
56 2. JavaScript gotchas.
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
57
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
58 3. Objects and inheritance, class basics.
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
59
90
347e10783e7f Minor changes.
Jonathan Fine <jfine@pytex.org>
parents: 89
diff changeset
60 4. JavaScript's *this* pseudo-variable (including *call* and *apply*).
41
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
61
90
347e10783e7f Minor changes.
Jonathan Fine <jfine@pytex.org>
parents: 89
diff changeset
62 We'll certainly have a break here.
41
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
63
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
64 5. Closures, modules and memory leaks.
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
65
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
66 6. Delegation.
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
67
94
454054afcc0a $ cp -piv ../python-classes-tutorial/source/javascript-objects.rst source/ # and some other changes
Jonathan Fine <jfine@pytex.org>
parents: 90
diff changeset
68 7. Review of counters example application.
454054afcc0a $ cp -piv ../python-classes-tutorial/source/javascript-objects.rst source/ # and some other changes
Jonathan Fine <jfine@pytex.org>
parents: 90
diff changeset
69
454054afcc0a $ cp -piv ../python-classes-tutorial/source/javascript-objects.rst source/ # and some other changes
Jonathan Fine <jfine@pytex.org>
parents: 90
diff changeset
70 8. JavaScript and Python objects and classes compared.
90
347e10783e7f Minor changes.
Jonathan Fine <jfine@pytex.org>
parents: 89
diff changeset
71
347e10783e7f Minor changes.
Jonathan Fine <jfine@pytex.org>
parents: 89
diff changeset
72 We finish at 18.30.
41
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
73
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
74
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
75 Is this tutorial for me?
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
76 ------------------------
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
77
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
78 This tutorial aimed at Python web developers who already know a bit of
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
79 JavaScript, and who need to understand JavaScript better.
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
80
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
81 The tutorial has two related objectives. One is a good understanding
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
82 of the counters example. The other is a good understanding of the
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
83 things that make JavaScript so different from Python (apart from
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
84 JavaScript being the only language supported by web browsers).
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
85
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
86 If you're thinking of taking this tutorial take the :doc:`gotcha-quiz`
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
87 and read through the :doc:`counters-example`. If you understand
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
88 what's there a bit, and would like to understand it more, then this
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
89 tutorial is for you.
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
90
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
91 Let me know
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
92 -----------
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
93
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
94 If you're going to attend the tutorial, I'd appreciate an email from
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
95 you that tells me a little bit about yourself and what you'd like to
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
96 get from the tutorial. If you have specific questions about
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
97 JavaScript, I'd like to here them also. (I can be contacted at
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
98 Jonathan.Fine1 at gmail.com.)
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
99
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
100 You can also, I believe, just turn up on the day, if there is
630e8132250e europython-2010-tutorial.rst: Drafted this page.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
101 space. Don't forget to install the software on your laptop.