SlideShare a Scribd company logo
1 of 115
Download to read offline
QCon Beijing
, TDD, Python, twitter, facebook, agile, js ...




                                        #QCon
QCon Beijing
• 4.23~4.25
QCon Beijing




http://www.qconbeijing.com/agenda.html
QCon Beijing
•
    •
    •
    •   Facebook        Memcached

    •   Twitter

    •
•            (Agile)

    •                          TDD

    •   Agile and Scrum in China
    •
•
    •   Python
    •   F#    Scala Erlang Rebol

    •   JavaScript
Agenda

• Overview
• Agile
• Twitter
• Douglas Crockford
• Python
OVERVIEW
OVERVIEW


•
•
•
OVERVIEW
      python


•
•
•
OVERVIEW
      python


•       twitter

•
•
OVERVIEW
      python


•       twitter

•      facebook
•
OVERVIEW


•
•
•
OVERVIEW


•
•
•
OVERVIEW

      Oracle   Micros ft
•
•
•
OVERVIEW

      Oracle   Micros ft
•
•
•
Agenda

• Overview
• Agile
• Twitter
• Douglas Crockford
• Python
Agile
Agile and Scrum in China : Can it work?   4.24
Agile
What is Agile ?
What is Agile ?
•   2001   2       17

                          “
               ”
•
                    ---


•
.........

17
     ...
Agile Manifesto

   •   Individuals and interactions over
       processes and tools
   •   Working software over
       comprehensive documentation
   •   Customer collaboration over
       contract negotiation
   •   Responding to change over
       following a plan
What is Agile ?
•

•


•
12 Principles of Agile
•          ,

•              ——                      ,


•                      ,           ,

•      ,

•              ,               ,


•                  ,

•
•
•
•      ,

•
•                          ,
What is Scrum?
•
•   backlog:

•   sprint:                                              30               .
                            backlog,

•   sprint backlog:    sprint

•   scrumMaster:                   Scrum

•   time-box:                                        daily scrum meeting time-box          15

•   sprint planning meeting:               sprint                                  8
                               Owner                   backlog                         ,
         sprint                                                  Product Backlog



•   Daily Scrum meeting                                       15
    ScrumMaster


•   Sprint review meeting              Sprint                 Team        Sprint
    Product Owner

•   Sprint retrospective meeting                    Sprint
Some tips from Practices of an
          Agile Developer
•


•
                1 4



•
•
•
•
•
•
•
•
...
...
Agenda

• Overview
• Agile
• Twitter
• Douglas Crockford
• Python
Twitter
Twitter             4.24
Twitter
          -   @nk
Twitter
          -   @nk
Twitter
                           -            @nk

•

      exp   single table => partition
    table
Twitter
                           -            @nk

•

      exp   single table => partition
    table
•
Twitter
                           -            @nk

•

      exp   single table => partition
    table
•
•
Twitter
Agenda

• Overview
• Agile
• Twitter
• Douglas Crockford
• Python
Douglas Crockford
   javascript   4.25
Crockford
• Yahoo!    js                           Douglas Crockford


• JavaScript The Good
 Parts         JavaScript


• JavaScript          Brendan Eich
         “lambda            JavaScript
               ”
• json
Crockford
                           Douglas Crockford


• IE6
• JavaScript
• HTML5
Crockford
IE6
Crockford
- IE6
Crockford
- IE6
Crockford
IE6 ...
   2010      3   1   IE6
          IE6              IE6
Crockford
IE6 ...


          OVER
          70% !!!
Crockford
- IE6
Crockford
- IE6 again
Crockford
- JavaScript
Crockford
- JavaScript



        Macros
        Threads
        Tail Calls
Crockford
- JavaScript
Crockford
- JavaScript
Crockford
- JavaScript
Crockford
HTML5
Crockford
HTML5


        HTML5 ~= HTML +CSS + JSAPI
Crockford
HTML5

HTML
    •   Semantics (New tags, Link Relations, Microdata)
    •   Web Forms 2.0 (Input Fields)
    •   Multimedia (Audio Tag,Video Tag)
    •   2D and 3D drawing (Canvas, WebGL, SVG)
Crockford
HTML5



        • Typography
CSS     • Visuals
        • Transitions, transforms and
          animations
Crockford
HTML5


        • Client Side Storage (Web SQL Database, App
            Cache, Web Storage)
JSAPI   •   Communication (Web Sockets)
        •   Desktop experience (Notifications, Drag and
            Drop API)
        •   Geolocation
Crockford
HTML5




          HTML5
Crockford
- HTML5
Crockford
- HTML5
Crockford
- HTML5
Agenda

• Overview
• Agile
• Twitter
• Douglas Crockford
• Python
Python
Python web2.0   4.23
Python

 twitter: @hongqn



• Python
•
       Python
Pythonic
Pythonic
Pythonic
Server
python -m SimpleHTTPServer
web
          web.py
      http://webpy.org/
web


      http://flask.pocoo.org/


           jinja
web
• Other frameworks: Quixote, django,leazy ...
• http://bitworking.org/news/
 Why_so_many_Python_web_frameworks
web
• Other frameworks: Quixote, django,leazy ...
• http://bitworking.org/news/
 Why_so_many_Python_web_frameworks

     the answer is often that it is way too easy to put together
     one in Python. That certainly seems plausible since there
     are so many libraries that implement the components of a
     web framework and if it's easy to plug those pieces
     together then maybe that lowers the bar of entry for new
     frameworks.
web
• Other frameworks: Quixote, django,leazy ...
• http://bitworking.org/news/
 Why_so_many_Python_web_frameworks

        Templating : kid
web
• Other frameworks: Quixote, django,leazy ...
• http://bitworking.org/news/
 Why_so_many_Python_web_frameworks

        Templating : kid
   SQL : SQLAlchemy
web
• Other frameworks: Quixote, django,leazy ...
• http://bitworking.org/news/
 Why_so_many_Python_web_frameworks

        Templating : kid
   SQL : SQLAlchemy
    Routing : Selector
web
• Other frameworks: Quixote, django,leazy ...
• http://bitworking.org/news/
 Why_so_many_Python_web_frameworks

        Templating : kid
   SQL : SQLAlchemy
    Routing : Selector
           WSGI
web
• Other frameworks: Quixote, django,leazy ...
• http://bitworking.org/news/
 Why_so_many_Python_web_frameworks

        Templating : kid
   SQL : SQLAlchemy                   Robaccia
                                    (3 hours, 60
    Routing : Selector                  lines)
           WSGI
web
  • Other frameworks: Quixote, django,leazy ...
  • http://bitworking.org/news/
    Why_so_many_Python_web_frameworks

        Templating :jinja2
SQL :dbop.py + model.py
                                         Leazy
Routing :dispatcher.py + url.py

                WSGI
doctest - testmod
doctest - testmod
doctest - testfile




  file name : example
doctest - unittest


        As your collection of doctest’ed modules
         grows, you’ll want a way to run all their
                 doctests systematically.
doctest - unittest




     utest1.py       utest2.py
doctest - unittest
doctest - unittest
doctest - unittest


                     >>> python utest_driver.py
                     ..
                     ---------------------------------------------
                     Ran 2 tests in 0.043s

                     OK
nose       easy_install nose

extends unittest to make testing easier.   http://somethingaboutorange.com/mrl/projects/nose/
nose       easy_install nose

extends unittest to make testing easier.      http://somethingaboutorange.com/mrl/projects/nose/


                      utest1.py            utest2.py                      nosetests

                   bash-3.2$ nosetests --with-doctest
                   ..
                   ------------------------------------
                   Ran 2 tests in 0.038s

                   OK
                   bash-3.2$
nose       easy_install nose

extends unittest to make testing easier.   http://somethingaboutorange.com/mrl/projects/nose/


Write your nose test file:




nose_test_case.py
nose       easy_install nose

extends unittest to make testing easier.   http://somethingaboutorange.com/mrl/projects/nose/


Write your nose test file:
                                               base$ nosetests nose_test_case.py
                                               .
                                               ----------------------------------------
                                               Ran 1 test in 0.001s

                                               OK
nose_test_case.py                              base$
nose       easy_install nose

extends unittest to make testing easier.   http://somethingaboutorange.com/mrl/projects/nose/


Write your nose test file:
                                                base$ nosetests nose_test_case.py
                                                .
                                                ----------------------------------------
                                                Ran 1 test in 0.001s

                                                OK
nose_test_case.py                               base$

         Any function or class that matches the configured testMatch regular expression
                                      ((?:^|[b_.-])[Tt]est)
numpy

        >>> numpy.arange(0, 10, 1)
        array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
        >>> numpy.linspace(0, 10, 10) # 0~10, 10 numbers
        >>> numpy.logspace(0, 2, 10) #1~100,10 numbers
        >>> a = numpy.arange(4).reshape(2,2)
        >>> a
        array([[0, 1],
             [2, 3]])
        >>> numpy.dot(a, a.T)
        array([[ 1, 3],
             [ 3, 13]])
ipython
iPython       http://ipython.scipy.org/doc/stable/html/

      bash$ ipython
      Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)
      Type "copyright", "credits" or "license" for more information.

      IPython 0.10 -- An enhanced Interactive Python.
      ?      -> Introduction and overview of IPython's features.
      %quickref -> Quick reference.
      help    -> Python's own help system.
      object? -> Details about 'object'. ?object also works, ?? prints more.

      In [1]: ls
      Flask-0.3.1/	

 	

   memcached-1.4.5/	

objc-json/	

   	

   web.py-0.34/
      einstall.py*	

 	

   numpy/	

 	

 	

  scipy/

      In [2]: print "hello world"
      hello world
virtualenv
virtualenv                                           python
        $ virtualenv --no-site-packages vetest
        $ cd vetest
        $ source bin/activate
        (vetest)fbmac:vetest fengbo$ ls
        bin include lib
        (vetest)fbmac:vetest fengbo$ python
        >>> import BeautifulSoup
        Traceback (most recent call last):
          File "<stdin>", line 1, in <module>
        ImportError: No module named BeautifulSoup
        >>> exit()
        $ sudo easy_install BeautifulSoup
        $ python
        >>> import BeautifulSoup
        >>>
C                       (1)
Cython            easy_install cython



                                    python
def say_hello(name):                Python 2.5.2 (r252:60911, Jan 24 2010, 14:53:14)
  print "hello, %s" % name          [GCC 4.3.2] on linux2
                                    Type "help", "copyright", "credits" or "license" for more
                                    information.
cython_test.pyx
                                    >>> import pyximport
                                    >>> pyximport.install()
                                    >>> import cython_test
                                    >>> cython_test.say_hello("world")
                                    hello, world
                                    >>> exit()
C                       (2)
Cython            easy_install cython

                                        setup.py


def say_hello(name):                     from distutils.core import setup
  print "hello, %s" % name               from distutils.extension import Extension
                                         from Cython.Distutils import build_ext
cython_test.pyx                          ext_modules = [Extension("hello", ["cython_test.pyx"])]

                                         setup(
                                            name = 'Hello world app',
                                            cmdclass = {'build_ext': build_ext},
    compile to .so file                      ext_modules = ext_modules
                                         )
C            (3)
Cython     easy_install cython



   $ python setup.py build_ext --inplace
   $ ls
   build cython_test.c cython_test.pyx hello.so setup.py
   $ python
   >>> import hello
   >>> hello.say_hello(“world”)
   >>> hello, world
svn
svn



 svn

config.py.sample   cp   config.py
svn

      config.py
      project_path = “/home/project/xx”
      try:
         from local_config import *
      except ImportError, ex:
         pass


      local_config.py
      project_path = “/home/user/aaa/project/xx”
decorator -
              email
decorator -
decorator




            async_func.py
decorator -
decorator




            async_func.py
decorator -
decorator




            async_func.py
decorator - cached
decorator - cached
decorator
decorator - cached
decorator - cached
             import inspect
decorator - cached
             import inspect




                         get params dict
decorator - cached
             import inspect




                         get params dict




              get from mmecache / db
decorator - cached
decorator


              “uinfo_{uid}”




            python2.6
            “uinfo_{uid}”.format(uid=2)
/

•       :Vim / Emacs / Ulipad
•          : subversion /mercurial / git
• wiki/          /        :Trac
•          : Bitten
Agenda

• Overview
• Agile
• Twitter
• Douglas Crockford
• Python
•
•
• IE6 MUST DIE
• HTML5? web
• python           TDD
•      decorator
More ...


• Visit : http://www.qconbeijing.com/
END


  follow me on twitter: @vonbo
         on           : @vonbo

More Related Content

What's hot

Updated non-lab version of Level Up. Delivered at LOPSA-East, May 3, 2014.
Updated non-lab version of Level Up. Delivered at LOPSA-East, May 3, 2014.Updated non-lab version of Level Up. Delivered at LOPSA-East, May 3, 2014.
Updated non-lab version of Level Up. Delivered at LOPSA-East, May 3, 2014.
Mandi Walls
 
Town Hall - Business Implications of Open Source OSGi Implementations - BJ Ha...
Town Hall - Business Implications of Open Source OSGi Implementations - BJ Ha...Town Hall - Business Implications of Open Source OSGi Implementations - BJ Ha...
Town Hall - Business Implications of Open Source OSGi Implementations - BJ Ha...
mfrancis
 
Git 101 tutorial presentation
Git 101 tutorial presentationGit 101 tutorial presentation
Git 101 tutorial presentation
Terry Wang
 

What's hot (20)

Updated non-lab version of Level Up. Delivered at LOPSA-East, May 3, 2014.
Updated non-lab version of Level Up. Delivered at LOPSA-East, May 3, 2014.Updated non-lab version of Level Up. Delivered at LOPSA-East, May 3, 2014.
Updated non-lab version of Level Up. Delivered at LOPSA-East, May 3, 2014.
 
OSDC 2013 | Introduction into Chef by Andy Hawkins
OSDC 2013 | Introduction into Chef by Andy HawkinsOSDC 2013 | Introduction into Chef by Andy Hawkins
OSDC 2013 | Introduction into Chef by Andy Hawkins
 
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)
 
Postgresql 9.0 HA at RMLL 2012
Postgresql 9.0 HA at RMLL 2012Postgresql 9.0 HA at RMLL 2012
Postgresql 9.0 HA at RMLL 2012
 
Enhance OpenSSH for fun and security
Enhance OpenSSH for fun and securityEnhance OpenSSH for fun and security
Enhance OpenSSH for fun and security
 
How I hack on puppet modules
How I hack on puppet modulesHow I hack on puppet modules
How I hack on puppet modules
 
7 tools for your devops stack
7 tools for your devops stack7 tools for your devops stack
7 tools for your devops stack
 
RPM experiments
RPM experimentsRPM experiments
RPM experiments
 
0day hunting a.k.a. The story of a proper CPE test
0day hunting a.k.a. The story of a proper CPE test0day hunting a.k.a. The story of a proper CPE test
0day hunting a.k.a. The story of a proper CPE test
 
Dev Tools State of the Union (Part II) - Atlassian Summit 2010
Dev Tools State of the Union (Part II) - Atlassian Summit 2010Dev Tools State of the Union (Part II) - Atlassian Summit 2010
Dev Tools State of the Union (Part II) - Atlassian Summit 2010
 
2013-06-12 Compliance Made Easy, Red Hat Summit 2013
2013-06-12 Compliance Made Easy, Red Hat Summit 20132013-06-12 Compliance Made Easy, Red Hat Summit 2013
2013-06-12 Compliance Made Easy, Red Hat Summit 2013
 
Town Hall - Business Implications of Open Source OSGi Implementations - BJ Ha...
Town Hall - Business Implications of Open Source OSGi Implementations - BJ Ha...Town Hall - Business Implications of Open Source OSGi Implementations - BJ Ha...
Town Hall - Business Implications of Open Source OSGi Implementations - BJ Ha...
 
Git 101 tutorial presentation
Git 101 tutorial presentationGit 101 tutorial presentation
Git 101 tutorial presentation
 
What is Git | What is GitHub | Git Tutorial | GitHub Tutorial | Devops Tutori...
What is Git | What is GitHub | Git Tutorial | GitHub Tutorial | Devops Tutori...What is Git | What is GitHub | Git Tutorial | GitHub Tutorial | Devops Tutori...
What is Git | What is GitHub | Git Tutorial | GitHub Tutorial | Devops Tutori...
 
Nebula: Netflix's OSS Gradle Plugins
Nebula: Netflix's OSS Gradle PluginsNebula: Netflix's OSS Gradle Plugins
Nebula: Netflix's OSS Gradle Plugins
 
Advanced Git: Functionality and Features
Advanced Git: Functionality and FeaturesAdvanced Git: Functionality and Features
Advanced Git: Functionality and Features
 
Introduction to github using Egit
Introduction to github using EgitIntroduction to github using Egit
Introduction to github using Egit
 
Big Data Everywhere Chicago: Apache Spark Plus Many Other Frameworks -- How S...
Big Data Everywhere Chicago: Apache Spark Plus Many Other Frameworks -- How S...Big Data Everywhere Chicago: Apache Spark Plus Many Other Frameworks -- How S...
Big Data Everywhere Chicago: Apache Spark Plus Many Other Frameworks -- How S...
 
Git training
Git trainingGit training
Git training
 
VCS for Teamwork - GIT Workshop
VCS for Teamwork - GIT WorkshopVCS for Teamwork - GIT Workshop
VCS for Teamwork - GIT Workshop
 

Similar to Qcon beijing 2010

Inside Of Mbga Open Platform
Inside Of Mbga Open PlatformInside Of Mbga Open Platform
Inside Of Mbga Open Platform
Hideo Kimura
 
Lessons learned while building Omroep.nl
Lessons learned while building Omroep.nlLessons learned while building Omroep.nl
Lessons learned while building Omroep.nl
bartzon
 

Similar to Qcon beijing 2010 (20)

Inside Of Mbga Open Platform
Inside Of Mbga Open PlatformInside Of Mbga Open Platform
Inside Of Mbga Open Platform
 
Lessons learned while building Omroep.nl
Lessons learned while building Omroep.nlLessons learned while building Omroep.nl
Lessons learned while building Omroep.nl
 
Lessons learned while building Omroep.nl
Lessons learned while building Omroep.nlLessons learned while building Omroep.nl
Lessons learned while building Omroep.nl
 
DrupalCon 2011 Highlight
DrupalCon 2011 HighlightDrupalCon 2011 Highlight
DrupalCon 2011 Highlight
 
Continuous Integration, the minimum viable product
Continuous Integration, the minimum viable productContinuous Integration, the minimum viable product
Continuous Integration, the minimum viable product
 
Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?
 
How we realized SOA by Python at PyCon JP 2015
How we realized SOA by Python at PyCon JP 2015How we realized SOA by Python at PyCon JP 2015
How we realized SOA by Python at PyCon JP 2015
 
JIRA Performance After 300,000 Issues
JIRA Performance After 300,000 IssuesJIRA Performance After 300,000 Issues
JIRA Performance After 300,000 Issues
 
Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Untangling - fall2017 - week 9
Untangling - fall2017 - week 9
 
Working Software Over Comprehensive Documentation
Working Software Over Comprehensive DocumentationWorking Software Over Comprehensive Documentation
Working Software Over Comprehensive Documentation
 
[2010]我有一个梦想
[2010]我有一个梦想[2010]我有一个梦想
[2010]我有一个梦想
 
Useful practices of creation automatic tests by using cucumber jvm
Useful practices of creation automatic tests by using cucumber jvmUseful practices of creation automatic tests by using cucumber jvm
Useful practices of creation automatic tests by using cucumber jvm
 
OpenStack Documentation Projects and Processes
OpenStack Documentation Projects and ProcessesOpenStack Documentation Projects and Processes
OpenStack Documentation Projects and Processes
 
Publishing Linked Data from RDB
Publishing Linked Data from RDBPublishing Linked Data from RDB
Publishing Linked Data from RDB
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache Usergrid
 
Сontinuous Integration - step to continuous deployment
Сontinuous Integration - step to continuous deploymentСontinuous Integration - step to continuous deployment
Сontinuous Integration - step to continuous deployment
 
OpenStack Documentation in the Open
OpenStack Documentation in the OpenOpenStack Documentation in the Open
OpenStack Documentation in the Open
 
Building Responsive Applications Using XPages
Building Responsive Applications Using XPagesBuilding Responsive Applications Using XPages
Building Responsive Applications Using XPages
 
DrupalCon Austin - Absolute Beginner's Guide to Drupal
DrupalCon Austin - Absolute Beginner's Guide to DrupalDrupalCon Austin - Absolute Beginner's Guide to Drupal
DrupalCon Austin - Absolute Beginner's Guide to Drupal
 
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit EuropeAutomation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 

Qcon beijing 2010

  • 1. QCon Beijing , TDD, Python, twitter, facebook, agile, js ... #QCon
  • 4. QCon Beijing • • • • Facebook Memcached • Twitter • • (Agile) • TDD • Agile and Scrum in China • • • Python • F# Scala Erlang Rebol • JavaScript
  • 5. Agenda • Overview • Agile • Twitter • Douglas Crockford • Python
  • 8. OVERVIEW python • • •
  • 9. OVERVIEW python • twitter • •
  • 10. OVERVIEW python • twitter • facebook •
  • 13. OVERVIEW Oracle Micros ft • • •
  • 14. OVERVIEW Oracle Micros ft • • •
  • 15. Agenda • Overview • Agile • Twitter • Douglas Crockford • Python
  • 16. Agile Agile and Scrum in China : Can it work? 4.24
  • 17. Agile
  • 19. What is Agile ? • 2001 2 17 “ ” • --- •
  • 21. Agile Manifesto • Individuals and interactions over processes and tools • Working software over comprehensive documentation • Customer collaboration over contract negotiation • Responding to change over following a plan
  • 22. What is Agile ? • • •
  • 23. 12 Principles of Agile • , • —— , • , , • , • , , • , • • • • , • • ,
  • 24. What is Scrum? • • backlog: • sprint: 30 . backlog, • sprint backlog: sprint • scrumMaster: Scrum • time-box: daily scrum meeting time-box 15 • sprint planning meeting: sprint 8 Owner backlog , sprint Product Backlog • Daily Scrum meeting 15 ScrumMaster • Sprint review meeting Sprint Team Sprint Product Owner • Sprint retrospective meeting Sprint
  • 25. Some tips from Practices of an Agile Developer • • 1 4 • • • • • • • •
  • 26. ...
  • 27. ...
  • 28. Agenda • Overview • Agile • Twitter • Douglas Crockford • Python
  • 30. Twitter - @nk
  • 31. Twitter - @nk
  • 32. Twitter - @nk • exp single table => partition table
  • 33. Twitter - @nk • exp single table => partition table •
  • 34. Twitter - @nk • exp single table => partition table • •
  • 36. Agenda • Overview • Agile • Twitter • Douglas Crockford • Python
  • 37. Douglas Crockford javascript 4.25
  • 38. Crockford • Yahoo! js Douglas Crockford • JavaScript The Good Parts JavaScript • JavaScript Brendan Eich “lambda JavaScript ” • json
  • 39. Crockford Douglas Crockford • IE6 • JavaScript • HTML5
  • 43. Crockford IE6 ... 2010 3 1 IE6 IE6 IE6
  • 44. Crockford IE6 ... OVER 70% !!!
  • 48. Crockford - JavaScript Macros Threads Tail Calls
  • 53. Crockford HTML5 HTML5 ~= HTML +CSS + JSAPI
  • 54. Crockford HTML5 HTML • Semantics (New tags, Link Relations, Microdata) • Web Forms 2.0 (Input Fields) • Multimedia (Audio Tag,Video Tag) • 2D and 3D drawing (Canvas, WebGL, SVG)
  • 55. Crockford HTML5 • Typography CSS • Visuals • Transitions, transforms and animations
  • 56. Crockford HTML5 • Client Side Storage (Web SQL Database, App Cache, Web Storage) JSAPI • Communication (Web Sockets) • Desktop experience (Notifications, Drag and Drop API) • Geolocation
  • 61. Agenda • Overview • Agile • Twitter • Douglas Crockford • Python
  • 63. Python twitter: @hongqn • Python • Python
  • 68. web web.py http://webpy.org/
  • 69. web http://flask.pocoo.org/ jinja
  • 70. web • Other frameworks: Quixote, django,leazy ... • http://bitworking.org/news/ Why_so_many_Python_web_frameworks
  • 71. web • Other frameworks: Quixote, django,leazy ... • http://bitworking.org/news/ Why_so_many_Python_web_frameworks the answer is often that it is way too easy to put together one in Python. That certainly seems plausible since there are so many libraries that implement the components of a web framework and if it's easy to plug those pieces together then maybe that lowers the bar of entry for new frameworks.
  • 72. web • Other frameworks: Quixote, django,leazy ... • http://bitworking.org/news/ Why_so_many_Python_web_frameworks Templating : kid
  • 73. web • Other frameworks: Quixote, django,leazy ... • http://bitworking.org/news/ Why_so_many_Python_web_frameworks Templating : kid SQL : SQLAlchemy
  • 74. web • Other frameworks: Quixote, django,leazy ... • http://bitworking.org/news/ Why_so_many_Python_web_frameworks Templating : kid SQL : SQLAlchemy Routing : Selector
  • 75. web • Other frameworks: Quixote, django,leazy ... • http://bitworking.org/news/ Why_so_many_Python_web_frameworks Templating : kid SQL : SQLAlchemy Routing : Selector WSGI
  • 76. web • Other frameworks: Quixote, django,leazy ... • http://bitworking.org/news/ Why_so_many_Python_web_frameworks Templating : kid SQL : SQLAlchemy Robaccia (3 hours, 60 Routing : Selector lines) WSGI
  • 77. web • Other frameworks: Quixote, django,leazy ... • http://bitworking.org/news/ Why_so_many_Python_web_frameworks Templating :jinja2 SQL :dbop.py + model.py Leazy Routing :dispatcher.py + url.py WSGI
  • 80. doctest - testfile file name : example
  • 81. doctest - unittest As your collection of doctest’ed modules grows, you’ll want a way to run all their doctests systematically.
  • 82. doctest - unittest utest1.py utest2.py
  • 85. doctest - unittest >>> python utest_driver.py .. --------------------------------------------- Ran 2 tests in 0.043s OK
  • 86. nose easy_install nose extends unittest to make testing easier. http://somethingaboutorange.com/mrl/projects/nose/
  • 87. nose easy_install nose extends unittest to make testing easier. http://somethingaboutorange.com/mrl/projects/nose/ utest1.py utest2.py nosetests bash-3.2$ nosetests --with-doctest .. ------------------------------------ Ran 2 tests in 0.038s OK bash-3.2$
  • 88. nose easy_install nose extends unittest to make testing easier. http://somethingaboutorange.com/mrl/projects/nose/ Write your nose test file: nose_test_case.py
  • 89. nose easy_install nose extends unittest to make testing easier. http://somethingaboutorange.com/mrl/projects/nose/ Write your nose test file: base$ nosetests nose_test_case.py . ---------------------------------------- Ran 1 test in 0.001s OK nose_test_case.py base$
  • 90. nose easy_install nose extends unittest to make testing easier. http://somethingaboutorange.com/mrl/projects/nose/ Write your nose test file: base$ nosetests nose_test_case.py . ---------------------------------------- Ran 1 test in 0.001s OK nose_test_case.py base$ Any function or class that matches the configured testMatch regular expression ((?:^|[b_.-])[Tt]est)
  • 91. numpy >>> numpy.arange(0, 10, 1) array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) >>> numpy.linspace(0, 10, 10) # 0~10, 10 numbers >>> numpy.logspace(0, 2, 10) #1~100,10 numbers >>> a = numpy.arange(4).reshape(2,2) >>> a array([[0, 1], [2, 3]]) >>> numpy.dot(a, a.T) array([[ 1, 3], [ 3, 13]])
  • 92. ipython iPython http://ipython.scipy.org/doc/stable/html/ bash$ ipython Python 2.5 (r25:51918, Sep 19 2006, 08:49:13) Type "copyright", "credits" or "license" for more information. IPython 0.10 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object'. ?object also works, ?? prints more. In [1]: ls Flask-0.3.1/ memcached-1.4.5/ objc-json/ web.py-0.34/ einstall.py* numpy/ scipy/ In [2]: print "hello world" hello world
  • 93. virtualenv virtualenv python $ virtualenv --no-site-packages vetest $ cd vetest $ source bin/activate (vetest)fbmac:vetest fengbo$ ls bin include lib (vetest)fbmac:vetest fengbo$ python >>> import BeautifulSoup Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named BeautifulSoup >>> exit() $ sudo easy_install BeautifulSoup $ python >>> import BeautifulSoup >>>
  • 94. C (1) Cython easy_install cython python def say_hello(name): Python 2.5.2 (r252:60911, Jan 24 2010, 14:53:14) print "hello, %s" % name [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. cython_test.pyx >>> import pyximport >>> pyximport.install() >>> import cython_test >>> cython_test.say_hello("world") hello, world >>> exit()
  • 95. C (2) Cython easy_install cython setup.py def say_hello(name): from distutils.core import setup print "hello, %s" % name from distutils.extension import Extension from Cython.Distutils import build_ext cython_test.pyx ext_modules = [Extension("hello", ["cython_test.pyx"])] setup( name = 'Hello world app', cmdclass = {'build_ext': build_ext}, compile to .so file ext_modules = ext_modules )
  • 96. C (3) Cython easy_install cython $ python setup.py build_ext --inplace $ ls build cython_test.c cython_test.pyx hello.so setup.py $ python >>> import hello >>> hello.say_hello(“world”) >>> hello, world
  • 97. svn
  • 98. svn svn config.py.sample cp config.py
  • 99. svn config.py project_path = “/home/project/xx” try: from local_config import * except ImportError, ex: pass local_config.py project_path = “/home/user/aaa/project/xx”
  • 100. decorator - email
  • 101. decorator - decorator async_func.py
  • 102. decorator - decorator async_func.py
  • 103. decorator - decorator async_func.py
  • 107. decorator - cached import inspect
  • 108. decorator - cached import inspect get params dict
  • 109. decorator - cached import inspect get params dict get from mmecache / db
  • 110. decorator - cached decorator “uinfo_{uid}” python2.6 “uinfo_{uid}”.format(uid=2)
  • 111. / • :Vim / Emacs / Ulipad • : subversion /mercurial / git • wiki/ / :Trac • : Bitten
  • 112. Agenda • Overview • Agile • Twitter • Douglas Crockford • Python
  • 113. • • • IE6 MUST DIE • HTML5? web • python TDD • decorator
  • 114. More ... • Visit : http://www.qconbeijing.com/
  • 115. END follow me on twitter: @vonbo on : @vonbo