image Rediscover with Python Cybozu Labs NISHIO Hirokazu Q&A Added Version2014-09-17 Wednesday, September 17, 20141

image evil pythonista Wednesday, September 17, 14 2

image evil pythonista Wednesday, September 17, 14 3

image evil pythonista -2006 LL Ring “Janken 2.0” Wednesday, September 17, 14, 2006 3

image evil pythonista -2006 LL Ring “Janken 2.0” - programmers of various languages write programs in each language and play rock-paper-scissors-paper in a communication game Wednesday, September 17, 14 3

image evil pythonista -2006 LL Ring “Janken 2.0” - Programmers of various languages write programs in each language and play rock-paper-scissors-paper in a communication game - this kind of program can be written in one line! You can write a program like this in one line! Wednesday, September 17, 14 3

image Can’t use syntax with line breaks -if -while -try..except Wednesday, September 17, 14 4

image How to? Wednesday, September 17, 14 5

image How to?-use short-circuit evaluation of if →and/or Wednesday, September 17, 14 5

image How to? -if →use short-circuit evaluation of and/or -while →useful library for infinite yield from itertools import count Wednesday, September 17, 14 5

image How to? -if →use short-circuit evaluation of and/or -while →convenience library for infinite yieldfrom itertools import count -try..except → Start a “process that may throw an exception and die” as a child process and read the error output on exitWednesday, September 17, 145

image Wednesday, September 17, 14 6 http://www.nishiohirokazu.org/blog/2006/08/python_12.html

image Serious Self-Introduction Wednesday, September 17, 14 7

image Serious Self-Introduction - Cybozu Labs Wednesday, September 17, 14 7

image Serious Self-Introduction - Cybozu Labs - Research and Development of Technologies that Will Serve as the Foundation for the Next Generation of Groupware from a Medium- to Long-Term Perspective7 Wednesday, September 17, 14

image Serious Self-Introduction-Cybozu Labs-Research and development of technologies that will form the basis of the next generation of groupware from a medium- to long-term perspective-One Liner not writtenWednesday, September 17, 14, 7

image Python Usage Scenes at Cybozu - Automation - Infrastructure - Analysis Wednesday, September 17, 14 8

image Automation - VM, storage and various configurations management - Testing: easy to write and mock - as Jenkins scripts → Requests to hit kintone API and others Wednesday, September 17, 14 9

image Infrastructure14 Wednesday, September 17, 10

image Remote Backup Wednesday, September 17, 14 https://enterprise.cybozu.com/topics131111/ 11

image P2P automatic failure recovery system Wednesday, September 17, 14 http://developer.cybozu.co.jp/tech/?p=5799 12

image P2P automatic failure recovery system Wednesday, September 17, 14 http://developer.cybozu.co.jp/tech/?p=5799 13

image Infrastructure - C++ and Java for the parts that require performance -Python to stitch those components together14 Wednesday, September 17, 14

image Analysis Wednesday, September 17, 1415

image Analysis - Data Collection Wednesday, September 17, 14 15

image Analysis - Data Collection - Cleansing and Filtering Wednesday, September 17, 14, 15

image Analysis - Data Collection - Cleansing and Filtering - Statistical Processing is also easy with NumPy and SciPy14, Wednesday, September 17, 1415

image Analysis - Data collection - Cleansing, filtering, and statistical processing is also easy with NumPy and SciPy from scipy.stats import chi2_contingency chi2_ contingency(data) Wednesday, September 17, 1415

image Python Usage Scenes at Cybozu - Automation - Infrastructure - Analysis → talk about specific examples Wednesday, September 17, 14 16

image Wednesday, September 17, 14 17

image Recommended Graph Chart recommendation -Create a graph from data -Various options for what kind of graph to create -Computer assistedWednesday, September 17, 14 http://developer. cybozu.co.jp/tech/?p=3874 18

image Recommend charts using statistics of data distribution Wednesday, September 17, 14 19

image Recommended Graph Chart recommendation -Flask and NumPy for prototypes -collections in the standard library are also useful -product version is implemented in JavaScript14 years Wednesday, September 17 http://developer.cybozu.co.jp/tech/?p=3874 20

image What is groupware? Wednesday, September 17, 14 21

image What is groupware? Group + Software Wednesday, September 17, 14 21

image Augmenting Human Intellect software augments human abilities Engelbert, “Augmenting Human Intellect: A Conceptual Framework” (1962) Wednesday, September 17, 14 22

image Augmenting Group Intellect Software Enhances Collective Capacity = Groupware Wednesday, September 17, 14 23

image Give word2vec a sentence and the computer will understand the meaning of the word24 Wednesday, September 17, 14

image Human Computer Wednesday, September 17, 14 25

image Human + Computer = Augmented Human Human Wednesday, September 17, 14 26

image Wednesday, September 17, 1427

image Wednesday, September 17, 1428

image Wednesday, 9/17/14 Search 29 for “motivational advice”

image 14 channels brain wave sensor Wednesday, September 17, 14 30

image Human to Machine keyboard switch mouse camera touch panel (multi-touch) scanner Machine to Human paper CRT liquid crystal e-ink 3D TV HMD Wednesday 17 Sep 14 31

image Machine→Human paper CRT liquid crystal e-ink 3D TV HMD book e-book Wednesday, September 17, 14 32

image Four elements of human enhancement -1: Artifacts: computers, software, etc. -2: Language: terminology for concepts, design patterns, etc. -3: Methodology: procedures, strategies, etc. Methodology: procedures, strategies, etc. for problem solving -4: Training: acquiring skills to use 13 Wednesday, September 17, 14 Engelbert, “Augmenting Human Intellect: A Conceptual Framework” (1962) 33 Framework” (1962) 33

image Four elements of human enhancement -1: Artifacts: computers, software, etc. -2: Language: terminology for concepts, design patterns, etc. -3: Methodology: procedures, strategies, etc. Methodology: procedures, strategies, etc. for problem solving -4: Training: acquiring skills to use 13 Wednesday, September 17, 14 Engelbert, “Augmenting Human Intellect: A Conceptual Framework” (1962) 34 Framework” (1962) 34

image theme of this conference: Rediscover with Python Wednesday, September 17, 1435

image How to discover? →Methodology to ïŹnd unknown Wednesday, September 17, 14 36

image Wednesday, September 17, 1437

image Wednesday, September 17, 1438

image Wednesday, September 17, 1439

image How to discover? →Change Perspective Wednesday, September 17, 14, 40

image Change Perspective - No matter what perspective you look at things, there is always something you don’t see - change your perspective to see what you don’t seeWednesday, September 17, 1441

image known (cid:15511) unknown Wednesday, September 17, 1442

image Obviously I don’t know 43 Obviously I know Wednesday, September 17, 14

image Obviously unknowing Unknown Obviously knowing Wednesday, September 17, 14, 44

image BLIND SPOT -The area between the “obviously know” area and the “obviously don’t know” area. -They don’t see it, but they don’t know they don’t see it. That is the blind spot.Wednesday, September 17, 1445

image Obviously you don’t know Obviously you know Wednesday 9/17/14 “How much do you know? “46

image Obviously don’t know Obviously know Wednesday 9/17/14 ← blindspot blindspot 47

image Obviously don’t know Obviously know Wednesday 9/17/14 ← blindspot blindspot 48

image How to ïŹnd blind spot? Wednesday, September 17, 1449

image Comparison History Experience Wednesday 9/17/14 50

image Comparison History Experience + Abstraction Communication Wednesday 9/17/14 51

image How to ïŹnd blind spots? Comparison History Experience Abstraction Communication Wednesday, September 17, 14 52

image Comparison - e.g., by comparing multiple languages, we notice “What? In Python it’s false, right? “What is true in different languages?” “What about other languages?” How is it defined in Python?” Wednesday 9/17/14 object.nonzero(self) Called to implement truth value testing and the built-in operation bool(); 53

image History - Example: By following the history, you will notice a blind spot “Why does Python have two types of classes, New-style classes and non-New-style classes? → History - realizing that the order of method name resolution needed to be changed for the purpose of merging types and classes Wednesday, September 17, 2002Unifying types and classes in Python 2.2 | Python.org https://www.python. org/download/releases/2.2.3/descrintro 54

image Experience - real use will help you notice blind spots “Hey, I thought 1/2 was going to be 0.5, but now it’s 0?” Wednesday 9/17/14 PEP 238 — Changing the Division Operator http://legacy.python.org/dev/peps/pep-0238/ 55

image Abstraction - verbalizing one’s experience by exposing concrete examples to abstractions “Oh, this writing style that I somehow used was named the Mediator Pattern!” Wednesday, September 17, 1456

image Communication -Conversations with others who have different experiences can help you to recognize blind spots, such as, “I’m having trouble with this problem,” or, “Why don’t you do it this way? “I see, I didn’t think of that idea!” “No, it’s a common idea in GUI. No, it’s a normal idea in GUI.” “I’m a server specialist.

image How to ïŹnd blind spots? Comparison History Experience Abstraction Communication Wednesday, September 17, 14 58

image Communication Wednesday, September 17, 14 59

image OfïŹce Hour 13:00-13:30 Blog, Mail see http://nhiro.org/ Wednesday, September 17, 14 60

image Q&A ↓ very helpful in reminding me of my question! Thanks! PyCon JP 2014 Day 3 Thoughts and Notes#pyconjp |Koemu’s Editorial Postscripthttp://www.koemu.com/blog/2014/09/15/pycon-jp-2014-day3/ Wednesday, September 17, 1461

image Q: Some people may see information that gives them a “chance to notice blind spots” but still think “that can’t be true” due to cognitive dissonance. What should we do with such people in terms of augmenting the organization? How do we educate them? Wednesday, September 17, 1462

image A: I will be explaining the “U Theory” that is trying to answer that very point at the Kyoto University Summer Design School starting 9/24, and I will be presenting the material
http://www.design.kyoto-u.ac.jp/sds2014/ja/theme01
 html 63 Wednesday, September 17, 14

image A: I have two points to make. First, the “how to change others” stance will not work. You need to change yourself.Wednesday, September 17, 1464

image A: Next, realize that it is common for people, including yourself, to get into a state of “seeing but not seeing. “Wednesday, September 17, 1465

image A: It can be small at first, and you should accumulate “success stories” that yield beneficial results from your awareness. This will give you confidence.Wednesday, September 17, 1466

image PDCA Cycle and U-Curve Relationship U-Curve Supplemental Slide U-Curve State Behavior Wednesday, September 17, 14, 67 C. Otto Scharmer, “U Theory.”

image PDCA Cycle and U-Curve Relationship U-Curve Supplemental Slide U-Curve ← State of affairs where you can see it but are not looking at it properly because of assumptions Wednesday, September 17, 14, 68 C. Otto Scharmer, “U Theory.”

image PDCA Cycle and U-Curve Relationship U-Curve Supplemental Slide U-Curve ← I see it, but only from my perspective. State behavior “they won’t do it because they won’t do it,” we think. Drawing boundaries between self and othersWednesday, 9/17/1469 C. Otto Scharmer, “U Theory.”

image Q: Isn’t it also important how the modeling is done? Wednesday, September 17, 1470

image A: Yes, it’s important.Wednesday, 9/17/1471

image You can read the entire three chapters of this special issue on the web at http://gihyo.jp/lifestyle/feature/01/engineer-studying Wednesday, September 17, 14 http://gihyo.jp/lifestyle/feature/01/engineer-studying 72

image A: Hypotheses are created from experience. The feeling of “understanding” is also a hypothesis. Hypotheses need to be tested by experimentation. Act on the understanding and check the results Wednesday, September 17, 1473

image A: If the results of an action differ from expectations, the model needs to be modified. Repeating this process creates a “likely correct” model, which is then combined to create a larger model. This is one methodology Wednesday, September 17, 1474

image A: Another methodology, the KJ method or grounded theory, is used in the humanities, where experimentation is not easy.14 Wednesday, September 17, 75

image A: First collect a large amount of data from interviews, etc., and then list it without filtering it out with your own biases and saying “this is noise” Wednesday, September 17, 14, 76

image A: Human working memory is only about seven, but if you put the data on paper and spread it out on a desk, you can see 100 or 200 Wednesday, September 17, 14, 77

image A: After making a list of 100 data, build a model by moving them around on the desk, which is the KJ method (I failed to mention this at the meeting, but it is also important to build a structure from the data bottom-up, rather than applying Existing Structure in a top-down manner). (Incidentally, the book and feature article I introduced above were modeled using the KJ method on Wednesday, September 17, 200278)

image Question Q in OïŹƒce Hour: Aren’t the 5 ways to notice blind spots not parallel but back and forth in time? Wednesday, September 17, 1479.

image A: That was a blind spot! It’s true that abstractions can’t be used out of the blue, right from the start. If someone with no programming experience reads a book on design patterns, they won’t be able to connect it to their own experience.Wednesday, September 17, 1480

image Q: How can we share our testing expertise among testers (detailed situation description omitted) Wednesday 9/17/14 81

image A: It seems to me that the question is how to share knowledge that is not verbalized. One methodology is “working together. “82 Wednesday, 9/17/14

image A: By working together, know-how can be shared without verbalization. Furthermore, separating “those who instruct without operating and those who operate” encourages the verbalization of knowledge in order to instruct.14 Wednesday, September 17, 2002Reference “A group of mediocre geniuses can beat a lone genius. “83

image A: Only when verbalization is done can manualization, etc. be done. Linguization is a rather difficult task, so if it is suddenly left to each individual without training that skill, it will not work.Wednesday, September 17, 1484

image Unverbalized Knowledge Supplement Slides Knowledge is created by turning this spiral “The Knowledge Creation Enterprise” p93 85 Wednesday, September 17, 14

image Unverbalized Knowledge Supplemental SlidesupPair Pro/Collaborative Work is the equivalent here Knowledge is created by turning this spiral “The Knowledge Creation Enterprise” p93 86 Wednesday, September 17, 14

image Q: I am creating a template for verbalizing information. Answer the questions and you will have the information you need.Wednesday, 9/17/14 87

image A: That is a good approach. Often, even those who can’t do it when told to “verbalize,” can answer when asked specific questions. Asking the right questions is important.Wednesday, September 17, 1488

image A: In that sense, there are advantages to templating. However, we need to be aware of the disadvantage that information that cannot be expressed in a template is discarded. New and important information is not templated.Wednesday, September 17, 1489


This page is auto-translated from [/nishio/PyCon JP 2014 ćŸșèȘżèŹ›æŒ”](https://scrapbox.io/nishio/PyCon JP 2014 ćŸșèȘżèŹ›æŒ”) using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I’m very happy to spread my thought to non-Japanese readers.