PyCon Philippines 2012
      Keynote
       Daniel Greenfeld
#pyconph
I’m excited!
Python is everywhere
Python is everywhere
• NASA
Python is everywhere
• NASA
• Google
Python is everywhere
• NASA
• Google
• Linux (expecially Ubuntu)
Python is everywhere
• NASA
• Google
• Linux (expecially Ubuntu)
• Mac OS X
Python is everywhere
• NASA
• Google
• Linux (expecially Ubuntu)
• Mac OS X
• Every special effects or animation shop
Python is everywhere
• NASA
• Google
• Linux (expecially Ubuntu)
• Mac OS X
• Every special effects or animation shop
• Science
Python is everywhere
• NASA
• Google
• Linux (expecially Ubuntu)
• Mac OS X
• Every special effects or animation shop
• Science
• Robotics
Python is everywhere
• NASA
• Google
• Linux (expecially Ubuntu)
• Mac OS X
• Every special effects or animation shop
• Science
• Robotics
• Web (Instagram!)
Thanking the sponsors

Auberon Solutions            Github

Cartwheel Web                Philhealth

Smart                        Chikka

Python Software Foundation   Globe Labs

10gen                        Django Software Foundation
Thanking my
    fellow speakers
Sony Valdez
                     Marco Moreto
Audrey Roy
                     Rodney Quillo
Malcolm Tredinnick
                     Bryan Veloso
Paolo Barazon
No speaker is
 getting paid
Thank my
fellow organizers
  Frank Pohlmann
  Mary Ann Tan-Pohlmann
  Mark Steve Samson
  Lanie Diosana
  Audrey Roy
No organizer
is getting paid
All volunteers
Passion
Passion
 The topic of this presentation
A little
about me
@pydanny
@pydanny

  • Worked at NASA
  • Python Software Foundation
  • Principal at cartwheelweb.com
  • CTO of consumer.io
NASA
@pydanny
@pydanny

  • Worked at NASA
@pydanny

  • Worked at NASA
  • Principal at Cartwheel Web
@pydanny

  • Worked at NASA
  • Principal at Cartwheel Web
  • CTO of consumer.io
@pydanny

  • Worked at NASA
  • Principal at Cartwheel Web
  • CTO of consumer.io
  • Member of Python Software
    Foundation
@pydanny
     Passions
@pydanny
         Passions
  • Python
@pydanny
         Passions
  • Python
  • Django
@pydanny
         Passions
  • Python
  • Django
  • Capoeira
@pydanny
         Passions
  • Python
  • Django
  • Capoeira
  • Audrey Roy is my fiancée
Back to
the talk
Passion
Passion means you care
about something so much you
   want help other people.
Mentorship
Mentorship, the developmental
       relationship between a more
       experienced mentor and a less
       experienced partner referred to as a
       mentee or protégé




http://en.wikipedia.org/wiki/Mentor_(disambiguation)
Mentorship refers to a personal
developmental relationship in which a more
experienced or more knowledgeable person
helps to guide a less experienced or less
knowledgeable person. However, true
mentoring is more than just answering
occasional questions or providing ad hoc
help. It is about an ongoing relationship of
learning, dialog, and challenge.



 http://en.wikipedia.org/wiki/Mentorship
Are mentors
 worth it?
Me on the Apple ][ circa 1980
10 HOME
20 PRINT "HELLO, WORLD"
30 GOTO 10




AppleBasic on the Apple ][
No mentorship
No mentorship
• Too proud to ask for help.
No mentorship
• Too proud to ask for help.
• Couldn’t figure out why anyone used arrays
No mentorship
• Too proud to ask for help.
• Couldn’t figure out why anyone used arrays
• Created a lot of variables.
No mentorship
• Too proud to ask for help.
• Couldn’t figure out why anyone used arrays
• Created a lot of variables.
• Lots of variables.
No mentorship
• Too proud to ask for help.
• Couldn’t figure out why anyone used arrays
• Created a lot of variables.
• Lots of variables.
• So many variables.
No mentorship
• Too proud to ask for help.
• Couldn’t figure out why anyone used arrays
• Created a lot of variables.
• Lots of variables.
• So many variables.
• So many, many variables.
10   NA   =   1
                 20   NB   =   4
                 30   NC   =   27
Before mentors   40   ND   =   256
                 50   NE   =   3125

                 ad infinitum
10   NA   =    1
                            20   NB   =    4
                            30   NC   =    27
Before mentors              40   ND   =    256
                            50   NE   =    3125

                            ad infinitum

                Array                 VS

After mentors           [1, 4, 27, 256, 3125]
10   NA   =    1
                             20   NB   =    4
                             30   NC   =    27
Before mentors               40   ND   =    256
                             50   NE   =    3125

                             ad infinitum

                Array                  VS

After mentors            [1, 4, 27, 256, 3125]


                    [x ** x for x in range(1,6)]
 List comprehension to
   generate the array
Mentors
made me
 better
Some of my mentors
x = 1
 FOR i = 1 to 10
     IF i = 25
        i = i + 1
     ELSE
        i = i + 3
     ENDIF
 ENDFOR


Anyone recognize this?
x = 1
FOR i = 1 to 10
    IF i = 25
       i = i + 1
    ELSE
       i = i + 3
    ENDIF
ENDFOR


Foxpro circa 1995
James Beerbower
James Beerbower

• Got me a job when things were bad.
James Beerbower

• Got me a job when things were bad.
• Taught me Foxpro 2.6 for Dos.
James Beerbower

• Got me a job when things were bad.
• Taught me Foxpro 2.6 for Dos.
• Jump started my programming career.
James Beerbower

• Got me a job when things were bad.
• Taught me Foxpro 2.6 for Dos.
• Jump started my programming career.
• Thank you James!
SELECT * FROM attendees
    WHERE awesomeness > 100
    GROUP BY experience_level;



      Anyone recognize this?
SELECT * FROM attendees
    WHERE awesomeness > 100
    GROUP BY experience_level;



 Structured Query Language (SQL)
Peter Thorsson
Peter Thorsson


• Very patient
Peter Thorsson


• Very patient
• Thank you Peter!
d = dict(
       one=1,
       two=2,
       three=3
   )
   for key in d.keys():
       print key, d[key]

A sample of my early Python code
Chris Shenton
Chris Shenton

• Introduced me to Python
Chris Shenton

• Introduced me to Python
• Introduced me to Plone
Chris Shenton

• Introduced me to Python
• Introduced me to Plone
• Introduced me to Django
Chris Shenton

• Introduced me to Python
• Introduced me to Plone
• Introduced me to Django
• Thank you Chris!
d = dict(
    one=1,
    two=2,
    three=3
)
for k, v in d.items():
    print("{0}, {1}".format(k, v))
d = dict(          Chris Shenton
    one=1,
    two=2,
    three=3
)
for k, v in d.items():
    print("{0}, {1}".format(k, v))
d = dict(          Chris Shenton
    one=1,
    two=2,
    three=3
)
for k, v in d.items():
    print("{0}, {1}".format(k, v))


                Raymond Hettinger
Noah Kantrowitz
Noah Kantrowitz
class HelloWorld(object):

    def __init__(self):
        print("Hello, World")

                      Python
Noah Kantrowitz
class HelloWorld(object):

    def __init__(self):
        print("Hello, World")

   @classmethod       Python
   def hello(cls):
       print("Hello, World")
>>> from pycon import HelloWorld
>>> from pycon import HelloWorld
>>> HelloWorld.hello()
>>> from pycon import HelloWorld
>>> HelloWorld.hello()
"Hello, World"
>>> from pycon import HelloWorld
>>> HelloWorld.hello()
"Hello, World"
                       class HelloWorld(object):

                           @classmethod
                           def hello(cls):
                               print("Hello, World")
>>> from pycon import HelloWorld
>>> HelloWorld.hello()
"Hello, World"
>>> h = HelloWorld()
                       class HelloWorld(object):

                           @classmethod
                           def hello(cls):
                               print("Hello, World")
>>> from pycon import HelloWorld
>>> HelloWorld.hello()
"Hello, World"
>>> h = HelloWorld()
                        class HelloWorld(object):
"Hello, World"
                                @classmethod
                                def hello(cls):
                                    print("Hello, World")
>>> from pycon import HelloWorld
>>> HelloWorld.hello()
"Hello, World"
>>> h = HelloWorld()
                        class HelloWorld(object):
"Hello, World"
                                     @classmethod
                                     def hello(cls):
                                         print("Hello, World")


     class HelloWorld(object):

         def __init__(self):
             print("Hello, World")
<div id="python">
          Click here
        </div>


$("#python").click(function() {
  alert("Python is awesome!");
});


             JQuery
James Tauber
James Tauber

• Introduced me to JQuery
James Tauber

• Introduced me to JQuery
• Encouraged me to create django-uni-form
James Tauber

• Introduced me to JQuery
• Encouraged me to create django-uni-form
    • (evolved to django-crispy-forms)
James Tauber

• Introduced me to JQuery
• Encouraged me to create django-uni-form
    • (evolved to django-crispy-forms)
• Gave me a job at Eldarion
James Tauber

• Introduced me to JQuery
• Encouraged me to create django-uni-form
    • (evolved to django-crispy-forms)
• Gave me a job at Eldarion
• Thank you James!