Version 9 (modified by sgk, 13 years ago) (diff)



PyCon2007 >> 2007/2/25

Testable network programming via the Network Gateway Interface



  • Sockets considered harmful
    • テストのときソケットを作ってしまう。
    • Not deterministic
  • Threads and Processes in Tests
  • Zope Enterprise Objects
    • Asyncore based
    • テストが大変。テストを書くのも大変。

"Network Gateway Interface"

  • テストのしやすさを考えて設計した
  • アプリの実装とソケットを分離。アプリの実装ではソケットを使わない。
  • イベントベース
  • Should have used twisted.
  • 「テストの時にソケットを使わない」というアイデア



  • zc.ngi.adapters.Lines
  • zc.ngi.adapters.Sized


Event-based APIは面倒なときもある。-- zc.ngi.blocking provides a file-like API.

"I developed NGI under the mistaken impression that Twisted wouldn't suport this style of programming"

  • 1.0 released shortly before PyCon. This will likely be the last release.
  • I will almost certainly switch to Twisted.

あわわ。こんな結論? いずれにしても、「ソケットを使わなければ、ネットワークアプリのテストが楽になる」と。

Keynote: Computer Literacy

by Mr. Robert M. Lefkowitz


ううう。Brianの言うとおり、話が難しい人だ…。 いきなり、トーマス・ジェファーソンの言葉の引用から始まる。 お芝居のような抑揚でしゃべる人だ。

CP4E -- Computer Programming for Education

Free Software

  • ソースの有無なんて、読める人だけに意味がある。
  • 読めるのは人口の2%だけだ。

Why Johnny can't code.


  • プログラミングは、単なるコンピュータへの指示ではなく、アイデアや考えの発露である。
  • Rhetoric=Programming is the art of communicating through symbols ideas about reality.
  • Computer literacy generally refers to the ability to use applications rather than to program.


If everyone had to read and study the source code of a (set of) program(s) in high school, which one would you pick?

Moshe Zadke -- Writing a PEP for something you have implemented is just as hard as writing a PEP for something you haven't implemented.

What would it take to design a programming language that would be expressive enough to communicate through symbols ideas about reality.

Literary Work -- Why is all the code for an application not in one file?

Programing as Rhetoric -- プログラミングは作文だ。

Rhetoric Application Architecture

  • introduction
  • background
  • proof
  • refutation
  • conclusion

In the beginning was a command line. -- Neal Stephanson

Dijkstra -- APL is a mistake, carried through to perfection. It is the language of the future for the programming techniques of the past.

How do you read code out loud?